diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-12-25 21:41:14 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-12-27 23:39:26 +0100 |
commit | 21248e052dbd0db33e8999aeeb919fb6f32c9567 (patch) | |
tree | 3345ae3b11c349ea56a58a387083fece2673e60c /lib/md4.c | |
parent | acaa79f961a6fd4cde83ea16b5fb85f0a32c7f23 (diff) | |
download | curl-21248e052dbd0db33e8999aeeb919fb6f32c9567.tar.gz |
checksrc: detect more kinds of NULL comparisons we avoid
Co-authored-by: Jay Satiro
Closes #8180
Diffstat (limited to 'lib/md4.c')
-rw-r--r-- | lib/md4.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -189,7 +189,7 @@ static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size) { if(!ctx->data) { ctx->data = malloc(size); - if(ctx->data != NULL) { + if(ctx->data) { memcpy(ctx->data, data, size); ctx->size = size; } @@ -198,7 +198,7 @@ static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size) static void MD4_Final(unsigned char *result, MD4_CTX *ctx) { - if(ctx->data != NULL) { + if(ctx->data) { #if !defined(HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS) mbedtls_md4(ctx->data, ctx->size, result); #else |