diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 12:12:26 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 23:48:41 +0100 |
commit | 90945fa31a42dcf3beb90540c618e4d627c595ea (patch) | |
tree | e73870c253abf0c37ca618384e30a7937a996b55 /crypto/engine/eng_openssl.c | |
parent | Standardise our style for checking malloc failures (diff) | |
download | openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.tar.xz openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.zip |
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_openssl.c')
-rw-r--r-- | crypto/engine/eng_openssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 244a6096c6..41754f7627 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -186,7 +186,7 @@ static int bind_helper(ENGINE *e) static ENGINE *engine_openssl(void) { ENGINE *ret = ENGINE_new(); - if (!ret) + if (ret == NULL) return NULL; if (!bind_helper(ret)) { ENGINE_free(ret); @@ -429,7 +429,7 @@ static int ossl_hmac_init(EVP_PKEY_CTX *ctx) OSSL_HMAC_PKEY_CTX *hctx; hctx = OPENSSL_zalloc(sizeof(*hctx)); - if (!hctx) + if (hctx == NULL) return 0; hctx->ktmp.type = V_ASN1_OCTET_STRING; HMAC_CTX_init(&hctx->ctx); @@ -579,7 +579,7 @@ static int ossl_register_hmac_meth(void) { EVP_PKEY_METHOD *meth; meth = EVP_PKEY_meth_new(EVP_PKEY_HMAC, 0); - if (!meth) + if (meth == NULL) return 0; EVP_PKEY_meth_set_init(meth, ossl_hmac_init); EVP_PKEY_meth_set_copy(meth, ossl_hmac_copy); |