find-doc-nits -c: Fix handling in case expected helpstr is not found
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 18 May 2021 09:23:13 +0000 (11:23 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Wed, 19 May 2021 12:13:12 +0000 (14:13 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15329)

util/find-doc-nits

index e8439b8626129b875606a75ee5188797cb352a51..fd465f6d0be0315eff78cb0520c5665e32ee9a29 100755 (executable)
@@ -1048,7 +1048,8 @@ sub checkflags {
                 next if m/^\s*#\s*if/;
                 err("$cmd does not implement help for -$expect_helpstr") unless m/^\s*"/;
                 $expect_helpstr = "";
-            } elsif (m/\{\s*"([^"]+)"\s*,\s*OPT_[A-Z0-9_]+\s*,\s*('[-\/:<>cEfFlMnNpsuU]'|0)\s*,(.*)$/
+            }
+            if (m/\{\s*"([^"]+)"\s*,\s*OPT_[A-Z0-9_]+\s*,\s*('[-\/:<>cEfFlMnNpsuU]'|0)\s*,(.*)$/
                        && !($cmd eq "s_client" && $1 eq "wdebug")) {
                 push @cmdopts, $1;
                 $expect_helpstr = $1;