From: Jan Kiszka Date: Fri, 21 Jan 2011 17:19:40 +0000 (+0100) Subject: checkpatch: Fix bracing false positives on #else X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7;p=qemu.git checkpatch: Fix bracing false positives on #else Signed-off-by: Jan Kiszka Signed-off-by: Blue Swirl --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 55ef439865..4fa06c002e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2536,7 +2536,8 @@ sub process { } } if (!defined $suppress_ifbraces{$linenr - 1} && - $line =~ /\b(if|while|for|else)\b/) { + $line =~ /\b(if|while|for|else)\b/ && + $line !~ /\#\s*else/) { my $allowed = 0; # Check the pre-context.