From: Daniel Stenberg Date: Mon, 17 Oct 2022 13:57:35 +0000 (+0200) Subject: ftp: remove redundant if X-Git-Tag: curl-7_86_0~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6b9971d73dada03b365b4f2dc85a10dba19a354;p=thirdparty%2Fcurl.git ftp: remove redundant if Reported-by: Trail of Bits Closes #9753 --- 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;