2007-07-23 Roland McGrath <roland@redhat.com>

* util.c (tv_add): Fix rounding comparison.
	Reported by Bai Weidong <baiwd@cn.fujitsu.com>.
This commit is contained in:
Roland McGrath 2007-07-24 01:38:22 +00:00
parent a7f34143e3
commit 58372f52ac

2
util.c
View File

@ -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;
}