remove re-initalisation of common structure

(cherry picked from commit 6e06d3e7c6)
This commit is contained in:
Mark Andrews 2018-07-02 15:51:26 +10:00
parent 5a059f2f4c
commit 43c6f0d801

View 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);