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/dsa/dsa_ossl.c | |
parent | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff) |
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/dsa/dsa_ossl.c')
-rw-r--r-- | crypto/dsa/dsa_ossl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index 19a75834fb..34b4a4ea4a 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -144,7 +144,7 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) m = BN_new(); xr = BN_new(); - if (!m || !xr) + if (m == NULL || xr == NULL) goto err; if (!dsa->p || !dsa->q || !dsa->g) { @@ -242,7 +242,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, k = BN_new(); kq = BN_new(); - if (!k || !kq) + if (k == NULL || kq == NULL) goto err; if (ctx_in == NULL) { @@ -356,7 +356,7 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, u2 = BN_new(); t1 = BN_new(); ctx = BN_CTX_new(); - if (!u1 || !u2 || !t1 || !ctx) + if (u1 == NULL || u2 == NULL || t1 == NULL || ctx == NULL) goto err; if (BN_is_zero(sig->r) || BN_is_negative(sig->r) || |