checkpatch: Fix bracing false positives on #else
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
b947c12c0b
commit
789f88d0b2
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user