checkpatch: Update alignment check
Parenthesis alignment doesn't correctly check an existing line after an inserted or modified line with an open parenthesis. Fix it. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4ed940d4c3
commit
b34a26f315
|
@ -1848,8 +1848,8 @@ sub process {
|
||||||
|
|
||||||
my $pos = pos_last_openparen($rest);
|
my $pos = pos_last_openparen($rest);
|
||||||
if ($pos >= 0) {
|
if ($pos >= 0) {
|
||||||
$line =~ /^\+([ \t]*)/;
|
$line =~ /^(\+| )([ \t]*)/;
|
||||||
my $newindent = $1;
|
my $newindent = $2;
|
||||||
|
|
||||||
my $goodtabindent = $oldindent .
|
my $goodtabindent = $oldindent .
|
||||||
"\t" x ($pos / 8) .
|
"\t" x ($pos / 8) .
|
||||||
|
|
Loading…
Reference in New Issue