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/http.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/http.c')
-rw-r--r-- | lib/http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c index caa14bbd9..f08a343e3 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3311,7 +3311,7 @@ checkhttpprefix(struct Curl_easy *data, #ifdef CURL_DOES_CONVERSIONS /* convert from the network encoding using a scratch area */ char *scratch = strdup(s); - if(NULL == scratch) { + if(!scratch) { failf(data, "Failed to allocate memory for conversion!"); return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ } @@ -3351,7 +3351,7 @@ checkrtspprefix(struct Curl_easy *data, #ifdef CURL_DOES_CONVERSIONS /* convert from the network encoding using a scratch area */ char *scratch = strdup(s); - if(NULL == scratch) { + if(!scratch) { failf(data, "Failed to allocate memory for conversion!"); return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ } |