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/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 03ee0855a..5a11e423b 100644 --- a/lib/url.c +++ b/lib/url.c @@ -6323,7 +6323,7 @@ static CURLcode resolve_server(struct Curl_easy *data, bool *async) { CURLcode result = CURLE_OK; - time_t timeout_ms = Curl_timeleft(data, NULL, TRUE); + timediff_t timeout_ms = Curl_timeleft(data, NULL, TRUE); /************************************************************* * Resolve the name of the server or proxy -- cgit v1.2.3