]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
timediff: fix comment for curlx_mstotv()
authorDaniel Stenberg <daniel@haxx.se>
Wed, 12 Feb 2025 21:36:27 +0000 (22:36 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Feb 2025 11:47:57 +0000 (12:47 +0100)
The max value when explaining the math was wrong.

Closes #16310

lib/timediff.c

index d0824d1448b71ae198181fd59516102fd3eef5dd..ebb733f98786473a50be2078e45abf823bf2040a 100644 (file)
@@ -44,7 +44,7 @@ struct timeval *curlx_mstotv(struct timeval *tv, timediff_t ms)
 
   if(ms > 0) {
     timediff_t tv_sec = ms / 1000;
-    timediff_t tv_usec = (ms % 1000) * 1000; /* max=999999 */
+    timediff_t tv_usec = (ms % 1000) * 1000; /* max=999000 */
 #ifdef HAVE_SUSECONDS_T
 #if TIMEDIFF_T_MAX > TIME_T_MAX
     /* tv_sec overflow check in case time_t is signed */