summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/isc/timer.c
diff options
context:
space:
mode:
authorjung <jung@openbsd.org>2020-02-22 19:50:05 +0000
committerjung <jung@openbsd.org>2020-02-22 19:50:05 +0000
commitad5cf5382279f230a235589e749cc8d438dfa7ab (patch)
tree2a69e4d83e68efc361bdbeb9c17a9b928ccbb3d0 /usr.bin/dig/lib/isc/timer.c
parentremove assigned but unused values (diff)
downloadwireguard-openbsd-ad5cf5382279f230a235589e749cc8d438dfa7ab.tar.xz
wireguard-openbsd-ad5cf5382279f230a235589e749cc8d438dfa7ab.zip
remove some unused args and unused assignments, as result
msgblock_free() becomes just free() also add UNUSED() for some dns_message *msg args for later revisit and cleanup ok millert florian
Diffstat (limited to 'usr.bin/dig/lib/isc/timer.c')
-rw-r--r--usr.bin/dig/lib/isc/timer.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/dig/lib/isc/timer.c b/usr.bin/dig/lib/isc/timer.c
index 6dbbf1d2cb1..265f32f14c2 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.20 2020/02/21 07:44:50 florian Exp $ */
+/* $Id: timer.c,v 1.21 2020/02/22 19:50:05 jung Exp $ */
/*! \file */
@@ -70,7 +70,7 @@ struct isc_timermgr {
static isc_timermgr_t *timermgr = NULL;
static inline isc_result_t
-schedule(isc_timer_t *timer, struct timespec *now, isc_boolean_t signal_ok) {
+schedule(isc_timer_t *timer) {
isc_result_t result;
isc_timermgr_t *manager;
struct timespec due;
@@ -79,8 +79,6 @@ schedule(isc_timer_t *timer, struct timespec *now, isc_boolean_t signal_ok) {
* Note: the caller must ensure locking.
*/
- UNUSED(signal_ok);
-
manager = timer->manager;
/*
@@ -218,7 +216,7 @@ isc_timer_create(isc_timermgr_t *manager0, const struct timespec *interval,
timer->index = 0;
ISC_LINK_INIT(timer, link);
- result = schedule(timer, &now, ISC_TRUE);
+ result = schedule(timer);
if (result == ISC_R_SUCCESS)
APPEND(manager->timers, timer, link);
@@ -238,7 +236,6 @@ isc_timer_reset(isc_timer_t *timer, const struct timespec *interval,
isc_boolean_t purge)
{
struct timespec now;
- isc_timermgr_t *manager;
isc_result_t result;
/*
@@ -247,7 +244,6 @@ isc_timer_reset(isc_timer_t *timer, const struct timespec *interval,
* are purged from its task's event queue.
*/
- manager = timer->manager;
REQUIRE(interval != NULL);
REQUIRE(timespecisset(interval));
@@ -269,7 +265,7 @@ isc_timer_reset(isc_timer_t *timer, const struct timespec *interval,
timespecclear(&timer->idle);
}
- result = schedule(timer, &now, ISC_TRUE);
+ result = schedule(timer);
return (result);
}
@@ -371,7 +367,7 @@ dispatch(isc_timermgr_t *manager, struct timespec *now) {
manager->nscheduled--;
if (need_schedule) {
- result = schedule(timer, now, ISC_FALSE);
+ result = schedule(timer);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"%s: %u",