summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2017-09-02 12:58:55 +0100
committerPatrick Monnerat <patrick@monnerat.net>2017-09-02 12:58:55 +0100
commitea4e7bdc81a69aace3b9db00d2aea8a5048696b7 (patch)
treedf8405cec9a2384b34de220d066ab5f4965667e7
parent989e4d4a31d094d1390b55a1888ac26765c18757 (diff)
downloadcurl-ea4e7bdc81a69aace3b9db00d2aea8a5048696b7.tar.gz
checksrc: disable SPACEBEFOREPAREN for case statement.
The case keyword may be followed by a constant expression and thus should allow it to start with an open parenthesis.
-rwxr-xr-xlib/checksrc.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index 2eff3e0cf..b9fa9362f 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -345,6 +345,9 @@ sub scanfile {
elsif($3 eq "return") {
# return must have a space
}
+ elsif($3 eq "case") {
+ # case must have a space
+ }
elsif($4 eq "*") {
# (* beginning makes the space OK!
}