[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #if
From: |
Blue Swirl |
Subject: |
[Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #if |
Date: |
Sun, 17 Jul 2011 11:48:38 +0300 |
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,
fix also #if.
Signed-off-by: Blue Swirl <address@hidden>
---
scripts/checkpatch.pl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 075b614..9bc867f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2537,6 +2537,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;
--
1.6.2.4
- [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #if,
Blue Swirl <=