aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_util.c2
-rw-r--r--tests/server/util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_util.c b/src/tool_util.c
index 1a5b773e2..9990a4634 100644
--- a/src/tool_util.c
+++ b/src/tool_util.c
@@ -47,7 +47,7 @@ struct timeval tvnow(void)
DWORD milliseconds = GetTickCount();
#endif
now.tv_sec = (long)(milliseconds / 1000);
- now.tv_usec = (milliseconds % 1000) * 1000;
+ now.tv_usec = (long)((milliseconds % 1000) * 1000);
return now;
}
diff --git a/tests/server/util.c b/tests/server/util.c
index df1e35da0..c3935f58a 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -422,7 +422,7 @@ static struct timeval tvnow(void)
DWORD milliseconds = GetTickCount();
#endif
now.tv_sec = (long)(milliseconds / 1000);
- now.tv_usec = (milliseconds % 1000) * 1000;
+ now.tv_usec = (long)((milliseconds % 1000) * 1000);
return now;
}