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/dso/dso_dl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/dso/dso_dl.c') diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 2b95f92eca..5315e99be7 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -238,7 +238,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2) */ if (!filespec2 || filespec1[0] == '/') { merged = OPENSSL_malloc(strlen(filespec1) + 1); - if (!merged) { + if (merged == NULL) { DSOerr(DSO_F_DL_MERGER, ERR_R_MALLOC_FAILURE); return (NULL); } @@ -249,7 +249,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2) */ else if (!filespec1) { merged = OPENSSL_malloc(strlen(filespec2) + 1); - if (!merged) { + if (merged == NULL) { DSOerr(DSO_F_DL_MERGER, ERR_R_MALLOC_FAILURE); return (NULL); } @@ -273,7 +273,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2) len--; } merged = OPENSSL_malloc(len + 2); - if (!merged) { + if (merged == NULL) { DSOerr(DSO_F_DL_MERGER, ERR_R_MALLOC_FAILURE); return (NULL); } -- cgit v1.2.3