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

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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t