summaryrefslogtreecommitdiff
path: root/usr.bin/dig/dighost.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-02-16 21:06:16 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-02-16 21:06:16 +0000
commite8f3491defb892b2bd792f47e21342fa19662a86 (patch)
treee9aceeccf1d1d5cc6701639a8561069117c96a08 /usr.bin/dig/dighost.c
parent1fe8e4538a9519d3e19b6d103d09b4a2c22af797 (diff)
Reduce interval indirection by setting struct members directly and
using macros from sys/time.h OK millert
Diffstat (limited to 'usr.bin/dig/dighost.c')
-rw-r--r--usr.bin/dig/dighost.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/dig/dighost.c b/usr.bin/dig/dighost.c
index 9e3dc544e22..4f79c254398 100644
--- a/usr.bin/dig/dighost.c
+++ b/usr.bin/dig/dighost.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.8 2020/02/16 18:05:08 florian Exp $ */
+/* $Id: dighost.c,v 1.9 2020/02/16 21:06:15 florian Exp $ */
/*! \file
* \note
@@ -2543,7 +2543,8 @@ bringup_timer(dig_query_t *query, unsigned int default_timeout) {
local_timeout = timeout;
}
debug("have local timeout of %d", local_timeout);
- interval_set(&l->interval, local_timeout, 0);
+ l->interval.tv_sec = local_timeout;
+ l->interval.tv_nsec = 0;
if (query->timer != NULL)
isc_timer_detach(&query->timer);
result = isc_timer_create(timermgr,
@@ -3662,7 +3663,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
local_timeout = INT_MAX;
}
debug("have local timeout of %d", local_timeout);
- interval_set(&l->interval, local_timeout, 0);
+ l->interval.tv_sec = local_timeout;
+ l->interval.tv_nsec = 0;
result = isc_timer_reset(query->timer,
&l->interval,
ISC_FALSE);