summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan Kiszka2011-01-21 18:19:40 +0100
committerBlue Swirl2011-01-21 18:32:45 +0100
commit789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 (patch)
treeb298f89336f527590de49548ebb1f579b2fc7fa7 /scripts
parentMerge branch 'usb.4' of git://anongit.freedesktop.org/spice/qemu (diff)
downloadqemu-789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7.tar.gz
qemu-789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7.tar.xz
qemu-789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7.zip
checkpatch: Fix bracing false positives on #else
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
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.