]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - util/check-format.pl
check-format.pl: Fix report on space before ';' and allow it after ')'
[thirdparty/openssl.git] / util / check-format.pl
index 836fe30fa910b3aa85cf236e37d2d399bbf9d73b..17bdc0aa15a0ccc1e837d38db862e54b757bb40e 100755 (executable)
@@ -684,7 +684,7 @@ while (<>) { # loop over all lines of all input files
         report("space before '$1'") if $intra_line =~ m/\s(\.|->)/;            # '.' or '->' with preceding space
         report("space after '$1'")  if $intra_line =~ m/(\.|->)\s/;            # '.' or '->' with following space
         $intra_line =~ s/\-\>|\+\+|\-\-/@/g;         # blind '->,', '++', and '--'
-        report("space before '$2'")     if $intra_line =~ m/[^:]\s+(;)/;       # space before ';' but not after ':'
+        report("space before '$1'")     if $intra_line =~ m/[^:)]\s+(;)/;      # space before ';' but not after ':' or ')'
         report("space before '$1'")     if $intra_line =~ m/\s([,)\]])/;       # space before ,)]
         report("space after '$1'")      if $intra_line =~ m/([(\[~!])\s/;      # space after ([~!
         report("space after '$1'")      if $intra_line =~ m/(defined)\s/;      # space after 'defined'