summaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsa_ossl.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-30 12:12:26 +0100
committerMatt Caswell <matt@openssl.org>2015-11-09 23:48:41 +0100
commit90945fa31a42dcf3beb90540c618e4d627c595ea (patch)
treee73870c253abf0c37ca618384e30a7937a996b55 /crypto/dsa/dsa_ossl.c
parentStandardise our style for checking malloc failures (diff)
downloadopenssl-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/dsa/dsa_ossl.c')
-rw-r--r--crypto/dsa/dsa_ossl.c6
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) ||