From: Blue Swirl Date: Fri, 15 Jul 2011 20:09:10 +0000 (+0000) Subject: checkpatch: Fix bracing false positives on #if X-Git-Tag: v0.15.0-rc0~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0510af26d854f714114a312eb4aed0649447eb2;p=thirdparty%2Fqemu.git checkpatch: Fix bracing false positives on #if 789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else, fix also #if. Reviewed-by: Stefan Hajnoczi Signed-off-by: Blue Swirl --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 70a2111d197..3498425fff6 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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;