]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorBrian Wellington <source@isc.org>
Mon, 18 Sep 2000 18:50:26 +0000 (18:50 +0000)
committerBrian Wellington <source@isc.org>
Mon, 18 Sep 2000 18:50:26 +0000 (18:50 +0000)
 472.   [bug]           Off-by-one error caused isc_time_add() to sometimes
                        produce invalid time values.

CHANGES
lib/isc/unix/time.c

diff --git a/CHANGES b/CHANGES
index 7ea8cb59898ca226065b8c4fb64c8375519f09ba..887af2846125ca15ca33859ae8b015ff919a2074 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,7 @@
 
+ 472.  [bug]           Off-by-one error caused isc_time_add() to sometimes
+                       produce invalid time values.
+
  471.  [bug]           nsupdate didn't compile on HP/UX 10.20
 
        --- 9.0.0 released ---
index f3b2cecbafc44dd2f2d6767156d9f42405242bb0..876591563c22d0806111740477526db4f41055a3 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: time.c,v 1.26 2000/06/22 21:58:50 tale Exp $ */
+/* $Id: time.c,v 1.26.2.1 2000/09/18 18:50:24 bwelling Exp $ */
 
 #include <config.h>
 
@@ -257,7 +257,7 @@ isc_time_add(isc_time_t *t, isc_interval_t *i, isc_time_t *result) {
 
        result->seconds = t->seconds + i->seconds;
        result->nanoseconds = t->nanoseconds + i->nanoseconds;
-       if (result->nanoseconds > NS_PER_S) {
+       if (result->nanoseconds >= NS_PER_S) {
                result->seconds++;
                result->nanoseconds -= NS_PER_S;
        }