]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ftp: fix 'portsock' variable was assigned the same value
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Apr 2023 11:02:54 +0000 (13:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Apr 2023 16:14:30 +0000 (18:14 +0200)
Pointed out by PVS

Ref: #10929
Closes #10955

lib/ftp.c

index d1c65f458e8c1073910bd3251c54f08fd3166f8c..f50d7baf622f864c6b26a8ed8f39237abb4f7144 100644 (file)
--- 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)) {