]> granicus.if.org Git - curl/commitdiff
bagder/Curl_tvdiff_us: fix the math
authorDaniel Stenberg <daniel@haxx.se>
Sat, 12 Aug 2017 13:34:59 +0000 (15:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 12 Aug 2017 15:25:50 +0000 (17:25 +0200)
Regression since adef394ac5 (released in 7.55.0)

Reported-by: Han Qiao
Fixes #1769
Closes #1771

lib/timeval.c

index 69a8fb1fcb8de06b6a680df04ccb3a08584a4ca1..d7207b3a2afff8ce1200ccd9822aed42344985ee 100644 (file)
@@ -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);
 }