aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/rand_lib.c2
-rw-r--r--crypto/rand/rand_os2.c2
-rw-r--r--crypto/rand/rand_win.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 55c90cc4bf..760de52e25 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -195,7 +195,7 @@ static size_t drbg_get_entropy(DRBG_CTX *ctx, unsigned char **pout,
/* Round up request to multiple of block size */
min_len = ((min_len + 19) / 20) * 20;
*pout = OPENSSL_malloc(min_len);
- if (!*pout)
+ if (*pout == NULL)
return 0;
if (RAND_OpenSSL()->bytes(*pout, min_len) <= 0) {
OPENSSL_free(*pout);
diff --git a/crypto/rand/rand_os2.c b/crypto/rand/rand_os2.c
index 0397d77c63..d95cd24a3b 100644
--- a/crypto/rand/rand_os2.c
+++ b/crypto/rand/rand_os2.c
@@ -149,7 +149,7 @@ int RAND_poll(void)
if (DosQuerySysState) {
char *buffer = OPENSSL_malloc(256 * 1024);
- if (!buffer)
+ if (buffer == NULL)
return 0;
if (DosQuerySysState(0x1F, 0, 0, 0, buffer, 256 * 1024) == 0) {
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index a91014bad3..7bf41616a6 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -712,7 +712,7 @@ static void readscreen(void)
bi.biClrImportant = 0;
bmbits = OPENSSL_malloc(size);
- if (bmbits) {
+ if (bmbits != NULL) {
/* Now go through the whole screen, repeatedly grabbing n lines */
for (y = 0; y < h - n; y += n) {
unsigned char md[MD_DIGEST_LENGTH];