History

checkpatch: Allow comments in macros tested for single statements

Convert all the comments to spaces before testing for single statement macros.

Joe Perches committed 11 years ago

Commit 1b36b201 parent 327953e1 file · +1 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−0
@@ -4260,6 +4260,7 @@ sub process { · 4259 unmodified lines
4260 $ctx = $dstat;4260 $ctx = $dstat;
4261 4261
4262 $dstat =~ s/\\\n.//g;4262 $dstat =~ s/\\\n.//g;
4263 $dstat =~ s/$;/ /g;
4263 4264
4264 if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) {4265 if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) {
4265 my $stmts = $2;4266 my $stmts = $2;