Commit c89ac488 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

472. [bug] Off-by-one error caused isc_time_add() to sometimes

                        produce invalid time values.
parent ec02cd59
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
470. [feature] $GENERATE is now supported. See also
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.c,v 1.28 2000/08/01 01:31:30 tale Exp $ */
/* $Id: time.c,v 1.29 2000/09/18 18:43:03 gson 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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment