Skip to content

Commit b34a26f

Browse files
JoePerchestorvalds
authored andcommitted
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>
1 parent 4ed940d commit b34a26f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/checkpatch.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,8 +1848,8 @@ sub process {
18481848

18491849
my $pos = pos_last_openparen($rest);
18501850
if ($pos >= 0) {
1851-
$line =~ /^\+([ \t]*)/;
1852-
my $newindent = $1;
1851+
$line =~ /^(\+| )([ \t]*)/;
1852+
my $newindent = $2;
18531853

18541854
my $goodtabindent = $oldindent .
18551855
"\t" x ($pos / 8) .

0 commit comments

Comments
 (0)