From 789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 21 Jan 2011 18:19:40 +0100 Subject: checkpatch: Fix bracing false positives on #else Signed-off-by: Jan Kiszka Signed-off-by: Blue Swirl --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/checkpatch.pl') 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. -- cgit v1.1