1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 08:38:49 -05:00

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
This commit is contained in:
Marcel Raad 2019-04-05 09:14:28 +02:00
parent f5a77473c5
commit 1369b74299
No known key found for this signature in database
GPG Key ID: FE4D8BC5EE1701DD

View File

@ -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"));