diff options
-rwxr-xr-x | scripts/cstyle.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl index 083b30f6e..4df185eb3 100755 --- a/scripts/cstyle.pl +++ b/scripts/cstyle.pl @@ -597,8 +597,9 @@ line: while (<$filehandle>) { if (/\(\s/) { err("whitespace after left paren"); } - # allow "for" statements to have empty "continue" clauses - if (/\s\)/ && !/^\s*for \([^;]*;[^;]*; \)/) { + # Allow "for" statements to have empty "continue" clauses. + # Allow right paren on its own line unless we're being picky (-p). + if (/\s\)/ && !/^\s*for \([^;]*;[^;]*; \)/ && ($picky || !/^\s*\)/)) { err("whitespace before right paren"); } if (/^\s*\(void\)[^ ]/) { |