提交 1b36b201 编写于 作者: J Joe Perches 提交者: Linus Torvalds

checkpatch: Allow comments in macros tested for single statements

Convert all the comments to spaces before testing for single statement
macros.
Reported-by: NValdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 327953e9
......@@ -4260,6 +4260,7 @@ sub process {
$ctx = $dstat;
$dstat =~ s/\\\n.//g;
$dstat =~ s/$;/ /g;
if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) {
my $stmts = $2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册