aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_new.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-30 11:12:26 +0000
committerMatt Caswell <matt@openssl.org>2015-11-09 22:48:41 +0000
commit90945fa31a42dcf3beb90540c618e4d627c595ea (patch)
treee73870c253abf0c37ca618384e30a7937a996b55 /crypto/asn1/tasn_new.c
parenta71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff)
downloadopenssl-90945fa31a42dcf3beb90540c618e4d627c595ea.tar.gz
Continue standardising malloc style for libcrypto
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/asn1/tasn_new.c')
-rw-r--r--crypto/asn1/tasn_new.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c
index 6a2ad62d70..668f6419d1 100644
--- a/crypto/asn1/tasn_new.c
+++ b/crypto/asn1/tasn_new.c
@@ -147,7 +147,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed)
memset(*pval, 0, it->size);
} else {
*pval = OPENSSL_zalloc(it->size);
- if (!*pval)
+ if (*pval == NULL)
goto memerr;
}
asn1_set_choice_selector(pval, -1, it);
@@ -173,7 +173,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed)
memset(*pval, 0, it->size);
} else {
*pval = OPENSSL_zalloc(it->size);
- if (!*pval)
+ if (*pval == NULL)
goto memerr;
}
asn1_do_lock(pval, 0, it);
@@ -341,7 +341,7 @@ static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
case V_ASN1_ANY:
typ = OPENSSL_malloc(sizeof(*typ));
- if (!typ)
+ if (typ == NULL)
return 0;
typ->value.ptr = NULL;
typ->type = -1;