mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:43:31 +03:00
checksrc: detect more kinds of NULL comparisons we avoid
Co-authored-by: Jay Satiro Closes #8180
This commit is contained in:
parent
acaa79f961
commit
21248e052d
36 changed files with 87 additions and 87 deletions
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue