Commit 789f88d0 authored by Jan Kiszka's avatar Jan Kiszka Committed by Blue Swirl

checkpatch: Fix bracing false positives on #else

Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent b947c12c
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment