From: Roland McGrath Date: Tue, 24 Jul 2007 01:38:22 +0000 (+0000) Subject: 2007-07-23 Roland McGrath X-Git-Tag: v4.5.18~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58372f52ac5f824be687c01bfc1db1ffb963f91e;p=strace 2007-07-23 Roland McGrath * util.c (tv_add): Fix rounding comparison. Reported by Bai Weidong . --- diff --git a/util.c b/util.c index 55f80700..64210ef9 100644 --- a/util.c +++ b/util.c @@ -193,7 +193,7 @@ struct timeval *tv, *a, *b; { tv->tv_sec = a->tv_sec + b->tv_sec; tv->tv_usec = a->tv_usec + b->tv_usec; - if (tv->tv_usec > 1000000) { + if (tv->tv_usec >= 1000000) { tv->tv_sec++; tv->tv_usec -= 1000000; }