History

checkpatch: indent checks -- stop when we run out of continuation lines

Ensure we terminate when there are no futher continuation lines when trying to determine relative indent of conditionals and their blocks.

Andy Whitcroft committed 17 years ago

Commit 30dad6e1 parent 113f04a1 file · +3 −2Browse files

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

Unified · Split

scripts/checkpatch.pl+3−2
@@ -1547,8 +1547,9 @@ sub process { · 1546 unmodified lines
15471547 $s =~ /^\s*#\s*?/ ||
15481548 $s =~ /^\s*$Ident\s*:/) {
15491549 $continuation = ($s =~ /^.*?\\\n/) ? 1 : 0;
1550− $s =~ s/^.*?\n//;
1551− $cond_lines++;
1550+ if ($s =~ s/^.*?\n//) {
1551+ $cond_lines++;
1552+ }
15521553 }
15531554 }
15541555