mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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. Reported-by: John Daiker <[email protected]> Signed-off-by: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
113f04a836
commit
30dad6ebec
1 file changed
+3
-2
@@ -1547,8 +1547,9 @@ sub process {
|
||||
$s =~ /^\s*#\s*?/ ||
|
||||
$s =~ /^\s*$Ident\s*:/) {
|
||||
$continuation = ($s =~ /^.*?\\\n/) ? 1 : 0;
|
||||
$s =~ s/^.*?\n//;
|
||||
$cond_lines++;
|
||||
if ($s =~ s/^.*?\n//) {
|
||||
$cond_lines++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user