Commit 30dad6eb authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

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: default avatarJohn Daiker <daikerjohn@gmail.com>
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 113f04a8
...@@ -1547,8 +1547,9 @@ sub process { ...@@ -1547,8 +1547,9 @@ sub process {
$s =~ /^\s*#\s*?/ || $s =~ /^\s*#\s*?/ ||
$s =~ /^\s*$Ident\s*:/) { $s =~ /^\s*$Ident\s*:/) {
$continuation = ($s =~ /^.*?\\\n/) ? 1 : 0; $continuation = ($s =~ /^.*?\\\n/) ? 1 : 0;
$s =~ s/^.*?\n//; if ($s =~ s/^.*?\n//) {
$cond_lines++; $cond_lines++;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment