diff options
author | Clemens Lang <cllang@redhat.com> | 2022-06-03 13:23:36 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-06-05 11:09:51 +0200 |
commit | 1a01e5c29dfaf09af3960b4c8e6ec0f8171eda80 (patch) | |
tree | c8236890a03d3e5ccd4bbe5ade80ab945f6d1d5e | |
parent | 5d219937d067a761fb871483369a6020c60a3cb8 (diff) | |
download | openssl-new-1a01e5c29dfaf09af3960b4c8e6ec0f8171eda80.tar.gz |
Fix inadvertent NULL assignments in ternary ops
As identified by both clang with a warning and
$> git grep -P '(?<![!=])= NULL \?'
Signed-off-by: Clemens Lang <cllang@redhat.com>
CLA: trivial
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18469)
-rw-r--r-- | crypto/encode_decode/decoder_meth.c | 2 | ||||
-rw-r--r-- | crypto/encode_decode/encoder_meth.c | 2 | ||||
-rw-r--r-- | 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 404ad38d97..a08705abb3 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 ? "<null>" : name, id, + name == NULL ? "<null>" : name, id, properties == NULL ? "<null>" : properties); } diff --git a/crypto/encode_decode/encoder_meth.c b/crypto/encode_decode/encoder_meth.c index 5309838ff2..7571570d28 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 ? "<null>" : name, id, + name == NULL ? "<null>" : name, id, properties == NULL ? "<null>" : properties); } diff --git a/crypto/store/store_meth.c b/crypto/store/store_meth.c index e41470a3d1..6f21d8f98f 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 ? "<null>" : scheme, id, + scheme == NULL ? "<null>" : scheme, id, properties == NULL ? "<null>" : properties); } |