]> Git Repo - qemu.git/commitdiff
checkpatch: Fix bracing false positives on #if
authorBlue Swirl <[email protected]>
Fri, 15 Jul 2011 20:09:10 +0000 (20:09 +0000)
committerBlue Swirl <[email protected]>
Wed, 20 Jul 2011 21:07:24 +0000 (21:07 +0000)
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,
fix also #if.

Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
scripts/checkpatch.pl

index 70a2111d197a4bcb061520422bc3fd03257e19de..3498425fff68fe48292df2115177deb97e3bbb3d 100755 (executable)
@@ -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;
 
This page took 0.026376 seconds and 4 git commands to generate.