From 75ebbd9aa411c5b8b19ded6ace2b34181566b56a Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Wed, 6 May 2015 13:43:59 -0400 Subject: Use p==NULL not !p (in if statements, mainly) Reviewed-by: Tim Hudson --- crypto/asn1/a_mbstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/asn1/a_mbstr.c') diff --git a/crypto/asn1/a_mbstr.c b/crypto/asn1/a_mbstr.c index 2ff496b4fd..ddb2798069 100644 --- a/crypto/asn1/a_mbstr.c +++ b/crypto/asn1/a_mbstr.c @@ -235,7 +235,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, cpyfunc = cpy_utf8; break; } - if (!(p = OPENSSL_malloc(outlen + 1))) { + if ((p = OPENSSL_malloc(outlen + 1)) == NULL) { if (free_out) ASN1_STRING_free(dest); ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ERR_R_MALLOC_FAILURE); -- cgit v1.2.3