diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-31 22:22:22 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-31 22:22:22 +0200 |
commit | a41b2869492d3eed3f2aabde0a1ad8c8169cd264 (patch) | |
tree | d910f7b46971aa6bcacd3db2437b8d178aed3862 /common | |
parent | 2d0abd289968a83a2a89509fc6c8aa20fc2b4829 (diff) |
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
Diffstat (limited to 'common')
-rw-r--r-- | common/tio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |