]> granicus.if.org Git - curl/commitdiff
ftp: the conditional expression is always true
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Sep 2019 07:19:44 +0000 (09:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Sep 2019 06:07:06 +0000 (08:07 +0200)
... both !result and (ftp->transfer != FTPTRANSFER_BODY)!

Fixes warning detected by PVS-Studio
Fixes #4374

lib/ftp.c

index 4cd9a1acf50623ca70f74cf592d82f72a22be09e..d057a0a6127a4513dd1800b7a45ae49fd3ecbf75 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3611,10 +3611,8 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
     return result;
   }
 
-  if(!result && (ftp->transfer != FTPTRANSFER_BODY))
-    /* no data to transfer. FIX: it feels like a kludge to have this here
-       too! */
-    Curl_setup_transfer(data, -1, -1, FALSE, -1);
+  /* no data to transfer */
+  Curl_setup_transfer(data, -1, -1, FALSE, -1);
 
   if(!ftpc->wait_data_conn) {
     /* no waiting for the data connection so this is now complete */