]> granicus.if.org Git - curl/commitdiff
ftp: Expression 'ftpc->wait_data_conn' is always false
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Sep 2019 07:18:26 +0000 (09:18 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Sep 2019 06:07:03 +0000 (08:07 +0200)
Fixes warning detected by PVS-Studio
Fixes #4374

lib/ftp.c

index a4a37c9affa5a5e583cf79885c8b216d2c05fa0d..4cd9a1acf50623ca70f74cf592d82f72a22be09e 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3570,13 +3570,8 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
         return result;
 
       result = ftp_multi_statemach(conn, &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;
+      /* ftpc->wait_data_conn is always false here */
+      *completep = (int)complete;
     }
     else {
       /* download */