Unverified Commit 1369b742 authored by Marcel Raad's avatar Marcel Raad
Browse files

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
parent f5a77473
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"));