diff options
| author | 2020-02-16 21:04:44 +0000 | |
|---|---|---|
| committer | 2020-02-16 21:04:44 +0000 | |
| commit | 1eb893f361b5cb979fbde4a44e2a744b3a62d4c7 (patch) | |
| tree | 9a6775e734f5064f17efcc63662fda35cb21b0fa /usr.bin/dig/lib/isc/timer.c | |
| parent | Remove trailing backslashes (diff) | |
| download | wireguard-openbsd-1eb893f361b5cb979fbde4a44e2a744b3a62d4c7.tar.xz wireguard-openbsd-1eb893f361b5cb979fbde4a44e2a744b3a62d4c7.zip | |
The timer type we are using requires interval to be set, remove
unused interval_zero.
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/timer.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/timer.c | 10 |
1 files changed, 3 insertions, 7 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))); /* |
