History

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.

Joe Perches committed 9 years ago

Commit ca819861 parent fe658f91 file · +1 −1Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−1
@@ -3219,7 +3219,7 @@ sub process { · 3218 unmodified lines
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);