diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl index 083b30f6e8..4df185eb38 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\)[^ ]/) {