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/objects/o_names.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/objects/o_names.c') diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c index 7a24ad0..d7441ca 100644 --- a/crypto/objects/o_names.c +++ b/crypto/objects/o_names.c @@ -85,7 +85,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *), MemCheck_off(); name_funcs = OPENSSL_zalloc(sizeof(*name_funcs)); MemCheck_on(); - if (!name_funcs) { + if (name_funcs == NULL) { OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX, ERR_R_MALLOC_FAILURE); return (0); } @@ -308,7 +308,7 @@ void OBJ_NAME_do_all_sorted(int type, d.names = OPENSSL_malloc(sizeof(*d.names) * lh_OBJ_NAME_num_items(names_lh)); /* Really should return an error if !d.names...but its a void function! */ - if (d.names) { + if (d.names != NULL) { d.n = 0; OBJ_NAME_do_all(type, do_all_sorted_fn, &d); -- cgit v1.1