From: Ondřej Surý Date: Fri, 27 Sep 2019 08:40:51 +0000 (+0200) Subject: lib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from... X-Git-Tag: v9.15.6~72^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66af8713d8a4350780c060d517dea27d2c31dd08;p=thirdparty%2Fbind9.git 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); } --- diff --git a/lib/dns/rdata/any_255/tsig_250.c b/lib/dns/rdata/any_255/tsig_250.c index 5ed242d4682..3337ad08dc0 100644 --- a/lib/dns/rdata/any_255/tsig_250.c +++ b/lib/dns/rdata/any_255/tsig_250.c @@ -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); diff --git a/lib/dns/rdata/ch_3/a_1.c b/lib/dns/rdata/ch_3/a_1.c index 94cae92c3c0..be1b489ef43 100644 --- a/lib/dns/rdata/ch_3/a_1.c +++ b/lib/dns/rdata/ch_3/a_1.c @@ -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) diff --git a/lib/dns/rdata/generic/afsdb_18.c b/lib/dns/rdata/generic/afsdb_18.c index 812dfa6e453..2c924b9f8d9 100644 --- a/lib/dns/rdata/generic/afsdb_18.c +++ b/lib/dns/rdata/generic/afsdb_18.c @@ -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) diff --git a/lib/dns/rdata/generic/amtrelay_260.c b/lib/dns/rdata/generic/amtrelay_260.c index bb4a38419c7..ca266383a30 100644 --- a/lib/dns/rdata/generic/amtrelay_260.c +++ b/lib/dns/rdata/generic/amtrelay_260.c @@ -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) diff --git a/lib/dns/rdata/generic/avc_258.c b/lib/dns/rdata/generic/avc_258.c index 31bbaffdc0d..e8efa377d70 100644 --- a/lib/dns/rdata/generic/avc_258.c +++ b/lib/dns/rdata/generic/avc_258.c @@ -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); } diff --git a/lib/dns/rdata/generic/caa_257.c b/lib/dns/rdata/generic/caa_257.c index 4dc36399069..8dd75c04dd9 100644 --- a/lib/dns/rdata/generic/caa_257.c +++ b/lib/dns/rdata/generic/caa_257.c @@ -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) diff --git a/lib/dns/rdata/generic/cds_59.c b/lib/dns/rdata/generic/cds_59.c index f94c6a6a3fa..1dace204580 100644 --- a/lib/dns/rdata/generic/cds_59.c +++ b/lib/dns/rdata/generic/cds_59.c @@ -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 diff --git a/lib/dns/rdata/generic/cert_37.c b/lib/dns/rdata/generic/cert_37.c index a0ac7691537..4b29cabdea2 100644 --- a/lib/dns/rdata/generic/cert_37.c +++ b/lib/dns/rdata/generic/cert_37.c @@ -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; diff --git a/lib/dns/rdata/generic/cname_5.c b/lib/dns/rdata/generic/cname_5.c index 3da82ebee48..1c40bcd6da5 100644 --- a/lib/dns/rdata/generic/cname_5.c +++ b/lib/dns/rdata/generic/cname_5.c @@ -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; diff --git a/lib/dns/rdata/generic/csync_62.c b/lib/dns/rdata/generic/csync_62.c index c63912875d1..481916d3d6f 100644 --- a/lib/dns/rdata/generic/csync_62.c +++ b/lib/dns/rdata/generic/csync_62.c @@ -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) diff --git a/lib/dns/rdata/generic/dlv_32769.c b/lib/dns/rdata/generic/dlv_32769.c index d61206aa8cd..358802327b3 100644 --- a/lib/dns/rdata/generic/dlv_32769.c +++ b/lib/dns/rdata/generic/dlv_32769.c @@ -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; diff --git a/lib/dns/rdata/generic/dname_39.c b/lib/dns/rdata/generic/dname_39.c index 50c58385647..cebd8c7e46e 100644 --- a/lib/dns/rdata/generic/dname_39.c +++ b/lib/dns/rdata/generic/dname_39.c @@ -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) diff --git a/lib/dns/rdata/generic/doa_259.c b/lib/dns/rdata/generic/doa_259.c index 16c0703d638..8597e5a5641 100644 --- a/lib/dns/rdata/generic/doa_259.c +++ b/lib/dns/rdata/generic/doa_259.c @@ -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) { diff --git a/lib/dns/rdata/generic/ds_43.c b/lib/dns/rdata/generic/ds_43.c index 8312351b268..c55fe10846c 100644 --- a/lib/dns/rdata/generic/ds_43.c +++ b/lib/dns/rdata/generic/ds_43.c @@ -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; diff --git a/lib/dns/rdata/generic/eui48_108.c b/lib/dns/rdata/generic/eui48_108.c index 686f23f8cf8..7a65eb421bd 100644 --- a/lib/dns/rdata/generic/eui48_108.c +++ b/lib/dns/rdata/generic/eui48_108.c @@ -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; diff --git a/lib/dns/rdata/generic/eui64_109.c b/lib/dns/rdata/generic/eui64_109.c index 0a37326c634..941f3c37478 100644 --- a/lib/dns/rdata/generic/eui64_109.c +++ b/lib/dns/rdata/generic/eui64_109.c @@ -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; diff --git a/lib/dns/rdata/generic/gpos_27.c b/lib/dns/rdata/generic/gpos_27.c index 62429327e44..ead5ca03327 100644 --- a/lib/dns/rdata/generic/gpos_27.c +++ b/lib/dns/rdata/generic/gpos_27.c @@ -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) diff --git a/lib/dns/rdata/generic/hinfo_13.c b/lib/dns/rdata/generic/hinfo_13.c index 528be5eb869..0d43a19fb9b 100644 --- a/lib/dns/rdata/generic/hinfo_13.c +++ b/lib/dns/rdata/generic/hinfo_13.c @@ -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; diff --git a/lib/dns/rdata/generic/hip_55.c b/lib/dns/rdata/generic/hip_55.c index 36c9273e458..7c8f31b1483 100644 --- a/lib/dns/rdata/generic/hip_55.c +++ b/lib/dns/rdata/generic/hip_55.c @@ -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; diff --git a/lib/dns/rdata/generic/ipseckey_45.c b/lib/dns/rdata/generic/ipseckey_45.c index 232f9b90049..ba880ffb66e 100644 --- a/lib/dns/rdata/generic/ipseckey_45.c +++ b/lib/dns/rdata/generic/ipseckey_45.c @@ -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) diff --git a/lib/dns/rdata/generic/isdn_20.c b/lib/dns/rdata/generic/isdn_20.c index a73cd1f70a7..586142ecefe 100644 --- a/lib/dns/rdata/generic/isdn_20.c +++ b/lib/dns/rdata/generic/isdn_20.c @@ -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; diff --git a/lib/dns/rdata/generic/key_25.c b/lib/dns/rdata/generic/key_25.c index 0cc8b96c506..88f3075dc66 100644 --- a/lib/dns/rdata/generic/key_25.c +++ b/lib/dns/rdata/generic/key_25.c @@ -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); diff --git a/lib/dns/rdata/generic/keydata_65533.c b/lib/dns/rdata/generic/keydata_65533.c index c4bab947c26..56c92b75fbb 100644 --- a/lib/dns/rdata/generic/keydata_65533.c +++ b/lib/dns/rdata/generic/keydata_65533.c @@ -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) diff --git a/lib/dns/rdata/generic/l32_105.c b/lib/dns/rdata/generic/l32_105.c index cc1b9b25152..c87789f4d5a 100644 --- a/lib/dns/rdata/generic/l32_105.c +++ b/lib/dns/rdata/generic/l32_105.c @@ -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; diff --git a/lib/dns/rdata/generic/l64_106.c b/lib/dns/rdata/generic/l64_106.c index 277c6a910ea..a3e7ab1b0a6 100644 --- a/lib/dns/rdata/generic/l64_106.c +++ b/lib/dns/rdata/generic/l64_106.c @@ -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; diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index 388742b8368..792c8e73003 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -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); diff --git a/lib/dns/rdata/generic/lp_107.c b/lib/dns/rdata/generic/lp_107.c index 49bc799bd9b..87e268f7f69 100644 --- a/lib/dns/rdata/generic/lp_107.c +++ b/lib/dns/rdata/generic/lp_107.c @@ -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) diff --git a/lib/dns/rdata/generic/mb_7.c b/lib/dns/rdata/generic/mb_7.c index 299f89d10d7..93d85e52bc1 100644 --- a/lib/dns/rdata/generic/mb_7.c +++ b/lib/dns/rdata/generic/mb_7.c @@ -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; diff --git a/lib/dns/rdata/generic/md_3.c b/lib/dns/rdata/generic/md_3.c index 9eefe6967e3..8c58d6e8c93 100644 --- a/lib/dns/rdata/generic/md_3.c +++ b/lib/dns/rdata/generic/md_3.c @@ -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) diff --git a/lib/dns/rdata/generic/mf_4.c b/lib/dns/rdata/generic/mf_4.c index 59659816e61..fa653a683c3 100644 --- a/lib/dns/rdata/generic/mf_4.c +++ b/lib/dns/rdata/generic/mf_4.c @@ -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) diff --git a/lib/dns/rdata/generic/mg_8.c b/lib/dns/rdata/generic/mg_8.c index 45a38ce7513..c631539d206 100644 --- a/lib/dns/rdata/generic/mg_8.c +++ b/lib/dns/rdata/generic/mg_8.c @@ -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) diff --git a/lib/dns/rdata/generic/minfo_14.c b/lib/dns/rdata/generic/minfo_14.c index 23506e2082a..5b1e8745c79 100644 --- a/lib/dns/rdata/generic/minfo_14.c +++ b/lib/dns/rdata/generic/minfo_14.c @@ -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) diff --git a/lib/dns/rdata/generic/mr_9.c b/lib/dns/rdata/generic/mr_9.c index edea7b16978..c39bf540839 100644 --- a/lib/dns/rdata/generic/mr_9.c +++ b/lib/dns/rdata/generic/mr_9.c @@ -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) diff --git a/lib/dns/rdata/generic/mx_15.c b/lib/dns/rdata/generic/mx_15.c index 37a687ccfe0..46ac7c67e69 100644 --- a/lib/dns/rdata/generic/mx_15.c +++ b/lib/dns/rdata/generic/mx_15.c @@ -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) diff --git a/lib/dns/rdata/generic/naptr_35.c b/lib/dns/rdata/generic/naptr_35.c index 80c8f167290..4d99e2b2536 100644 --- a/lib/dns/rdata/generic/naptr_35.c +++ b/lib/dns/rdata/generic/naptr_35.c @@ -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) diff --git a/lib/dns/rdata/generic/nid_104.c b/lib/dns/rdata/generic/nid_104.c index fee61fd32c9..44e63b5ba7c 100644 --- a/lib/dns/rdata/generic/nid_104.c +++ b/lib/dns/rdata/generic/nid_104.c @@ -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; diff --git a/lib/dns/rdata/generic/ninfo_56.c b/lib/dns/rdata/generic/ninfo_56.c index fe8957affa2..1101ba1a77c 100644 --- a/lib/dns/rdata/generic/ninfo_56.c +++ b/lib/dns/rdata/generic/ninfo_56.c @@ -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); diff --git a/lib/dns/rdata/generic/ns_2.c b/lib/dns/rdata/generic/ns_2.c index 7f3979f6220..ac552529fbc 100644 --- a/lib/dns/rdata/generic/ns_2.c +++ b/lib/dns/rdata/generic/ns_2.c @@ -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; diff --git a/lib/dns/rdata/generic/nsec3_50.c b/lib/dns/rdata/generic/nsec3_50.c index 1aedf224388..b1aee3e6705 100644 --- a/lib/dns/rdata/generic/nsec3_50.c +++ b/lib/dns/rdata/generic/nsec3_50.c @@ -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) diff --git a/lib/dns/rdata/generic/nsec3param_51.c b/lib/dns/rdata/generic/nsec3param_51.c index 8a24deea03e..4e7c4c96faf 100644 --- a/lib/dns/rdata/generic/nsec3param_51.c +++ b/lib/dns/rdata/generic/nsec3param_51.c @@ -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) diff --git a/lib/dns/rdata/generic/nsec_47.c b/lib/dns/rdata/generic/nsec_47.c index 0ba688cec01..824d5d3b452 100644 --- a/lib/dns/rdata/generic/nsec_47.c +++ b/lib/dns/rdata/generic/nsec_47.c @@ -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) diff --git a/lib/dns/rdata/generic/null_10.c b/lib/dns/rdata/generic/null_10.c index 624adade556..5ffdb71e116 100644 --- a/lib/dns/rdata/generic/null_10.c +++ b/lib/dns/rdata/generic/null_10.c @@ -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) diff --git a/lib/dns/rdata/generic/nxt_30.c b/lib/dns/rdata/generic/nxt_30.c index f9efc3f3613..ba8c87bb24d 100644 --- a/lib/dns/rdata/generic/nxt_30.c +++ b/lib/dns/rdata/generic/nxt_30.c @@ -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) diff --git a/lib/dns/rdata/generic/openpgpkey_61.c b/lib/dns/rdata/generic/openpgpkey_61.c index e2c55a8c3e4..900d665c2e6 100644 --- a/lib/dns/rdata/generic/openpgpkey_61.c +++ b/lib/dns/rdata/generic/openpgpkey_61.c @@ -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) diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c index 0fe7243f642..d361e13a3a8 100644 --- a/lib/dns/rdata/generic/opt_41.c +++ b/lib/dns/rdata/generic/opt_41.c @@ -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) diff --git a/lib/dns/rdata/generic/proforma.c b/lib/dns/rdata/generic/proforma.c index c31b29f7318..7ed78acbdf7 100644 --- a/lib/dns/rdata/generic/proforma.c +++ b/lib/dns/rdata/generic/proforma.c @@ -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 == #); diff --git a/lib/dns/rdata/generic/ptr_12.c b/lib/dns/rdata/generic/ptr_12.c index a2f5ef1c610..1e405152ba8 100644 --- a/lib/dns/rdata/generic/ptr_12.c +++ b/lib/dns/rdata/generic/ptr_12.c @@ -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) diff --git a/lib/dns/rdata/generic/rp_17.c b/lib/dns/rdata/generic/rp_17.c index 2e915658057..ee2eef22fdb 100644 --- a/lib/dns/rdata/generic/rp_17.c +++ b/lib/dns/rdata/generic/rp_17.c @@ -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) diff --git a/lib/dns/rdata/generic/rrsig_46.c b/lib/dns/rdata/generic/rrsig_46.c index d3e6a562565..975810f2654 100644 --- a/lib/dns/rdata/generic/rrsig_46.c +++ b/lib/dns/rdata/generic/rrsig_46.c @@ -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) diff --git a/lib/dns/rdata/generic/rt_21.c b/lib/dns/rdata/generic/rt_21.c index e6450cb0d0e..43c08628f8e 100644 --- a/lib/dns/rdata/generic/rt_21.c +++ b/lib/dns/rdata/generic/rt_21.c @@ -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) diff --git a/lib/dns/rdata/generic/sig_24.c b/lib/dns/rdata/generic/sig_24.c index 87b20316b57..47a69e86337 100644 --- a/lib/dns/rdata/generic/sig_24.c +++ b/lib/dns/rdata/generic/sig_24.c @@ -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) diff --git a/lib/dns/rdata/generic/sink_40.c b/lib/dns/rdata/generic/sink_40.c index 128941440d9..13f8562d8c3 100644 --- a/lib/dns/rdata/generic/sink_40.c +++ b/lib/dns/rdata/generic/sink_40.c @@ -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) diff --git a/lib/dns/rdata/generic/smimea_53.c b/lib/dns/rdata/generic/smimea_53.c index efd7f0178bd..152ad9cfa0f 100644 --- a/lib/dns/rdata/generic/smimea_53.c +++ b/lib/dns/rdata/generic/smimea_53.c @@ -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); diff --git a/lib/dns/rdata/generic/soa_6.c b/lib/dns/rdata/generic/soa_6.c index 805aaa18829..e93ac6e4285 100644 --- a/lib/dns/rdata/generic/soa_6.c +++ b/lib/dns/rdata/generic/soa_6.c @@ -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) diff --git a/lib/dns/rdata/generic/spf_99.c b/lib/dns/rdata/generic/spf_99.c index c41edf67441..3668d9c76f2 100644 --- a/lib/dns/rdata/generic/spf_99.c +++ b/lib/dns/rdata/generic/spf_99.c @@ -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); } diff --git a/lib/dns/rdata/generic/sshfp_44.c b/lib/dns/rdata/generic/sshfp_44.c index ce60be5ae50..853416eb944 100644 --- a/lib/dns/rdata/generic/sshfp_44.c +++ b/lib/dns/rdata/generic/sshfp_44.c @@ -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; diff --git a/lib/dns/rdata/generic/ta_32768.c b/lib/dns/rdata/generic/ta_32768.c index 12ec6e7ee81..0a38619a48e 100644 --- a/lib/dns/rdata/generic/ta_32768.c +++ b/lib/dns/rdata/generic/ta_32768.c @@ -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(). diff --git a/lib/dns/rdata/generic/talink_58.c b/lib/dns/rdata/generic/talink_58.c index 7f6bacb74f7..f286982aa7d 100644 --- a/lib/dns/rdata/generic/talink_58.c +++ b/lib/dns/rdata/generic/talink_58.c @@ -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) diff --git a/lib/dns/rdata/generic/tkey_249.c b/lib/dns/rdata/generic/tkey_249.c index 7bbd1d34791..3a05f9e04e5 100644 --- a/lib/dns/rdata/generic/tkey_249.c +++ b/lib/dns/rdata/generic/tkey_249.c @@ -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; diff --git a/lib/dns/rdata/generic/tlsa_52.c b/lib/dns/rdata/generic/tlsa_52.c index 69867e72bfa..1eeb8d263df 100644 --- a/lib/dns/rdata/generic/tlsa_52.c +++ b/lib/dns/rdata/generic/tlsa_52.c @@ -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); diff --git a/lib/dns/rdata/generic/txt_16.c b/lib/dns/rdata/generic/txt_16.c index 3f3842e6b0a..21b0e4539ea 100644 --- a/lib/dns/rdata/generic/txt_16.c +++ b/lib/dns/rdata/generic/txt_16.c @@ -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); diff --git a/lib/dns/rdata/generic/uri_256.c b/lib/dns/rdata/generic/uri_256.c index 8fb0307d28b..0a8801a81ec 100644 --- a/lib/dns/rdata/generic/uri_256.c +++ b/lib/dns/rdata/generic/uri_256.c @@ -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) diff --git a/lib/dns/rdata/generic/x25_19.c b/lib/dns/rdata/generic/x25_19.c index d267f651519..5dc9e2e36e1 100644 --- a/lib/dns/rdata/generic/x25_19.c +++ b/lib/dns/rdata/generic/x25_19.c @@ -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) diff --git a/lib/dns/rdata/generic/zonemd_63.c b/lib/dns/rdata/generic/zonemd_63.c index 604a901d3ed..0c918063549 100644 --- a/lib/dns/rdata/generic/zonemd_63.c +++ b/lib/dns/rdata/generic/zonemd_63.c @@ -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; diff --git a/lib/dns/rdata/hs_4/a_1.c b/lib/dns/rdata/hs_4/a_1.c index bfa59e25ed1..93c6183d635 100644 --- a/lib/dns/rdata/hs_4/a_1.c +++ b/lib/dns/rdata/hs_4/a_1.c @@ -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); diff --git a/lib/dns/rdata/in_1/a6_38.c b/lib/dns/rdata/in_1/a6_38.c index 9d7d431ed55..20213f555f3 100644 --- a/lib/dns/rdata/in_1/a6_38.c +++ b/lib/dns/rdata/in_1/a6_38.c @@ -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); diff --git a/lib/dns/rdata/in_1/a_1.c b/lib/dns/rdata/in_1/a_1.c index 588c5ec0d4a..81f87b01139 100644 --- a/lib/dns/rdata/in_1/a_1.c +++ b/lib/dns/rdata/in_1/a_1.c @@ -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); diff --git a/lib/dns/rdata/in_1/aaaa_28.c b/lib/dns/rdata/in_1/aaaa_28.c index 75e5d2169af..a8c6740c31e 100644 --- a/lib/dns/rdata/in_1/aaaa_28.c +++ b/lib/dns/rdata/in_1/aaaa_28.c @@ -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); diff --git a/lib/dns/rdata/in_1/apl_42.c b/lib/dns/rdata/in_1/apl_42.c index ae35db9b931..f376eba4c0e 100644 --- a/lib/dns/rdata/in_1/apl_42.c +++ b/lib/dns/rdata/in_1/apl_42.c @@ -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); diff --git a/lib/dns/rdata/in_1/atma_34.c b/lib/dns/rdata/in_1/atma_34.c index b5d1aa1d222..c232b3feacb 100644 --- a/lib/dns/rdata/in_1/atma_34.c +++ b/lib/dns/rdata/in_1/atma_34.c @@ -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); diff --git a/lib/dns/rdata/in_1/dhcid_49.c b/lib/dns/rdata/in_1/dhcid_49.c index 4a52d58e27e..7722e466d0c 100644 --- a/lib/dns/rdata/in_1/dhcid_49.c +++ b/lib/dns/rdata/in_1/dhcid_49.c @@ -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; diff --git a/lib/dns/rdata/in_1/eid_31.c b/lib/dns/rdata/in_1/eid_31.c index e22ac4ae7ab..627d2f1e1a0 100644 --- a/lib/dns/rdata/in_1/eid_31.c +++ b/lib/dns/rdata/in_1/eid_31.c @@ -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); diff --git a/lib/dns/rdata/in_1/kx_36.c b/lib/dns/rdata/in_1/kx_36.c index 2786951de0f..7431b919972 100644 --- a/lib/dns/rdata/in_1/kx_36.c +++ b/lib/dns/rdata/in_1/kx_36.c @@ -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); diff --git a/lib/dns/rdata/in_1/nimloc_32.c b/lib/dns/rdata/in_1/nimloc_32.c index 1070a4e8c0b..aba3481c57a 100644 --- a/lib/dns/rdata/in_1/nimloc_32.c +++ b/lib/dns/rdata/in_1/nimloc_32.c @@ -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); diff --git a/lib/dns/rdata/in_1/nsap-ptr_23.c b/lib/dns/rdata/in_1/nsap-ptr_23.c index 3217300cc94..98953e4b376 100644 --- a/lib/dns/rdata/in_1/nsap-ptr_23.c +++ b/lib/dns/rdata/in_1/nsap-ptr_23.c @@ -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); diff --git a/lib/dns/rdata/in_1/nsap_22.c b/lib/dns/rdata/in_1/nsap_22.c index ba3e69c767f..c08473e17ac 100644 --- a/lib/dns/rdata/in_1/nsap_22.c +++ b/lib/dns/rdata/in_1/nsap_22.c @@ -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); diff --git a/lib/dns/rdata/in_1/px_26.c b/lib/dns/rdata/in_1/px_26.c index a94b9df0ca8..bb69223f864 100644 --- a/lib/dns/rdata/in_1/px_26.c +++ b/lib/dns/rdata/in_1/px_26.c @@ -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); diff --git a/lib/dns/rdata/in_1/srv_33.c b/lib/dns/rdata/in_1/srv_33.c index 63a4e80a28f..385bdaa0492 100644 --- a/lib/dns/rdata/in_1/srv_33.c +++ b/lib/dns/rdata/in_1/srv_33.c @@ -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); diff --git a/lib/dns/rdata/in_1/wks_11.c b/lib/dns/rdata/in_1/wks_11.c index eabbe5bf7d5..dc52eec3f56 100644 --- a/lib/dns/rdata/in_1/wks_11.c +++ b/lib/dns/rdata/in_1/wks_11.c @@ -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);