diff options
author | davidxu <davidxu@FreeBSD.org> | 2005-06-22 22:38:56 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2005-06-22 22:38:56 +0000 |
commit | 4a65a73e5803446baf1d49bd2bce77e52b84bddd (patch) | |
tree | 91f0afc2495ab9766119e3a5479b2e096419d233 /lib | |
parent | fab6f17360611cadc3d67e159eb23e8e09b1f97d (diff) | |
download | FreeBSD-src-4a65a73e5803446baf1d49bd2bce77e52b84bddd.zip FreeBSD-src-4a65a73e5803446baf1d49bd2bce77e52b84bddd.tar.gz |
Fix off-by-one nanosecond bug in macro TIMESPEC_ADD.
Reviewed by: deischen
Approved by: re (dwhite)
MFC after : 4 days
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libthr/thread/thr_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 3c4f9ed..65e258d 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -94,7 +94,7 @@ do { \ (dst)->tv_sec = (src)->tv_sec + (val)->tv_sec; \ (dst)->tv_nsec = (src)->tv_nsec + (val)->tv_nsec; \ - if ((dst)->tv_nsec > 1000000000) { \ + if ((dst)->tv_nsec >= 1000000000) { \ (dst)->tv_sec++; \ (dst)->tv_nsec -= 1000000000; \ } \ |