mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 14:59:59 -04:00
Merge branch 'ondrej/enable-cppcheck' into 'master'
Add Cppcheck job to the CI See merge request isc-projects/bind9!2403
This commit is contained in:
commit
fb14852ede
121 changed files with 459 additions and 338 deletions
|
|
@ -66,6 +66,8 @@
|
|||
(concat directory-of-current-dir-locals-file "bin/dig/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/unix/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
||||
(expand-file-name
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -56,3 +56,6 @@ kyua.log
|
|||
named.memstats
|
||||
named.run
|
||||
timestamp
|
||||
/compile_commands.json
|
||||
/cppcheck_html/
|
||||
/cppcheck.results
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ variables:
|
|||
BUILD_PARALLEL_JOBS: 6
|
||||
TEST_PARALLEL_JOBS: 6
|
||||
|
||||
MAKE: make
|
||||
|
||||
stages:
|
||||
- precheck
|
||||
- build
|
||||
|
|
@ -22,6 +24,7 @@ stages:
|
|||
- system
|
||||
- docs
|
||||
- push
|
||||
- postcheck
|
||||
|
||||
### Runner Tag Templates
|
||||
|
||||
|
|
@ -162,7 +165,7 @@ stages:
|
|||
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
||||
script:
|
||||
- *configure
|
||||
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
|
||||
- ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
|
||||
- test -z "${RUN_MAKE_INSTALL}" || make install
|
||||
dependencies:
|
||||
- autoreconf:sid:amd64
|
||||
|
|
@ -221,6 +224,39 @@ stages:
|
|||
expire_in: "1 week"
|
||||
when: on_failure
|
||||
|
||||
.cppcheck_args: &run_cppcheck |
|
||||
cppcheck --enable=warning,performance,portability,information,missingInclude \
|
||||
--include=config.h \
|
||||
--quiet \
|
||||
--std=c11 \
|
||||
--language=c \
|
||||
--project=compile_commands.json \
|
||||
--error-exitcode=2 \
|
||||
-j ${TEST_PARALLEL_JOBS:-1} \
|
||||
--xml \
|
||||
--output-file=cppcheck.results \
|
||||
--inline-suppr
|
||||
|
||||
.cppcheck_report: &cppcheck_report_html |
|
||||
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \
|
||||
--file=cppcheck.results \
|
||||
--report-dir=cppcheck_html/
|
||||
|
||||
.cppcheck: &cppcheck_job
|
||||
<<: *default_triggering_rules
|
||||
stage: postcheck
|
||||
script:
|
||||
- *run_cppcheck
|
||||
after_script:
|
||||
- *cppcheck_report_html
|
||||
artifacts:
|
||||
paths:
|
||||
- compile_commands.json
|
||||
- cppcheck.results
|
||||
- cppcheck_html/
|
||||
expire_in: "1 week"
|
||||
when: on_failure
|
||||
|
||||
### Job Definitions
|
||||
|
||||
# Jobs in the precheck stage
|
||||
|
|
@ -437,6 +473,7 @@ gcc:sid:amd64:
|
|||
CFLAGS: "-Wall -Wextra -O3 -g"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
|
||||
RUN_MAKE_INSTALL: 1
|
||||
MAKE: bear make
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
|
|
@ -454,6 +491,13 @@ unit:gcc:sid:amd64:
|
|||
- gcc:sid:amd64
|
||||
needs: ["gcc:sid:amd64"]
|
||||
|
||||
cppcheck:gcc:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *cppcheck_job
|
||||
dependencies:
|
||||
- gcc:sid:amd64
|
||||
needs: ["gcc:sid:amd64"]
|
||||
|
||||
# Jobs for regular GCC builds on Debian Sid (i386)
|
||||
|
||||
gcc:sid:i386:
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ setup_style(dns_master_style_t **stylep) {
|
|||
isc_result_t result;
|
||||
dns_master_style_t *style = NULL;
|
||||
|
||||
REQUIRE(stylep != NULL || *stylep == NULL);
|
||||
REQUIRE(stylep != NULL && *stylep == NULL);
|
||||
|
||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||
if (yaml) {
|
||||
|
|
|
|||
|
|
@ -2045,6 +2045,9 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
char cookiebuf[256];
|
||||
char *origin = NULL;
|
||||
char *textname = NULL;
|
||||
|
||||
REQUIRE(lookup != NULL);
|
||||
|
||||
#ifdef HAVE_LIBIDN2
|
||||
char idn_origin[MXNAME], idn_textname[MXNAME];
|
||||
|
||||
|
|
@ -2053,7 +2056,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
check_result(result, "dns_name_settotextfilter");
|
||||
#endif /* HAVE_LIBIDN2 */
|
||||
|
||||
REQUIRE(lookup != NULL);
|
||||
INSIST(!free_now);
|
||||
|
||||
debug("setup_lookup(%p)", lookup);
|
||||
|
|
|
|||
|
|
@ -2485,15 +2485,17 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
|||
} else {
|
||||
old = NULL;
|
||||
}
|
||||
if (old == NULL)
|
||||
if (old == NULL) {
|
||||
*old_rpz_okp = false;
|
||||
else
|
||||
} else {
|
||||
*old_rpz_okp = true;
|
||||
}
|
||||
|
||||
for (i = 0;
|
||||
zone_element != NULL;
|
||||
++i, zone_element = cfg_list_next(zone_element)) {
|
||||
INSIST(old != NULL || !*old_rpz_okp);
|
||||
++i, zone_element = cfg_list_next(zone_element))
|
||||
{
|
||||
INSIST(!*old_rpz_okp || old != NULL);
|
||||
if (*old_rpz_okp && i < old->p.num_zones) {
|
||||
old_zone = old->zones[i];
|
||||
} else {
|
||||
|
|
@ -2518,24 +2520,21 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
|||
* zones are unchanged, then use the same policy data.
|
||||
* Data for individual zones that must be reloaded will be merged.
|
||||
*/
|
||||
if (*old_rpz_okp &&
|
||||
old != NULL && memcmp(&old->p, &zones->p, sizeof(zones->p)) != 0)
|
||||
{
|
||||
*old_rpz_okp = false;
|
||||
}
|
||||
|
||||
if (*old_rpz_okp &&
|
||||
(old == NULL ||
|
||||
old->rps_cstr == NULL) != (zones->rps_cstr == NULL))
|
||||
{
|
||||
*old_rpz_okp = false;
|
||||
}
|
||||
|
||||
if (*old_rpz_okp &&
|
||||
(zones->rps_cstr != NULL &&
|
||||
strcmp(old->rps_cstr, zones->rps_cstr) != 0))
|
||||
{
|
||||
*old_rpz_okp = false;
|
||||
if (*old_rpz_okp) {
|
||||
if (old != NULL &&
|
||||
memcmp(&old->p, &zones->p, sizeof(zones->p)) != 0)
|
||||
{
|
||||
*old_rpz_okp = false;
|
||||
} else if ((old == NULL || old->rps_cstr == NULL) !=
|
||||
(zones->rps_cstr == NULL))
|
||||
{
|
||||
*old_rpz_okp = false;
|
||||
} else if (old != NULL &&
|
||||
zones->rps_cstr != NULL &&
|
||||
strcmp(old->rps_cstr, zones->rps_cstr) != 0)
|
||||
{
|
||||
*old_rpz_okp = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (*old_rpz_okp) {
|
||||
|
|
@ -2549,8 +2548,9 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
|||
view->rpzs->rpz_ver);
|
||||
}
|
||||
|
||||
if (pview != NULL)
|
||||
if (pview != NULL) {
|
||||
dns_view_detach(&pview);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
|
@ -6769,7 +6769,7 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
|
|||
|
||||
REQUIRE(keytable != NULL);
|
||||
REQUIRE(keynode != NULL);
|
||||
REQUIRE(arg != NULL);
|
||||
REQUIRE(dotat_arg != NULL);
|
||||
|
||||
view = dotat_arg->view;
|
||||
task = dotat_arg->task;
|
||||
|
|
@ -9558,7 +9558,7 @@ get_matching_view(isc_netaddr_t *srcaddr, isc_netaddr_t *destaddr,
|
|||
if (message->rdclass == view->rdclass ||
|
||||
message->rdclass == dns_rdataclass_any)
|
||||
{
|
||||
dns_name_t *tsig = NULL;
|
||||
const dns_name_t *tsig = NULL;
|
||||
|
||||
*sigresult = dns_message_rechecksig(message, view);
|
||||
if (*sigresult == ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -758,7 +758,6 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
|
|||
dns_aclenv_t *env = ns_interfacemgr_getaclenv(interfacemgr);
|
||||
dns_view_t *view;
|
||||
dns_tsigkey_t *key = NULL;
|
||||
dns_name_t *tsig = NULL;
|
||||
isc_netaddr_t netsrc;
|
||||
isc_netaddr_t netdst;
|
||||
|
||||
|
|
@ -773,7 +772,9 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
|
|||
|
||||
for (view = ISC_LIST_HEAD(named_g_server->viewlist);
|
||||
view != NULL;
|
||||
view = ISC_LIST_NEXT(view, link)) {
|
||||
view = ISC_LIST_NEXT(view, link))
|
||||
{
|
||||
const dns_name_t *tsig = NULL;
|
||||
|
||||
if (view->matchrecursiveonly)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ dns_acl_isinsecure(const dns_acl_t *a) {
|
|||
* Check whether an address/signer is allowed by a given acl/aclenv.
|
||||
*/
|
||||
bool
|
||||
dns_acl_allowed(isc_netaddr_t *addr, dns_name_t *signer,
|
||||
dns_acl_allowed(isc_netaddr_t *addr, const dns_name_t *signer,
|
||||
dns_acl_t *acl, dns_aclenv_t *aclenv)
|
||||
{
|
||||
int match;
|
||||
|
|
|
|||
|
|
@ -745,7 +745,6 @@ rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp) {
|
|||
REQUIRE(iteratorp != NULL);
|
||||
REQUIRE(DNS_RDATASETITER_VALID(*iteratorp));
|
||||
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
u.rdatasetiterator = *iteratorp;
|
||||
*iteratorp = NULL;
|
||||
|
||||
|
|
@ -760,28 +759,30 @@ rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp) {
|
|||
|
||||
static isc_result_t
|
||||
rdatasetiter_first(dns_rdatasetiter_t *iterator) {
|
||||
REQUIRE(DNS_RDATASETITER_VALID(iterator));
|
||||
|
||||
ecdb_rdatasetiter_t *ecdbiterator = (ecdb_rdatasetiter_t *)iterator;
|
||||
dns_ecdbnode_t *ecdbnode = (dns_ecdbnode_t *)iterator->node;
|
||||
|
||||
REQUIRE(DNS_RDATASETITER_VALID(iterator));
|
||||
|
||||
if (ISC_LIST_EMPTY(ecdbnode->rdatasets))
|
||||
if (ISC_LIST_EMPTY(ecdbnode->rdatasets)) {
|
||||
return (ISC_R_NOMORE);
|
||||
}
|
||||
ecdbiterator->current = ISC_LIST_HEAD(ecdbnode->rdatasets);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
rdatasetiter_next(dns_rdatasetiter_t *iterator) {
|
||||
ecdb_rdatasetiter_t *ecdbiterator = (ecdb_rdatasetiter_t *)iterator;
|
||||
|
||||
REQUIRE(DNS_RDATASETITER_VALID(iterator));
|
||||
|
||||
ecdb_rdatasetiter_t *ecdbiterator = (ecdb_rdatasetiter_t *)iterator;
|
||||
|
||||
ecdbiterator->current = ISC_LIST_NEXT(ecdbiterator->current, link);
|
||||
if (ecdbiterator->current == NULL)
|
||||
if (ecdbiterator->current == NULL) {
|
||||
return (ISC_R_NOMORE);
|
||||
else
|
||||
} else {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
geoip_state_t *state = NULL;
|
||||
dns_geoip_subtype_t subtype;
|
||||
const char *s = NULL;
|
||||
int ret, i;
|
||||
int ret;
|
||||
|
||||
REQUIRE(reqaddr != NULL);
|
||||
REQUIRE(elt != NULL);
|
||||
|
|
@ -347,7 +347,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
case dns_geoip_country_code:
|
||||
case dns_geoip_city_countrycode:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"country", "iso_code", NULL);
|
||||
"country", "iso_code", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
case dns_geoip_country_name:
|
||||
case dns_geoip_city_countryname:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"country", "names", "en", NULL);
|
||||
"country", "names", "en", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -365,7 +365,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
case dns_geoip_country_continentcode:
|
||||
case dns_geoip_city_continentcode:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"continent", "code", NULL);
|
||||
"continent", "code", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -374,7 +374,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
case dns_geoip_country_continent:
|
||||
case dns_geoip_city_continent:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"continent", "names", "en", NULL);
|
||||
"continent", "names", "en", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -383,7 +383,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
case dns_geoip_region:
|
||||
case dns_geoip_city_region:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"subdivisions", "0", "iso_code", NULL);
|
||||
"subdivisions", "0", "iso_code", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -392,7 +392,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
case dns_geoip_regionname:
|
||||
case dns_geoip_city_regionname:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"subdivisions", "0", "names", "en", NULL);
|
||||
"subdivisions", "0", "names", "en", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -400,7 +400,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
|
||||
case dns_geoip_city_name:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"city", "names", "en", NULL);
|
||||
"city", "names", "en", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -408,7 +408,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
|
||||
case dns_geoip_city_postalcode:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"postal", "code", NULL);
|
||||
"postal", "code", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -416,7 +416,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
|
||||
case dns_geoip_city_timezonecode:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"location", "time_zone", NULL);
|
||||
"location", "time_zone", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -425,14 +425,14 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
|
||||
case dns_geoip_city_metrocode:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"location", "metro_code", NULL);
|
||||
"location", "metro_code", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_geoip_isp_name:
|
||||
ret = MMDB_get_value(&state->entry, &value, "isp", NULL);
|
||||
ret = MMDB_get_value(&state->entry, &value, "isp", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
@ -442,8 +442,9 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
INSIST(elt->as_string != NULL);
|
||||
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"autonomous_system_number", NULL);
|
||||
"autonomous_system_number", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
int i;
|
||||
s = elt->as_string;
|
||||
if (strncasecmp(s, "AS", 2) == 0) {
|
||||
s += 2;
|
||||
|
|
@ -455,14 +456,14 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
|
|||
|
||||
case dns_geoip_org_name:
|
||||
ret = MMDB_get_value(&state->entry, &value,
|
||||
"autonomous_system_organization", NULL);
|
||||
"autonomous_system_organization", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
break;
|
||||
|
||||
case dns_geoip_domain_name:
|
||||
ret = MMDB_get_value(&state->entry, &value, "domain", NULL);
|
||||
ret = MMDB_get_value(&state->entry, &value, "domain", (char *)0);
|
||||
if (ret == MMDB_SUCCESS) {
|
||||
return (match_string(&value, elt->as_string));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ gssapi_dump(dst_key_t *key, isc_mem_t *mctx, char **buffer, int *length) {
|
|||
major = gss_export_sec_context(&minor, &key->keydata.gssctx,
|
||||
&gssbuffer);
|
||||
if (major != GSS_S_COMPLETE) {
|
||||
fprintf(stderr, "gss_export_sec_context -> %d, %d\n",
|
||||
fprintf(stderr, "gss_export_sec_context -> %u, %u\n",
|
||||
major, minor);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ dns_acl_isinsecure(const dns_acl_t *a);
|
|||
*/
|
||||
|
||||
bool
|
||||
dns_acl_allowed(isc_netaddr_t *addr, dns_name_t *signer,
|
||||
dns_acl_allowed(isc_netaddr_t *addr, const dns_name_t *signer,
|
||||
dns_acl_t *acl, dns_aclenv_t *aclenv);
|
||||
/*%<
|
||||
* Return #true iff the 'addr', 'signer', or ECS values are
|
||||
|
|
|
|||
|
|
@ -86,13 +86,21 @@ struct dns_tsigkey {
|
|||
ISC_LINK(dns_tsigkey_t) link;
|
||||
};
|
||||
|
||||
#define dns_tsigkey_identity(tsigkey) \
|
||||
((tsigkey) == NULL ? NULL : \
|
||||
(tsigkey)->generated ? ((tsigkey)->creator) : \
|
||||
(&((tsigkey)->name)))
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
const dns_name_t *
|
||||
dns_tsigkey_identity(const dns_tsigkey_t *tsigkey);
|
||||
/*%<
|
||||
* Returns the identity of the provided TSIG key.
|
||||
*
|
||||
* Requires:
|
||||
*\li 'tsigkey' is a valid TSIG key or NULL
|
||||
*
|
||||
* Returns:
|
||||
*\li NULL if 'tsigkey' was NULL
|
||||
*\li identity of the provided TSIG key
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_tsigkey_create(const dns_name_t *name, const dns_name_t *algorithm,
|
||||
unsigned char *secret, int length, bool generated,
|
||||
|
|
|
|||
|
|
@ -3056,7 +3056,7 @@ dns_message_signer(dns_message_t *msg, dns_name_t *signer) {
|
|||
dns_name_clone(&sig.signer, signer);
|
||||
dns_rdata_freestruct(&sig);
|
||||
} else {
|
||||
dns_name_t *identity;
|
||||
const dns_name_t *identity;
|
||||
dns_rdata_any_tsig_t tsig;
|
||||
|
||||
result = dns_rdataset_first(msg->tsig);
|
||||
|
|
|
|||
|
|
@ -1345,7 +1345,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
|
|||
unsigned int trem, count;
|
||||
unsigned int labels;
|
||||
bool saw_root = false;
|
||||
unsigned int oused = target->used;
|
||||
unsigned int oused;
|
||||
dns_name_totextfilter_t *mem;
|
||||
dns_name_totextfilter_t totext_filter_proc = NULL;
|
||||
isc_result_t result;
|
||||
|
|
@ -1358,6 +1358,8 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
|
|||
REQUIRE(VALID_NAME(name));
|
||||
REQUIRE(ISC_BUFFER_VALID(target));
|
||||
|
||||
oused = target->used;
|
||||
|
||||
result = totext_filter_proc_key_init();
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,6 @@ progress_cb(int p, int n, BN_GENCB *cb) {
|
|||
|
||||
UNUSED(n);
|
||||
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
u.dptr = BN_GENCB_get_arg(cb);
|
||||
if (u.fptr != NULL)
|
||||
u.fptr(p);
|
||||
|
|
@ -304,7 +303,6 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
|
|||
if (callback == NULL) {
|
||||
BN_GENCB_set_old(cb, NULL, NULL);
|
||||
} else {
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
u.fptr = callback;
|
||||
BN_GENCB_set(cb, progress_cb, u.dptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,6 @@ progress_cb(int p, int n, BN_GENCB *cb) {
|
|||
|
||||
UNUSED(n);
|
||||
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
u.dptr = BN_GENCB_get_arg(cb);
|
||||
if (u.fptr != NULL)
|
||||
u.fptr(p);
|
||||
|
|
@ -495,7 +494,6 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
|
|||
if (callback == NULL) {
|
||||
BN_GENCB_set_old(cb, NULL, NULL);
|
||||
} else {
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
u.fptr = callback;
|
||||
BN_GENCB_set(cb, progress_cb, u.dptr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2676,6 +2676,7 @@ deletefromlevel(dns_rbtnode_t *item, dns_rbtnode_t **rootp) {
|
|||
* Fix color violations.
|
||||
*/
|
||||
if (IS_BLACK(item)) {
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=item */
|
||||
parent = PARENT(item);
|
||||
|
||||
while (child != *rootp && IS_BLACK(child)) {
|
||||
|
|
@ -2693,6 +2694,7 @@ deletefromlevel(dns_rbtnode_t *item, dns_rbtnode_t **rootp) {
|
|||
|
||||
INSIST(sibling != NULL);
|
||||
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=sibling */
|
||||
if (IS_BLACK(LEFT(sibling)) &&
|
||||
IS_BLACK(RIGHT(sibling))) {
|
||||
MAKE_RED(sibling);
|
||||
|
|
@ -2732,6 +2734,7 @@ deletefromlevel(dns_rbtnode_t *item, dns_rbtnode_t **rootp) {
|
|||
|
||||
INSIST(sibling != NULL);
|
||||
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=sibling */
|
||||
if (IS_BLACK(LEFT(sibling)) &&
|
||||
IS_BLACK(RIGHT(sibling))) {
|
||||
MAKE_RED(sibling);
|
||||
|
|
@ -2863,6 +2866,7 @@ check_properties_helper(dns_rbtnode_t *node) {
|
|||
return (false);
|
||||
}
|
||||
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=node */
|
||||
if ((DOWN(node) != NULL) && (!IS_ROOT(DOWN(node))))
|
||||
return (false);
|
||||
|
||||
|
|
@ -2900,12 +2904,15 @@ check_black_distance_helper(dns_rbtnode_t *node, size_t *distance) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=node */
|
||||
if (!check_black_distance_helper(LEFT(node), &dl))
|
||||
return (false);
|
||||
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=node */
|
||||
if (!check_black_distance_helper(RIGHT(node), &dr))
|
||||
return (false);
|
||||
|
||||
/* cppcheck-suppress nullPointerRedundantCheck symbolName=node */
|
||||
if (!check_black_distance_helper(DOWN(node), &dd))
|
||||
return (false);
|
||||
|
||||
|
|
|
|||
|
|
@ -7081,17 +7081,14 @@ rbt_datafixer(dns_rbtnode_t *rbtnode, void *base, size_t filesize,
|
|||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *) arg;
|
||||
rdatasetheader_t *header;
|
||||
unsigned char *limit = ((unsigned char *) base) + filesize;
|
||||
unsigned char *p;
|
||||
size_t size;
|
||||
unsigned int count;
|
||||
|
||||
REQUIRE(rbtnode != NULL);
|
||||
REQUIRE(VALID_RBTDB(rbtdb));
|
||||
|
||||
for (header = rbtnode->data; header != NULL; header = header->next) {
|
||||
p = (unsigned char *) header;
|
||||
|
||||
size = dns_rdataslab_size(p, sizeof(*header));
|
||||
count = dns_rdataslab_count(p, sizeof(*header));;
|
||||
unsigned char *p = (unsigned char *) header;
|
||||
size_t size = dns_rdataslab_size(p, sizeof(*header));
|
||||
unsigned int count = dns_rdataslab_count(p, sizeof(*header));;
|
||||
rbtdb->current_version->records += count;
|
||||
rbtdb->current_version->bytes += size;
|
||||
isc_crc64_update(crc, p, size);
|
||||
|
|
@ -7105,7 +7102,7 @@ rbt_datafixer(dns_rbtnode_t *rbtnode, void *base, size_t filesize,
|
|||
header->node = rbtnode;
|
||||
header->node_is_relative = 0;
|
||||
|
||||
if (rbtdb != NULL && RESIGN(header) &&
|
||||
if (RESIGN(header) &&
|
||||
(header->resign != 0 || header->resign_lsb != 0))
|
||||
{
|
||||
int idx = header->node->locknum;
|
||||
|
|
|
|||
|
|
@ -361,7 +361,6 @@ dns_secalg_format(dns_secalg_t alg, char *cp, unsigned int size) {
|
|||
isc_buffer_usedregion(&b, &r);
|
||||
r.base[r.length] = 0;
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
r.base[0] = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -461,7 +460,6 @@ dns_dsdigest_format(dns_dsdigest_t typ, char *cp, unsigned int size) {
|
|||
isc_buffer_usedregion(&b, &r);
|
||||
r.base[r.length] = 0;
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
/* cppcheck-suppress unreadVariable */
|
||||
r.base[0] = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1199,7 +1199,7 @@ dns_rdata_tostruct(const dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
void
|
||||
dns_rdata_freestruct(void *source) {
|
||||
dns_rdatacommon_t *common = source;
|
||||
REQUIRE(source != NULL);
|
||||
REQUIRE(common != NULL);
|
||||
|
||||
FREESTRUCTSWITCH
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 == #);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue