From db1915892bd38aa8b8ed839fb500fa0ffcfde464 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 1 Aug 2025 14:06:20 +0200 Subject: [PATCH] tweaked typecast --- src/tool_writeout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tool_writeout.c b/src/tool_writeout.c index 39acac8f69..b2f05b0889 100644 --- a/src/tool_writeout.c +++ b/src/tool_writeout.c @@ -571,9 +571,11 @@ static const char *outtime(const char *ptr, /* %time{ ... */ const char *timestr = getenv("CURL_TIME"); if(timestr) { curl_off_t val; + unsigned int usecs; curlx_str_number(×tr, &val, TIME_T_MAX); cnow.tv_sec = (time_t)val; - cnow.tv_usec = (unsigned int)(val % 1000000); + usecs = (unsigned int)(val % 1000000); + cnow.tv_usec = usecs; } } #endif