]> granicus.if.org Git - strace/commitdiff
2007-07-23 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 24 Jul 2007 01:38:22 +0000 (01:38 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 24 Jul 2007 01:38:22 +0000 (01:38 +0000)
* util.c (tv_add): Fix rounding comparison.
Reported by Bai Weidong <baiwd@cn.fujitsu.com>.

util.c

diff --git a/util.c b/util.c
index 55f80700b33450081ceca57e6d62f2c29c50f12c..64210ef9b0320f71b97b68d2c339940d68775ca2 100644 (file)
--- 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;
        }