diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 11:12:26 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | 90945fa31a42dcf3beb90540c618e4d627c595ea (patch) | |
tree | e73870c253abf0c37ca618384e30a7937a996b55 /crypto/engine/eng_list.c | |
parent | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff) | |
download | openssl-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/engine/eng_list.c')
-rw-r--r-- | crypto/engine/eng_list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index 54141f3ea6..cfd4f7e25c 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -332,7 +332,7 @@ ENGINE *ENGINE_by_id(const char *id) iterator = engine_list_head; while (iterator && (strcmp(id, iterator->id) != 0)) iterator = iterator->next; - if (iterator) { + if (iterator != NULL) { /* * We need to return a structural reference. If this is an ENGINE * type that returns copies, make a duplicate - otherwise increment @@ -340,7 +340,7 @@ ENGINE *ENGINE_by_id(const char *id) */ if (iterator->flags & ENGINE_FLAGS_BY_ID_COPY) { ENGINE *cp = ENGINE_new(); - if (!cp) + if (cp == NULL) iterator = NULL; else { engine_cpy(cp, iterator); @@ -352,7 +352,7 @@ ENGINE *ENGINE_by_id(const char *id) } } CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); - if (iterator) + if (iterator != NULL) return iterator; /* * Prevent infinite recusrion if we're looking for the dynamic engine. |