2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Refactor isc_timer_reset() use with semantic patch

Add and apply semantic patch to remove expires argument from the
isc_timer_reset() calls through the codebase.
This commit is contained in:
Ondřej Surý
2022-03-11 23:08:17 +01:00
committed by Evan Hunt
parent 6437bcc488
commit e6ca2a651f
12 changed files with 63 additions and 116 deletions

View File

@@ -1616,8 +1616,8 @@ dns_rpz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
isc_interval_set(&interval, (unsigned int)defer, 0);
dns_db_currentversion(zone->db, &zone->dbversion);
result = isc_timer_reset(zone->updatetimer,
isc_timertype_once, NULL,
&interval, true);
isc_timertype_once, &interval,
true);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
@@ -1669,7 +1669,7 @@ dns_rpz_update_taskaction(isc_task_t *task, isc_event_t *event) {
zone->updaterunning = true;
dns_rpz_update_from_db(zone);
result = isc_timer_reset(zone->updatetimer, isc_timertype_inactive,
NULL, NULL, true);
NULL, true);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
result = isc_time_now(&zone->lastupdated);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
@@ -1770,7 +1770,7 @@ finish_update(dns_rpz_zone_t *rpz) {
dname, defer);
isc_interval_set(&interval, (unsigned int)defer, 0);
isc_timer_reset(rpz->updatetimer, isc_timertype_once,
NULL, &interval, true);
&interval, true);
} else {
isc_event_t *event = NULL;
INSIST(!ISC_LINK_LINKED(&rpz->updateevent, ev_link));
@@ -2210,7 +2210,7 @@ rpz_detach(dns_rpz_zone_t **rpzp) {
}
isc_timer_reset(rpz->updatetimer, isc_timertype_inactive, NULL,
NULL, true);
true);
isc_timer_detach(&rpz->updatetimer);
isc_ht_destroy(&rpz->nodes);