diff options
author | Rich Salz <rsalz@akamai.com> | 2019-09-16 15:28:57 -0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-09 21:32:15 +0200 |
commit | 12a765a5235f181c2f4992b615eb5f892c368e88 (patch) | |
tree | 67ece1a3fb210bd4895aea73649773fc912a60d6 /crypto/pkcs12/p12_key.c | |
parent | 3a4e43de473ee80347036d78163889b6b1221210 (diff) |
Explicitly test against NULL; do not use !p or similar
Also added blanks lines after declarations in a couple of places.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9916)
Diffstat (limited to 'crypto/pkcs12/p12_key.c')
-rw-r--r-- | crypto/pkcs12/p12_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c index 3580754a58..4849cbd5bc 100644 --- a/crypto/pkcs12/p12_key.c +++ b/crypto/pkcs12/p12_key.c @@ -26,7 +26,7 @@ int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, unsigned char *unipass; int uniplen; - if (!pass) { + if (pass == NULL) { unipass = NULL; uniplen = 0; } else if (!OPENSSL_asc2uni(pass, passlen, &unipass, &uniplen)) { @@ -49,7 +49,7 @@ int PKCS12_key_gen_utf8(const char *pass, int passlen, unsigned char *salt, unsigned char *unipass; int uniplen; - if (!pass) { + if (pass == NULL) { unipass = NULL; uniplen = 0; } else if (!OPENSSL_utf82uni(pass, passlen, &unipass, &uniplen)) { |