summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-04-05 09:14:28 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-04-05 12:56:10 +0200
commit1369b7429958a22a76754a28bc6c6743c62fa23d (patch)
treeb1f9b2c57adc0b395d8ea6c53da28667acca9e1d /lib
parentf5a77473c5397982a9e6ad74de20ccab3d5b31cc (diff)
downloadcurl-1369b7429958a22a76754a28bc6c6743c62fa23d.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c2
1 files changed, 1 insertions, 1 deletions
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"));