]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ftp: remove dead code
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Apr 2023 11:33:52 +0000 (13:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Apr 2023 16:13:40 +0000 (18:13 +0200)
This condition can never be true here since it is handled already 28
lines above.

Pointed out by PVS.

Ref: #10929
Closes #10957

lib/ftp.c

index ac09853f7bfdd2f7cb89d7c74511f4add47f2fb0..d1c65f458e8c1073910bd3251c54f08fd3166f8c 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3621,7 +3621,7 @@ static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
     /* a transfer is about to take place, or if not a file name was given
        so we'll do a SIZE on it later and then we need the right TYPE first */
 
-    if(ftpc->wait_data_conn == TRUE) {
+    if(ftpc->wait_data_conn) {
       bool serv_conned;
 
       result = ReceivedServerConnect(data, &serv_conned);
@@ -3649,13 +3649,7 @@ static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
         return result;
 
       result = ftp_multi_statemach(data, &complete);
-      if(ftpc->wait_data_conn)
-        /* if we reach the end of the FTP state machine here, *complete will be
-           TRUE but so is ftpc->wait_data_conn, which says we need to wait for
-           the data connection and therefore we're not actually complete */
-        *completep = 0;
-      else
-        *completep = (int)complete;
+      *completep = (int)complete;
     }
     else {
       /* download */