[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #else
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #else |
Date: |
Fri, 21 Jan 2011 18:19:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Signed-off-by: Jan Kiszka <address@hidden>
---
scripts/checkpatch.pl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 55ef439..4fa06c0 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.
--
1.7.1
- [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #else,
Jan Kiszka <=