From a41b2869492d3eed3f2aabde0a1ad8c8169cd264 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Thu, 31 Mar 2011 20:22:22 +0000 Subject: tv_usec in struct timeval must be lower than 1000000 (patch by SATOH Fumiyasu) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1421 ef36b2f9-881f-0410-afb5-c4e39611909c --- common/tio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/tio.c') diff --git a/common/tio.c b/common/tio.c index 6f9bfc3..e323e1e 100644 --- a/common/tio.c +++ b/common/tio.c @@ -78,7 +78,7 @@ static inline void tio_tv_add(struct timeval *tv1, const struct timeval *tv2) { /* BUG: we hope that this does not overflow */ tv1->tv_usec+=tv2->tv_usec; - if (tv1->tv_usec>1000000) + if (tv1->tv_usec>=1000000) { tv1->tv_usec-=1000000; tv1->tv_sec+=1; -- cgit v1.2.3