diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-01-21 18:19:40 +0100 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-01-21 17:32:45 +0000 |
commit | 789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 (patch) | |
tree | b298f89336f527590de49548ebb1f579b2fc7fa7 /scripts | |
parent | b947c12c0bb217fe09968e652873e0d22b269d68 (diff) |
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-x | scripts/checkpatch.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 55ef43986..4fa06c002 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. |