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:
parent
f5a77473c5
commit
1369b74299
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user