]> granicus.if.org Git - curl/commitdiff
metalink: fix error: ‘*’ in boolean context, suggest ‘&&’ instead
authorDaniel Stenberg <daniel@haxx.se>
Thu, 10 Aug 2017 12:54:55 +0000 (14:54 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 10 Aug 2017 12:54:55 +0000 (14:54 +0200)
src/tool_metalink.c

index 7646a7fdf214cc1e5ebb84b78487c79132d7b382..3f66c747092d05c9e07aa3e9b465752134892788 100644 (file)
@@ -875,7 +875,7 @@ size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
    * it does not match then it fails with CURLE_WRITE_ERROR. So at this
    * 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)
     return failure;