checkpatch: Fix bracing false positives on #if

789f88d0b2 only fixed #else,
fix also #if.

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-07-15 20:09:10 +00:00
parent ea15fb0672
commit d0510af26d

View File

@ -2539,6 +2539,7 @@ sub process {
}
if (!defined $suppress_ifbraces{$linenr - 1} &&
$line =~ /\b(if|while|for|else)\b/ &&
$line !~ /\#\s*if/ &&
$line !~ /\#\s*else/) {
my $allowed = 0;