2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Apply the semantic patch to remove isc_stdtime_get()

This is a simple replacement using the semantic patch from the previous
commit and as added bonus, one removal of previously undetected unused
variable in named/server.c.
This commit is contained in:
Ondřej Surý
2023-03-30 21:13:41 +02:00
parent 0ec8d7b6f3
commit 46f06c1d6e
39 changed files with 97 additions and 163 deletions

View File

@@ -1545,7 +1545,7 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
goto cleanup;
}
isc_stdtime_get(&dctx->now);
dctx->now = isc_stdtime_now();
dns_db_attach(db, &dctx->db);
dctx->do_date = dns_db_iscache(dctx->db);
@@ -1913,7 +1913,7 @@ dns_master_dumpnodetostream(isc_mem_t *mctx, dns_db_t *db,
isc_result_t result;
isc_buffer_t buffer;
char *bufmem;
isc_stdtime_t now;
isc_stdtime_t now = isc_stdtime_now();
dns_totext_ctx_t ctx;
dns_rdatasetiter_t *rdsiter = NULL;
unsigned int options = DNS_DB_STALEOK;
@@ -1928,8 +1928,6 @@ dns_master_dumpnodetostream(isc_mem_t *mctx, dns_db_t *db,
return (ISC_R_UNEXPECTED);
}
isc_stdtime_get(&now);
bufmem = isc_mem_get(mctx, initial_buffer_length);
isc_buffer_init(&buffer, bufmem, initial_buffer_length);