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:11:48 +0200 |
commit | dd151560f9aea3edfc7aa8759c1c11f35a11c4a2 (patch) | |
tree | ea11a203a87dd5515ea11c6266dc22615d0d0aaf /crypto/encode_decode | |
parent | 0f4738ab5ef8085b27e89dba91677f892b5b3689 (diff) |
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)
(cherry picked from commit 1a01e5c29dfaf09af3960b4c8e6ec0f8171eda80)
Diffstat (limited to 'crypto/encode_decode')
-rw-r--r-- | crypto/encode_decode/decoder_meth.c | 2 | ||||
-rw-r--r-- | crypto/encode_decode/encoder_meth.c | 2 |
2 files changed, 2 insertions, 2 deletions
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 ? "<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 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 ? "<null>" : name, id, + name == NULL ? "<null>" : name, id, properties == NULL ? "<null>" : properties); } |