]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ftp: remove redundant if
authorDaniel Stenberg <daniel@haxx.se>
Mon, 17 Oct 2022 13:57:35 +0000 (15:57 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 18 Oct 2022 06:42:46 +0000 (08:42 +0200)
Reported-by: Trail of Bits
Closes #9753

lib/ftp.c

index 98773ebf210fadb769e952889135acd3e34d9374..f1a25b23dcfda35e54847d95bb1b453e0984ef6e 100644 (file)
--- 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;