From: Daniel Stenberg Date: Thu, 13 Apr 2023 11:02:54 +0000 (+0200) Subject: ftp: fix 'portsock' variable was assigned the same value X-Git-Tag: curl-8_1_0~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e68133d041376c1012571e5a2386bb03a620a8e;p=thirdparty%2Fcurl.git ftp: fix 'portsock' variable was assigned the same value Pointed out by PVS Ref: #10929 Closes #10955 --- diff --git a/lib/ftp.c b/lib/ftp.c index d1c65f458e..f50d7baf62 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -1085,8 +1085,6 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data, host = NULL; /* step 2, create a socket for the requested address */ - - portsock = CURL_SOCKET_BAD; error = 0; for(ai = res; ai; ai = ai->ai_next) { if(Curl_socket_open(data, ai, NULL, conn->transport, &portsock)) {