summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/log.c b/utils/log.c
index 8ec42c1f7..0be8ea264 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -70,12 +70,12 @@ timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y)
{
/* Perform the carry for the later subtraction by updating y. */
if (x->tv_usec < y->tv_usec) {
- int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
+ int nsec = (int)(y->tv_usec - x->tv_usec) / 1000000 + 1;
y->tv_usec -= 1000000 * nsec;
y->tv_sec += nsec;
}
- if (x->tv_usec - y->tv_usec > 1000000) {
- int nsec = (x->tv_usec - y->tv_usec) / 1000000;
+ if ((int)(x->tv_usec - y->tv_usec) > 1000000) {
+ int nsec = (int)(x->tv_usec - y->tv_usec) / 1000000;
y->tv_usec += 1000000 * nsec;
y->tv_sec -= nsec;
}