]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
util/find-doc-nits: Improve helpstr pattern matching
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Wed, 19 May 2021 07:38:20 +0000 (09:38 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Thu, 20 May 2021 14:24:44 +0000 (16:24 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15299)

util/find-doc-nits

index 7d68f70c0294d111006f4be71fdc4cf18351b5e2..c62307a9ce2222f7c17b26baa0752d115a38046e 100755 (executable)
@@ -1069,11 +1069,11 @@ sub checkflags {
                 err("$cmd does not implement help for -$expect_helpstr") unless m/^\s*"/;
                 $expect_helpstr = "";
             }
-            if (m/\{\s*"([^"]+)"\s*,\s*OPT_[A-Z0-9_]+\s*,\s*('[-\/:<>cEfFlMnNpsuU]'|0)\s*,(.*)$/
-                       && !($cmd eq "s_client" && $1 eq "wdebug")) {
+            if (m/\{\s*"([^"]+)"\s*,\s*OPT_[A-Z0-9_]+\s*,\s*('[-\/:<>cEfFlMnNpsuU]'|0)(.*)$/
+                    && !($cmd eq "s_client" && $1 eq "wdebug")) {
                 push @cmdopts, $1;
                 $expect_helpstr = $1;
-                $expect_helpstr = "" if $3 =~ m/^\s*"/;
+                $expect_helpstr = "" if $3 =~ m/^\s*,\s*"/;
             } elsif (m/[\s,](OPT_[A-Z]+_OPTIONS?)\s*(,|$)/) {
                 push @cmdopts, @{ $genopts{$1} };
             }