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 <daikerjohn@gmail.com> Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
113f04a836
commit
30dad6ebec
1 changed files with 3 additions and 2 deletions
|
@ -1547,10 +1547,11 @@ sub process {
|
|||
$s =~ /^\s*#\s*?/ ||
|
||||
$s =~ /^\s*$Ident\s*:/) {
|
||||
$continuation = ($s =~ /^.*?\\\n/) ? 1 : 0;
|
||||
$s =~ s/^.*?\n//;
|
||||
if ($s =~ s/^.*?\n//) {
|
||||
$cond_lines++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my (undef, $sindent) = line_stats("+" . $s);
|
||||
my $stat_real = raw_line($linenr, $cond_lines);
|
||||
|
|
Loading…
Reference in a new issue