aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ecdsa
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-30 11:12:26 +0000
committerMatt Caswell <matt@openssl.org>2015-11-09 22:48:41 +0000
commit90945fa31a42dcf3beb90540c618e4d627c595ea (patch)
treee73870c253abf0c37ca618384e30a7937a996b55 /crypto/ecdsa
parenta71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff)
downloadopenssl-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/ecdsa')
-rw-r--r--crypto/ecdsa/ecs_ossl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ecdsa/ecs_ossl.c b/crypto/ecdsa/ecs_ossl.c
index 27266e9173..bff80f9e11 100644
--- a/crypto/ecdsa/ecs_ossl.c
+++ b/crypto/ecdsa/ecs_ossl.c
@@ -120,7 +120,7 @@ static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in,
r = BN_new(); /* this value is later returned in *rp */
order = BN_new();
X = BN_new();
- if (!k || !r || !order || !X) {
+ if (k == NULL || r == NULL || order == NULL || X == NULL) {
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_MALLOC_FAILURE);
goto err;
}
@@ -265,7 +265,7 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
}
ret = ECDSA_SIG_new();
- if (!ret) {
+ if (ret == NULL) {
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE);
return NULL;
}
@@ -371,7 +371,7 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
}
ctx = BN_CTX_new();
- if (!ctx) {
+ if (ctx == NULL) {
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE);
return -1;
}