提交 30dad6eb 编写于 作者: A Andy Whitcroft 提交者: 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: NJohn Daiker <daikerjohn@gmail.com>
Signed-off-by: NAndy Whitcroft <apw@canonical.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 113f04a8
......@@ -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++;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册