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/evp/pmeth_lib.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/evp/pmeth_lib.c')
-rw-r--r-- | crypto/evp/pmeth_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 67ba16d85e..bbc4565816 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -160,7 +160,7 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) } ret = OPENSSL_zalloc(sizeof(*ret)); - if (!ret) { + if (ret == NULL) { #ifndef OPENSSL_NO_ENGINE if (e) ENGINE_finish(e); @@ -190,7 +190,7 @@ EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags) EVP_PKEY_METHOD *pmeth; pmeth = OPENSSL_zalloc(sizeof(*pmeth)); - if (!pmeth) + if (pmeth == NULL) return NULL; pmeth->pkey_id = id; @@ -277,7 +277,7 @@ EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) } #endif rctx = OPENSSL_malloc(sizeof(*rctx)); - if (!rctx) + if (rctx == NULL) return NULL; rctx->pmeth = pctx->pmeth; @@ -311,7 +311,7 @@ int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth) { if (app_pkey_methods == NULL) { app_pkey_methods = sk_EVP_PKEY_METHOD_new(pmeth_cmp); - if (!app_pkey_methods) + if (app_pkey_methods == NULL) return 0; } if (!sk_EVP_PKEY_METHOD_push(app_pkey_methods, pmeth)) |