]> git.proxmox.com Git - qemu.git/blobdiff - scripts/checkpatch.pl
checkpatch: Fix bracing false positives on #if
[qemu.git] / scripts / checkpatch.pl
index 70a2111d197a4bcb061520422bc3fd03257e19de..3498425fff68fe48292df2115177deb97e3bbb3d 100755 (executable)
@@ -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;