]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove re-initalisation of common structure
authorMark Andrews <marka@isc.org>
Mon, 2 Jul 2018 05:51:26 +0000 (15:51 +1000)
committerMark Andrews <marka@isc.org>
Wed, 11 Jul 2018 23:37:13 +0000 (09:37 +1000)
lib/dns/rdata/generic/tlsa_52.c

index 1160aca897b0d37d314f70943bb58d1f856dbe94..079bcb1de868eb90228ba335b4447a049d5e797c 100644 (file)
@@ -207,12 +207,13 @@ generic_tostruct_tlsa(ARGS_TOSTRUCT) {
        dns_rdata_tlsa_t *tlsa = target;
        isc_region_t region;
 
-       REQUIRE(target != NULL);
+       REQUIRE(rdata != NULL);
        REQUIRE(rdata->length != 0);
 
-       tlsa->common.rdclass = rdata->rdclass;
-       tlsa->common.rdtype = rdata->type;
-       ISC_LINK_INIT(&tlsa->common, link);
+       REQUIRE(tlsa != NULL);
+       REQUIRE(tlsa->common.rdclass == rdata->rdclass);
+       REQUIRE(tlsa->common.rdtype == rdata->type);
+       REQUIRE(!ISC_LINK_LINKED(&tlsa->common, link));
 
        dns_rdata_toregion(rdata, &region);