]> granicus.if.org Git - curl/commitdiff
checksrc: detect "}else" uses as well
authorDaniel Stenberg <daniel@haxx.se>
Wed, 7 Sep 2011 20:45:43 +0000 (22:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Sep 2011 20:45:43 +0000 (22:45 +0200)
lib/checksrc.pl

index c3e79691ccbdc4cafb5604607f3518dff498ddc9..9f5058ddb57adcd0e2beafb4d8b23042482bbd1c 100755 (executable)
@@ -145,7 +145,7 @@ sub scanfile {
         }
 
         # check for "} else"
-        if($l =~ /^(.*)\} else/) {
+        if($l =~ /^(.*)\} *else/) {
             checkwarn($line, length($1), $file, $l, "else after closing brace on same line");
         }
         # check for "){"