From b9d25f9a6b3ca791385b80a6a3c3fa5ae113e1e0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Oct 2017 12:05:49 +0200 Subject: timediff: return timediff_t from the time diff functions ... to cater for systems with unsigned time_t variables. - Renamed the functions to curlx_timediff and Curl_timediff_us. - Added overflow protection for both of them in either direction for both 32 bit and 64 bit time_ts - Reprefixed the curlx_time functions to use Curl_* Reported-by: Peter Piekarski Fixes #2004 Closes #2005 --- tests/unit/unit1323.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/unit') diff --git a/tests/unit/unit1323.c b/tests/unit/unit1323.c index 7bb4cca40..1adb27494 100644 --- a/tests/unit/unit1323.c +++ b/tests/unit/unit1323.c @@ -50,7 +50,7 @@ UNITTEST_START size_t i; for(i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) { - time_t result = curlx_tvdiff(tests[i].first, tests[i].second); + timediff_t result = Curl_timediff(tests[i].first, tests[i].second); if(result != tests[i].result) { printf("%d.%06u to %d.%06u got %d, but expected %d\n", tests[i].first.tv_sec, -- cgit v1.2.3