summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-10-17 15:57:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-10-18 08:42:46 +0200
commitf6b9971d73dada03b365b4f2dc85a10dba19a354 (patch)
tree05f71b3eef5edff7567747e58435001f8e8a8004 /lib/ftp.c
parentec977b050d4073d19e5fa9c817c3d46290c937ac (diff)
downloadcurl-f6b9971d73dada03b365b4f2dc85a10dba19a354.tar.gz
ftp: remove redundant if
Reported-by: Trail of Bits Closes #9753
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 98773ebf2..f1a25b23d 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -516,11 +516,9 @@ static CURLcode AllowServerConnect(struct Curl_easy *data, bool *connected)
}
else {
/* Add timeout to multi handle and break out of the loop */
- if(*connected == FALSE) {
- Curl_expire(data, data->set.accepttimeout > 0 ?
- data->set.accepttimeout: DEFAULT_ACCEPT_TIMEOUT,
- EXPIRE_FTP_ACCEPT);
- }
+ Curl_expire(data, data->set.accepttimeout ?
+ data->set.accepttimeout: DEFAULT_ACCEPT_TIMEOUT,
+ EXPIRE_FTP_ACCEPT);
}
return result;