diff options
author | Rich Salz <rsalz@akamai.com> | 2019-09-16 22:28:57 +0300 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-09 22:32:15 +0300 |
commit | 12a765a5235f181c2f4992b615eb5f892c368e88 (patch) | |
tree | 67ece1a3fb210bd4895aea73649773fc912a60d6 /crypto/asn1/d2i_pr.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/asn1/d2i_pr.c')
-rw-r--r-- | crypto/asn1/d2i_pr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index b24f99118e..08101a826b 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -48,7 +48,7 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, EVP_PKEY *tmp; PKCS8_PRIV_KEY_INFO *p8 = NULL; p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); - if (!p8) + if (p8 == NULL) goto err; tmp = EVP_PKCS82PKEY(p8); PKCS8_PRIV_KEY_INFO_free(p8); @@ -104,7 +104,7 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, EVP_PKEY *ret; sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); - if (!p8) { + if (p8 == NULL) { ASN1err(ASN1_F_D2I_AUTOPRIVATEKEY, ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); return NULL; |