Skip to content

Commit ca81986

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: fix stepping through statements with $stat and ctx_statement_block
Fix the off-by-one in the suppression of lines in a statement block. This means that for multiple line statements like foo(bar, baz, qux); $stat has been inspected first correctly for the entire statement, and subsequently incorrectly just for qux); This fix will help make tracking appropriate indentation a little easier. Link: http://lkml.kernel.org/r/71b25979c90412133c717084036c9851cd2b7bcb.1496862585.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent fe658f9 commit ca81986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/checkpatch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3219,7 +3219,7 @@ sub process {
32193219
my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
32203220
$realline_next);
32213221
#print "LINE<$line>\n";
3222-
if ($linenr >= $suppress_statement &&
3222+
if ($linenr > $suppress_statement &&
32233223
$realcnt && $sline =~ /.\s*\S/) {
32243224
($stat, $cond, $line_nr_next, $remain_next, $off_next) =
32253225
ctx_statement_block($linenr, $realcnt, 0);

0 commit comments

Comments
 (0)