From 90945fa31a42dcf3beb90540c618e4d627c595ea Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 30 Oct 2015 11:12:26 +0000 Subject: Continue standardising malloc style for libcrypto Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx --- crypto/asn1/tasn_new.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/asn1/tasn_new.c') 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; -- cgit v1.2.3