From 1a01e5c29dfaf09af3960b4c8e6ec0f8171eda80 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Fri, 3 Jun 2022 13:23:36 +0200 Subject: [PATCH] Fix inadvertent NULL assignments in ternary ops As identified by both clang with a warning and $> git grep -P '(? CLA: trivial Reviewed-by: Dmitry Belyavskiy Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18469) --- crypto/encode_decode/decoder_meth.c | 2 +- crypto/encode_decode/encoder_meth.c | 2 +- crypto/store/store_meth.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/encode_decode/decoder_meth.c b/crypto/encode_decode/decoder_meth.c index 404ad38d973..a08705abb38 100644 --- a/crypto/encode_decode/decoder_meth.c +++ b/crypto/encode_decode/decoder_meth.c @@ -383,7 +383,7 @@ inner_ossl_decoder_fetch(struct decoder_data_st *methdata, ERR_raise_data(ERR_LIB_OSSL_DECODER, code, "%s, Name (%s : %d), Properties (%s)", ossl_lib_ctx_get_descriptor(methdata->libctx), - name = NULL ? "" : name, id, + name == NULL ? "" : name, id, properties == NULL ? "" : properties); } diff --git a/crypto/encode_decode/encoder_meth.c b/crypto/encode_decode/encoder_meth.c index 5309838ff2c..7571570d281 100644 --- a/crypto/encode_decode/encoder_meth.c +++ b/crypto/encode_decode/encoder_meth.c @@ -392,7 +392,7 @@ inner_ossl_encoder_fetch(struct encoder_data_st *methdata, ERR_raise_data(ERR_LIB_OSSL_ENCODER, code, "%s, Name (%s : %d), Properties (%s)", ossl_lib_ctx_get_descriptor(methdata->libctx), - name = NULL ? "" : name, id, + name == NULL ? "" : name, id, properties == NULL ? "" : properties); } diff --git a/crypto/store/store_meth.c b/crypto/store/store_meth.c index e41470a3d13..6f21d8f98f1 100644 --- a/crypto/store/store_meth.c +++ b/crypto/store/store_meth.c @@ -330,7 +330,7 @@ inner_loader_fetch(struct loader_data_st *methdata, "%s%s, Scheme (%s : %d), Properties (%s)", helpful_msg, ossl_lib_ctx_get_descriptor(methdata->libctx), - scheme = NULL ? "" : scheme, id, + scheme == NULL ? "" : scheme, id, properties == NULL ? "" : properties); } -- 2.47.2