summaryrefslogtreecommitdiff
path: root/lib/md4.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-12-25 21:41:14 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-12-27 23:39:26 +0100
commit21248e052dbd0db33e8999aeeb919fb6f32c9567 (patch)
tree3345ae3b11c349ea56a58a387083fece2673e60c /lib/md4.c
parentacaa79f961a6fd4cde83ea16b5fb85f0a32c7f23 (diff)
downloadcurl-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/md4.c b/lib/md4.c
index d90e45475..117cce4fd 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -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