Commit d0510af2 authored by Blue Swirl's avatar Blue Swirl

checkpatch: Fix bracing false positives on #if

789f88d0 only fixed #else,
fix also #if.
Reviewed-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent ea15fb06
......@@ -2539,6 +2539,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;
......
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