summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authormalc2011-07-22 22:50:37 +0200
committermalc2011-07-22 22:50:37 +0200
commit670acc9bf21474b2a4456a3cd13323e48e35820d (patch)
tree81a794b007c8b94dacf593ef8e5eaea6e90dcdc0 /scripts/checkpatch.pl
parentTCG/PPC: use stack for TCG temps (diff)
parentguest-agent: fix build with OpenBSD (diff)
downloadqemu-670acc9bf21474b2a4456a3cd13323e48e35820d.tar.gz
qemu-670acc9bf21474b2a4456a3cd13323e48e35820d.tar.xz
qemu-670acc9bf21474b2a4456a3cd13323e48e35820d.zip
Merge branch 'master' of git://git.qemu.org/qemu
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 075b6149a3..3498425fff 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2068,8 +2068,10 @@ sub process {
}
# , must have a space on the right.
+ # not required when having a single },{ on one line
} elsif ($op eq ',') {
- if ($ctx !~ /.x[WEC]/ && $cc !~ /^}/) {
+ if ($ctx !~ /.x[WEC]/ && $cc !~ /^}/ &&
+ ($elements[$n] . $elements[$n + 2]) !~ " *}{") {
ERROR("space required after that '$op' $at\n" . $hereptr);
}
@@ -2537,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;