gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 133/205: gcc7: fix ‘*’ in boolean context, suggest


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 133/205: gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
Date: Thu, 20 Apr 2017 16:21:13 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.

commit 244e0a36bd01ebbbdbf009ca2be6b78f29740277
Author: Alexis La Goutte <address@hidden>
AuthorDate: Thu Mar 30 14:14:53 2017 +0200

    gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead 
[-Wint-in-bool-context]
    
    Closes #1371
---
 src/tool_cb_hdr.c | 2 +-
 src/tool_cb_wrt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index 6e23d1da8..0e13eec50 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -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
    * 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)
     return failure;
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index 5c28a2cf8..6c08943ea 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -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
    * 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;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]