lib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck

Cppcheck gets confused by:

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(source != NULL);
    REQUIRE(data->member != NULL);
}

and for consistency the DbC check needs to be changed to

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(data != NULL);
    REQUIRE(data->member != NULL);
}
This commit is contained in:
Ondřej Surý 2019-09-27 10:40:51 +02:00
parent e68333aa67
commit 66af8713d8
79 changed files with 240 additions and 227 deletions

View file

@ -358,7 +358,7 @@ fromstruct_any_tsig(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_tsig);
REQUIRE(rdclass == dns_rdataclass_any);
REQUIRE(source != NULL);
REQUIRE(tsig != NULL);
REQUIRE(tsig->common.rdclass == rdclass);
REQUIRE(tsig->common.rdtype == type);
@ -523,7 +523,7 @@ static inline void
freestruct_any_tsig(ARGS_FREESTRUCT) {
dns_rdata_any_tsig_t *tsig = (dns_rdata_any_tsig_t *) source;
REQUIRE(source != NULL);
REQUIRE(tsig != NULL);
REQUIRE(tsig->common.rdtype == dns_rdatatype_tsig);
REQUIRE(tsig->common.rdclass == dns_rdataclass_any);

View file

@ -191,7 +191,7 @@ fromstruct_ch_a(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_a);
REQUIRE(source != NULL);
REQUIRE(a != NULL);
REQUIRE(a->common.rdtype == type);
REQUIRE(a->common.rdclass == rdclass);
@ -235,7 +235,7 @@ static inline void
freestruct_ch_a(ARGS_FREESTRUCT) {
dns_rdata_ch_a_t *a = source;
REQUIRE(source != NULL);
REQUIRE(a != NULL);
REQUIRE(a->common.rdtype == dns_rdatatype_a);
if (a->mctx == NULL)

View file

@ -174,7 +174,7 @@ fromstruct_afsdb(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_afsdb);
REQUIRE(source != NULL);
REQUIRE(afsdb != NULL);
REQUIRE(afsdb->common.rdclass == rdclass);
REQUIRE(afsdb->common.rdtype == type);
@ -193,7 +193,7 @@ tostruct_afsdb(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_afsdb);
REQUIRE(target != NULL);
REQUIRE(afsdb != NULL);
REQUIRE(rdata->length != 0);
afsdb->common.rdclass = rdata->rdclass;
@ -219,7 +219,7 @@ static inline void
freestruct_afsdb(ARGS_FREESTRUCT) {
dns_rdata_afsdb_t *afsdb = source;
REQUIRE(source != NULL);
REQUIRE(afsdb != NULL);
REQUIRE(afsdb->common.rdtype == dns_rdatatype_afsdb);
if (afsdb->mctx == NULL)

View file

@ -269,7 +269,7 @@ fromstruct_amtrelay(ARGS_FROMSTRUCT) {
uint32_t n;
REQUIRE(type == dns_rdatatype_amtrelay);
REQUIRE(source != NULL);
REQUIRE(amtrelay != NULL);
REQUIRE(amtrelay->common.rdtype == type);
REQUIRE(amtrelay->common.rdclass == rdclass);
@ -310,7 +310,7 @@ tostruct_amtrelay(ARGS_TOSTRUCT) {
uint32_t n;
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
REQUIRE(target != NULL);
REQUIRE(amtrelay != NULL);
REQUIRE(rdata->length >= 2);
amtrelay->common.rdclass = rdata->rdclass;
@ -370,7 +370,7 @@ static inline void
freestruct_amtrelay(ARGS_FREESTRUCT) {
dns_rdata_amtrelay_t *amtrelay = source;
REQUIRE(source != NULL);
REQUIRE(amtrelay != NULL);
REQUIRE(amtrelay->common.rdtype == dns_rdatatype_amtrelay);
if (amtrelay->mctx == NULL)

View file

@ -90,7 +90,7 @@ tostruct_avc(ARGS_TOSTRUCT) {
dns_rdata_avc_t *avc = target;
REQUIRE(rdata->type == dns_rdatatype_avc);
REQUIRE(target != NULL);
REQUIRE(avc != NULL);
avc->common.rdclass = rdata->rdclass;
avc->common.rdtype = rdata->type;
@ -101,10 +101,10 @@ tostruct_avc(ARGS_TOSTRUCT) {
static inline void
freestruct_avc(ARGS_FREESTRUCT) {
dns_rdata_avc_t *txt = source;
dns_rdata_avc_t *avc = source;
REQUIRE(source != NULL);
REQUIRE(txt->common.rdtype == dns_rdatatype_avc);
REQUIRE(avc != NULL);
REQUIRE(avc->common.rdtype == dns_rdatatype_avc);
generic_freestruct_txt(source);
}

View file

@ -196,7 +196,7 @@ fromstruct_caa(ARGS_FROMSTRUCT) {
unsigned int i;
REQUIRE(type == dns_rdatatype_caa);
REQUIRE(source != NULL);
REQUIRE(caa != NULL);
REQUIRE(caa->common.rdtype == type);
REQUIRE(caa->common.rdclass == rdclass);
REQUIRE(caa->tag != NULL && caa->tag_len != 0);
@ -239,7 +239,7 @@ tostruct_caa(ARGS_TOSTRUCT) {
isc_region_t sr;
REQUIRE(rdata->type == dns_rdatatype_caa);
REQUIRE(target != NULL);
REQUIRE(caa != NULL);
REQUIRE(rdata->length >= 3U);
REQUIRE(rdata->data != NULL);
@ -291,7 +291,7 @@ static inline void
freestruct_caa(ARGS_FREESTRUCT) {
dns_rdata_caa_t *caa = (dns_rdata_caa_t *) source;
REQUIRE(source != NULL);
REQUIRE(caa != NULL);
REQUIRE(caa->common.rdtype == dns_rdatatype_caa);
if (caa->mctx == NULL)

View file

@ -86,7 +86,7 @@ tostruct_cds(ARGS_TOSTRUCT) {
dns_rdata_cds_t *cds = target;
REQUIRE(rdata->type == dns_rdatatype_cds);
REQUIRE(target != NULL);
REQUIRE(cds != NULL);
REQUIRE(rdata->length != 0);
/*
@ -101,17 +101,19 @@ tostruct_cds(ARGS_TOSTRUCT) {
static inline void
freestruct_cds(ARGS_FREESTRUCT) {
dns_rdata_cds_t *ds = source;
dns_rdata_cds_t *cds = source;
REQUIRE(ds != NULL);
REQUIRE(ds->common.rdtype == dns_rdatatype_cds);
REQUIRE(cds != NULL);
REQUIRE(cds->common.rdtype == dns_rdatatype_cds);
if (ds->mctx == NULL)
if (cds->mctx == NULL) {
return;
}
if (ds->digest != NULL)
isc_mem_free(ds->mctx, ds->digest);
ds->mctx = NULL;
if (cds->digest != NULL) {
isc_mem_free(cds->mctx, cds->digest);
}
cds->mctx = NULL;
}
static inline isc_result_t

View file

@ -162,7 +162,7 @@ fromstruct_cert(ARGS_FROMSTRUCT) {
dns_rdata_cert_t *cert = source;
REQUIRE(type == dns_rdatatype_cert);
REQUIRE(source != NULL);
REQUIRE(cert != NULL);
REQUIRE(cert->common.rdtype == type);
REQUIRE(cert->common.rdclass == rdclass);
@ -182,7 +182,7 @@ tostruct_cert(ARGS_TOSTRUCT) {
isc_region_t region;
REQUIRE(rdata->type == dns_rdatatype_cert);
REQUIRE(target != NULL);
REQUIRE(cert != NULL);
REQUIRE(rdata->length != 0);
cert->common.rdclass = rdata->rdclass;

View file

@ -123,7 +123,7 @@ fromstruct_cname(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_cname);
REQUIRE(source != NULL);
REQUIRE(cname != NULL);
REQUIRE(cname->common.rdtype == type);
REQUIRE(cname->common.rdclass == rdclass);
@ -141,7 +141,7 @@ tostruct_cname(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_cname);
REQUIRE(target != NULL);
REQUIRE(cname != NULL);
REQUIRE(rdata->length != 0);
cname->common.rdclass = rdata->rdclass;
@ -161,7 +161,7 @@ static inline void
freestruct_cname(ARGS_FREESTRUCT) {
dns_rdata_cname_t *cname = source;
REQUIRE(source != NULL);
REQUIRE(cname != NULL);
if (cname->mctx == NULL)
return;

View file

@ -140,7 +140,7 @@ fromstruct_csync(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_csync);
REQUIRE(source != NULL);
REQUIRE(csync != NULL);
REQUIRE(csync->common.rdtype == type);
REQUIRE(csync->common.rdclass == rdclass);
REQUIRE(csync->typebits != NULL || csync->len == 0);
@ -163,7 +163,7 @@ tostruct_csync(ARGS_TOSTRUCT) {
dns_rdata_csync_t *csync = target;
REQUIRE(rdata->type == dns_rdatatype_csync);
REQUIRE(target != NULL);
REQUIRE(csync != NULL);
REQUIRE(rdata->length != 0);
csync->common.rdclass = rdata->rdclass;
@ -194,7 +194,7 @@ static inline void
freestruct_csync(ARGS_FREESTRUCT) {
dns_rdata_csync_t *csync = source;
REQUIRE(source != NULL);
REQUIRE(csync != NULL);
REQUIRE(csync->common.rdtype == dns_rdatatype_csync);
if (csync->mctx == NULL)

View file

@ -87,6 +87,7 @@ tostruct_dlv(ARGS_TOSTRUCT) {
dns_rdata_dlv_t *dlv = target;
REQUIRE(rdata->type == dns_rdatatype_dlv);
REQUIRE(dlv != NULL);
dlv->common.rdclass = rdata->rdclass;
dlv->common.rdtype = rdata->type;

View file

@ -123,7 +123,7 @@ fromstruct_dname(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_dname);
REQUIRE(source != NULL);
REQUIRE(dname != NULL);
REQUIRE(dname->common.rdtype == type);
REQUIRE(dname->common.rdclass == rdclass);
@ -141,7 +141,7 @@ tostruct_dname(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_dname);
REQUIRE(target != NULL);
REQUIRE(dname != NULL);
REQUIRE(rdata->length != 0);
dname->common.rdclass = rdata->rdclass;
@ -161,7 +161,7 @@ static inline void
freestruct_dname(ARGS_FREESTRUCT) {
dns_rdata_dname_t *dname = source;
REQUIRE(source != NULL);
REQUIRE(dname != NULL);
REQUIRE(dname->common.rdtype == dns_rdatatype_dname);
if (dname->mctx == NULL)

View file

@ -191,7 +191,7 @@ fromstruct_doa(ARGS_FROMSTRUCT) {
dns_rdata_doa_t *doa = source;
REQUIRE(type == dns_rdatatype_doa);
REQUIRE(source != NULL);
REQUIRE(doa != NULL);
REQUIRE(doa->common.rdtype == dns_rdatatype_doa);
REQUIRE(doa->common.rdclass == rdclass);
@ -210,6 +210,7 @@ tostruct_doa(ARGS_TOSTRUCT) {
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_doa);
REQUIRE(doa != NULL);
REQUIRE(rdata->length != 0);
doa->common.rdclass = rdata->rdclass;
@ -288,7 +289,7 @@ static inline void
freestruct_doa(ARGS_FREESTRUCT) {
dns_rdata_doa_t *doa = source;
REQUIRE(source != NULL);
REQUIRE(doa != NULL);
REQUIRE(doa->common.rdtype == dns_rdatatype_doa);
if (doa->mctx == NULL) {

View file

@ -233,7 +233,7 @@ static inline isc_result_t
generic_fromstruct_ds(ARGS_FROMSTRUCT) {
dns_rdata_ds_t *ds = source;
REQUIRE(source != NULL);
REQUIRE(ds != NULL);
REQUIRE(ds->common.rdtype == type);
REQUIRE(ds->common.rdclass == rdclass);
@ -272,7 +272,7 @@ generic_tostruct_ds(ARGS_TOSTRUCT) {
dns_rdata_ds_t *ds = target;
isc_region_t region;
REQUIRE(target != NULL);
REQUIRE(ds != NULL);
REQUIRE(rdata->length != 0);
REQUIRE(ds->common.rdtype == rdata->type);
REQUIRE(ds->common.rdclass == rdata->rdclass);
@ -301,7 +301,7 @@ tostruct_ds(ARGS_TOSTRUCT) {
dns_rdata_ds_t *ds = target;
REQUIRE(rdata->type == dns_rdatatype_ds);
REQUIRE(target != NULL);
REQUIRE(ds != NULL);
ds->common.rdclass = rdata->rdclass;
ds->common.rdtype = rdata->type;

View file

@ -113,7 +113,7 @@ fromstruct_eui48(ARGS_FROMSTRUCT) {
dns_rdata_eui48_t *eui48 = source;
REQUIRE(type == dns_rdatatype_eui48);
REQUIRE(source != NULL);
REQUIRE(eui48 != NULL);
REQUIRE(eui48->common.rdtype == type);
REQUIRE(eui48->common.rdclass == rdclass);
@ -128,7 +128,7 @@ tostruct_eui48(ARGS_TOSTRUCT) {
dns_rdata_eui48_t *eui48 = target;
REQUIRE(rdata->type == dns_rdatatype_eui48);
REQUIRE(target != NULL);
REQUIRE(eui48 != NULL);
REQUIRE(rdata->length == 6);
UNUSED(mctx);
@ -145,7 +145,7 @@ static inline void
freestruct_eui48(ARGS_FREESTRUCT) {
dns_rdata_eui48_t *eui48 = source;
REQUIRE(source != NULL);
REQUIRE(eui48 != NULL);
REQUIRE(eui48->common.rdtype == dns_rdatatype_eui48);
return;

View file

@ -118,7 +118,7 @@ fromstruct_eui64(ARGS_FROMSTRUCT) {
dns_rdata_eui64_t *eui64 = source;
REQUIRE(type == dns_rdatatype_eui64);
REQUIRE(source != NULL);
REQUIRE(eui64 != NULL);
REQUIRE(eui64->common.rdtype == type);
REQUIRE(eui64->common.rdclass == rdclass);
@ -133,7 +133,7 @@ tostruct_eui64(ARGS_TOSTRUCT) {
dns_rdata_eui64_t *eui64 = target;
REQUIRE(rdata->type == dns_rdatatype_eui64);
REQUIRE(target != NULL);
REQUIRE(eui64 != NULL);
REQUIRE(rdata->length == 8);
UNUSED(mctx);
@ -150,7 +150,7 @@ static inline void
freestruct_eui64(ARGS_FREESTRUCT) {
dns_rdata_eui64_t *eui64 = source;
REQUIRE(source != NULL);
REQUIRE(eui64 != NULL);
REQUIRE(eui64->common.rdtype == dns_rdatatype_eui64);
return;

View file

@ -107,7 +107,7 @@ fromstruct_gpos(ARGS_FROMSTRUCT) {
dns_rdata_gpos_t *gpos = source;
REQUIRE(type == dns_rdatatype_gpos);
REQUIRE(source != NULL);
REQUIRE(gpos != NULL);
REQUIRE(gpos->common.rdtype == type);
REQUIRE(gpos->common.rdclass == rdclass);
@ -128,7 +128,7 @@ tostruct_gpos(ARGS_TOSTRUCT) {
isc_region_t region;
REQUIRE(rdata->type == dns_rdatatype_gpos);
REQUIRE(target != NULL);
REQUIRE(gpos != NULL);
REQUIRE(rdata->length != 0);
gpos->common.rdclass = rdata->rdclass;
@ -177,7 +177,7 @@ static inline void
freestruct_gpos(ARGS_FREESTRUCT) {
dns_rdata_gpos_t *gpos = source;
REQUIRE(source != NULL);
REQUIRE(gpos != NULL);
REQUIRE(gpos->common.rdtype == dns_rdatatype_gpos);
if (gpos->mctx == NULL)

View file

@ -97,7 +97,7 @@ fromstruct_hinfo(ARGS_FROMSTRUCT) {
dns_rdata_hinfo_t *hinfo = source;
REQUIRE(type == dns_rdatatype_hinfo);
REQUIRE(source != NULL);
REQUIRE(hinfo != NULL);
REQUIRE(hinfo->common.rdtype == type);
REQUIRE(hinfo->common.rdclass == rdclass);
@ -116,7 +116,7 @@ tostruct_hinfo(ARGS_TOSTRUCT) {
isc_region_t region;
REQUIRE(rdata->type == dns_rdatatype_hinfo);
REQUIRE(target != NULL);
REQUIRE(hinfo != NULL);
REQUIRE(rdata->length != 0);
hinfo->common.rdclass = rdata->rdclass;
@ -150,7 +150,7 @@ static inline void
freestruct_hinfo(ARGS_FREESTRUCT) {
dns_rdata_hinfo_t *hinfo = source;
REQUIRE(source != NULL);
REQUIRE(hinfo != NULL);
if (hinfo->mctx == NULL)
return;

View file

@ -254,7 +254,7 @@ fromstruct_hip(ARGS_FROMSTRUCT) {
isc_result_t result;
REQUIRE(type == dns_rdatatype_hip);
REQUIRE(source != NULL);
REQUIRE(hip != NULL);
REQUIRE(hip->common.rdtype == type);
REQUIRE(hip->common.rdclass == rdclass);
REQUIRE(hip->hit_len > 0 && hip->hit != NULL);
@ -286,7 +286,7 @@ tostruct_hip(ARGS_TOSTRUCT) {
dns_rdata_hip_t *hip = target;
REQUIRE(rdata->type == dns_rdatatype_hip);
REQUIRE(target != NULL);
REQUIRE(hip != NULL);
REQUIRE(rdata->length != 0);
hip->common.rdclass = rdata->rdclass;
@ -344,7 +344,7 @@ static inline void
freestruct_hip(ARGS_FREESTRUCT) {
dns_rdata_hip_t *hip = source;
REQUIRE(source != NULL);
REQUIRE(hip != NULL);
if (hip->mctx == NULL)
return;

View file

@ -282,7 +282,7 @@ fromstruct_ipseckey(ARGS_FROMSTRUCT) {
uint32_t n;
REQUIRE(type == dns_rdatatype_ipseckey);
REQUIRE(source != NULL);
REQUIRE(ipseckey != NULL);
REQUIRE(ipseckey->common.rdtype == type);
REQUIRE(ipseckey->common.rdclass == rdclass);
@ -326,7 +326,7 @@ tostruct_ipseckey(ARGS_TOSTRUCT) {
uint32_t n;
REQUIRE(rdata->type == dns_rdatatype_ipseckey);
REQUIRE(target != NULL);
REQUIRE(ipseckey != NULL);
REQUIRE(rdata->length >= 3);
if (rdata->data[1] > 3U)
@ -392,7 +392,7 @@ static inline void
freestruct_ipseckey(ARGS_FREESTRUCT) {
dns_rdata_ipseckey_t *ipseckey = source;
REQUIRE(source != NULL);
REQUIRE(ipseckey != NULL);
REQUIRE(ipseckey->common.rdtype == dns_rdatatype_ipseckey);
if (ipseckey->mctx == NULL)

View file

@ -108,7 +108,7 @@ fromstruct_isdn(ARGS_FROMSTRUCT) {
dns_rdata_isdn_t *isdn = source;
REQUIRE(type == dns_rdatatype_isdn);
REQUIRE(source != NULL);
REQUIRE(isdn != NULL);
REQUIRE(isdn->common.rdtype == type);
REQUIRE(isdn->common.rdclass == rdclass);
@ -129,7 +129,7 @@ tostruct_isdn(ARGS_TOSTRUCT) {
isc_region_t r;
REQUIRE(rdata->type == dns_rdatatype_isdn);
REQUIRE(target != NULL);
REQUIRE(isdn != NULL);
REQUIRE(rdata->length != 0);
isdn->common.rdclass = rdata->rdclass;
@ -170,7 +170,7 @@ static inline void
freestruct_isdn(ARGS_FREESTRUCT) {
dns_rdata_isdn_t *isdn = source;
REQUIRE(source != NULL);
REQUIRE(isdn != NULL);
if (isdn->mctx == NULL)
return;

View file

@ -320,7 +320,7 @@ generic_tostruct_key(ARGS_TOSTRUCT) {
dns_rdata_key_t *key = target;
isc_region_t sr;
REQUIRE(rdata != NULL);
REQUIRE(key != NULL);
REQUIRE(rdata->length != 0);
REQUIRE(key != NULL);

View file

@ -275,7 +275,7 @@ fromstruct_keydata(ARGS_FROMSTRUCT) {
dns_rdata_keydata_t *keydata = source;
REQUIRE(type == dns_rdatatype_keydata);
REQUIRE(source != NULL);
REQUIRE(keydata != NULL);
REQUIRE(keydata->common.rdtype == type);
REQUIRE(keydata->common.rdclass == rdclass);
@ -310,7 +310,7 @@ tostruct_keydata(ARGS_TOSTRUCT) {
isc_region_t sr;
REQUIRE(rdata->type == dns_rdatatype_keydata);
REQUIRE(target != NULL);
REQUIRE(keydata != NULL);
keydata->common.rdclass = rdata->rdclass;
keydata->common.rdtype = rdata->type;
@ -368,7 +368,7 @@ static inline void
freestruct_keydata(ARGS_FREESTRUCT) {
dns_rdata_keydata_t *keydata = (dns_rdata_keydata_t *) source;
REQUIRE(source != NULL);
REQUIRE(keydata != NULL);
REQUIRE(keydata->common.rdtype == dns_rdatatype_keydata);
if (keydata->mctx == NULL)

View file

@ -124,7 +124,7 @@ fromstruct_l32(ARGS_FROMSTRUCT) {
uint32_t n;
REQUIRE(type == dns_rdatatype_l32);
REQUIRE(source != NULL);
REQUIRE(l32 != NULL);
REQUIRE(l32->common.rdtype == type);
REQUIRE(l32->common.rdclass == rdclass);
@ -143,7 +143,7 @@ tostruct_l32(ARGS_TOSTRUCT) {
uint32_t n;
REQUIRE(rdata->type == dns_rdatatype_l32);
REQUIRE(target != NULL);
REQUIRE(l32 != NULL);
REQUIRE(rdata->length == 6);
UNUSED(mctx);
@ -163,7 +163,7 @@ static inline void
freestruct_l32(ARGS_FREESTRUCT) {
dns_rdata_l32_t *l32 = source;
REQUIRE(source != NULL);
REQUIRE(l32 != NULL);
REQUIRE(l32->common.rdtype == dns_rdatatype_l32);
return;

View file

@ -122,7 +122,7 @@ fromstruct_l64(ARGS_FROMSTRUCT) {
dns_rdata_l64_t *l64 = source;
REQUIRE(type == dns_rdatatype_l64);
REQUIRE(source != NULL);
REQUIRE(l64 != NULL);
REQUIRE(l64->common.rdtype == type);
REQUIRE(l64->common.rdclass == rdclass);
@ -139,7 +139,7 @@ tostruct_l64(ARGS_TOSTRUCT) {
dns_rdata_l64_t *l64 = target;
REQUIRE(rdata->type == dns_rdatatype_l64);
REQUIRE(target != NULL);
REQUIRE(l64 != NULL);
REQUIRE(rdata->length == 10);
UNUSED(mctx);
@ -158,7 +158,7 @@ static inline void
freestruct_l64(ARGS_FREESTRUCT) {
dns_rdata_l64_t *l64 = source;
REQUIRE(source != NULL);
REQUIRE(l64 != NULL);
REQUIRE(l64->common.rdtype == dns_rdatatype_l64);
return;

View file

@ -670,7 +670,7 @@ fromstruct_loc(ARGS_FROMSTRUCT) {
uint8_t c;
REQUIRE(type == dns_rdatatype_loc);
REQUIRE(source != NULL);
REQUIRE(loc != NULL);
REQUIRE(loc->common.rdtype == type);
REQUIRE(loc->common.rdclass == rdclass);
@ -715,7 +715,7 @@ tostruct_loc(ARGS_TOSTRUCT) {
uint8_t version;
REQUIRE(rdata->type == dns_rdatatype_loc);
REQUIRE(target != NULL);
REQUIRE(loc != NULL);
REQUIRE(rdata->length != 0);
UNUSED(mctx);
@ -750,7 +750,7 @@ static inline void
freestruct_loc(ARGS_FREESTRUCT) {
dns_rdata_loc_t *loc = source;
REQUIRE(source != NULL);
REQUIRE(loc != NULL);
REQUIRE(loc->common.rdtype == dns_rdatatype_loc);
UNUSED(source);

View file

@ -130,7 +130,7 @@ fromstruct_lp(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_lp);
REQUIRE(source != NULL);
REQUIRE(lp != NULL);
REQUIRE(lp->common.rdtype == type);
REQUIRE(lp->common.rdclass == rdclass);
@ -149,7 +149,7 @@ tostruct_lp(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_lp);
REQUIRE(target != NULL);
REQUIRE(lp != NULL);
REQUIRE(rdata->length != 0);
lp->common.rdclass = rdata->rdclass;
@ -171,7 +171,7 @@ static inline void
freestruct_lp(ARGS_FREESTRUCT) {
dns_rdata_lp_t *lp = source;
REQUIRE(source != NULL);
REQUIRE(lp != NULL);
REQUIRE(lp->common.rdtype == dns_rdatatype_lp);
if (lp->mctx == NULL)

View file

@ -122,7 +122,7 @@ fromstruct_mb(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_mb);
REQUIRE(source != NULL);
REQUIRE(mb != NULL);
REQUIRE(mb->common.rdtype == type);
REQUIRE(mb->common.rdclass == rdclass);
@ -140,7 +140,7 @@ tostruct_mb(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_mb);
REQUIRE(target != NULL);
REQUIRE(mb != NULL);
REQUIRE(rdata->length != 0);
mb->common.rdclass = rdata->rdclass;
@ -160,7 +160,7 @@ static inline void
freestruct_mb(ARGS_FREESTRUCT) {
dns_rdata_mb_t *mb = source;
REQUIRE(source != NULL);
REQUIRE(mb != NULL);
if (mb->mctx == NULL)
return;

View file

@ -122,7 +122,7 @@ fromstruct_md(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_md);
REQUIRE(source != NULL);
REQUIRE(md != NULL);
REQUIRE(md->common.rdtype == type);
REQUIRE(md->common.rdclass == rdclass);
@ -140,7 +140,7 @@ tostruct_md(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_md);
REQUIRE(target != NULL);
REQUIRE(md != NULL);
REQUIRE(rdata->length != 0);
md->common.rdclass = rdata->rdclass;
@ -160,7 +160,7 @@ static inline void
freestruct_md(ARGS_FREESTRUCT) {
dns_rdata_md_t *md = source;
REQUIRE(source != NULL);
REQUIRE(md != NULL);
REQUIRE(md->common.rdtype == dns_rdatatype_md);
if (md->mctx == NULL)

View file

@ -122,7 +122,7 @@ fromstruct_mf(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_mf);
REQUIRE(source != NULL);
REQUIRE(mf != NULL);
REQUIRE(mf->common.rdtype == type);
REQUIRE(mf->common.rdclass == rdclass);
@ -140,7 +140,7 @@ tostruct_mf(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_mf);
REQUIRE(target != NULL);
REQUIRE(mf != NULL);
REQUIRE(rdata->length != 0);
mf->common.rdclass = rdata->rdclass;
@ -160,7 +160,7 @@ static inline void
freestruct_mf(ARGS_FREESTRUCT) {
dns_rdata_mf_t *mf = source;
REQUIRE(source != NULL);
REQUIRE(mf != NULL);
REQUIRE(mf->common.rdtype == dns_rdatatype_mf);
if (mf->mctx == NULL)

View file

@ -122,7 +122,7 @@ fromstruct_mg(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_mg);
REQUIRE(source != NULL);
REQUIRE(mg != NULL);
REQUIRE(mg->common.rdtype == type);
REQUIRE(mg->common.rdclass == rdclass);
@ -140,7 +140,7 @@ tostruct_mg(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_mg);
REQUIRE(target != NULL);
REQUIRE(mg != NULL);
REQUIRE(rdata->length != 0);
mg->common.rdclass = rdata->rdclass;
@ -160,7 +160,7 @@ static inline void
freestruct_mg(ARGS_FREESTRUCT) {
dns_rdata_mg_t *mg = source;
REQUIRE(source != NULL);
REQUIRE(mg != NULL);
REQUIRE(mg->common.rdtype == dns_rdatatype_mg);
if (mg->mctx == NULL)

View file

@ -177,7 +177,7 @@ fromstruct_minfo(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_minfo);
REQUIRE(source != NULL);
REQUIRE(minfo != NULL);
REQUIRE(minfo->common.rdtype == type);
REQUIRE(minfo->common.rdclass == rdclass);
@ -198,7 +198,7 @@ tostruct_minfo(ARGS_TOSTRUCT) {
isc_result_t result;
REQUIRE(rdata->type == dns_rdatatype_minfo);
REQUIRE(target != NULL);
REQUIRE(minfo != NULL);
REQUIRE(rdata->length != 0);
minfo->common.rdclass = rdata->rdclass;
@ -230,7 +230,7 @@ static inline void
freestruct_minfo(ARGS_FREESTRUCT) {
dns_rdata_minfo_t *minfo = source;
REQUIRE(source != NULL);
REQUIRE(minfo != NULL);
REQUIRE(minfo->common.rdtype == dns_rdatatype_minfo);
if (minfo->mctx == NULL)

View file

@ -122,7 +122,7 @@ fromstruct_mr(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_mr);
REQUIRE(source != NULL);
REQUIRE(mr != NULL);
REQUIRE(mr->common.rdtype == type);
REQUIRE(mr->common.rdclass == rdclass);
@ -140,7 +140,7 @@ tostruct_mr(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_mr);
REQUIRE(target != NULL);
REQUIRE(mr != NULL);
REQUIRE(rdata->length != 0);
mr->common.rdclass = rdata->rdclass;
@ -160,7 +160,7 @@ static inline void
freestruct_mr(ARGS_FREESTRUCT) {
dns_rdata_mr_t *mr = source;
REQUIRE(source != NULL);
REQUIRE(mr != NULL);
REQUIRE(mr->common.rdtype == dns_rdatatype_mr);
if (mr->mctx == NULL)

View file

@ -193,7 +193,7 @@ fromstruct_mx(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_mx);
REQUIRE(source != NULL);
REQUIRE(mx != NULL);
REQUIRE(mx->common.rdtype == type);
REQUIRE(mx->common.rdclass == rdclass);
@ -212,7 +212,7 @@ tostruct_mx(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_mx);
REQUIRE(target != NULL);
REQUIRE(mx != NULL);
REQUIRE(rdata->length != 0);
mx->common.rdclass = rdata->rdclass;
@ -234,7 +234,7 @@ static inline void
freestruct_mx(ARGS_FREESTRUCT) {
dns_rdata_mx_t *mx = source;
REQUIRE(source != NULL);
REQUIRE(mx != NULL);
REQUIRE(mx->common.rdtype == dns_rdatatype_mx);
if (mx->mctx == NULL)

View file

@ -402,7 +402,7 @@ fromstruct_naptr(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_naptr);
REQUIRE(source != NULL);
REQUIRE(naptr != NULL);
REQUIRE(naptr->common.rdtype == type);
REQUIRE(naptr->common.rdclass == rdclass);
REQUIRE(naptr->flags != NULL || naptr->flags_len == 0);
@ -432,7 +432,7 @@ tostruct_naptr(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_naptr);
REQUIRE(target != NULL);
REQUIRE(naptr != NULL);
REQUIRE(rdata->length != 0);
naptr->common.rdclass = rdata->rdclass;
@ -498,7 +498,7 @@ static inline void
freestruct_naptr(ARGS_FREESTRUCT) {
dns_rdata_naptr_t *naptr = source;
REQUIRE(source != NULL);
REQUIRE(naptr != NULL);
REQUIRE(naptr->common.rdtype == dns_rdatatype_naptr);
if (naptr->mctx == NULL)

View file

@ -122,7 +122,7 @@ fromstruct_nid(ARGS_FROMSTRUCT) {
dns_rdata_nid_t *nid = source;
REQUIRE(type == dns_rdatatype_nid);
REQUIRE(source != NULL);
REQUIRE(nid != NULL);
REQUIRE(nid->common.rdtype == type);
REQUIRE(nid->common.rdclass == rdclass);
@ -139,7 +139,7 @@ tostruct_nid(ARGS_TOSTRUCT) {
dns_rdata_nid_t *nid = target;
REQUIRE(rdata->type == dns_rdatatype_nid);
REQUIRE(target != NULL);
REQUIRE(nid != NULL);
REQUIRE(rdata->length == 10);
UNUSED(mctx);
@ -158,7 +158,7 @@ static inline void
freestruct_nid(ARGS_FREESTRUCT) {
dns_rdata_nid_t *nid = source;
REQUIRE(source != NULL);
REQUIRE(nid != NULL);
REQUIRE(nid->common.rdtype == dns_rdatatype_nid);
return;

View file

@ -87,13 +87,14 @@ fromstruct_ninfo(ARGS_FROMSTRUCT) {
static inline isc_result_t
tostruct_ninfo(ARGS_TOSTRUCT) {
dns_rdata_ninfo_t *txt = target;
dns_rdata_ninfo_t *ninfo = target;
REQUIRE(rdata->type == dns_rdatatype_ninfo);
REQUIRE(ninfo != NULL);
txt->common.rdclass = rdata->rdclass;
txt->common.rdtype = rdata->type;
ISC_LINK_INIT(&txt->common, link);
ninfo->common.rdclass = rdata->rdclass;
ninfo->common.rdtype = rdata->type;
ISC_LINK_INIT(&ninfo->common, link);
return (generic_tostruct_txt(rdata, target, mctx));
}
@ -102,7 +103,7 @@ static inline void
freestruct_ninfo(ARGS_FREESTRUCT) {
dns_rdata_ninfo_t *ninfo = source;
REQUIRE(source != NULL);
REQUIRE(ninfo != NULL);
REQUIRE(ninfo->common.rdtype == dns_rdatatype_ninfo);
generic_freestruct_txt(source);

View file

@ -130,7 +130,7 @@ fromstruct_ns(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_ns);
REQUIRE(source != NULL);
REQUIRE(ns != NULL);
REQUIRE(ns->common.rdtype == type);
REQUIRE(ns->common.rdclass == rdclass);
@ -148,7 +148,7 @@ tostruct_ns(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_ns);
REQUIRE(target != NULL);
REQUIRE(ns != NULL);
REQUIRE(rdata->length != 0);
ns->common.rdclass = rdata->rdclass;
@ -168,7 +168,7 @@ static inline void
freestruct_ns(ARGS_FREESTRUCT) {
dns_rdata_ns_t *ns = source;
REQUIRE(source != NULL);
REQUIRE(ns != NULL);
if (ns->mctx == NULL)
return;

View file

@ -249,7 +249,7 @@ fromstruct_nsec3(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_nsec3);
REQUIRE(source != NULL);
REQUIRE(nsec3 != NULL);
REQUIRE(nsec3->common.rdtype == type);
REQUIRE(nsec3->common.rdclass == rdclass);
REQUIRE(nsec3->typebits != NULL || nsec3->len == 0);
@ -278,7 +278,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
dns_rdata_nsec3_t *nsec3 = target;
REQUIRE(rdata->type == dns_rdatatype_nsec3);
REQUIRE(target != NULL);
REQUIRE(nsec3 != NULL);
REQUIRE(rdata->length != 0);
nsec3->common.rdclass = rdata->rdclass;
@ -322,7 +322,7 @@ static inline void
freestruct_nsec3(ARGS_FREESTRUCT) {
dns_rdata_nsec3_t *nsec3 = source;
REQUIRE(source != NULL);
REQUIRE(nsec3 != NULL);
REQUIRE(nsec3->common.rdtype == dns_rdatatype_nsec3);
if (nsec3->mctx == NULL)

View file

@ -198,7 +198,7 @@ fromstruct_nsec3param(ARGS_FROMSTRUCT) {
dns_rdata_nsec3param_t *nsec3param = source;
REQUIRE(type == dns_rdatatype_nsec3param);
REQUIRE(source != NULL);
REQUIRE(nsec3param != NULL);
REQUIRE(nsec3param->common.rdtype == type);
REQUIRE(nsec3param->common.rdclass == rdclass);
@ -220,7 +220,7 @@ tostruct_nsec3param(ARGS_TOSTRUCT) {
dns_rdata_nsec3param_t *nsec3param = target;
REQUIRE(rdata->type == dns_rdatatype_nsec3param);
REQUIRE(target != NULL);
REQUIRE(nsec3param != NULL);
REQUIRE(rdata->length != 0);
nsec3param->common.rdclass = rdata->rdclass;
@ -248,7 +248,7 @@ static inline void
freestruct_nsec3param(ARGS_FREESTRUCT) {
dns_rdata_nsec3param_t *nsec3param = source;
REQUIRE(source != NULL);
REQUIRE(nsec3param != NULL);
REQUIRE(nsec3param->common.rdtype == dns_rdatatype_nsec3param);
if (nsec3param->mctx == NULL)

View file

@ -135,7 +135,7 @@ fromstruct_nsec(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_nsec);
REQUIRE(source != NULL);
REQUIRE(nsec != NULL);
REQUIRE(nsec->common.rdtype == type);
REQUIRE(nsec->common.rdclass == rdclass);
REQUIRE(nsec->typebits != NULL || nsec->len == 0);
@ -159,7 +159,7 @@ tostruct_nsec(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_nsec);
REQUIRE(target != NULL);
REQUIRE(nsec != NULL);
REQUIRE(rdata->length != 0);
nsec->common.rdclass = rdata->rdclass;
@ -191,7 +191,7 @@ static inline void
freestruct_nsec(ARGS_FREESTRUCT) {
dns_rdata_nsec_t *nsec = source;
REQUIRE(source != NULL);
REQUIRE(nsec != NULL);
REQUIRE(nsec->common.rdtype == dns_rdatatype_nsec);
if (nsec->mctx == NULL)

View file

@ -80,7 +80,7 @@ fromstruct_null(ARGS_FROMSTRUCT) {
dns_rdata_null_t *null = source;
REQUIRE(type == dns_rdatatype_null);
REQUIRE(source != NULL);
REQUIRE(null != NULL);
REQUIRE(null->common.rdtype == type);
REQUIRE(null->common.rdclass == rdclass);
REQUIRE(null->data != NULL || null->length == 0);
@ -97,7 +97,7 @@ tostruct_null(ARGS_TOSTRUCT) {
isc_region_t r;
REQUIRE(rdata->type == dns_rdatatype_null);
REQUIRE(target != NULL);
REQUIRE(null != NULL);
null->common.rdclass = rdata->rdclass;
null->common.rdtype = rdata->type;
@ -117,7 +117,7 @@ static inline void
freestruct_null(ARGS_FREESTRUCT) {
dns_rdata_null_t *null = source;
REQUIRE(source != NULL);
REQUIRE(null != NULL);
REQUIRE(null->common.rdtype == dns_rdatatype_null);
if (null->mctx == NULL)

View file

@ -197,7 +197,7 @@ fromstruct_nxt(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_nxt);
REQUIRE(source != NULL);
REQUIRE(nxt != NULL);
REQUIRE(nxt->common.rdtype == type);
REQUIRE(nxt->common.rdclass == rdclass);
REQUIRE(nxt->typebits != NULL || nxt->len == 0);
@ -222,7 +222,7 @@ tostruct_nxt(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_nxt);
REQUIRE(target != NULL);
REQUIRE(nxt != NULL);
REQUIRE(rdata->length != 0);
nxt->common.rdclass = rdata->rdclass;
@ -254,7 +254,7 @@ static inline void
freestruct_nxt(ARGS_FREESTRUCT) {
dns_rdata_nxt_t *nxt = source;
REQUIRE(source != NULL);
REQUIRE(nxt != NULL);
REQUIRE(nxt->common.rdtype == dns_rdatatype_nxt);
if (nxt->mctx == NULL)

View file

@ -116,7 +116,7 @@ fromstruct_openpgpkey(ARGS_FROMSTRUCT) {
dns_rdata_openpgpkey_t *sig = source;
REQUIRE(type == dns_rdatatype_openpgpkey);
REQUIRE(source != NULL);
REQUIRE(sig != NULL);
REQUIRE(sig->common.rdtype == type);
REQUIRE(sig->common.rdclass == rdclass);
REQUIRE(sig->keyring != NULL && sig->length != 0);
@ -136,7 +136,7 @@ tostruct_openpgpkey(ARGS_TOSTRUCT) {
dns_rdata_openpgpkey_t *sig = target;
REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
REQUIRE(target != NULL);
REQUIRE(sig != NULL);
REQUIRE(rdata->length != 0);
sig->common.rdclass = rdata->rdclass;
@ -164,7 +164,7 @@ static inline void
freestruct_openpgpkey(ARGS_FREESTRUCT) {
dns_rdata_openpgpkey_t *sig = (dns_rdata_openpgpkey_t *) source;
REQUIRE(source != NULL);
REQUIRE(sig != NULL);
REQUIRE(sig->common.rdtype == dns_rdatatype_openpgpkey);
if (sig->mctx == NULL)

View file

@ -260,7 +260,7 @@ fromstruct_opt(ARGS_FROMSTRUCT) {
uint16_t length;
REQUIRE(type == dns_rdatatype_opt);
REQUIRE(source != NULL);
REQUIRE(opt != NULL);
REQUIRE(opt->common.rdtype == type);
REQUIRE(opt->common.rdclass == rdclass);
REQUIRE(opt->options != NULL || opt->length == 0);
@ -290,7 +290,7 @@ tostruct_opt(ARGS_TOSTRUCT) {
isc_region_t r;
REQUIRE(rdata->type == dns_rdatatype_opt);
REQUIRE(target != NULL);
REQUIRE(opt != NULL);
opt->common.rdclass = rdata->rdclass;
opt->common.rdtype = rdata->type;
@ -311,7 +311,7 @@ static inline void
freestruct_opt(ARGS_FREESTRUCT) {
dns_rdata_opt_t *opt = source;
REQUIRE(source != NULL);
REQUIRE(opt != NULL);
REQUIRE(opt->common.rdtype == dns_rdatatype_opt);
if (opt->mctx == NULL)

View file

@ -86,7 +86,7 @@ fromstruct_#(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_proforma.c#);
REQUIRE(rdclass == #);
REQUIRE(source != NULL);
REQUIRE(# != NULL);
REQUIRE(#->common.rdtype == dns_rdatatype_proforma.ctype);
REQUIRE(#->common.rdclass == rdclass);
@ -107,7 +107,7 @@ static inline void
freestruct_#(ARGS_FREESTRUCT) {
dns_rdata_#_t *# = source;
REQUIRE(source != NULL);
REQUIRE(# != NULL);
REQUIRE(#->common.rdtype == dns_rdatatype_proforma.c#);
REQUIRE(#->common.rdclass == #);

View file

@ -132,7 +132,7 @@ fromstruct_ptr(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_ptr);
REQUIRE(source != NULL);
REQUIRE(ptr != NULL);
REQUIRE(ptr->common.rdtype == type);
REQUIRE(ptr->common.rdclass == rdclass);
@ -150,7 +150,7 @@ tostruct_ptr(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_ptr);
REQUIRE(target != NULL);
REQUIRE(ptr != NULL);
REQUIRE(rdata->length != 0);
ptr->common.rdclass = rdata->rdclass;
@ -170,7 +170,7 @@ static inline void
freestruct_ptr(ARGS_FREESTRUCT) {
dns_rdata_ptr_t *ptr = source;
REQUIRE(source != NULL);
REQUIRE(ptr != NULL);
REQUIRE(ptr->common.rdtype == dns_rdatatype_ptr);
if (ptr->mctx == NULL)

View file

@ -177,7 +177,7 @@ fromstruct_rp(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_rp);
REQUIRE(source != NULL);
REQUIRE(rp != NULL);
REQUIRE(rp->common.rdtype == type);
REQUIRE(rp->common.rdclass == rdclass);
@ -198,7 +198,7 @@ tostruct_rp(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_rp);
REQUIRE(target != NULL);
REQUIRE(rp != NULL);
REQUIRE(rdata->length != 0);
rp->common.rdclass = rdata->rdclass;
@ -230,7 +230,7 @@ static inline void
freestruct_rp(ARGS_FREESTRUCT) {
dns_rdata_rp_t *rp = source;
REQUIRE(source != NULL);
REQUIRE(rp != NULL);
REQUIRE(rp->common.rdtype == dns_rdatatype_rp);
if (rp->mctx == NULL)

View file

@ -356,7 +356,7 @@ fromstruct_rrsig(ARGS_FROMSTRUCT) {
dns_rdata_rrsig_t *sig = source;
REQUIRE(type == dns_rdatatype_rrsig);
REQUIRE(source != NULL);
REQUIRE(sig != NULL);
REQUIRE(sig->common.rdtype == type);
REQUIRE(sig->common.rdclass == rdclass);
REQUIRE(sig->signature != NULL || sig->siglen == 0);
@ -417,7 +417,7 @@ tostruct_rrsig(ARGS_TOSTRUCT) {
dns_name_t signer;
REQUIRE(rdata->type == dns_rdatatype_rrsig);
REQUIRE(target != NULL);
REQUIRE(sig != NULL);
REQUIRE(rdata->length != 0);
sig->common.rdclass = rdata->rdclass;
@ -496,7 +496,7 @@ static inline void
freestruct_rrsig(ARGS_FREESTRUCT) {
dns_rdata_rrsig_t *sig = (dns_rdata_rrsig_t *) source;
REQUIRE(source != NULL);
REQUIRE(sig != NULL);
REQUIRE(sig->common.rdtype == dns_rdatatype_rrsig);
if (sig->mctx == NULL)

View file

@ -170,7 +170,7 @@ fromstruct_rt(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_rt);
REQUIRE(source != NULL);
REQUIRE(rt != NULL);
REQUIRE(rt->common.rdtype == type);
REQUIRE(rt->common.rdclass == rdclass);
@ -189,7 +189,7 @@ tostruct_rt(ARGS_TOSTRUCT) {
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_rt);
REQUIRE(target != NULL);
REQUIRE(rt != NULL);
REQUIRE(rdata->length != 0);
rt->common.rdclass = rdata->rdclass;
@ -212,7 +212,7 @@ static inline void
freestruct_rt(ARGS_FREESTRUCT) {
dns_rdata_rt_t *rt = source;
REQUIRE(source != NULL);
REQUIRE(rt != NULL);
REQUIRE(rt->common.rdtype == dns_rdatatype_rt);
if (rt->mctx == NULL)

View file

@ -355,7 +355,7 @@ fromstruct_sig(ARGS_FROMSTRUCT) {
dns_rdata_sig_t *sig = source;
REQUIRE(type == dns_rdatatype_sig);
REQUIRE(source != NULL);
REQUIRE(sig != NULL);
REQUIRE(sig->common.rdtype == type);
REQUIRE(sig->common.rdclass == rdclass);
REQUIRE(sig->signature != NULL || sig->siglen == 0);
@ -416,7 +416,7 @@ tostruct_sig(ARGS_TOSTRUCT) {
dns_name_t signer;
REQUIRE(rdata->type == dns_rdatatype_sig);
REQUIRE(target != NULL);
REQUIRE(sig != NULL);
REQUIRE(rdata->length != 0);
sig->common.rdclass = rdata->rdclass;
@ -495,7 +495,7 @@ static inline void
freestruct_sig(ARGS_FREESTRUCT) {
dns_rdata_sig_t *sig = (dns_rdata_sig_t *) source;
REQUIRE(source != NULL);
REQUIRE(sig != NULL);
REQUIRE(sig->common.rdtype == dns_rdatatype_sig);
if (sig->mctx == NULL)

View file

@ -146,7 +146,7 @@ fromstruct_sink(ARGS_FROMSTRUCT) {
dns_rdata_sink_t *sink = source;
REQUIRE(type == dns_rdatatype_sink);
REQUIRE(source != NULL);
REQUIRE(sink != NULL);
REQUIRE(sink->common.rdtype == type);
REQUIRE(sink->common.rdclass == rdclass);
@ -172,7 +172,7 @@ tostruct_sink(ARGS_TOSTRUCT) {
isc_region_t sr;
REQUIRE(rdata->type == dns_rdatatype_sink);
REQUIRE(target != NULL);
REQUIRE(sink != NULL);
REQUIRE(rdata->length >= 3);
sink->common.rdclass = rdata->rdclass;
@ -213,7 +213,7 @@ static inline void
freestruct_sink(ARGS_FREESTRUCT) {
dns_rdata_sink_t *sink = (dns_rdata_sink_t *) source;
REQUIRE(source != NULL);
REQUIRE(sink != NULL);
REQUIRE(sink->common.rdtype == dns_rdatatype_sink);
if (sink->mctx == NULL)

View file

@ -81,8 +81,9 @@ static inline isc_result_t
tostruct_smimea(ARGS_TOSTRUCT) {
dns_rdata_smimea_t *smimea = target;
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_smimea);
REQUIRE(target != NULL);
REQUIRE(smimea != NULL);
smimea->common.rdclass = rdata->rdclass;
smimea->common.rdtype = rdata->type;
@ -95,7 +96,7 @@ static inline void
freestruct_smimea(ARGS_FREESTRUCT) {
dns_rdata_smimea_t *smimea = source;
REQUIRE(source != NULL);
REQUIRE(smimea != NULL);
REQUIRE(smimea->common.rdtype == dns_rdatatype_smimea);
generic_freestruct_tlsa(source);

View file

@ -274,7 +274,7 @@ fromstruct_soa(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_soa);
REQUIRE(source != NULL);
REQUIRE(soa != NULL);
REQUIRE(soa->common.rdtype == type);
REQUIRE(soa->common.rdclass == rdclass);
@ -300,7 +300,7 @@ tostruct_soa(ARGS_TOSTRUCT) {
isc_result_t result;
REQUIRE(rdata->type == dns_rdatatype_soa);
REQUIRE(target != NULL);
REQUIRE(soa != NULL);
REQUIRE(rdata->length != 0);
soa->common.rdclass = rdata->rdclass;
@ -350,7 +350,7 @@ static inline void
freestruct_soa(ARGS_FREESTRUCT) {
dns_rdata_soa_t *soa = source;
REQUIRE(source != NULL);
REQUIRE(soa != NULL);
REQUIRE(soa->common.rdtype == dns_rdatatype_soa);
if (soa->mctx == NULL)

View file

@ -89,8 +89,9 @@ static inline isc_result_t
tostruct_spf(ARGS_TOSTRUCT) {
dns_rdata_spf_t *spf = target;
REQUIRE(spf != NULL);
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_spf);
REQUIRE(target != NULL);
spf->common.rdclass = rdata->rdclass;
spf->common.rdtype = rdata->type;
@ -101,10 +102,10 @@ tostruct_spf(ARGS_TOSTRUCT) {
static inline void
freestruct_spf(ARGS_FREESTRUCT) {
dns_rdata_spf_t *txt = source;
dns_rdata_spf_t *spf = source;
REQUIRE(source != NULL);
REQUIRE(txt->common.rdtype == dns_rdatatype_spf);
REQUIRE(spf != NULL);
REQUIRE(spf->common.rdtype == dns_rdatatype_spf);
generic_freestruct_txt(source);
}

View file

@ -176,7 +176,7 @@ fromstruct_sshfp(ARGS_FROMSTRUCT) {
dns_rdata_sshfp_t *sshfp = source;
REQUIRE(type == dns_rdatatype_sshfp);
REQUIRE(source != NULL);
REQUIRE(sshfp != NULL);
REQUIRE(sshfp->common.rdtype == type);
REQUIRE(sshfp->common.rdclass == rdclass);
@ -195,7 +195,7 @@ tostruct_sshfp(ARGS_TOSTRUCT) {
isc_region_t region;
REQUIRE(rdata->type == dns_rdatatype_sshfp);
REQUIRE(target != NULL);
REQUIRE(sshfp != NULL);
REQUIRE(rdata->length != 0);
sshfp->common.rdclass = rdata->rdclass;

View file

@ -84,6 +84,7 @@ tostruct_ta(ARGS_TOSTRUCT) {
dns_rdata_ds_t *ds = target;
REQUIRE(rdata->type == dns_rdatatype_ta);
REQUIRE(ds != NULL);
/*
* Checked by generic_tostruct_ds().

View file

@ -144,7 +144,7 @@ fromstruct_talink(ARGS_FROMSTRUCT) {
isc_region_t region;
REQUIRE(type == dns_rdatatype_talink);
REQUIRE(source != NULL);
REQUIRE(talink != NULL);
REQUIRE(talink->common.rdtype == type);
REQUIRE(talink->common.rdclass == rdclass);
@ -165,7 +165,7 @@ tostruct_talink(ARGS_TOSTRUCT) {
isc_result_t result;
REQUIRE(rdata->type == dns_rdatatype_talink);
REQUIRE(target != NULL);
REQUIRE(talink != NULL);
REQUIRE(rdata->length != 0);
talink->common.rdclass = rdata->rdclass;
@ -200,7 +200,7 @@ static inline void
freestruct_talink(ARGS_FREESTRUCT) {
dns_rdata_talink_t *talink = source;
REQUIRE(source != NULL);
REQUIRE(talink != NULL);
REQUIRE(talink->common.rdtype == dns_rdatatype_talink);
if (talink->mctx == NULL)

View file

@ -343,7 +343,7 @@ fromstruct_tkey(ARGS_FROMSTRUCT) {
dns_rdata_tkey_t *tkey = source;
REQUIRE(type == dns_rdatatype_tkey);
REQUIRE(source != NULL);
REQUIRE(tkey != NULL);
REQUIRE(tkey->common.rdtype == type);
REQUIRE(tkey->common.rdclass == rdclass);
@ -403,7 +403,7 @@ tostruct_tkey(ARGS_TOSTRUCT) {
isc_region_t sr;
REQUIRE(rdata->type == dns_rdatatype_tkey);
REQUIRE(target != NULL);
REQUIRE(tkey != NULL);
REQUIRE(rdata->length != 0);
tkey->common.rdclass = rdata->rdclass;
@ -489,7 +489,7 @@ static inline void
freestruct_tkey(ARGS_FREESTRUCT) {
dns_rdata_tkey_t *tkey = (dns_rdata_tkey_t *) source;
REQUIRE(source != NULL);
REQUIRE(tkey != NULL);
if (tkey->mctx == NULL)
return;

View file

@ -188,7 +188,7 @@ static inline isc_result_t
generic_fromstruct_tlsa(ARGS_FROMSTRUCT) {
dns_rdata_tlsa_t *tlsa = source;
REQUIRE(source != NULL);
REQUIRE(tlsa != NULL);
REQUIRE(tlsa->common.rdtype == type);
REQUIRE(tlsa->common.rdclass == rdclass);
@ -207,7 +207,7 @@ generic_tostruct_tlsa(ARGS_TOSTRUCT) {
dns_rdata_tlsa_t *tlsa = target;
isc_region_t region;
REQUIRE(rdata != NULL);
REQUIRE(tlsa != NULL);
REQUIRE(rdata->length != 0);
REQUIRE(tlsa != NULL);
@ -260,7 +260,7 @@ tostruct_tlsa(ARGS_TOSTRUCT) {
dns_rdata_tlsa_t *tlsa = target;
REQUIRE(rdata->type == dns_rdatatype_tlsa);
REQUIRE(target != NULL);
REQUIRE(tlsa != NULL);
tlsa->common.rdclass = rdata->rdclass;
tlsa->common.rdtype = rdata->type;
@ -273,7 +273,7 @@ static inline void
freestruct_tlsa(ARGS_FREESTRUCT) {
dns_rdata_tlsa_t *tlsa = source;
REQUIRE(source != NULL);
REQUIRE(tlsa != NULL);
REQUIRE(tlsa->common.rdtype == dns_rdatatype_tlsa);
generic_freestruct_tlsa(source);

View file

@ -138,7 +138,7 @@ generic_fromstruct_txt(ARGS_FROMSTRUCT) {
isc_region_t region;
uint8_t length;
REQUIRE(source != NULL);
REQUIRE(txt != NULL);
REQUIRE(txt->common.rdtype == type);
REQUIRE(txt->common.rdclass == rdclass);
REQUIRE(txt->txt != NULL && txt->txt_len != 0);
@ -164,7 +164,7 @@ generic_tostruct_txt(ARGS_TOSTRUCT) {
dns_rdata_txt_t *txt = target;
isc_region_t r;
REQUIRE(target != NULL);
REQUIRE(txt != NULL);
REQUIRE(txt->common.rdclass == rdata->rdclass);
REQUIRE(txt->common.rdtype == rdata->type);
REQUIRE(!ISC_LINK_LINKED(&txt->common, link));
@ -184,7 +184,7 @@ static inline void
generic_freestruct_txt(ARGS_FREESTRUCT) {
dns_rdata_txt_t *txt = source;
REQUIRE(source != NULL);
REQUIRE(txt != NULL);
if (txt->mctx == NULL)
return;
@ -207,7 +207,7 @@ tostruct_txt(ARGS_TOSTRUCT) {
dns_rdata_txt_t *txt = target;
REQUIRE(rdata->type == dns_rdatatype_txt);
REQUIRE(target != NULL);
REQUIRE(txt != NULL);
txt->common.rdclass = rdata->rdclass;
txt->common.rdtype = rdata->type;
@ -220,7 +220,7 @@ static inline void
freestruct_txt(ARGS_FREESTRUCT) {
dns_rdata_txt_t *txt = source;
REQUIRE(source != NULL);
REQUIRE(txt != NULL);
REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
generic_freestruct_txt(source);

View file

@ -171,7 +171,7 @@ fromstruct_uri(ARGS_FROMSTRUCT) {
dns_rdata_uri_t *uri = source;
REQUIRE(type == dns_rdatatype_uri);
REQUIRE(source != NULL);
REQUIRE(uri != NULL);
REQUIRE(uri->common.rdtype == type);
REQUIRE(uri->common.rdclass == rdclass);
REQUIRE(uri->target != NULL && uri->tgt_len != 0);
@ -201,7 +201,7 @@ tostruct_uri(ARGS_TOSTRUCT) {
isc_region_t sr;
REQUIRE(rdata->type == dns_rdatatype_uri);
REQUIRE(target != NULL);
REQUIRE(uri != NULL);
REQUIRE(rdata->length != 0);
uri->common.rdclass = rdata->rdclass;
@ -242,7 +242,7 @@ static inline void
freestruct_uri(ARGS_FREESTRUCT) {
dns_rdata_uri_t *uri = (dns_rdata_uri_t *) source;
REQUIRE(source != NULL);
REQUIRE(uri != NULL);
REQUIRE(uri->common.rdtype == dns_rdatatype_uri);
if (uri->mctx == NULL)

View file

@ -102,7 +102,7 @@ fromstruct_x25(ARGS_FROMSTRUCT) {
uint8_t i;
REQUIRE(type == dns_rdatatype_x25);
REQUIRE(source != NULL);
REQUIRE(x25 != NULL);
REQUIRE(x25->common.rdtype == type);
REQUIRE(x25->common.rdclass == rdclass);
REQUIRE(x25->x25 != NULL && x25->x25_len != 0);
@ -127,7 +127,7 @@ tostruct_x25(ARGS_TOSTRUCT) {
isc_region_t r;
REQUIRE(rdata->type == dns_rdatatype_x25);
REQUIRE(target != NULL);
REQUIRE(x25 != NULL);
REQUIRE(rdata->length != 0);
x25->common.rdclass = rdata->rdclass;
@ -148,7 +148,8 @@ tostruct_x25(ARGS_TOSTRUCT) {
static inline void
freestruct_x25(ARGS_FREESTRUCT) {
dns_rdata_x25_t *x25 = source;
REQUIRE(source != NULL);
REQUIRE(x25 != NULL);
REQUIRE(x25->common.rdtype == dns_rdatatype_x25);
if (x25->mctx == NULL)

View file

@ -196,7 +196,7 @@ static inline isc_result_t
fromstruct_zonemd(ARGS_FROMSTRUCT) {
dns_rdata_zonemd_t *zonemd = source;
REQUIRE(source != NULL);
REQUIRE(zonemd != NULL);
REQUIRE(zonemd->common.rdtype == type);
REQUIRE(zonemd->common.rdclass == rdclass);
@ -222,7 +222,7 @@ tostruct_zonemd(ARGS_TOSTRUCT) {
isc_region_t region;
REQUIRE(rdata->type == dns_rdatatype_zonemd);
REQUIRE(target != NULL);
REQUIRE(zonemd != NULL);
REQUIRE(rdata->length != 0);
zonemd->common.rdclass = rdata->rdclass;

View file

@ -127,7 +127,7 @@ fromstruct_hs_a(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_a);
REQUIRE(rdclass == dns_rdataclass_hs);
REQUIRE(source != NULL);
REQUIRE(a != NULL);
REQUIRE(a->common.rdtype == type);
REQUIRE(a->common.rdclass == rdclass);
@ -148,6 +148,7 @@ tostruct_hs_a(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_a);
REQUIRE(rdata->rdclass == dns_rdataclass_hs);
REQUIRE(rdata->length == 4);
REQUIRE(a != NULL);
UNUSED(mctx);

View file

@ -279,7 +279,7 @@ fromstruct_in_a6(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_a6);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(a6 != NULL);
REQUIRE(a6->common.rdtype == type);
REQUIRE(a6->common.rdclass == rdclass);
@ -322,7 +322,7 @@ tostruct_in_a6(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_a6);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(a6 != NULL);
REQUIRE(rdata->length != 0);
a6->common.rdclass = rdata->rdclass;
@ -362,7 +362,7 @@ static inline void
freestruct_in_a6(ARGS_FREESTRUCT) {
dns_rdata_in_a6_t *a6 = source;
REQUIRE(source != NULL);
REQUIRE(a6 != NULL);
REQUIRE(a6->common.rdclass == dns_rdataclass_in);
REQUIRE(a6->common.rdtype == dns_rdatatype_a6);

View file

@ -128,7 +128,7 @@ fromstruct_in_a(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_a);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(a != NULL);
REQUIRE(a->common.rdtype == type);
REQUIRE(a->common.rdclass == rdclass);
@ -147,6 +147,7 @@ tostruct_in_a(ARGS_TOSTRUCT) {
uint32_t n;
isc_region_t region;
REQUIRE(a != NULL);
REQUIRE(rdata->type == dns_rdatatype_a);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(rdata->length == 4);
@ -168,7 +169,7 @@ static inline void
freestruct_in_a(ARGS_FREESTRUCT) {
dns_rdata_in_a_t *a = source;
REQUIRE(source != NULL);
REQUIRE(a != NULL);
REQUIRE(a->common.rdtype == dns_rdatatype_a);
REQUIRE(a->common.rdclass == dns_rdataclass_in);

View file

@ -144,7 +144,7 @@ fromstruct_in_aaaa(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_aaaa);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(aaaa != NULL);
REQUIRE(aaaa->common.rdtype == type);
REQUIRE(aaaa->common.rdclass == rdclass);
@ -161,7 +161,7 @@ tostruct_in_aaaa(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_aaaa);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(aaaa != NULL);
REQUIRE(rdata->length == 16);
UNUSED(mctx);
@ -181,7 +181,7 @@ static inline void
freestruct_in_aaaa(ARGS_FREESTRUCT) {
dns_rdata_in_aaaa_t *aaaa = source;
REQUIRE(source != NULL);
REQUIRE(aaaa != NULL);
REQUIRE(aaaa->common.rdclass == dns_rdataclass_in);
REQUIRE(aaaa->common.rdtype == dns_rdatatype_aaaa);

View file

@ -248,7 +248,7 @@ fromstruct_in_apl(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_apl);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(apl != NULL);
REQUIRE(apl->common.rdtype == type);
REQUIRE(apl->common.rdclass == rdclass);
REQUIRE(apl->apl != NULL || apl->apl_len == 0);
@ -264,6 +264,7 @@ tostruct_in_apl(ARGS_TOSTRUCT) {
dns_rdata_in_apl_t *apl = target;
isc_region_t r;
REQUIRE(apl != NULL);
REQUIRE(rdata->type == dns_rdatatype_apl);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
@ -286,7 +287,7 @@ static inline void
freestruct_in_apl(ARGS_FREESTRUCT) {
dns_rdata_in_apl_t *apl = source;
REQUIRE(source != NULL);
REQUIRE(apl != NULL);
REQUIRE(apl->common.rdtype == dns_rdatatype_apl);
REQUIRE(apl->common.rdclass == dns_rdataclass_in);

View file

@ -201,7 +201,7 @@ fromstruct_in_atma(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_atma);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(atma != NULL);
REQUIRE(atma->common.rdtype == type);
REQUIRE(atma->common.rdclass == rdclass);
REQUIRE(atma->atma != NULL || atma->atma_len == 0);
@ -220,7 +220,7 @@ tostruct_in_atma(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_atma);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(atma != NULL);
REQUIRE(rdata->length != 0);
atma->common.rdclass = rdata->rdclass;
@ -244,7 +244,7 @@ static inline void
freestruct_in_atma(ARGS_FREESTRUCT) {
dns_rdata_in_atma_t *atma = source;
REQUIRE(source != NULL);
REQUIRE(atma != NULL);
REQUIRE(atma->common.rdclass == dns_rdataclass_in);
REQUIRE(atma->common.rdtype == dns_rdatatype_atma);

View file

@ -121,7 +121,7 @@ fromstruct_in_dhcid(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_dhcid);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(dhcid != NULL);
REQUIRE(dhcid->common.rdtype == type);
REQUIRE(dhcid->common.rdclass == rdclass);
REQUIRE(dhcid->length != 0);
@ -139,7 +139,7 @@ tostruct_in_dhcid(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_dhcid);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(dhcid != NULL);
REQUIRE(rdata->length != 0);
dhcid->common.rdclass = rdata->rdclass;

View file

@ -112,7 +112,7 @@ fromstruct_in_eid(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_eid);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(eid != NULL);
REQUIRE(eid->common.rdtype == type);
REQUIRE(eid->common.rdclass == rdclass);
REQUIRE(eid->eid != NULL || eid->eid_len == 0);
@ -130,7 +130,7 @@ tostruct_in_eid(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_eid);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(eid != NULL);
REQUIRE(rdata->length != 0);
eid->common.rdclass = rdata->rdclass;
@ -152,7 +152,7 @@ static inline void
freestruct_in_eid(ARGS_FREESTRUCT) {
dns_rdata_in_eid_t *eid = source;
REQUIRE(source != NULL);
REQUIRE(eid != NULL);
REQUIRE(eid->common.rdclass == dns_rdataclass_in);
REQUIRE(eid->common.rdtype == dns_rdatatype_eid);

View file

@ -159,7 +159,7 @@ fromstruct_in_kx(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_kx);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(kx != NULL);
REQUIRE(kx->common.rdtype == type);
REQUIRE(kx->common.rdclass == rdclass);
@ -179,7 +179,7 @@ tostruct_in_kx(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_kx);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(kx != NULL);
REQUIRE(rdata->length != 0);
kx->common.rdclass = rdata->rdclass;
@ -203,7 +203,7 @@ static inline void
freestruct_in_kx(ARGS_FREESTRUCT) {
dns_rdata_in_kx_t *kx = source;
REQUIRE(source != NULL);
REQUIRE(kx != NULL);
REQUIRE(kx->common.rdclass == dns_rdataclass_in);
REQUIRE(kx->common.rdtype == dns_rdatatype_kx);

View file

@ -112,7 +112,7 @@ fromstruct_in_nimloc(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_nimloc);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(nimloc != NULL);
REQUIRE(nimloc->common.rdtype == type);
REQUIRE(nimloc->common.rdclass == rdclass);
REQUIRE(nimloc->nimloc != NULL || nimloc->nimloc_len == 0);
@ -130,7 +130,7 @@ tostruct_in_nimloc(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_nimloc);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(nimloc != NULL);
REQUIRE(rdata->length != 0);
nimloc->common.rdclass = rdata->rdclass;
@ -152,7 +152,7 @@ static inline void
freestruct_in_nimloc(ARGS_FREESTRUCT) {
dns_rdata_in_nimloc_t *nimloc = source;
REQUIRE(source != NULL);
REQUIRE(nimloc != NULL);
REQUIRE(nimloc->common.rdclass == dns_rdataclass_in);
REQUIRE(nimloc->common.rdtype == dns_rdatatype_nimloc);

View file

@ -129,7 +129,7 @@ fromstruct_in_nsap_ptr(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_nsap_ptr);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(nsap_ptr != NULL);
REQUIRE(nsap_ptr->common.rdtype == type);
REQUIRE(nsap_ptr->common.rdclass == rdclass);
@ -148,7 +148,7 @@ tostruct_in_nsap_ptr(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(nsap_ptr != NULL);
REQUIRE(rdata->length != 0);
nsap_ptr->common.rdclass = rdata->rdclass;
@ -168,7 +168,7 @@ static inline void
freestruct_in_nsap_ptr(ARGS_FREESTRUCT) {
dns_rdata_in_nsap_ptr_t *nsap_ptr = source;
REQUIRE(source != NULL);
REQUIRE(nsap_ptr != NULL);
REQUIRE(nsap_ptr->common.rdclass == dns_rdataclass_in);
REQUIRE(nsap_ptr->common.rdtype == dns_rdatatype_nsap_ptr);

View file

@ -141,7 +141,7 @@ fromstruct_in_nsap(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_nsap);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(nsap != NULL);
REQUIRE(nsap->common.rdtype == type);
REQUIRE(nsap->common.rdclass == rdclass);
REQUIRE(nsap->nsap != NULL || nsap->nsap_len == 0);
@ -159,7 +159,7 @@ tostruct_in_nsap(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_nsap);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(nsap != NULL);
REQUIRE(rdata->length != 0);
nsap->common.rdclass = rdata->rdclass;
@ -180,7 +180,7 @@ static inline void
freestruct_in_nsap(ARGS_FREESTRUCT) {
dns_rdata_in_nsap_t *nsap = source;
REQUIRE(source != NULL);
REQUIRE(nsap != NULL);
REQUIRE(nsap->common.rdclass == dns_rdataclass_in);
REQUIRE(nsap->common.rdtype == dns_rdatatype_nsap);

View file

@ -224,7 +224,7 @@ fromstruct_in_px(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_px);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(px != NULL);
REQUIRE(px->common.rdtype == type);
REQUIRE(px->common.rdclass == rdclass);
@ -247,7 +247,7 @@ tostruct_in_px(ARGS_TOSTRUCT) {
REQUIRE(rdata->type == dns_rdatatype_px);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(target != NULL);
REQUIRE(px != NULL);
REQUIRE(rdata->length != 0);
px->common.rdclass = rdata->rdclass;
@ -283,7 +283,7 @@ static inline void
freestruct_in_px(ARGS_FREESTRUCT) {
dns_rdata_in_px_t *px = source;
REQUIRE(source != NULL);
REQUIRE(px != NULL);
REQUIRE(px->common.rdclass == dns_rdataclass_in);
REQUIRE(px->common.rdtype == dns_rdatatype_px);

View file

@ -231,7 +231,7 @@ fromstruct_in_srv(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_srv);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(srv != NULL);
REQUIRE(srv->common.rdtype == type);
REQUIRE(srv->common.rdclass == rdclass);
@ -253,7 +253,7 @@ tostruct_in_srv(ARGS_TOSTRUCT) {
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(rdata->type == dns_rdatatype_srv);
REQUIRE(target != NULL);
REQUIRE(srv != NULL);
REQUIRE(rdata->length != 0);
srv->common.rdclass = rdata->rdclass;
@ -279,7 +279,7 @@ static inline void
freestruct_in_srv(ARGS_FREESTRUCT) {
dns_rdata_in_srv_t *srv = source;
REQUIRE(source != NULL);
REQUIRE(srv != NULL);
REQUIRE(srv->common.rdclass == dns_rdataclass_in);
REQUIRE(srv->common.rdtype == dns_rdatatype_srv);

View file

@ -296,7 +296,7 @@ fromstruct_in_wks(ARGS_FROMSTRUCT) {
REQUIRE(type == dns_rdatatype_wks);
REQUIRE(rdclass == dns_rdataclass_in);
REQUIRE(source != NULL);
REQUIRE(wks != NULL);
REQUIRE(wks->common.rdtype == type);
REQUIRE(wks->common.rdclass == rdclass);
REQUIRE((wks->map != NULL && wks->map_len <= 8*1024) ||
@ -317,6 +317,7 @@ tostruct_in_wks(ARGS_TOSTRUCT) {
uint32_t n;
isc_region_t region;
REQUIRE(wks != NULL);
REQUIRE(rdata->type == dns_rdatatype_wks);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
REQUIRE(rdata->length != 0);
@ -343,7 +344,7 @@ static inline void
freestruct_in_wks(ARGS_FREESTRUCT) {
dns_rdata_in_wks_t *wks = source;
REQUIRE(source != NULL);
REQUIRE(wks != NULL);
REQUIRE(wks->common.rdtype == dns_rdatatype_wks);
REQUIRE(wks->common.rdclass == dns_rdataclass_in);