From: Daniel Stenberg Date: Sat, 12 Aug 2017 13:34:59 +0000 (+0200) Subject: bagder/Curl_tvdiff_us: fix the math X-Git-Tag: curl-7_55_1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7973baacea1ad22f235f64642af71d6791e763b3;p=curl bagder/Curl_tvdiff_us: fix the math Regression since adef394ac5 (released in 7.55.0) Reported-by: Han Qiao Fixes #1769 Closes #1771 --- diff --git a/lib/timeval.c b/lib/timeval.c index 69a8fb1fc..d7207b3a2 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -158,5 +158,5 @@ time_t Curl_tvdiff_us(struct curltime newer, struct curltime older) return 0x7fffffffffffffffLL; #endif return (newer.tv_sec-older.tv_sec)*1000000+ - (time_t)(newer.tv_usec-older.tv_usec); + (int)(newer.tv_usec-older.tv_usec); }