From f6b9971d73dada03b365b4f2dc85a10dba19a354 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 17 Oct 2022 15:57:35 +0200 Subject: [PATCH] ftp: remove redundant if Reported-by: Trail of Bits Closes #9753 --- lib/ftp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ftp.c b/lib/ftp.c index 98773ebf21..f1a25b23dc 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; -- 2.47.3