summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_ctx.c2
-rw-r--r--crypto/bn/bn_intern.c2
-rw-r--r--crypto/bn/bn_lib.c2
-rw-r--r--crypto/bn/bn_mont.c2
-rw-r--r--crypto/bn/bn_rand.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c
index 756d404c13..19ff68e1eb 100644
--- a/crypto/bn/bn_ctx.c
+++ b/crypto/bn/bn_ctx.c
@@ -204,7 +204,7 @@ BN_CTX *BN_CTX_secure_new(void)
{
BN_CTX *ret = BN_CTX_new();
- if (ret)
+ if (ret != NULL)
ret->flags = BN_FLG_SECURE;
return ret;
}
diff --git a/crypto/bn/bn_intern.c b/crypto/bn/bn_intern.c
index 0b222517d4..abc8fc45a1 100644
--- a/crypto/bn/bn_intern.c
+++ b/crypto/bn/bn_intern.c
@@ -74,7 +74,7 @@ signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len)
if (BN_is_zero(scalar)) {
r = OPENSSL_malloc(1);
- if (!r) {
+ if (r == NULL) {
BNerr(BN_F_BN_COMPUTE_WNAF, ERR_R_MALLOC_FAILURE);
goto err;
}
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index 3b07d7d28c..2042920d35 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -287,7 +287,7 @@ BIGNUM *BN_new(void)
BIGNUM *BN_secure_new(void)
{
BIGNUM *ret = BN_new();
- if (ret)
+ if (ret != NULL)
ret->flags |= BN_FLG_SECURE;
return (ret);
}
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c
index d4d817a74f..bda2157aa5 100644
--- a/crypto/bn/bn_mont.c
+++ b/crypto/bn/bn_mont.c
@@ -517,7 +517,7 @@ BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
* (the losers throw away the work they've done).
*/
ret = BN_MONT_CTX_new();
- if (!ret)
+ if (ret == NULL)
return NULL;
if (!BN_MONT_CTX_set(ret, mod, ctx)) {
BN_MONT_CTX_free(ret);
diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c
index 2764c8a307..66a175c32a 100644
--- a/crypto/bn/bn_rand.c
+++ b/crypto/bn/bn_rand.c
@@ -315,7 +315,7 @@ int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
int ret = 0;
k_bytes = OPENSSL_malloc(num_k_bytes);
- if (!k_bytes)
+ if (k_bytes == NULL)
goto err;
/* We copy |priv| into a local buffer to avoid exposing its length. */