]> granicus.if.org Git - curl/commitdiff
checksrc: disable SPACEBEFOREPAREN for case statement.
authorPatrick Monnerat <patrick@monnerat.net>
Sat, 2 Sep 2017 11:58:55 +0000 (12:58 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Sat, 2 Sep 2017 11:58:55 +0000 (12:58 +0100)
The case keyword may be followed by a constant expression and thus should
allow it to start with an open parenthesis.

lib/checksrc.pl

index 2eff3e0cf4bbfecab80917461fbc65affded6fb2..b9fa9362f4f07d7c361a099ec96120a7759bb86b 100755 (executable)
@@ -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!
             }