diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-06 13:43:59 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-11 10:06:38 -0400 |
commit | 75ebbd9aa411c5b8b19ded6ace2b34181566b56a (patch) | |
tree | 6bc9cd77b2794b25f9cd9aac1c66f4626fb975a5 /crypto/pem/pem_pk8.c | |
parent | 344c271eb339fc2982e9a3584a94e51112d84584 (diff) |
Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/pem/pem_pk8.c')
-rw-r--r-- | crypto/pem/pem_pk8.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/pem/pem_pk8.c b/crypto/pem/pem_pk8.c index 529d077a9a..52b40fe5ea 100644 --- a/crypto/pem/pem_pk8.c +++ b/crypto/pem/pem_pk8.c @@ -116,7 +116,8 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, PKCS8_PRIV_KEY_INFO *p8inf; char buf[PEM_BUFSIZE]; int ret; - if (!(p8inf = EVP_PKEY2PKCS8(x))) { + + if ((p8inf = EVP_PKEY2PKCS8(x)) == NULL) { PEMerr(PEM_F_DO_PK8PKEY, PEM_R_ERROR_CONVERTING_PRIVATE_KEY); return 0; } @@ -224,7 +225,8 @@ static int do_pk8pkey_fp(FILE *fp, EVP_PKEY *x, int isder, int nid, { BIO *bp; int ret; - if (!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) { + + if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) { PEMerr(PEM_F_DO_PK8PKEY_FP, ERR_R_BUF_LIB); return (0); } @@ -238,7 +240,8 @@ EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, { BIO *bp; EVP_PKEY *ret; - if (!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) { + + if ((bp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) { PEMerr(PEM_F_D2I_PKCS8PRIVATEKEY_FP, ERR_R_BUF_LIB); return NULL; } |