diff options
author | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-05-20 19:39:51 +0200 |
---|---|---|
committer | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-05-24 22:56:22 +0200 |
commit | 8ab22a74533acee61af31c48e75269822f408cb4 (patch) | |
tree | 24025f8450cf3b72eb5bf9316c1212b0a571363c /tests/libtest/lib582.c | |
parent | b4d87f54d60711e936fefae388d741b281eecdf0 (diff) |
time: fix type conversions and compiler warnings
Fix bugs and compiler warnings on systems with 32-bit long and
64-bit time_t.
Reviewed-by: Daniel Stenberg
Closes #1499
Diffstat (limited to 'tests/libtest/lib582.c')
-rw-r--r-- | tests/libtest/lib582.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index 1eb9b02d5..d7e4dd1bf 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -174,8 +174,8 @@ static int getMicroSecondTimeout(struct timeval* timeout) struct timeval now; ssize_t result; now = tutil_tvnow(); - result = (timeout->tv_sec - now.tv_sec) * 1000000 + - timeout->tv_usec - now.tv_usec; + result = (ssize_t)((timeout->tv_sec - now.tv_sec) * 1000000 + + timeout->tv_usec - now.tv_usec); if(result < 0) result = 0; |