From: Pauli Date: Tue, 24 Jan 2023 01:23:37 +0000 (+1100) Subject: Fix Coverity 1520485: logically dead code X-Git-Tag: openssl-3.2.0-alpha1~1379 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01a17b24f6649fc192ba6bb9ea34e28ce9678e6c;p=thirdparty%2Fopenssl.git Fix Coverity 1520485: logically dead code The check is unnecessary as the condition is already checked before the switch statement. Reviewed-by: Hugo Landau Reviewed-by: David von Oheimb Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/20121) --- diff --git a/crypto/cmp/cmp_ctx.c b/crypto/cmp/cmp_ctx.c index d01be8ebc75..dcad9c89415 100644 --- a/crypto/cmp/cmp_ctx.c +++ b/crypto/cmp/cmp_ctx.c @@ -919,13 +919,9 @@ int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val) ctx->keep_alive = val; break; case OSSL_CMP_OPT_MSG_TIMEOUT: - if (val < 0) - val = 0; ctx->msg_timeout = val; break; case OSSL_CMP_OPT_TOTAL_TIMEOUT: - if (val < 0) - val = 0; ctx->total_timeout = val; break; case OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR: