mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
checkpatch: Fix bracing false positives on #if
789f88d0b2 only fixed #else,
fix also #if.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
ea15fb0672
commit
d0510af26d
1 changed files with 1 additions and 0 deletions
|
|
@ -2539,6 +2539,7 @@ sub process {
|
||||||
}
|
}
|
||||||
if (!defined $suppress_ifbraces{$linenr - 1} &&
|
if (!defined $suppress_ifbraces{$linenr - 1} &&
|
||||||
$line =~ /\b(if|while|for|else)\b/ &&
|
$line =~ /\b(if|while|for|else)\b/ &&
|
||||||
|
$line !~ /\#\s*if/ &&
|
||||||
$line !~ /\#\s*else/) {
|
$line !~ /\#\s*else/) {
|
||||||
my $allowed = 0;
|
my $allowed = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue