gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 15/219: transfer: fix LGTM alert "Comparison is alw


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 15/219: transfer: fix LGTM alert "Comparison is always true"
Date: Wed, 22 May 2019 19:15:54 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 1369b7429958a22a76754a28bc6c6743c62fa23d
Author: Marcel Raad <address@hidden>
AuthorDate: Fri Apr 5 09:14:28 2019 +0200

    transfer: fix LGTM alert "Comparison is always true"
    
    Just remove the redundant condition, which also makes it clear that
    k->buf is always 0-terminated if this break is not hit.
    
    Closes https://github.com/curl/curl/pull/3732
---
 lib/transfer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/transfer.c b/lib/transfer.c
index ca6031724..0c6056a08 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -650,7 +650,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
     if(0 < nread || is_empty_data) {
       k->buf[nread] = 0;
     }
-    else if(0 >= nread) {
+    else {
       /* if we receive 0 or less here, the server closed the connection
          and we bail out from this! */
       DEBUGF(infof(data, "nread <= 0, server closed connection, bailing\n"));

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



reply via email to

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