aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_pbe.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-05-06 13:43:59 -0400
committerRich Salz <rsalz@openssl.org>2015-05-11 10:06:38 -0400
commit75ebbd9aa411c5b8b19ded6ace2b34181566b56a (patch)
tree6bc9cd77b2794b25f9cd9aac1c66f4626fb975a5 /crypto/evp/evp_pbe.c
parent344c271eb339fc2982e9a3584a94e51112d84584 (diff)
downloadopenssl-75ebbd9aa411c5b8b19ded6ace2b34181566b56a.tar.gz
Use p==NULL not !p (in if statements, mainly)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/evp/evp_pbe.c')
-rw-r--r--crypto/evp/evp_pbe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c
index 0f325076d4..63b3ad1852 100644
--- a/crypto/evp/evp_pbe.c
+++ b/crypto/evp/evp_pbe.c
@@ -227,9 +227,9 @@ int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
{
EVP_PBE_CTL *pbe_tmp;
- if (!pbe_algs)
+ if (pbe_algs == NULL)
pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
- if (!(pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp)))) {
+ if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL) {
EVPerr(EVP_F_EVP_PBE_ALG_ADD_TYPE, ERR_R_MALLOC_FAILURE);
return 0;
}
@@ -247,6 +247,7 @@ int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
EVP_PBE_KEYGEN *keygen)
{
int cipher_nid, md_nid;
+
if (cipher)
cipher_nid = EVP_CIPHER_nid(cipher);
else