2430. [bug] win32: isc_interval_set() could round down to
zero if the input was less than NS_INTERVAL
nanoseconds. Round up instead. [RT #18549]
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2430. [bug] win32: isc_interval_set() could round down to
|
||||
zero if the input was less than NS_INTERVAL
|
||||
nanoseconds. Round up instead. [RT #18549]
|
||||
|
||||
2429. [doc] nsupdate should be in section 1 of the man pages.
|
||||
[RT #18283]
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: time.c,v 1.43 2007/06/19 23:47:19 tbox Exp $ */
|
||||
/* $Id: time.c,v 1.44 2008/08/29 03:57:38 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -64,8 +64,11 @@ isc_interval_set(isc_interval_t *i, unsigned int seconds,
|
||||
REQUIRE(i != NULL);
|
||||
REQUIRE(nanoseconds < NS_PER_S);
|
||||
|
||||
/*
|
||||
* This rounds nanoseconds up not down.
|
||||
*/
|
||||
i->interval = (LONGLONG)seconds * INTERVALS_PER_S
|
||||
+ nanoseconds / NS_INTERVAL;
|
||||
+ (nanoseconds + NS_INTERVAL - 1) / NS_INTERVAL;
|
||||
}
|
||||
|
||||
isc_boolean_t
|
||||
|
||||
Reference in New Issue
Block a user