From dd151560f9aea3edfc7aa8759c1c11f35a11c4a2 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Fri, 3 Jun 2022 13:23:36 +0200 Subject: 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) (cherry picked from commit 1a01e5c29dfaf09af3960b4c8e6ec0f8171eda80) --- crypto/encode_decode/decoder_meth.c | 2 +- crypto/encode_decode/encoder_meth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/encode_decode') diff --git a/crypto/encode_decode/decoder_meth.c b/crypto/encode_decode/decoder_meth.c index 434385f04f..c797084dd2 100644 --- a/crypto/encode_decode/decoder_meth.c +++ b/crypto/encode_decode/decoder_meth.c @@ -413,7 +413,7 @@ inner_ossl_decoder_fetch(struct decoder_data_st *methdata, int id, 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 52bbd2baac..a7b3461034 100644 --- a/crypto/encode_decode/encoder_meth.c +++ b/crypto/encode_decode/encoder_meth.c @@ -422,7 +422,7 @@ inner_ossl_encoder_fetch(struct encoder_data_st *methdata, int id, 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); } -- cgit v1.2.3