diff options
author | Pauli <pauli@openssl.org> | 2021-12-08 02:16:42 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-12-09 23:47:09 +0100 |
commit | f0fc3c10d0617821a476b34aba1ee77d47a2a64a (patch) | |
tree | 30b7fe61f5c177f7a9d97baa063c3c1e732ddfab /apps/lib/opt.c | |
parent | APPS/cmp: Fix use of OPENSSL_NO_SOCK: options like -server do not make sense ... (diff) | |
download | openssl-f0fc3c10d0617821a476b34aba1ee77d47a2a64a.tar.xz openssl-f0fc3c10d0617821a476b34aba1ee77d47a2a64a.zip |
fix Coverity 1494649: dead code
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17230)
Diffstat (limited to '')
-rw-r--r-- | apps/lib/opt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/lib/opt.c b/apps/lib/opt.c index 3925ec96c3..7967fa7956 100644 --- a/apps/lib/opt.c +++ b/apps/lib/opt.c @@ -1036,14 +1036,14 @@ int opt_check_rest_arg(const char *expected) return 1; opt_printf_stderr("%s: Missing argument: %s\n", prog, expected); return 0; - } else if (expected != NULL) { - return 1; } + if (expected != NULL) + return 1; if (opt_unknown() == NULL) opt_printf_stderr("%s: Extra option: \"%s\"\n", prog, opt); else opt_printf_stderr("%s: Extra (unknown) options: \"%s\" \"%s\"\n", - prog, opt_unknown(), opt != NULL ? opt : ""); + prog, opt_unknown(), opt); return 0; } |