mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
Closes #1371
This commit is contained in:
parent
f104f7d914
commit
244e0a36bd
@ -56,7 +56,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
|
|||||||
* it does not match then it fails with CURLE_WRITE_ERROR. So at this
|
* it does not match then it fails with CURLE_WRITE_ERROR. So at this
|
||||||
* point returning a value different from sz*nmemb indicates failure.
|
* point returning a value different from sz*nmemb indicates failure.
|
||||||
*/
|
*/
|
||||||
size_t failure = (size * nmemb) ? 0 : 1;
|
size_t failure = (size && nmemb) ? 0 : 1;
|
||||||
|
|
||||||
if(!heads->config)
|
if(!heads->config)
|
||||||
return failure;
|
return failure;
|
||||||
|
@ -84,7 +84,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
|||||||
* it does not match then it fails with CURLE_WRITE_ERROR. So at this
|
* it does not match then it fails with CURLE_WRITE_ERROR. So at this
|
||||||
* point returning a value different from sz*nmemb indicates failure.
|
* point returning a value different from sz*nmemb indicates failure.
|
||||||
*/
|
*/
|
||||||
const size_t failure = (sz * nmemb) ? 0 : 1;
|
const size_t failure = (sz && nmemb) ? 0 : 1;
|
||||||
|
|
||||||
if(!config)
|
if(!config)
|
||||||
return failure;
|
return failure;
|
||||||
|
Loading…
Reference in New Issue
Block a user