diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2019-06-23 23:19:34 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2019-06-23 23:19:34 +0300 |
commit | 7883d73530b4b2a701ddd7d50c35676cbc158039 (patch) | |
tree | dea64895ae28278af681691c029f3e1c8c7cedd2 /src/xz/mytime.c | |
parent | tuklib_cpucores: Silence warnings from -Wsign-conversion. (diff) | |
download | xz-7883d73530b4b2a701ddd7d50c35676cbc158039.tar.xz |
xz: Fix some of the warnings from -Wsign-conversion.
Diffstat (limited to 'src/xz/mytime.c')
-rw-r--r-- | src/xz/mytime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xz/mytime.c b/src/xz/mytime.c index 4be184fd..95138840 100644 --- a/src/xz/mytime.c +++ b/src/xz/mytime.c @@ -39,11 +39,11 @@ mytime_now(void) while (clock_gettime(clk_id, &tv)) clk_id = CLOCK_REALTIME; - return (uint64_t)(tv.tv_sec) * UINT64_C(1000) + tv.tv_nsec / 1000000; + return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_nsec / 1000000); #else struct timeval tv; gettimeofday(&tv, NULL); - return (uint64_t)(tv.tv_sec) * UINT64_C(1000) + tv.tv_usec / 1000; + return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_usec / 1000); #endif } |