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/ec/ec_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/ec/ec_lib.c')
-rw-r--r-- | crypto/ec/ec_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 793645de8a..7cb4759f65 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -91,10 +91,10 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) ret->meth = meth; ret->order = BN_new(); - if (!ret->order) + if (ret->order == NULL) goto err; ret->cofactor = BN_new(); - if (!ret->cofactor) + if (ret->cofactor == NULL) goto err; ret->asn1_flag = OPENSSL_EC_NAMED_CURVE; ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED; @@ -464,9 +464,9 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx) EC_GROUP_get_curve_name(a) != EC_GROUP_get_curve_name(b)) return 1; - if (!ctx) + if (ctx == NULL) ctx_new = ctx = BN_CTX_new(); - if (!ctx) + if (ctx == NULL) return -1; BN_CTX_start(ctx); @@ -476,7 +476,7 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx) b1 = BN_CTX_get(ctx); b2 = BN_CTX_get(ctx); b3 = BN_CTX_get(ctx); - if (!b3) { + if (b3 == NULL) { BN_CTX_end(ctx); BN_CTX_free(ctx_new); return -1; @@ -1075,7 +1075,7 @@ int ec_precompute_mont_data(EC_GROUP *group) goto err; group->mont_data = BN_MONT_CTX_new(); - if (!group->mont_data) + if (group->mont_data == NULL) goto err; if (!BN_MONT_CTX_set(group->mont_data, group->order, ctx)) { |