diff options
| -rw-r--r-- | usr.bin/dig/lib/isc/timer.c | 10 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/include/isc/time.h | 8 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 5 |
3 files changed, 5 insertions, 18 deletions
diff --git a/usr.bin/dig/lib/isc/timer.c b/usr.bin/dig/lib/isc/timer.c index 46953e12524..412918e3df8 100644 --- a/usr.bin/dig/lib/isc/timer.c +++ b/usr.bin/dig/lib/isc/timer.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: timer.c,v 1.11 2020/02/16 18:05:09 florian Exp $ */ +/* $Id: timer.c,v 1.12 2020/02/16 21:04:44 florian Exp $ */ /*! \file */ @@ -220,8 +220,7 @@ isc__timer_create(isc_timermgr_t *manager0, const struct timespec *interval, REQUIRE(VALID_MANAGER(manager)); REQUIRE(task != NULL); REQUIRE(action != NULL); - if (interval == NULL) - interval = interval_zero; + REQUIRE(interval != NULL); REQUIRE(!(interval_iszero(interval))); REQUIRE(timerp != NULL && *timerp == NULL); @@ -300,10 +299,7 @@ isc__timer_reset(isc_timer_t *timer0, const struct timespec *interval, REQUIRE(VALID_TIMER(timer)); manager = timer->manager; REQUIRE(VALID_MANAGER(manager)); - - if (interval == NULL) - interval = interval_zero; - + REQUIRE(interval != NULL); REQUIRE(!(interval_iszero(interval))); /* diff --git a/usr.bin/dig/lib/isc/unix/include/isc/time.h b/usr.bin/dig/lib/isc/unix/include/isc/time.h index 9423a67781b..8f95089fc23 100644 --- a/usr.bin/dig/lib/isc/unix/include/isc/time.h +++ b/usr.bin/dig/lib/isc/unix/include/isc/time.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.h,v 1.5 2020/02/16 18:05:09 florian Exp $ */ +/* $Id: time.h,v 1.6 2020/02/16 21:04:44 florian Exp $ */ #ifndef ISC_TIME_H #define ISC_TIME_H 1 @@ -24,12 +24,6 @@ #include <time.h> #include <isc/types.h> -/*** - *** Intervals - ***/ - -extern const struct timespec * const interval_zero; - /* * ISC_FORMATHTTPTIMESTAMP_SIZE needs to be 30 in C locale and potentially * more for other locales to handle longer national abbreviations when diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c index 85ed2e906a2..e666dfc042c 100644 --- a/usr.bin/dig/lib/isc/unix/time.c +++ b/usr.bin/dig/lib/isc/unix/time.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.8 2020/02/16 18:05:09 florian Exp $ */ +/* $Id: time.c,v 1.9 2020/02/16 21:04:44 florian Exp $ */ /*! \file */ @@ -47,9 +47,6 @@ *** Intervals ***/ -static const struct timespec zero_interval = { 0, 0 }; -const struct timespec * const interval_zero = &zero_interval; - void interval_set(struct timespec *i, time_t seconds, long nanoseconds) { |
