diff options
Diffstat (limited to 'lib/dns/diff.c')
-rw-r--r-- | lib/dns/diff.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/dns/diff.c b/lib/dns/diff.c index b6d4152999f8..1c073ab75e2f 100644 --- a/lib/dns/diff.c +++ b/lib/dns/diff.c @@ -26,6 +26,7 @@ #include <isc/buffer.h> #include <isc/file.h> #include <isc/mem.h> +#include <isc/print.h> #include <isc/string.h> #include <isc/util.h> @@ -290,12 +291,11 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, * of the diff itself is not affected. */ + dns_rdatalist_init(&rdl); rdl.type = type; rdl.covers = covers; rdl.rdclass = t->rdata.rdclass; rdl.ttl = t->ttl; - ISC_LIST_INIT(rdl.rdata); - ISC_LINK_INIT(&rdl, link); node = NULL; if (type != dns_rdatatype_nsec3 && @@ -462,12 +462,11 @@ dns_diff_load(dns_diff_t *diff, dns_addrdatasetfunc_t addfunc, type = t->rdata.type; covers = rdata_covers(&t->rdata); + dns_rdatalist_init(&rdl); rdl.type = type; rdl.covers = covers; rdl.rdclass = t->rdata.rdclass; rdl.ttl = t->ttl; - ISC_LIST_INIT(rdl.rdata); - ISC_LINK_INIT(&rdl, link); while (t != NULL && dns_name_equal(&t->name, name) && t->op == op && t->rdata.type == type && @@ -556,11 +555,10 @@ diff_tuple_tordataset(dns_difftuple_t *t, dns_rdata_t *rdata, REQUIRE(rdl != NULL); REQUIRE(rds != NULL); + dns_rdatalist_init(rdl); rdl->type = t->rdata.type; rdl->rdclass = t->rdata.rdclass; rdl->ttl = t->ttl; - ISC_LIST_INIT(rdl->rdata); - ISC_LINK_INIT(rdl, link); dns_rdataset_init(rds); ISC_LINK_INIT(rdata, link); dns_rdata_clone(&t->rdata, rdata); |