From 0d85eed3dfbbce18303900385d17f84d939cef00 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 26 Oct 2017 15:24:50 +0200 Subject: Curl_timeleft: change return type to timediff_t returning 'time_t' is problematic when that type is unsigned and we return values less than zero to signal "already expired", used in several places in the code. Closes #2021 --- lib/ftp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ftp.c') diff --git a/lib/ftp.c b/lib/ftp.c index 5c7df2b4c..8042edf48 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -333,10 +333,10 @@ static CURLcode AcceptServerConnect(struct connectdata *conn) * Curl_pgrsTime(..., TIMER_STARTACCEPT); * */ -static time_t ftp_timeleft_accept(struct Curl_easy *data) +static timediff_t ftp_timeleft_accept(struct Curl_easy *data) { - time_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT; - time_t other; + timediff_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT; + timediff_t other; struct curltime now; if(data->set.accepttimeout > 0) -- cgit v1.2.3