aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-19 09:16:41 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-09-20 08:07:00 +0200
commita50c3d7fa0ba4390ac05a290836f076909d2954d (patch)
treec0c3aaf3eeb9f3c91b83a2ac6513792db0b87072 /lib
parent97c17e9fcbb4d27eec3cf51db8599ea151c16042 (diff)
ftp: Expression 'ftpc->wait_data_conn' is always true
Fixes warning detected by PVS-Studio Fixes #4374
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 59ca13ef1..a4a37c9af 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3530,14 +3530,13 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
/* if we got an error or if we don't wait for a data connection return
immediately */
- if(result || (ftpc->wait_data_conn != TRUE))
+ if(result || !ftpc->wait_data_conn)
return result;
- 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;
+ /* 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;
}
if(ftp->transfer <= FTPTRANSFER_INFO) {