mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Merge branch 'ondrej/use-newer-compiler-features-v9_18' into 'v9_18'
Use modern C and modern compiler features [v9.18] See merge request isc-projects/bind9!6025
This commit is contained in:
commit
010583541a
239 changed files with 1885 additions and 2099 deletions
|
|
@ -58,7 +58,7 @@ isc_log_t *logc = NULL;
|
|||
} while (0)
|
||||
|
||||
/*% usage */
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -306,8 +306,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
|
||||
|
|
@ -326,8 +325,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
|
|
@ -357,8 +355,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
|
|
@ -377,8 +374,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
|
|
@ -401,8 +397,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
|
|
@ -420,8 +415,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
|
|
@ -437,8 +431,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -677,7 +670,7 @@ main(int argc, char **argv) {
|
|||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
usage();
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static enum { progmode_check, progmode_compile } progmode;
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -147,8 +147,7 @@ main(int argc, char **argv) {
|
|||
} else if (PROGCMP("named-compilezone")) {
|
||||
progmode = progmode_compile;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/* Compilation specific defaults */
|
||||
|
|
@ -426,7 +425,7 @@ main(int argc, char **argv) {
|
|||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
prog_name, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
usage();
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ bool verbose = false;
|
|||
|
||||
const char *keyfile, *keydef;
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(int status);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const char *progname;
|
|||
static enum { progmode_keygen, progmode_confgen } progmode;
|
||||
bool verbose = false; /* needed by util.c but not used here */
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(int status);
|
||||
|
||||
static void
|
||||
|
|
@ -121,8 +121,7 @@ main(int argc, char **argv) {
|
|||
} else if (PROGCMP("ddns-confgen")) {
|
||||
progmode = progmode_confgen;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ISC_LANG_BEGINDECLS
|
|||
void
|
||||
notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ usage(void) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
static void
|
||||
|
|
@ -1325,7 +1325,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
|||
case 'h':
|
||||
usage();
|
||||
exit(0);
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
case 'i':
|
||||
no_sigs = true;
|
||||
root_validation = false;
|
||||
|
|
@ -1336,10 +1336,9 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
|||
case 'v':
|
||||
fprintf(stderr, "delv %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
if (strlen(option) > 1U) {
|
||||
option = &option[1];
|
||||
|
|
@ -1477,7 +1476,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
|||
fprintf(stderr, "Invalid option: -%s\n", option);
|
||||
usage();
|
||||
}
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ usage(void) {
|
|||
fprintf(stderr, "Press <Help> for complete list of options\n");
|
||||
}
|
||||
#else /* if TARGET_OS_IPHONE */
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -2115,7 +2115,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||
have_ipv6 = false;
|
||||
} else {
|
||||
fatal("can't find IPv4 networking");
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -2125,7 +2125,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||
have_ipv4 = false;
|
||||
} else {
|
||||
fatal("can't find IPv6 networking");
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -2377,7 +2377,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||
fprintf(stderr, "Invalid option: -%s\n", option);
|
||||
usage();
|
||||
}
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2468,8 +2468,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
memmove(addr, &sin6->sin6_addr, addrl);
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));
|
||||
|
|
|
|||
|
|
@ -276,13 +276,13 @@ getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
|
|||
isc_result_t
|
||||
get_reverse(char *reverse, size_t len, char *value, bool strict);
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
void
|
||||
warn(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
digexit(void);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ rcode_totext(dns_rcode_t rcode) {
|
|||
return (totext.deconsttext);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
show_usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -776,7 +776,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
|
|||
break;
|
||||
case 'A':
|
||||
list_almost_all = true;
|
||||
/* FALL THROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'a':
|
||||
if (!lookup->rdtypeset ||
|
||||
lookup->rdtype != dns_rdatatype_axfr) {
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@ get_next_command(void) {
|
|||
}
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -845,7 +845,7 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata, uint32_t ttl,
|
|||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
rdata_cmp(const void *rdata1, const void *rdata2) {
|
||||
return (dns_rdata_compare((const dns_rdata_t *)rdata1,
|
||||
(const dns_rdata_t *)rdata2));
|
||||
|
|
@ -1015,7 +1015,7 @@ nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
|
|||
}
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ emits(bool showall, bool cds, dns_rdata_t *rdata) {
|
|||
}
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -434,14 +434,14 @@ main(int argc, char **argv) {
|
|||
}
|
||||
break;
|
||||
case 'F':
|
||||
/* Reserved for FIPS mode */
|
||||
/* FALLTHROUGH */
|
||||
/* Reserved for FIPS mode */
|
||||
FALLTHROUGH;
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ emit(const char *dir, dns_rdata_t *rdata) {
|
|||
dst_key_free(&key);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -385,7 +385,7 @@ main(int argc, char **argv) {
|
|||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
const char *program = "dnssec-keyfromlabel";
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -315,14 +315,14 @@ main(int argc, char **argv) {
|
|||
prepub = strtottl(isc_commandline_argument);
|
||||
break;
|
||||
case 'F':
|
||||
/* Reserved for FIPS mode */
|
||||
/* FALLTHROUGH */
|
||||
/* Reserved for FIPS mode */
|
||||
FALLTHROUGH;
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
@ -616,7 +616,7 @@ main(int argc, char **argv) {
|
|||
dns_secalg_format(alg, algstr, sizeof(algstr));
|
||||
fatal("failed to get key %s/%s: %s", namestr, algstr,
|
||||
isc_result_totext(ret));
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ const char *program = "dnssec-keygen";
|
|||
|
||||
isc_log_t *lctx = NULL;
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -1108,14 +1108,14 @@ main(int argc, char **argv) {
|
|||
ctx.prepub = strtottl(isc_commandline_argument);
|
||||
break;
|
||||
case 'F':
|
||||
/* Reserved for FIPS mode */
|
||||
/* FALLTHROUGH */
|
||||
/* Reserved for FIPS mode */
|
||||
FALLTHROUGH;
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const char *program = "dnssec-revoke";
|
|||
|
||||
static isc_mem_t *mctx = NULL;
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -119,7 +119,7 @@ main(int argc, char **argv) {
|
|||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const char *program = "dnssec-settime";
|
|||
|
||||
static isc_mem_t *mctx = NULL;
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -342,7 +342,7 @@ main(int argc, char **argv) {
|
|||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -325,28 +325,28 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
|
|||
dns_diff_append(add, &tuple);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
issigningkey(dns_dnsseckey_t *key) {
|
||||
return (key->force_sign || key->hint_sign);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
ispublishedkey(dns_dnsseckey_t *key) {
|
||||
return ((key->force_publish || key->hint_publish) && !key->hint_remove);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
iszonekey(dns_dnsseckey_t *key) {
|
||||
return (dns_name_equal(dst_key_name(key->key), gorigin) &&
|
||||
dst_key_iszonekey(key->key));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
isksk(dns_dnsseckey_t *key) {
|
||||
return (key->ksk);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
iszsk(dns_dnsseckey_t *key) {
|
||||
return (ignore_kskflag || !key->ksk);
|
||||
}
|
||||
|
|
@ -463,11 +463,11 @@ expecttofindkey(dns_name_t *name) {
|
|||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
fatal("failure looking for '%s DNSKEY' in database: %s", namestr,
|
||||
isc_result_totext(result));
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false); /* removes a warning */
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
||||
dns_rdata_t *rrsig) {
|
||||
isc_result_t result;
|
||||
|
|
@ -1246,7 +1246,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
|
|||
* See if the node contains any non RRSIG/NSEC records and report to
|
||||
* caller. Clean out extraneous RRSIG records for node.
|
||||
*/
|
||||
static inline bool
|
||||
static bool
|
||||
active_node(dns_dbnode_t *node) {
|
||||
dns_rdatasetiter_t *rdsiter = NULL;
|
||||
dns_rdatasetiter_t *rdsiter2 = NULL;
|
||||
|
|
@ -3194,7 +3194,7 @@ print_version(FILE *fp) {
|
|||
fprintf(fp, "; dnssec_signzone version %s\n", PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -3640,14 +3640,14 @@ main(int argc, char *argv[]) {
|
|||
break;
|
||||
|
||||
case 'F':
|
||||
/* Reserved for FIPS mode */
|
||||
/* FALLTHROUGH */
|
||||
/* Reserved for FIPS mode */
|
||||
FALLTHROUGH;
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
|
|
|||
|
|
@ -132,14 +132,14 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
|||
"use -o to specify a different zone origin",
|
||||
origin, file);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
fatal("failed loading zone from '%s': %s", file,
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -258,7 +258,7 @@ main(int argc, char *argv[]) {
|
|||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) {
|
|||
default:
|
||||
fatal("time value %s is invalid", str);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
break;
|
||||
case 'W':
|
||||
case 'w':
|
||||
|
|
@ -233,11 +233,11 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) {
|
|||
default:
|
||||
fatal("time value %s is invalid", str);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (0); /* silence compiler warning */
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
isnone(const char *str) {
|
||||
return ((strcasecmp(str, "none") == 0) ||
|
||||
(strcasecmp(str, "never") == 0));
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ extern uint8_t dtype[8];
|
|||
|
||||
typedef void(fatalcallback_t)(void);
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
void
|
||||
|
|
@ -55,7 +55,7 @@ check_result(isc_result_t result, const char *message);
|
|||
void
|
||||
vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
version(const char *program);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -454,8 +454,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
|
|||
} else if (strcasecmp(str, "redirect") == 0) {
|
||||
ztype = dns_zone_redirect;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
return (ztype);
|
||||
}
|
||||
|
|
@ -1067,8 +1066,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
|
|||
*name = dns_tsig_hmacsha512_name;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (typep != NULL) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ getcommand(isc_lex_t *lex, char **cmdp) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
command_compare(const char *str, const char *command) {
|
||||
return (strcasecmp(str, command) == 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ cleanup_sendhandle:
|
|||
isc_nmhandle_detach(&conn->sendhandle);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
log_invalid(isccc_ccmsg_t *ccmsg, isc_result_t result) {
|
||||
char socktext[ISC_SOCKADDR_FORMATSIZE];
|
||||
isc_sockaddr_t peeraddr = isc_nmhandle_peeraddr(ccmsg->handle);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
#define NAMED_MAIN_ARGS "46A:c:d:D:E:fFgL:M:m:n:N:p:sS:t:T:U:u:vVx:X:"
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
named_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -161,8 +161,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
|
|||
maxoffset = 0x7fffffffffffffffULL;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
type = ISC_LOG_TOFILE;
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ named_main_earlyfatal(const char *format, ...) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
assertion_failed(const char *file, int line, isc_assertiontype_t type,
|
||||
const char *cond);
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
library_fatal_error(const char *file, int line, const char *format,
|
||||
va_list args) ISC_FORMAT_PRINTF(3, 0);
|
||||
|
||||
|
|
@ -728,8 +728,7 @@ parse_port(char *arg) {
|
|||
named_g_httpport = port;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -860,8 +859,8 @@ parse_command_line(int argc, char *argv[]) {
|
|||
}
|
||||
break;
|
||||
case 'F':
|
||||
/* Reserved for FIPS mode */
|
||||
/* FALLTHROUGH */
|
||||
/* Reserved for FIPS mode */
|
||||
FALLTHROUGH;
|
||||
case '?':
|
||||
usage();
|
||||
if (isc_commandline_option == '?') {
|
||||
|
|
@ -876,7 +875,7 @@ parse_command_line(int argc, char *argv[]) {
|
|||
"an argument",
|
||||
isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
named_main_earlyfatal("parsing options returned %d",
|
||||
ch);
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ const char *empty_zones[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(named_server_t *server, const char *msg, isc_result_t result);
|
||||
|
||||
static void
|
||||
|
|
@ -455,7 +455,7 @@ end_reserved_dispatches(named_server_t *server, bool all);
|
|||
static void
|
||||
newzone_cfgctx_destroy(void **cfgp);
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
putstr(isc_buffer_t **b, const char *str);
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -464,7 +464,7 @@ putmem(isc_buffer_t **b, const char *str, size_t len);
|
|||
static isc_result_t
|
||||
putuint8(isc_buffer_t **b, uint8_t val);
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
putnull(isc_buffer_t **b);
|
||||
|
||||
static int
|
||||
|
|
@ -866,8 +866,7 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, const char **namestrp,
|
|||
break;
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
@ -1273,8 +1272,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
|||
INSIST(result == ISC_R_SUCCESS);
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
sa = *(cfg_obj_assockaddr(obj));
|
||||
|
|
@ -1296,8 +1294,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
|||
result = isc_net_probeipv6();
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
@ -1401,8 +1398,7 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
|
|||
} else if (!strcasecmp(str, "none")) {
|
||||
mode = DNS_RDATASETATTR_NONE;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1558,8 +1554,7 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
|
|||
} else if (strcasecmp(str, "one-answer") == 0) {
|
||||
CHECK(dns_peer_settransferformat(peer, dns_one_answer));
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2933,7 +2928,7 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin,
|
|||
break;
|
||||
default:
|
||||
REQUIRE(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
event = (catz_chgzone_event_t *)isc_event_allocate(
|
||||
|
|
@ -4329,8 +4324,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
} else if (strcasecmp(str, "ignore") == 0) {
|
||||
view->checknames = false;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -4784,8 +4778,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
} else if (strcasecmp(resp, "fail") == 0) {
|
||||
r = DNS_R_SERVFAIL;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
dns_resolver_setquotaresponse(view->resolver,
|
||||
|
|
@ -5184,8 +5177,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
} else if (strcasecmp(str, "no-auth-recursive") == 0) {
|
||||
view->minimalresponses = dns_minimal_noauthrec;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5198,8 +5190,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
} else if (strcasecmp(str, "one-answer") == 0) {
|
||||
view->transfer_format = dns_one_answer;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -5511,8 +5502,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
} else if (strcasecmp(resp, "fail") == 0) {
|
||||
r = DNS_R_SERVFAIL;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
dns_resolver_setquotaresponse(view->resolver,
|
||||
|
|
@ -5739,8 +5729,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
} else if (strcasecmp(levelstr, "none") == 0) {
|
||||
statlevel = dns_zonestat_none;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6281,8 +6270,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
|
|||
} else if (strcasecmp(forwardstr, "only") == 0) {
|
||||
fwdpolicy = dns_fwdpolicy_only;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9588,8 +9576,7 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
|
||||
server->sctx->cookiealg = ns_cookiealg_aes;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -13677,8 +13664,7 @@ newzone_parse(named_server_t *server, char *command, dns_view_t **viewp,
|
|||
} else if (strncasecmp(command, "mod", 3) == 0) {
|
||||
bn = "modzone";
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -15074,7 +15060,7 @@ cleanup:
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
argcheck(char *cmd, const char *full) {
|
||||
size_t l;
|
||||
|
||||
|
|
@ -15412,7 +15398,7 @@ putmem(isc_buffer_t **b, const char *str, size_t len) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
putstr(isc_buffer_t **b, const char *str) {
|
||||
return (putmem(b, str, strlen(str)));
|
||||
}
|
||||
|
|
@ -15430,7 +15416,7 @@ putuint8(isc_buffer_t **b, uint8_t val) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
putnull(isc_buffer_t **b) {
|
||||
return (putuint8(b, 0));
|
||||
}
|
||||
|
|
@ -16373,8 +16359,7 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
|
|||
CHECK(mkey_destroy(server, view, text));
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
if (viewtxt != NULL) {
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ static int tcpoutsizestats_index[dns_sizecounter_out_max];
|
|||
static int dnstapstats_index[dns_dnstapcounter_max];
|
||||
static int gluecachestats_index[dns_gluecachestatscounter_max];
|
||||
|
||||
static inline void
|
||||
static void
|
||||
set_desc(int counter, int maxcounter, const char *fdesc, const char **fdescs,
|
||||
const char *xdesc, const char **xdescs) {
|
||||
REQUIRE(counter < maxcounter);
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
|||
aclname = "allow-update-forwarding";
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/* First check to see if ACL is defined within the zone */
|
||||
|
|
@ -246,8 +245,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
|||
} else if (strcasecmp(str, "deny") == 0) {
|
||||
grant = false;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
str = cfg_obj_asstring(matchtype);
|
||||
|
|
@ -684,7 +682,7 @@ cleanup:
|
|||
/*%
|
||||
* Convert a config file zone type into a server zone type.
|
||||
*/
|
||||
static inline dns_zonetype_t
|
||||
static dns_zonetype_t
|
||||
zonetype_fromconfig(const cfg_obj_t *map) {
|
||||
const cfg_obj_t *obj = NULL;
|
||||
isc_result_t result;
|
||||
|
|
@ -759,8 +757,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
|
|||
result = named_checknames_get(maps, primary_synonyms, objp);
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
|
||||
|
|
@ -1041,8 +1038,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1065,8 +1061,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(masterstylestr, "relative") == 0) {
|
||||
masterstyle = &dns_master_style_default;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1159,8 +1154,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(dialupstr, "passive") == 0) {
|
||||
dialup = dns_dialuptype_passive;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (raw != NULL) {
|
||||
|
|
@ -1186,8 +1180,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(levelstr, "none") == 0) {
|
||||
statlevel = dns_zonestat_none;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
dns_zone_setstatlevel(zone, statlevel);
|
||||
|
|
@ -1266,8 +1259,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
{
|
||||
notifytype = dns_notifytype_masteronly;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
notifytype = process_notifytype(notifytype, ztype, zname,
|
||||
|
|
@ -1460,8 +1452,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
if (raw != NULL) {
|
||||
dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMES, check);
|
||||
|
|
@ -1495,8 +1486,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
check = false;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
|
||||
|
||||
|
|
@ -1696,8 +1686,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(arg, "off") == 0) {
|
||||
/* Default */
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_CREATE, false);
|
||||
|
|
@ -1756,8 +1745,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(dupcheck, "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRRFAIL, fail);
|
||||
|
|
@ -1773,8 +1761,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail);
|
||||
|
|
@ -1796,8 +1783,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
warn = ignore = true;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNOREMXCNAME, ignore);
|
||||
|
|
@ -1813,8 +1799,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
warn = ignore = true;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNORESRVCNAME,
|
||||
|
|
@ -1837,8 +1822,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
} else if (strcasecmp(arg, "maintain") == 0) {
|
||||
/* Default */
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1874,7 +1858,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
dns_zone_setxfracl(zone, none);
|
||||
dns_acl_detach(&none);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case dns_zone_secondary:
|
||||
case dns_zone_stub:
|
||||
case dns_zone_redirect:
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
|
|||
static void
|
||||
send_update(dns_name_t *zonename, isc_sockaddr_t *primary);
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
static void
|
||||
|
|
@ -304,7 +304,7 @@ ddebug(const char *format, ...) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
check_result(isc_result_t result, const char *msg) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("%s: %s", msg, isc_result_totext(result));
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static isc_nmhandle_t *recvnonce_handle = NULL;
|
|||
static void
|
||||
rndc_startconnect(isc_sockaddr_t *addr);
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(int status);
|
||||
|
||||
static void
|
||||
|
|
@ -592,8 +592,7 @@ rndc_startconnect(isc_sockaddr_t *addr) {
|
|||
*/
|
||||
fatal("UNIX domain sockets not currently supported");
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
atomic_fetch_add_relaxed(&connects, 1);
|
||||
|
|
@ -1001,7 +1000,7 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
usage(1);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 'h':
|
||||
usage(0);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ISC_LANG_BEGINDECLS
|
|||
void
|
||||
notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
ISC_NORETURN void
|
||||
noreturn void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ main(int argc, char **argv) {
|
|||
#ifdef USE_DNSRPS
|
||||
printf("%s\n", librpz->dnsrpzd_path);
|
||||
#else /* ifdef USE_DNSRPS */
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
#endif /* ifdef USE_DNSRPS */
|
||||
return (0);
|
||||
|
||||
|
|
@ -134,8 +133,7 @@ main(int argc, char **argv) {
|
|||
librpz->client_detach(&client);
|
||||
printf("%u\n", serial);
|
||||
#else /* ifdef USE_DNSRPS */
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
#endif /* ifdef USE_DNSRPS */
|
||||
return (0);
|
||||
|
||||
|
|
|
|||
|
|
@ -432,8 +432,7 @@ run(void) {
|
|||
} break;
|
||||
#endif
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
waitforsignal();
|
||||
|
|
|
|||
|
|
@ -302,8 +302,7 @@ run(void) {
|
|||
} break;
|
||||
#endif
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
REQUIRE(result == ISC_R_SUCCESS);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ process_message(isc_buffer_t *source);
|
|||
static isc_result_t
|
||||
printmessage(dns_message_t *msg);
|
||||
|
||||
static inline void
|
||||
static void
|
||||
CHECKRESULT(isc_result_t result, const char *msg) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("%s: %s\n", msg, isc_result_totext(result));
|
||||
|
|
@ -58,7 +58,7 @@ fromhex(char c) {
|
|||
|
||||
fprintf(stderr, "bad input format: %02x\n", c);
|
||||
exit(3);
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const char *program = "dnstap-read";
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(const char *format, ...);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@ sendqueries(isc_task_t *task, isc_event_t *event) {
|
|||
return;
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -894,7 +894,7 @@ help(void) {
|
|||
"Server ID)\n");
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
static void
|
||||
|
|
@ -1698,7 +1698,7 @@ dash_option(const char *option, char *next, struct query *query, bool global,
|
|||
have_ipv6 = false;
|
||||
} else {
|
||||
fatal("can't find IPv4 networking");
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1709,7 +1709,7 @@ dash_option(const char *option, char *next, struct query *query, bool global,
|
|||
have_ipv4 = false;
|
||||
} else {
|
||||
fatal("can't find IPv6 networking");
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1817,7 +1817,7 @@ dash_option(const char *option, char *next, struct query *query, bool global,
|
|||
fprintf(stderr, "Invalid option: -%s\n", option);
|
||||
usage();
|
||||
}
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ static isc_lex_t *lex;
|
|||
|
||||
static isc_lexspecials_t specials;
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
usage(void);
|
||||
|
||||
static void
|
||||
|
|
@ -52,7 +52,7 @@ usage(void) {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(const char *format, ...);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
const char *program = "nsec3hash";
|
||||
|
||||
ISC_NORETURN static void
|
||||
noreturn static void
|
||||
fatal(const char *format, ...);
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
@@
|
||||
@@
|
||||
|
||||
INSIST(0);
|
||||
+ ISC_UNREACHABLE();
|
||||
... when != ISC_UNREACHABLE();
|
||||
- INSIST(0);
|
||||
+ UNREACHABLE();
|
||||
... when != UNREACHABLE();
|
||||
|
||||
@@
|
||||
@@
|
||||
|
||||
- INSIST(0);
|
||||
- ISC_UNREACHABLE();
|
||||
+ UNREACHABLE();
|
||||
|
|
|
|||
|
|
@ -1149,7 +1149,7 @@ AC_CHECK_HEADERS(
|
|||
])
|
||||
LIBS="$LIBS $ISC_ATOMIC_LIBS"
|
||||
|
||||
AC_CHECK_HEADERS([stdalign.h])
|
||||
AC_CHECK_HEADERS([stdalign.h stdnoreturn.h])
|
||||
|
||||
AC_CHECK_HEADERS([uchar.h])
|
||||
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ isrelative(const char *s) {
|
|||
}
|
||||
|
||||
/* Return a dot if 's' doesn't already end with one */
|
||||
static inline const char *
|
||||
static const char *
|
||||
dot(const char *s) {
|
||||
return (isrelative(s) ? "." : "");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -684,7 +684,7 @@ fnmatch(const char *pattern, const char *string, int flags) {
|
|||
--pattern;
|
||||
}
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
norm:
|
||||
if (c == *string) {
|
||||
|
|
@ -699,7 +699,7 @@ fnmatch(const char *pattern, const char *string, int flags) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -142,12 +142,10 @@ Good:
|
|||
static char * c /* Description of 'c'. */
|
||||
|
||||
|
||||
The following lint and lint-like comments should be used where appropriate:
|
||||
The following macros should be used where appropriate:
|
||||
|
||||
/* ARGSUSED */
|
||||
/* FALLTHROUGH */
|
||||
/* NOTREACHED */
|
||||
/* VARARGS */
|
||||
FALLTHROUGH;
|
||||
UNREACHABLE();
|
||||
|
||||
#### Header files
|
||||
|
||||
|
|
@ -271,7 +269,7 @@ specifying the implementation of the function. The opening curly brace
|
|||
should occur on the same line as the argument list, unless the argument
|
||||
list is more than one line long:
|
||||
|
||||
static inline void
|
||||
static void
|
||||
func1(int i) {
|
||||
/* whatever */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2656,8 +2656,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
for (element2 = cfg_list_first(typelist); element2 != NULL;
|
||||
|
|
@ -3056,8 +3055,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
|
|||
break;
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ again:
|
|||
goto again;
|
||||
}
|
||||
#endif /* ifdef AI_ADDRCONFIG */
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -464,8 +464,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr, const dns_name_t *reqsigner,
|
|||
return (dns_geoip_match(reqaddr, env->geoip, &e->geoip_elem));
|
||||
#endif /* if defined(HAVE_GEOIP2) */
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
result = dns_acl_match(reqaddr, reqsigner, inner, env, &indirectmatch,
|
||||
|
|
@ -658,8 +657,7 @@ dns_acl_isinsecure(const dns_acl_t *a) {
|
|||
return (true);
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
118
lib/dns/adb.c
118
lib/dns/adb.c
|
|
@ -273,35 +273,35 @@ struct dns_adbentry {
|
|||
/*
|
||||
* Internal functions (and prototypes).
|
||||
*/
|
||||
static inline dns_adbname_t *
|
||||
static dns_adbname_t *
|
||||
new_adbname(dns_adb_t *, const dns_name_t *);
|
||||
static inline void
|
||||
static void
|
||||
free_adbname(dns_adb_t *, dns_adbname_t **);
|
||||
static inline dns_adbnamehook_t *
|
||||
static dns_adbnamehook_t *
|
||||
new_adbnamehook(dns_adb_t *, dns_adbentry_t *);
|
||||
static inline void
|
||||
static void
|
||||
free_adbnamehook(dns_adb_t *, dns_adbnamehook_t **);
|
||||
static inline dns_adblameinfo_t *
|
||||
static dns_adblameinfo_t *
|
||||
new_adblameinfo(dns_adb_t *, const dns_name_t *, dns_rdatatype_t);
|
||||
static inline void
|
||||
static void
|
||||
free_adblameinfo(dns_adb_t *, dns_adblameinfo_t **);
|
||||
static inline dns_adbentry_t *
|
||||
static dns_adbentry_t *
|
||||
new_adbentry(dns_adb_t *);
|
||||
static inline void
|
||||
static void
|
||||
free_adbentry(dns_adb_t *, dns_adbentry_t **);
|
||||
static inline dns_adbfind_t *
|
||||
static dns_adbfind_t *
|
||||
new_adbfind(dns_adb_t *);
|
||||
static inline bool
|
||||
static bool
|
||||
free_adbfind(dns_adb_t *, dns_adbfind_t **);
|
||||
static inline dns_adbaddrinfo_t *
|
||||
static dns_adbaddrinfo_t *
|
||||
new_adbaddrinfo(dns_adb_t *, dns_adbentry_t *, in_port_t);
|
||||
static inline dns_adbfetch_t *
|
||||
static dns_adbfetch_t *
|
||||
new_adbfetch(dns_adb_t *);
|
||||
static inline void
|
||||
static void
|
||||
free_adbfetch(dns_adb_t *, dns_adbfetch_t **);
|
||||
static inline dns_adbname_t *
|
||||
static dns_adbname_t *
|
||||
find_name_and_lock(dns_adb_t *, const dns_name_t *, unsigned int, int *);
|
||||
static inline dns_adbentry_t *
|
||||
static dns_adbentry_t *
|
||||
find_entry_and_lock(dns_adb_t *, const isc_sockaddr_t *, int *, isc_stdtime_t);
|
||||
static void
|
||||
dump_adb(dns_adb_t *, FILE *, bool debug, isc_stdtime_t);
|
||||
|
|
@ -314,17 +314,17 @@ static void
|
|||
print_find_list(FILE *, dns_adbname_t *);
|
||||
static void
|
||||
print_fetch_list(FILE *, dns_adbname_t *);
|
||||
static inline bool
|
||||
static bool
|
||||
dec_adb_irefcnt(dns_adb_t *);
|
||||
static inline void
|
||||
static void
|
||||
inc_adb_irefcnt(dns_adb_t *);
|
||||
static inline void
|
||||
static void
|
||||
inc_adb_erefcnt(dns_adb_t *);
|
||||
static inline void
|
||||
static void
|
||||
inc_entry_refcnt(dns_adb_t *, dns_adbentry_t *, bool);
|
||||
static inline bool
|
||||
static bool
|
||||
dec_entry_refcnt(dns_adb_t *, bool, dns_adbentry_t *, bool);
|
||||
static inline void
|
||||
static void
|
||||
violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
|
||||
static bool
|
||||
clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
|
||||
|
|
@ -343,7 +343,7 @@ dbfind_name(dns_adbname_t *, isc_stdtime_t, dns_rdatatype_t);
|
|||
static isc_result_t
|
||||
fetch_name(dns_adbname_t *, bool, unsigned int, isc_counter_t *qc,
|
||||
dns_rdatatype_t);
|
||||
static inline void
|
||||
static void
|
||||
check_exit(dns_adb_t *);
|
||||
static void
|
||||
destroy(dns_adb_t *);
|
||||
|
|
@ -351,13 +351,13 @@ static bool
|
|||
shutdown_names(dns_adb_t *);
|
||||
static bool
|
||||
shutdown_entries(dns_adb_t *);
|
||||
static inline void
|
||||
static void
|
||||
link_name(dns_adb_t *, int, dns_adbname_t *);
|
||||
static inline bool
|
||||
static bool
|
||||
unlink_name(dns_adb_t *, dns_adbname_t *);
|
||||
static inline void
|
||||
static void
|
||||
link_entry(dns_adb_t *, int, dns_adbentry_t *);
|
||||
static inline bool
|
||||
static bool
|
||||
unlink_entry(dns_adb_t *, dns_adbentry_t *);
|
||||
static bool
|
||||
kill_name(dns_adbname_t **, isc_eventtype_t);
|
||||
|
|
@ -502,7 +502,7 @@ DP(int level, const char *format, ...) {
|
|||
/*%
|
||||
* Increment resolver-related statistics counters.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
inc_stats(dns_adb_t *adb, isc_statscounter_t counter) {
|
||||
if (adb->view->resstats != NULL) {
|
||||
isc_stats_increment(adb->view->resstats, counter);
|
||||
|
|
@ -512,28 +512,28 @@ inc_stats(dns_adb_t *adb, isc_statscounter_t counter) {
|
|||
/*%
|
||||
* Set adb-related statistics counters.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
set_adbstat(dns_adb_t *adb, uint64_t val, isc_statscounter_t counter) {
|
||||
if (adb->view->adbstats != NULL) {
|
||||
isc_stats_set(adb->view->adbstats, val, counter);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
dec_adbstats(dns_adb_t *adb, isc_statscounter_t counter) {
|
||||
if (adb->view->adbstats != NULL) {
|
||||
isc_stats_decrement(adb->view->adbstats, counter);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
inc_adbstats(dns_adb_t *adb, isc_statscounter_t counter) {
|
||||
if (adb->view->adbstats != NULL) {
|
||||
isc_stats_increment(adb->view->adbstats, counter);
|
||||
}
|
||||
}
|
||||
|
||||
static inline dns_ttl_t
|
||||
static dns_ttl_t
|
||||
ttlclamp(dns_ttl_t ttl) {
|
||||
if (ttl < ADB_CACHE_MINIMUM) {
|
||||
ttl = ADB_CACHE_MINIMUM;
|
||||
|
|
@ -1132,7 +1132,7 @@ check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
|
|||
/*
|
||||
* Requires the name's bucket be locked.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
link_name(dns_adb_t *adb, int bucket, dns_adbname_t *name) {
|
||||
INSIST(name->lock_bucket == DNS_ADB_INVALIDBUCKET);
|
||||
|
||||
|
|
@ -1144,7 +1144,7 @@ link_name(dns_adb_t *adb, int bucket, dns_adbname_t *name) {
|
|||
/*
|
||||
* Requires the name's bucket be locked.
|
||||
*/
|
||||
static inline bool
|
||||
static bool
|
||||
unlink_name(dns_adb_t *adb, dns_adbname_t *name) {
|
||||
int bucket;
|
||||
bool result = false;
|
||||
|
|
@ -1169,7 +1169,7 @@ unlink_name(dns_adb_t *adb, dns_adbname_t *name) {
|
|||
/*
|
||||
* Requires the entry's bucket be locked.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) {
|
||||
int i;
|
||||
dns_adbentry_t *e;
|
||||
|
|
@ -1200,7 +1200,7 @@ link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) {
|
|||
/*
|
||||
* Requires the entry's bucket be locked.
|
||||
*/
|
||||
static inline bool
|
||||
static bool
|
||||
unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) {
|
||||
int bucket;
|
||||
bool result = false;
|
||||
|
|
@ -1222,7 +1222,7 @@ unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
violate_locking_hierarchy(isc_mutex_t *have, isc_mutex_t *want) {
|
||||
if (isc_mutex_trylock(want) != ISC_R_SUCCESS) {
|
||||
UNLOCK(have);
|
||||
|
|
@ -1563,7 +1563,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
|
|||
DP(ENTER_LEVEL, "EXIT clean_finds_at_name, name %p", name);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
check_exit(dns_adb_t *adb) {
|
||||
isc_event_t *event;
|
||||
/*
|
||||
|
|
@ -1584,7 +1584,7 @@ check_exit(dns_adb_t *adb) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
dec_adb_irefcnt(dns_adb_t *adb) {
|
||||
isc_event_t *event;
|
||||
isc_task_t *etask;
|
||||
|
|
@ -1613,21 +1613,21 @@ dec_adb_irefcnt(dns_adb_t *adb) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
inc_adb_irefcnt(dns_adb_t *adb) {
|
||||
LOCK(&adb->reflock);
|
||||
adb->irefcnt++;
|
||||
UNLOCK(&adb->reflock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
inc_adb_erefcnt(dns_adb_t *adb) {
|
||||
LOCK(&adb->reflock);
|
||||
adb->erefcnt++;
|
||||
UNLOCK(&adb->reflock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, bool lock) {
|
||||
int bucket;
|
||||
|
||||
|
|
@ -1644,7 +1644,7 @@ inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, bool lock) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
dec_entry_refcnt(dns_adb_t *adb, bool overmem, dns_adbentry_t *entry,
|
||||
bool lock) {
|
||||
int bucket;
|
||||
|
|
@ -1687,7 +1687,7 @@ dec_entry_refcnt(dns_adb_t *adb, bool overmem, dns_adbentry_t *entry,
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline dns_adbname_t *
|
||||
static dns_adbname_t *
|
||||
new_adbname(dns_adb_t *adb, const dns_name_t *dnsname) {
|
||||
dns_adbname_t *name;
|
||||
|
||||
|
|
@ -1730,7 +1730,7 @@ new_adbname(dns_adb_t *adb, const dns_name_t *dnsname) {
|
|||
return (name);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_adbname(dns_adb_t *adb, dns_adbname_t **name) {
|
||||
dns_adbname_t *n;
|
||||
|
||||
|
|
@ -1756,7 +1756,7 @@ free_adbname(dns_adb_t *adb, dns_adbname_t **name) {
|
|||
UNLOCK(&adb->namescntlock);
|
||||
}
|
||||
|
||||
static inline dns_adbnamehook_t *
|
||||
static dns_adbnamehook_t *
|
||||
new_adbnamehook(dns_adb_t *adb, dns_adbentry_t *entry) {
|
||||
dns_adbnamehook_t *nh;
|
||||
|
||||
|
|
@ -1770,7 +1770,7 @@ new_adbnamehook(dns_adb_t *adb, dns_adbentry_t *entry) {
|
|||
return (nh);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_adbnamehook(dns_adb_t *adb, dns_adbnamehook_t **namehook) {
|
||||
dns_adbnamehook_t *nh;
|
||||
|
||||
|
|
@ -1787,7 +1787,7 @@ free_adbnamehook(dns_adb_t *adb, dns_adbnamehook_t **namehook) {
|
|||
isc_mem_put(adb->mctx, nh, sizeof(*nh));
|
||||
}
|
||||
|
||||
static inline dns_adblameinfo_t *
|
||||
static dns_adblameinfo_t *
|
||||
new_adblameinfo(dns_adb_t *adb, const dns_name_t *qname,
|
||||
dns_rdatatype_t qtype) {
|
||||
dns_adblameinfo_t *li;
|
||||
|
|
@ -1804,7 +1804,7 @@ new_adblameinfo(dns_adb_t *adb, const dns_name_t *qname,
|
|||
return (li);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_adblameinfo(dns_adb_t *adb, dns_adblameinfo_t **lameinfo) {
|
||||
dns_adblameinfo_t *li;
|
||||
|
||||
|
|
@ -1821,7 +1821,7 @@ free_adblameinfo(dns_adb_t *adb, dns_adblameinfo_t **lameinfo) {
|
|||
isc_mem_put(adb->mctx, li, sizeof(*li));
|
||||
}
|
||||
|
||||
static inline dns_adbentry_t *
|
||||
static dns_adbentry_t *
|
||||
new_adbentry(dns_adb_t *adb) {
|
||||
dns_adbentry_t *e;
|
||||
|
||||
|
|
@ -1866,7 +1866,7 @@ new_adbentry(dns_adb_t *adb) {
|
|||
return (e);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_adbentry(dns_adb_t *adb, dns_adbentry_t **entry) {
|
||||
dns_adbentry_t *e;
|
||||
dns_adblameinfo_t *li;
|
||||
|
|
@ -1899,7 +1899,7 @@ free_adbentry(dns_adb_t *adb, dns_adbentry_t **entry) {
|
|||
UNLOCK(&adb->entriescntlock);
|
||||
}
|
||||
|
||||
static inline dns_adbfind_t *
|
||||
static dns_adbfind_t *
|
||||
new_adbfind(dns_adb_t *adb) {
|
||||
dns_adbfind_t *h;
|
||||
|
||||
|
|
@ -1935,7 +1935,7 @@ new_adbfind(dns_adb_t *adb) {
|
|||
return (h);
|
||||
}
|
||||
|
||||
static inline dns_adbfetch_t *
|
||||
static dns_adbfetch_t *
|
||||
new_adbfetch(dns_adb_t *adb) {
|
||||
dns_adbfetch_t *f;
|
||||
|
||||
|
|
@ -1951,7 +1951,7 @@ new_adbfetch(dns_adb_t *adb) {
|
|||
return (f);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_adbfetch(dns_adb_t *adb, dns_adbfetch_t **fetch) {
|
||||
dns_adbfetch_t *f;
|
||||
|
||||
|
|
@ -1968,7 +1968,7 @@ free_adbfetch(dns_adb_t *adb, dns_adbfetch_t **fetch) {
|
|||
isc_mem_put(adb->mctx, f, sizeof(*f));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) {
|
||||
dns_adbfind_t *find;
|
||||
|
||||
|
|
@ -1996,7 +1996,7 @@ free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) {
|
|||
* must be locked, and the reference count must be bumped up by one
|
||||
* if this function returns a valid pointer.
|
||||
*/
|
||||
static inline dns_adbaddrinfo_t *
|
||||
static dns_adbaddrinfo_t *
|
||||
new_adbaddrinfo(dns_adb_t *adb, dns_adbentry_t *entry, in_port_t port) {
|
||||
dns_adbaddrinfo_t *ai;
|
||||
|
||||
|
|
@ -2014,7 +2014,7 @@ new_adbaddrinfo(dns_adb_t *adb, dns_adbentry_t *entry, in_port_t port) {
|
|||
return (ai);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_adbaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **ainfo) {
|
||||
dns_adbaddrinfo_t *ai;
|
||||
|
||||
|
|
@ -2037,7 +2037,7 @@ free_adbaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **ainfo) {
|
|||
* On the first call to this function, *bucketp must be set to
|
||||
* DNS_ADB_INVALIDBUCKET.
|
||||
*/
|
||||
static inline dns_adbname_t *
|
||||
static dns_adbname_t *
|
||||
find_name_and_lock(dns_adb_t *adb, const dns_name_t *name, unsigned int options,
|
||||
int *bucketp) {
|
||||
dns_adbname_t *adbname;
|
||||
|
|
@ -2080,7 +2080,7 @@ find_name_and_lock(dns_adb_t *adb, const dns_name_t *name, unsigned int options,
|
|||
* if this function is called multiple times locking is only done if
|
||||
* the bucket changes.
|
||||
*/
|
||||
static inline dns_adbentry_t *
|
||||
static dns_adbentry_t *
|
||||
find_entry_and_lock(dns_adb_t *adb, const isc_sockaddr_t *addr, int *bucketp,
|
||||
isc_stdtime_t now) {
|
||||
dns_adbentry_t *entry, *entry_next;
|
||||
|
|
@ -3624,7 +3624,7 @@ print_namehook_list(FILE *f, const char *legend, dns_adb_t *adb,
|
|||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
print_fetch(FILE *f, dns_adbfetch_t *ft, const char *type) {
|
||||
fprintf(f, "\t\tFetch(%s): %p -> { fetch %p }\n", type, ft, ft->fetch);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ struct dns_byaddr {
|
|||
|
||||
#define MAX_RESTARTS 16
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
copy_ptr_targets(dns_byaddr_t *byaddr, dns_rdataset_t *rdataset) {
|
||||
isc_result_t result;
|
||||
dns_name_t *name;
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ overmem_cleaning_action(isc_task_t *task, isc_event_t *event);
|
|||
static void
|
||||
water(void *arg, int mark);
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
cache_create_db(dns_cache_t *cache, dns_db_t **db) {
|
||||
isc_result_t result;
|
||||
result = dns_db_create(cache->mctx, cache->db_type, dns_rootname,
|
||||
|
|
|
|||
|
|
@ -1337,7 +1337,7 @@ catz_process_zones_suboption(dns_catz_zone_t *zone, dns_rdataset_t *value,
|
|||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
catz_entry_add_or_mod(dns_catz_zone_t *target, isc_ht_t *ht, unsigned char *key,
|
||||
size_t keysize, dns_catz_entry_t *nentry,
|
||||
dns_catz_entry_t *oentry, const char *msg,
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ fetch_done(isc_task_t *task, isc_event_t *event) {
|
|||
client_resfind(rctx, fevent);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
start_fetch(resctx_t *rctx) {
|
||||
isc_result_t result;
|
||||
int fopts = 0;
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ found:
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
static unsigned int
|
||||
name_length(const dns_name_t *name) {
|
||||
isc_region_t r;
|
||||
dns_name_toregion(name, &r);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ initialize(void) {
|
|||
ISC_LIST_APPEND(implementations, &rbtimp, link);
|
||||
}
|
||||
|
||||
static inline dns_dbimplementation_t *
|
||||
static dns_dbimplementation_t *
|
||||
impfind(const char *name) {
|
||||
dns_dbimplementation_t *imp;
|
||||
|
||||
|
|
|
|||
|
|
@ -372,8 +372,7 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
|
|||
&ardataset);
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -240,14 +240,14 @@ mgr_log(dns_dispatchmgr_t *mgr, int level, const char *fmt, ...) {
|
|||
msgbuf);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
inc_stats(dns_dispatchmgr_t *mgr, isc_statscounter_t counter) {
|
||||
if (mgr->stats != NULL) {
|
||||
isc_stats_increment(mgr->stats, counter);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
dec_stats(dns_dispatchmgr_t *mgr, isc_statscounter_t counter) {
|
||||
if (mgr->stats != NULL) {
|
||||
isc_stats_decrement(mgr->stats, counter);
|
||||
|
|
@ -801,7 +801,7 @@ tcp_recv(isc_nmhandle_t *handle, isc_result_t result, isc_region_t *region,
|
|||
}
|
||||
|
||||
/* Got an invalid DNS response, terminate the connection */
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
isc_sockaddr_format(&peer, buf, sizeof(buf));
|
||||
dispatch_log(disp, ISC_LOG_ERROR,
|
||||
|
|
@ -1543,8 +1543,7 @@ dispatch_getnext(dns_dispatch_t *disp, dns_dispentry_t *resp, int32_t timeout) {
|
|||
break;
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1710,8 +1709,7 @@ startrecv(isc_nmhandle_t *handle, dns_dispatch_t *disp, dns_dispentry_t *resp) {
|
|||
break;
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1838,8 +1836,7 @@ dns_dispatch_connect(dns_dispentry_t *resp) {
|
|||
break;
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ dlz_initialize(void) {
|
|||
/*%
|
||||
* Searches the dlz_implementations list for a driver matching name.
|
||||
*/
|
||||
static inline dns_dlzimplementation_t *
|
||||
static dns_dlzimplementation_t *
|
||||
dlz_impfind(const char *name) {
|
||||
dns_dlzimplementation_t *imp;
|
||||
|
||||
|
|
|
|||
|
|
@ -311,8 +311,7 @@ dns_dnsrps_2policy(librpz_policy_t rps_policy) {
|
|||
case LIBRPZ_POLICY_GIVEN:
|
||||
case LIBRPZ_POLICY_DISABLED:
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ digest_callback(void *arg, isc_region_t *data) {
|
|||
return (dst_context_adddata(ctx, data));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
inc_stat(isc_statscounter_t counter) {
|
||||
if (dns_dnssec_stats != NULL) {
|
||||
isc_stats_increment(dns_dnssec_stats, counter);
|
||||
|
|
@ -441,7 +441,7 @@ dns_dnssec_verify(const dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
|||
inc_stat(dns_dnssecstats_fail);
|
||||
return (DNS_R_SIGINVALID);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
if (!dns_name_issubdomain(name, &sig.signer)) {
|
||||
inc_stat(dns_dnssecstats_fail);
|
||||
|
|
|
|||
|
|
@ -635,8 +635,7 @@ dnstap_type(dns_dtmsgtype_t msgtype) {
|
|||
case DNS_DTTYPE_UR:
|
||||
return (DNSTAP__MESSAGE__TYPE__UPDATE_RESPONSE);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -816,7 +815,7 @@ dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype, isc_sockaddr_t *qaddr,
|
|||
break;
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case DNS_DTTYPE_AQ:
|
||||
case DNS_DTTYPE_CQ:
|
||||
case DNS_DTTYPE_FQ:
|
||||
|
|
@ -985,8 +984,7 @@ dns_dt_open(const char *filename, dns_dtmode_t mode, isc_mem_t *mctx,
|
|||
result = ISC_R_NOTIMPLEMENTED;
|
||||
goto cleanup;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_mem_attach(mctx, &handle->mctx);
|
||||
|
|
|
|||
|
|
@ -63,8 +63,7 @@ dns_ds_fromkeyrdata(const dns_name_t *owner, dns_rdata_t *key,
|
|||
break;
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
name = dns_fixedname_initname(&fname);
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ dns_ecs_equals(const dns_ecs_t *ecs1, const dns_ecs_t *ecs2) {
|
|||
addr2 = (const unsigned char *)&ecs2->addr.type.in6;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ static gss_OID_desc __gss_spnego_mechanism_oid_desc = {
|
|||
goto out; \
|
||||
} while (0)
|
||||
|
||||
static inline void
|
||||
static void
|
||||
name_to_gbuffer(const dns_name_t *name, isc_buffer_t *buffer,
|
||||
gss_buffer_desc *gbuffer) {
|
||||
dns_name_t tname;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ struct dst_hmac_key {
|
|||
uint8_t key[ISC_MAX_BLOCK_SIZE];
|
||||
};
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
getkeybits(dst_key_t *key, struct dst_private_element *element) {
|
||||
uint16_t *bits = (uint16_t *)element->data;
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ getkeybits(dst_key_t *key, struct dst_private_element *element) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_createctx(const isc_md_type_t *type, const dst_key_t *key,
|
||||
dst_context_t *dctx) {
|
||||
isc_result_t result;
|
||||
|
|
@ -172,7 +172,7 @@ hmac_createctx(const isc_md_type_t *type, const dst_key_t *key,
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hmac_destroyctx(dst_context_t *dctx) {
|
||||
isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx;
|
||||
REQUIRE(ctx != NULL);
|
||||
|
|
@ -181,7 +181,7 @@ hmac_destroyctx(dst_context_t *dctx) {
|
|||
dctx->ctxdata.hmac_ctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_adddata(const dst_context_t *dctx, const isc_region_t *data) {
|
||||
isc_result_t result;
|
||||
isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx;
|
||||
|
|
@ -196,7 +196,7 @@ hmac_adddata(const dst_context_t *dctx, const isc_region_t *data) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_sign(const dst_context_t *dctx, isc_buffer_t *sig) {
|
||||
isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx;
|
||||
REQUIRE(ctx != NULL);
|
||||
|
|
@ -220,7 +220,7 @@ hmac_sign(const dst_context_t *dctx, isc_buffer_t *sig) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_verify(const dst_context_t *dctx, const isc_region_t *sig) {
|
||||
isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx;
|
||||
unsigned char digest[ISC_MAX_MD_SIZE];
|
||||
|
|
@ -245,7 +245,7 @@ hmac_verify(const dst_context_t *dctx, const isc_region_t *sig) {
|
|||
: DST_R_VERIFYFAILURE);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
hmac_compare(const isc_md_type_t *type, const dst_key_t *key1,
|
||||
const dst_key_t *key2) {
|
||||
dst_hmac_key_t *hkey1, *hkey2;
|
||||
|
|
@ -263,7 +263,7 @@ hmac_compare(const isc_md_type_t *type, const dst_key_t *key1,
|
|||
isc_md_type_get_block_size(type)));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_generate(const isc_md_type_t *type, dst_key_t *key) {
|
||||
isc_buffer_t b;
|
||||
isc_result_t ret;
|
||||
|
|
@ -291,13 +291,13 @@ hmac_generate(const isc_md_type_t *type, dst_key_t *key) {
|
|||
return (ret);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
hmac_isprivate(const dst_key_t *key) {
|
||||
UNUSED(key);
|
||||
return (true);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hmac_destroy(dst_key_t *key) {
|
||||
dst_hmac_key_t *hkey = key->keydata.hmac_key;
|
||||
isc_safe_memwipe(hkey, sizeof(*hkey));
|
||||
|
|
@ -305,7 +305,7 @@ hmac_destroy(dst_key_t *key) {
|
|||
key->keydata.hmac_key = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_todns(const dst_key_t *key, isc_buffer_t *data) {
|
||||
REQUIRE(key != NULL && key->keydata.hmac_key != NULL);
|
||||
dst_hmac_key_t *hkey = key->keydata.hmac_key;
|
||||
|
|
@ -320,7 +320,7 @@ hmac_todns(const dst_key_t *key, isc_buffer_t *data) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_fromdns(const isc_md_type_t *type, dst_key_t *key, isc_buffer_t *data) {
|
||||
dst_hmac_key_t *hkey;
|
||||
unsigned int keylen;
|
||||
|
|
@ -355,7 +355,7 @@ hmac_fromdns(const isc_md_type_t *type, dst_key_t *key, isc_buffer_t *data) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
hmac__get_tag_key(const isc_md_type_t *type) {
|
||||
if (type == ISC_MD_MD5) {
|
||||
return (TAG_HMACMD5_KEY);
|
||||
|
|
@ -370,12 +370,11 @@ hmac__get_tag_key(const isc_md_type_t *type) {
|
|||
} else if (type == ISC_MD_SHA512) {
|
||||
return (TAG_HMACSHA512_KEY);
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
hmac__get_tag_bits(const isc_md_type_t *type) {
|
||||
if (type == ISC_MD_MD5) {
|
||||
return (TAG_HMACMD5_BITS);
|
||||
|
|
@ -390,12 +389,11 @@ hmac__get_tag_bits(const isc_md_type_t *type) {
|
|||
} else if (type == ISC_MD_SHA512) {
|
||||
return (TAG_HMACSHA512_BITS);
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_tofile(const isc_md_type_t *type, const dst_key_t *key,
|
||||
const char *directory) {
|
||||
dst_hmac_key_t *hkey;
|
||||
|
|
@ -428,7 +426,7 @@ hmac_tofile(const isc_md_type_t *type, const dst_key_t *key,
|
|||
return (dst__privstruct_writefile(key, &priv, directory));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
hmac__to_dst_alg(const isc_md_type_t *type) {
|
||||
if (type == ISC_MD_MD5) {
|
||||
return (DST_ALG_HMACMD5);
|
||||
|
|
@ -443,12 +441,11 @@ hmac__to_dst_alg(const isc_md_type_t *type) {
|
|||
} else if (type == ISC_MD_SHA512) {
|
||||
return (DST_ALG_HMACSHA512);
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
hmac_parse(const isc_md_type_t *type, dst_key_t *key, isc_lex_t *lexer,
|
||||
dst_key_t *pub) {
|
||||
dst_private_t priv;
|
||||
|
|
|
|||
|
|
@ -110,13 +110,13 @@
|
|||
static isc_result_t
|
||||
index_to_disk(dns_journal_t *);
|
||||
|
||||
static inline uint32_t
|
||||
static uint32_t
|
||||
decode_uint32(unsigned char *p) {
|
||||
return (((uint32_t)p[0] << 24) + ((uint32_t)p[1] << 16) +
|
||||
((uint32_t)p[2] << 8) + ((uint32_t)p[3] << 0));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
encode_uint32(uint32_t val, unsigned char *p) {
|
||||
p[0] = (uint8_t)(val >> 24);
|
||||
p[1] = (uint8_t)(val >> 16);
|
||||
|
|
@ -825,8 +825,7 @@ ixfr_order(const void *av, const void *bv) {
|
|||
aop = 0;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
switch (b->op) {
|
||||
|
|
@ -839,8 +838,7 @@ ixfr_order(const void *av, const void *bv) {
|
|||
bop = 0;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
r = bop - aop;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ dns_kasp_attach(dns_kasp_t *source, dns_kasp_t **targetp) {
|
|||
*targetp = source;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
destroy(dns_kasp_t *kasp) {
|
||||
dns_kasp_key_t *key;
|
||||
dns_kasp_key_t *key_next;
|
||||
|
|
|
|||
|
|
@ -1366,8 +1366,7 @@ keymgr_transition_time(dns_dnsseckey_t *key, int type,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ fetch_done(isc_task_t *task, isc_event_t *event) {
|
|||
lookup_find(lookup, fevent);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
start_fetch(dns_lookup_t *lookup) {
|
||||
isc_result_t result;
|
||||
|
||||
|
|
|
|||
|
|
@ -335,14 +335,14 @@ static unsigned char ip6_arpa_offsets[] = { 0, 4, 9 };
|
|||
static dns_name_t const ip6_arpa = DNS_NAME_INITABSOLUTE(ip6_arpa_data,
|
||||
ip6_arpa_offsets);
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
dns_master_isprimary(dns_loadctx_t *lctx) {
|
||||
return ((lctx->options & DNS_MASTER_ZONE) != 0 &&
|
||||
(lctx->options & DNS_MASTER_SECONDARY) == 0 &&
|
||||
(lctx->options & DNS_MASTER_KEY) == 0);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token, bool eol,
|
||||
dns_rdatacallbacks_t *callbacks) {
|
||||
isc_result_t result;
|
||||
|
|
@ -540,8 +540,7 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx, unsigned int options,
|
|||
lctx->load = load_raw;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
if (lex != NULL) {
|
||||
|
|
@ -2205,7 +2204,7 @@ cleanup:
|
|||
* Fill/check exists buffer with 'len' bytes. Track remaining bytes to be
|
||||
* read when incrementally filling the buffer.
|
||||
*/
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
read_and_check(bool do_read, isc_buffer_t *buffer, size_t len, FILE *f,
|
||||
uint32_t *totallen) {
|
||||
isc_result_t result;
|
||||
|
|
|
|||
|
|
@ -703,7 +703,7 @@ rdataset_totext(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
|
|||
isc_buffer_putstr(target, KEYDATA);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
if ((ctx->style.flags & DNS_STYLEFLAG_UNKNOWNFORMAT) !=
|
||||
0) {
|
||||
|
|
@ -1580,8 +1580,7 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
dctx->dumpsets = dump_rdatasets_raw;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
result = totext_ctx_init(style, NULL, &dctx->tctx);
|
||||
|
|
@ -1701,8 +1700,7 @@ writeheader(dns_dumpctx_t *dctx) {
|
|||
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_mem_put(dctx->mctx, buffer.base, buffer.length);
|
||||
|
|
|
|||
|
|
@ -170,19 +170,19 @@ struct dns_msgblock {
|
|||
ISC_LINK(dns_msgblock_t) link;
|
||||
}; /* dynamically sized */
|
||||
|
||||
static inline dns_msgblock_t *
|
||||
static dns_msgblock_t *
|
||||
msgblock_allocate(isc_mem_t *, unsigned int, unsigned int);
|
||||
|
||||
#define msgblock_get(block, type) \
|
||||
((type *)msgblock_internalget(block, sizeof(type)))
|
||||
|
||||
static inline void *
|
||||
static void *
|
||||
msgblock_internalget(dns_msgblock_t *, unsigned int);
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msgblock_reset(dns_msgblock_t *);
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msgblock_free(isc_mem_t *, dns_msgblock_t *, unsigned int);
|
||||
|
||||
static void
|
||||
|
|
@ -195,7 +195,7 @@ logfmtpacket(dns_message_t *message, const char *description,
|
|||
* Allocate a new dns_msgblock_t, and return a pointer to it. If no memory
|
||||
* is free, return NULL.
|
||||
*/
|
||||
static inline dns_msgblock_t *
|
||||
static dns_msgblock_t *
|
||||
msgblock_allocate(isc_mem_t *mctx, unsigned int sizeof_type,
|
||||
unsigned int count) {
|
||||
dns_msgblock_t *block;
|
||||
|
|
@ -217,7 +217,7 @@ msgblock_allocate(isc_mem_t *mctx, unsigned int sizeof_type,
|
|||
* Return an element from the msgblock. If no more are available, return
|
||||
* NULL.
|
||||
*/
|
||||
static inline void *
|
||||
static void *
|
||||
msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) {
|
||||
void *ptr;
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) {
|
|||
return (ptr);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msgblock_reset(dns_msgblock_t *block) {
|
||||
block->remaining = block->count;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ msgblock_reset(dns_msgblock_t *block) {
|
|||
/*
|
||||
* Release memory associated with a message block.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
msgblock_free(isc_mem_t *mctx, dns_msgblock_t *block,
|
||||
unsigned int sizeof_type) {
|
||||
unsigned int length;
|
||||
|
|
@ -256,7 +256,7 @@ msgblock_free(isc_mem_t *mctx, dns_msgblock_t *block,
|
|||
* "current" buffer. (which is always the last on the list, for our
|
||||
* uses)
|
||||
*/
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
newbuffer(dns_message_t *msg, unsigned int size) {
|
||||
isc_buffer_t *dynbuf;
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ newbuffer(dns_message_t *msg, unsigned int size) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_buffer_t *
|
||||
static isc_buffer_t *
|
||||
currentbuffer(dns_message_t *msg) {
|
||||
isc_buffer_t *dynbuf;
|
||||
|
||||
|
|
@ -277,12 +277,12 @@ currentbuffer(dns_message_t *msg) {
|
|||
return (dynbuf);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
releaserdata(dns_message_t *msg, dns_rdata_t *rdata) {
|
||||
ISC_LIST_PREPEND(msg->freerdata, rdata, link);
|
||||
}
|
||||
|
||||
static inline dns_rdata_t *
|
||||
static dns_rdata_t *
|
||||
newrdata(dns_message_t *msg) {
|
||||
dns_msgblock_t *msgblock;
|
||||
dns_rdata_t *rdata;
|
||||
|
|
@ -307,12 +307,12 @@ newrdata(dns_message_t *msg) {
|
|||
return (rdata);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
releaserdatalist(dns_message_t *msg, dns_rdatalist_t *rdatalist) {
|
||||
ISC_LIST_PREPEND(msg->freerdatalist, rdatalist, link);
|
||||
}
|
||||
|
||||
static inline dns_rdatalist_t *
|
||||
static dns_rdatalist_t *
|
||||
newrdatalist(dns_message_t *msg) {
|
||||
dns_msgblock_t *msgblock;
|
||||
dns_rdatalist_t *rdatalist;
|
||||
|
|
@ -337,7 +337,7 @@ out:
|
|||
return (rdatalist);
|
||||
}
|
||||
|
||||
static inline dns_offsets_t *
|
||||
static dns_offsets_t *
|
||||
newoffsets(dns_message_t *msg) {
|
||||
dns_msgblock_t *msgblock;
|
||||
dns_offsets_t *offsets;
|
||||
|
|
@ -355,7 +355,7 @@ newoffsets(dns_message_t *msg) {
|
|||
return (offsets);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msginitheader(dns_message_t *m) {
|
||||
m->id = 0;
|
||||
m->flags = 0;
|
||||
|
|
@ -364,7 +364,7 @@ msginitheader(dns_message_t *m) {
|
|||
m->rdclass = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msginitprivate(dns_message_t *m) {
|
||||
unsigned int i;
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ msginitprivate(dns_message_t *m) {
|
|||
m->buffer = NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msginittsig(dns_message_t *m) {
|
||||
m->tsigstatus = dns_rcode_noerror;
|
||||
m->querytsigstatus = dns_rcode_noerror;
|
||||
|
|
@ -402,7 +402,7 @@ msginittsig(dns_message_t *m) {
|
|||
* Init elements to default state. Used both when allocating a new element
|
||||
* and when resetting one.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
msginit(dns_message_t *m) {
|
||||
msginitheader(m);
|
||||
msginitprivate(m);
|
||||
|
|
@ -431,7 +431,7 @@ msginit(dns_message_t *m) {
|
|||
m->indent.count = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
msgresetnames(dns_message_t *msg, unsigned int first_section) {
|
||||
unsigned int i;
|
||||
dns_name_t *name, *next_name;
|
||||
|
|
@ -883,8 +883,7 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
|
|||
}
|
||||
}
|
||||
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1849,7 +1848,7 @@ dns_message_renderreserve(dns_message_t *msg, unsigned int space) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) {
|
||||
int pass_needed;
|
||||
|
||||
|
|
|
|||
|
|
@ -853,12 +853,6 @@ dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname) {
|
|||
REQUIRE(labels > 0);
|
||||
REQUIRE(dns_name_iswildcard(wname));
|
||||
|
||||
#if defined(__clang__) && \
|
||||
(__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 2))
|
||||
memset(&tname, 0, sizeof(tname));
|
||||
#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \
|
||||
* 3 \
|
||||
* && __clang_minor__ < 2)) */
|
||||
DNS_NAME_INIT(&tname, NULL);
|
||||
dns_name_getlabelsequence(wname, 1, labels - 1, &tname);
|
||||
if (dns_name_fullcompare(name, &tname, &order, &nlabels) ==
|
||||
|
|
@ -1145,7 +1139,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
break;
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case ft_start:
|
||||
label = ndata;
|
||||
ndata++;
|
||||
|
|
@ -1160,7 +1154,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
if (nrem == 0) {
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case ft_ordinary:
|
||||
if (c == '.') {
|
||||
if (count == 0) {
|
||||
|
|
@ -1204,7 +1198,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
}
|
||||
state = ft_escape;
|
||||
POST(state);
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case ft_escape:
|
||||
if (!isdigit((unsigned char)c)) {
|
||||
if (count >= 63) {
|
||||
|
|
@ -1224,7 +1218,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
digits = 0;
|
||||
value = 0;
|
||||
state = ft_escdecimal;
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case ft_escdecimal:
|
||||
if (!isdigit((unsigned char)c)) {
|
||||
return (DNS_R_BADESCAPE);
|
||||
|
|
@ -1427,7 +1421,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
|
|||
0) {
|
||||
goto no_escape;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case 0x22: /* '"' */
|
||||
case 0x28: /* '(' */
|
||||
case 0x29: /* ')' */
|
||||
|
|
@ -1475,7 +1469,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
|
|||
} else {
|
||||
FATAL_ERROR(__FILE__, __LINE__,
|
||||
"Unexpected label type %02x", count);
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1599,7 +1593,7 @@ dns_name_tofilenametext(const dns_name_t *name, bool omit_final_dot,
|
|||
} else {
|
||||
FATAL_ERROR(__FILE__, __LINE__,
|
||||
"Unexpected label type %02x", count);
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1977,12 +1971,6 @@ dns_name_towire2(const dns_name_t *name, dns_compress_t *cctx,
|
|||
* has one.
|
||||
*/
|
||||
if (name->offsets == NULL) {
|
||||
#if defined(__clang__) && \
|
||||
(__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 2))
|
||||
memset(&clname, 0, sizeof(clname));
|
||||
#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \
|
||||
* 3 \
|
||||
* && __clang_minor__ < 2)) */
|
||||
DNS_NAME_INIT(&clname, clo);
|
||||
dns_name_clone(name, &clname);
|
||||
name = &clname;
|
||||
|
|
@ -2300,12 +2288,6 @@ dns_name_digest(const dns_name_t *name, dns_digestfunc_t digest, void *arg) {
|
|||
REQUIRE(VALID_NAME(name));
|
||||
REQUIRE(digest != NULL);
|
||||
|
||||
#if defined(__clang__) && \
|
||||
(__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 2))
|
||||
memset(&downname, 0, sizeof(downname));
|
||||
#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \
|
||||
* 3 \
|
||||
* && __clang_minor__ < 2)) */
|
||||
DNS_NAME_INIT(&downname, NULL);
|
||||
|
||||
isc_buffer_init(&buffer, data, sizeof(data));
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
|
|||
dns_ttl_t maxttl, bool optout, bool secure,
|
||||
dns_rdataset_t *addedrdataset);
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) {
|
||||
isc_result_t result;
|
||||
unsigned int count;
|
||||
|
|
|
|||
|
|
@ -1153,8 +1153,7 @@ dst__key_to_eckey(dst_key_t *key, EC_KEY **eckey) {
|
|||
group_nid = NID_secp384r1;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
*eckey = EC_KEY_new_by_curve_name(group_nid);
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
evp_md_ctx = EVP_MD_CTX_create();
|
||||
|
|
@ -104,8 +103,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
type = EVP_sha512();
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) {
|
||||
|
|
@ -426,8 +424,7 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
if (exp == 0) {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ dns_order_add(dns_order_t *order, const dns_name_t *name,
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
match(const dns_name_t *name1, const dns_name_t *name2) {
|
||||
if (dns_name_iswildcard(name2)) {
|
||||
return (dns_name_matcheswildcard(name1, name2));
|
||||
|
|
|
|||
|
|
@ -251,8 +251,7 @@ dns_peer_new(isc_mem_t *mem, const isc_netaddr_t *addr, dns_peer_t **peerptr) {
|
|||
prefixlen = 128;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
return (dns_peer_newprefix(mem, addr, prefixlen, peerptr));
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
#define HASHSIZE(bits) (UINT64_C(1) << (bits))
|
||||
|
||||
static inline uint32_t
|
||||
static uint32_t
|
||||
hash_32(uint32_t val, unsigned int bits) {
|
||||
REQUIRE(bits <= RBT_HASH_MAX_BITS);
|
||||
/* High bits are more random. */
|
||||
|
|
@ -172,7 +172,7 @@ struct dns_rbt {
|
|||
* path of the tree traversal code.
|
||||
*/
|
||||
|
||||
static inline void
|
||||
static void
|
||||
NODENAME(dns_rbtnode_t *node, dns_name_t *name) {
|
||||
name->length = NAMELEN(node);
|
||||
name->labels = OFFSETLEN(node);
|
||||
|
|
@ -183,7 +183,6 @@ NODENAME(dns_rbtnode_t *node, dns_name_t *name) {
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#define inline
|
||||
/*
|
||||
* A little something to help out in GDB.
|
||||
*/
|
||||
|
|
@ -206,7 +205,7 @@ Name(dns_rbtnode_t *node) {
|
|||
* Upper node is the parent of the root of the passed node's
|
||||
* subtree. The passed node must not be NULL.
|
||||
*/
|
||||
static inline dns_rbtnode_t *
|
||||
static dns_rbtnode_t *
|
||||
get_upper_node(dns_rbtnode_t *node) {
|
||||
return (UPPERNODE(node));
|
||||
}
|
||||
|
|
@ -232,15 +231,15 @@ dns__rbtnode_getdistance(dns_rbtnode_t *node) {
|
|||
static isc_result_t
|
||||
create_node(isc_mem_t *mctx, const dns_name_t *name, dns_rbtnode_t **nodep);
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hashtable_new(dns_rbt_t *rbt, uint8_t index, uint8_t bits);
|
||||
static inline void
|
||||
static void
|
||||
hashtable_free(dns_rbt_t *rbt, uint8_t index);
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hash_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name);
|
||||
|
||||
static inline void
|
||||
static void
|
||||
unhash_node(dns_rbt_t *rbt, dns_rbtnode_t *node);
|
||||
|
||||
static uint32_t
|
||||
|
|
@ -251,15 +250,15 @@ static void
|
|||
hashtable_rehash_one(dns_rbt_t *rbt);
|
||||
static void
|
||||
maybe_rehash(dns_rbt_t *rbt, size_t size);
|
||||
static inline bool
|
||||
static bool
|
||||
rehashing_in_progress(dns_rbt_t *rbt);
|
||||
|
||||
#define TRY_NEXTTABLE(hindex, rbt) \
|
||||
(hindex == rbt->hindex && rehashing_in_progress(rbt))
|
||||
|
||||
static inline void
|
||||
static void
|
||||
rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp);
|
||||
static inline void
|
||||
static void
|
||||
rotate_right(dns_rbtnode_t *node, dns_rbtnode_t **rootp);
|
||||
|
||||
static void
|
||||
|
|
@ -388,7 +387,7 @@ dns_rbt_hashsize(dns_rbt_t *rbt) {
|
|||
return (1 << hashbits);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
chain_name(dns_rbtnodechain_t *chain, dns_name_t *name,
|
||||
bool include_chain_end) {
|
||||
dns_name_t nodename;
|
||||
|
|
@ -415,7 +414,7 @@ chain_name(dns_rbtnodechain_t *chain, dns_name_t *name,
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
move_chain_to_last(dns_rbtnodechain_t *chain, dns_rbtnode_t *node) {
|
||||
do {
|
||||
/*
|
||||
|
|
@ -1609,7 +1608,7 @@ create_node(isc_mem_t *mctx, const dns_name_t *name, dns_rbtnode_t **nodep) {
|
|||
/*
|
||||
* Add a node to the hash table
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
hash_add_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) {
|
||||
uint32_t hash;
|
||||
|
||||
|
|
@ -1626,7 +1625,7 @@ hash_add_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) {
|
|||
/*
|
||||
* Initialize hash table
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
hashtable_new(dns_rbt_t *rbt, uint8_t index, uint8_t bits) {
|
||||
size_t size;
|
||||
|
||||
|
|
@ -1642,7 +1641,7 @@ hashtable_new(dns_rbt_t *rbt, uint8_t index, uint8_t bits) {
|
|||
memset(rbt->hashtable[index], 0, size);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
hashtable_free(dns_rbt_t *rbt, uint8_t index) {
|
||||
size_t size = HASHSIZE(rbt->hashbits[index]) * sizeof(dns_rbtnode_t *);
|
||||
isc_mem_put(rbt->mctx, rbt->hashtable[index], size);
|
||||
|
|
@ -1734,12 +1733,12 @@ maybe_rehash(dns_rbt_t *rbt, size_t newcount) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
rehashing_in_progress(dns_rbt_t *rbt) {
|
||||
return (rbt->hashtable[RBT_HASH_NEXTTABLE(rbt->hindex)] != NULL);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
hashtable_is_overcommited(dns_rbt_t *rbt) {
|
||||
return (rbt->nodecount >=
|
||||
(HASHSIZE(rbt->hashbits[rbt->hindex]) * RBT_HASH_OVERCOMMIT));
|
||||
|
|
@ -1749,7 +1748,7 @@ hashtable_is_overcommited(dns_rbt_t *rbt) {
|
|||
* Add a node to the hash table. Rehash the hashtable if the node count
|
||||
* rises above a critical level.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
hash_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) {
|
||||
REQUIRE(DNS_RBTNODE_VALID(node));
|
||||
|
||||
|
|
@ -1767,7 +1766,7 @@ hash_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) {
|
|||
/*
|
||||
* Remove a node from the hash table
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
unhash_node(dns_rbt_t *rbt, dns_rbtnode_t *dnode) {
|
||||
uint32_t hash;
|
||||
uint8_t hindex = rbt->hindex;
|
||||
|
|
@ -1805,11 +1804,10 @@ nexttable:
|
|||
}
|
||||
|
||||
/* We haven't found any matching node, this should not be possible. */
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp) {
|
||||
dns_rbtnode_t *child;
|
||||
|
||||
|
|
@ -1842,7 +1840,7 @@ rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp) {
|
|||
PARENT(node) = child;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
rotate_right(dns_rbtnode_t *node, dns_rbtnode_t **rootp) {
|
||||
dns_rbtnode_t *child;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
/*! \file */
|
||||
|
||||
/* #define inline */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
|
@ -319,7 +317,7 @@ typedef ISC_LIST(dns_rbtnode_t) rbtnodelist_t;
|
|||
#define GOLDEN_RATIO_32 0x61C88647
|
||||
#define HASHSIZE(bits) (UINT64_C(1) << (bits))
|
||||
|
||||
static inline uint32_t
|
||||
static uint32_t
|
||||
hash_32(uint32_t val, unsigned int bits) {
|
||||
REQUIRE(bits <= RBTDB_GLUE_TABLE_MAX_BITS);
|
||||
/* High bits are more random. */
|
||||
|
|
@ -548,7 +546,7 @@ rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
|||
static isc_result_t
|
||||
rdataset_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig);
|
||||
static inline bool
|
||||
static bool
|
||||
need_headerupdate(rdatasetheader_t *header, isc_stdtime_t now);
|
||||
static void
|
||||
update_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header, isc_stdtime_t now);
|
||||
|
|
@ -791,7 +789,7 @@ update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) {
|
|||
case DNS_R_COVERINGNSEC:
|
||||
isc_stats_increment(rbtdb->cachestats,
|
||||
dns_cachestatscounter_coveringnsec);
|
||||
/* FALLTHROUGH */
|
||||
FALLTHROUGH;
|
||||
case ISC_R_SUCCESS:
|
||||
case DNS_R_CNAME:
|
||||
case DNS_R_DNAME:
|
||||
|
|
@ -1155,7 +1153,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb, bool log, isc_event_t *event) {
|
|||
isc_mem_putanddetach(&rbtdb->common.mctx, rbtdb, sizeof(*rbtdb));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
maybe_free_rbtdb(dns_rbtdb_t *rbtdb) {
|
||||
bool want_free = false;
|
||||
unsigned int i;
|
||||
|
|
@ -1242,7 +1240,7 @@ currentversion(dns_db_t *db, dns_dbversion_t **versionp) {
|
|||
*versionp = (dns_dbversion_t *)version;
|
||||
}
|
||||
|
||||
static inline rbtdb_version_t *
|
||||
static rbtdb_version_t *
|
||||
allocate_version(isc_mem_t *mctx, rbtdb_serial_t serial,
|
||||
unsigned int references, bool writer) {
|
||||
rbtdb_version_t *version;
|
||||
|
|
@ -1359,7 +1357,7 @@ add_changed(dns_rbtdb_t *rbtdb, rbtdb_version_t *version, dns_rbtnode_t *node) {
|
|||
return (changed);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_noqname(isc_mem_t *mctx, struct noqname **noqname) {
|
||||
if (dns_name_dynamic(&(*noqname)->name)) {
|
||||
dns_name_free(&(*noqname)->name, mctx);
|
||||
|
|
@ -1376,7 +1374,7 @@ free_noqname(isc_mem_t *mctx, struct noqname **noqname) {
|
|||
*noqname = NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
init_rdataset(dns_rbtdb_t *rbtdb, rdatasetheader_t *h) {
|
||||
ISC_LINK_INIT(h, link);
|
||||
h->heap_index = 0;
|
||||
|
|
@ -1407,7 +1405,7 @@ update_newheader(rdatasetheader_t *newh, rdatasetheader_t *old) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline rdatasetheader_t *
|
||||
static rdatasetheader_t *
|
||||
new_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx) {
|
||||
rdatasetheader_t *h;
|
||||
|
||||
|
|
@ -1424,7 +1422,7 @@ new_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx) {
|
|||
return (h);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
free_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *rdataset) {
|
||||
unsigned int size;
|
||||
int idx;
|
||||
|
|
@ -1460,7 +1458,7 @@ free_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *rdataset) {
|
|||
isc_mem_put(mctx, rdataset, size);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) {
|
||||
rdatasetheader_t *header, *dcurrent;
|
||||
bool make_dirty = false;
|
||||
|
|
@ -1493,7 +1491,7 @@ rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
mark_header_ancient(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) {
|
||||
uint_least16_t attributes = atomic_load_acquire(&header->attributes);
|
||||
uint_least16_t newattributes = 0;
|
||||
|
|
@ -1522,7 +1520,7 @@ mark_header_ancient(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) {
|
|||
update_rrsetstats(rbtdb, header->type, newattributes, true);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
mark_header_stale(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) {
|
||||
uint_least16_t attributes = atomic_load_acquire(&header->attributes);
|
||||
uint_least16_t newattributes = 0;
|
||||
|
|
@ -1551,7 +1549,7 @@ mark_header_stale(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) {
|
|||
update_rrsetstats(rbtdb, header->type, newattributes, true);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
clean_stale_headers(dns_rbtdb_t *rbtdb, isc_mem_t *mctx,
|
||||
rdatasetheader_t *top) {
|
||||
rdatasetheader_t *d, *down_next;
|
||||
|
|
@ -1563,7 +1561,7 @@ clean_stale_headers(dns_rbtdb_t *rbtdb, isc_mem_t *mctx,
|
|||
top->down = NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
clean_cache_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
|
||||
rdatasetheader_t *current, *top_prev, *top_next;
|
||||
isc_mem_t *mctx = rbtdb->common.mctx;
|
||||
|
|
@ -1596,7 +1594,7 @@ clean_cache_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
|
|||
node->dirty = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
clean_zone_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
rbtdb_serial_t least_serial) {
|
||||
rdatasetheader_t *current, *dcurrent, *down_next, *dparent;
|
||||
|
|
@ -1807,7 +1805,7 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
|
|||
/*
|
||||
* Caller must be holding the node lock.
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
new_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
isc_rwlocktype_t locktype) {
|
||||
if (locktype == isc_rwlocktype_write && ISC_LINK_LINKED(node, deadlink))
|
||||
|
|
@ -1825,13 +1823,13 @@ new_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
|||
/*%
|
||||
* The tree lock must be held for the result to be valid.
|
||||
*/
|
||||
static inline bool
|
||||
static bool
|
||||
is_leaf(dns_rbtnode_t *node) {
|
||||
return (node->parent != NULL && node->parent->down == node &&
|
||||
node->left == NULL && node->right == NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
send_to_prune_tree(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
isc_rwlocktype_t locktype) {
|
||||
isc_event_t *ev;
|
||||
|
|
@ -1906,7 +1904,7 @@ cleanup_dead_nodes(dns_rbtdb_t *rbtdb, int bucketnum) {
|
|||
* few cases where the node can be in the deadnode list (only empty nodes can
|
||||
* have been added to the list).
|
||||
*/
|
||||
static inline void
|
||||
static void
|
||||
reactivate_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
isc_rwlocktype_t treelocktype) {
|
||||
isc_rwlocktype_t locktype = isc_rwlocktype_read;
|
||||
|
|
@ -2178,7 +2176,7 @@ prune_tree(isc_task_t *task, isc_event_t *event) {
|
|||
detach((dns_db_t **)&rbtdb);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
make_least_version(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
|
||||
rbtdb_changedlist_t *cleanup_list) {
|
||||
/*
|
||||
|
|
@ -2190,7 +2188,7 @@ make_least_version(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
|
|||
ISC_LIST_INIT(version->changed_list);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
cleanup_nondirty(rbtdb_version_t *version, rbtdb_changedlist_t *cleanup_list) {
|
||||
rbtdb_changed_t *changed, *next_changed;
|
||||
|
||||
|
|
@ -2972,7 +2970,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
bind_rdataset(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rdatasetheader_t *header,
|
||||
isc_stdtime_t now, isc_rwlocktype_t locktype,
|
||||
dns_rdataset_t *rdataset) {
|
||||
|
|
@ -3093,7 +3091,7 @@ bind_rdataset(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rdatasetheader_t *header,
|
|||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
||||
dns_name_t *foundname, dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset) {
|
||||
|
|
@ -3153,7 +3151,7 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||
return (DNS_R_DELEGATION);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type,
|
||||
dns_rbtnode_t *node) {
|
||||
unsigned char *raw; /* RDATASLAB */
|
||||
|
|
@ -3209,7 +3207,7 @@ valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type,
|
|||
return (valid);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain,
|
||||
const dns_name_t *name) {
|
||||
dns_fixedname_t fnext;
|
||||
|
|
@ -3262,7 +3260,7 @@ activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain,
|
|||
return (answer);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
activeemptynode(rbtdb_search_t *search, const dns_name_t *qname,
|
||||
dns_name_t *wname) {
|
||||
dns_fixedname_t fnext;
|
||||
|
|
@ -3382,7 +3380,7 @@ activeemptynode(rbtdb_search_t *search, const dns_name_t *qname,
|
|||
return (answer);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep,
|
||||
const dns_name_t *qname) {
|
||||
unsigned int i, j;
|
||||
|
|
@ -3582,7 +3580,7 @@ matchparams(rdatasetheader_t *header, rbtdb_search_t *search) {
|
|||
/*
|
||||
* Find node of the NSEC/NSEC3 record that is 'name'.
|
||||
*/
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search,
|
||||
dns_name_t *name, dns_name_t *origin,
|
||||
dns_rbtnode_t **nodep, dns_rbtnodechain_t *nsecchain,
|
||||
|
|
@ -3698,7 +3696,7 @@ previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search,
|
|||
* search chain. For NSEC3 records only NSEC3 records that match the
|
||||
* current NSEC3PARAM record are considered.
|
||||
*/
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
||||
dns_name_t *foundname, dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset, dns_rbt_t *tree,
|
||||
|
|
@ -4440,7 +4438,7 @@ zone_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options,
|
|||
|
||||
FATAL_ERROR(__FILE__, __LINE__, "zone_findzonecut() called!");
|
||||
|
||||
/* NOTREACHED */
|
||||
UNREACHABLE();
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
|
|
@ -4623,7 +4621,7 @@ cache_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
||||
dns_dbnode_t **nodep, dns_name_t *foundname,
|
||||
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
|
||||
|
|
@ -6063,7 +6061,7 @@ resign_delete(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
|
|||
}
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
static uint64_t
|
||||
recordsize(rdatasetheader_t *header, unsigned int namelen) {
|
||||
return (dns_rdataslab_rdatasize((unsigned char *)header,
|
||||
sizeof(*header)) +
|
||||
|
|
@ -6616,7 +6614,7 @@ find_header:
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
delegating_type(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
rbtdb_rdatatype_t type) {
|
||||
if (IS_CACHE(rbtdb)) {
|
||||
|
|
@ -6634,7 +6632,7 @@ delegating_type(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
|||
return (false);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
addnoqname(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader,
|
||||
dns_rdataset_t *rdataset) {
|
||||
struct noqname *noqname;
|
||||
|
|
@ -6679,7 +6677,7 @@ cleanup:
|
|||
return (result);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
addclosest(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader,
|
||||
dns_rdataset_t *rdataset) {
|
||||
struct noqname *closest;
|
||||
|
|
@ -7606,8 +7604,7 @@ nodecount(dns_db_t *db, dns_dbtree_t tree) {
|
|||
count = dns_rbt_nodecount(rbtdb->nsec3);
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
|
||||
|
|
@ -8838,7 +8835,7 @@ rdatasetiter_current(dns_rdatasetiter_t *iterator, dns_rdataset_t *rdataset) {
|
|||
* Database Iterator Methods
|
||||
*/
|
||||
|
||||
static inline void
|
||||
static void
|
||||
reference_iter_node(rbtdb_dbiterator_t *rbtdbiter) {
|
||||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db;
|
||||
dns_rbtnode_t *node = rbtdbiter->node;
|
||||
|
|
@ -8851,7 +8848,7 @@ reference_iter_node(rbtdb_dbiterator_t *rbtdbiter) {
|
|||
reactivate_node(rbtdb, node, rbtdbiter->tree_locked);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
dereference_iter_node(rbtdb_dbiterator_t *rbtdbiter) {
|
||||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db;
|
||||
dns_rbtnode_t *node = rbtdbiter->node;
|
||||
|
|
@ -8920,7 +8917,7 @@ flush_deletions(rbtdb_dbiterator_t *rbtdbiter) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
resume_iteration(rbtdb_dbiterator_t *rbtdbiter) {
|
||||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db;
|
||||
|
||||
|
|
@ -9970,7 +9967,7 @@ no_glue:
|
|||
*
|
||||
* Caller must hold the node (read or write) lock.
|
||||
*/
|
||||
static inline bool
|
||||
static bool
|
||||
need_headerupdate(rdatasetheader_t *header, isc_stdtime_t now) {
|
||||
if (RDATASET_ATTR_GET(header, (RDATASET_ATTR_NONEXISTENT |
|
||||
RDATASET_ATTR_ANCIENT |
|
||||
|
|
|
|||
|
|
@ -259,17 +259,17 @@ static isc_result_t
|
|||
unknown_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
||||
isc_buffer_t *target);
|
||||
|
||||
static inline isc_result_t generic_fromtext_key(ARGS_FROMTEXT);
|
||||
static isc_result_t generic_fromtext_key(ARGS_FROMTEXT);
|
||||
|
||||
static inline isc_result_t generic_totext_key(ARGS_TOTEXT);
|
||||
static isc_result_t generic_totext_key(ARGS_TOTEXT);
|
||||
|
||||
static inline isc_result_t generic_fromwire_key(ARGS_FROMWIRE);
|
||||
static isc_result_t generic_fromwire_key(ARGS_FROMWIRE);
|
||||
|
||||
static inline isc_result_t generic_fromstruct_key(ARGS_FROMSTRUCT);
|
||||
static isc_result_t generic_fromstruct_key(ARGS_FROMSTRUCT);
|
||||
|
||||
static inline isc_result_t generic_tostruct_key(ARGS_TOSTRUCT);
|
||||
static isc_result_t generic_tostruct_key(ARGS_TOSTRUCT);
|
||||
|
||||
static inline void generic_freestruct_key(ARGS_FREESTRUCT);
|
||||
static void generic_freestruct_key(ARGS_FREESTRUCT);
|
||||
|
||||
static isc_result_t generic_fromtext_txt(ARGS_FROMTEXT);
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ static dns_name_t const gc_msdcs = DNS_NAME_INITNONABSOLUTE(gc_msdcs_data,
|
|||
* \note
|
||||
* (1) does not touch `dst' unless it's returning 1.
|
||||
*/
|
||||
static inline int
|
||||
static int
|
||||
locator_pton(const char *src, unsigned char *dst) {
|
||||
static const char xdigits_l[] = "0123456789abcdef",
|
||||
xdigits_u[] = "0123456789ABCDEF";
|
||||
|
|
@ -409,7 +409,7 @@ locator_pton(const char *src, unsigned char *dst) {
|
|||
return (1);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
name_duporclone(const dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
|
||||
if (mctx != NULL) {
|
||||
dns_name_dup(source, mctx, target);
|
||||
|
|
@ -418,7 +418,7 @@ name_duporclone(const dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline void *
|
||||
static void *
|
||||
mem_maybedup(isc_mem_t *mctx, void *source, size_t length) {
|
||||
void *copy;
|
||||
|
||||
|
|
@ -431,7 +431,7 @@ mem_maybedup(isc_mem_t *mctx, void *source, size_t length) {
|
|||
return (copy);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target, bool allow_empty) {
|
||||
isc_token_t token;
|
||||
unsigned char bm[8 * 1024]; /* 64k bits */
|
||||
|
|
@ -499,7 +499,7 @@ typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target, bool allow_empty) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
typemap_totext(isc_region_t *sr, dns_rdata_textctx_t *tctx,
|
||||
isc_buffer_t *target) {
|
||||
unsigned int i, j, k;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#define RRTYPE_TSIG_ATTRIBUTES \
|
||||
(DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_NOTQUESTION)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_any_tsig(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
dns_name_t name;
|
||||
|
|
@ -130,7 +130,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
|
|||
return (isc_base64_tobuffer(lexer, target, (int)token.value.as_ulong));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_any_tsig(ARGS_TOTEXT) {
|
||||
isc_region_t sr;
|
||||
isc_region_t sigr;
|
||||
|
|
@ -251,7 +251,7 @@ totext_any_tsig(ARGS_TOTEXT) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_any_tsig(ARGS_FROMWIRE) {
|
||||
isc_region_t sr;
|
||||
dns_name_t name;
|
||||
|
|
@ -320,7 +320,7 @@ fromwire_any_tsig(ARGS_FROMWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, n + 2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_any_tsig(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
dns_name_t name;
|
||||
|
|
@ -339,7 +339,7 @@ towire_any_tsig(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_any_tsig(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -369,7 +369,7 @@ compare_any_tsig(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_any_tsig(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_any_tsig_t *tsig = source;
|
||||
isc_region_t tr;
|
||||
|
|
@ -441,7 +441,7 @@ fromstruct_any_tsig(ARGS_FROMSTRUCT) {
|
|||
return (mem_tobuffer(target, tsig->other, tsig->otherlen));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_any_tsig(ARGS_TOSTRUCT) {
|
||||
dns_rdata_any_tsig_t *tsig;
|
||||
dns_name_t alg;
|
||||
|
|
@ -541,7 +541,7 @@ cleanup:
|
|||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_any_tsig(ARGS_FREESTRUCT) {
|
||||
dns_rdata_any_tsig_t *tsig = (dns_rdata_any_tsig_t *)source;
|
||||
|
||||
|
|
@ -563,7 +563,7 @@ freestruct_any_tsig(ARGS_FREESTRUCT) {
|
|||
tsig->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_any_tsig(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_tsig);
|
||||
REQUIRE(rdata->rdclass == dns_rdataclass_any);
|
||||
|
|
@ -576,7 +576,7 @@ additionaldata_any_tsig(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_any_tsig(ARGS_DIGEST) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_tsig);
|
||||
REQUIRE(rdata->rdclass == dns_rdataclass_any);
|
||||
|
|
@ -588,7 +588,7 @@ digest_any_tsig(ARGS_DIGEST) {
|
|||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_any_tsig(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_tsig);
|
||||
REQUIRE(rdclass == dns_rdataclass_any);
|
||||
|
|
@ -601,7 +601,7 @@ checkowner_any_tsig(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_any_tsig(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_tsig);
|
||||
REQUIRE(rdata->rdclass == dns_rdataclass_any);
|
||||
|
|
@ -613,7 +613,7 @@ checknames_any_tsig(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_any_tsig(ARGS_COMPARE) {
|
||||
return (compare_any_tsig(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#define RRTYPE_A_ATTRIBUTES (0)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_ch_a(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
dns_name_t name;
|
||||
|
|
@ -64,7 +64,7 @@ fromtext_ch_a(ARGS_FROMTEXT) {
|
|||
return (uint16_tobuffer(token.value.as_ulong, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_ch_a(ARGS_TOTEXT) {
|
||||
isc_region_t region;
|
||||
dns_name_t name;
|
||||
|
|
@ -93,7 +93,7 @@ totext_ch_a(ARGS_TOTEXT) {
|
|||
return (str_totext(buf, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_ch_a(ARGS_FROMWIRE) {
|
||||
isc_region_t sregion;
|
||||
isc_region_t tregion;
|
||||
|
|
@ -127,7 +127,7 @@ fromwire_ch_a(ARGS_FROMWIRE) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_ch_a(ARGS_TOWIRE) {
|
||||
dns_name_t name;
|
||||
dns_offsets_t offsets;
|
||||
|
|
@ -158,7 +158,7 @@ towire_ch_a(ARGS_TOWIRE) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_ch_a(ARGS_COMPARE) {
|
||||
dns_name_t name1;
|
||||
dns_name_t name2;
|
||||
|
|
@ -196,7 +196,7 @@ compare_ch_a(ARGS_COMPARE) {
|
|||
return (order);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_ch_a(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_ch_a_t *a = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -215,7 +215,7 @@ fromstruct_ch_a(ARGS_FROMSTRUCT) {
|
|||
return (uint16_tobuffer(ntohs(a->ch_addr), target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_ch_a(ARGS_TOSTRUCT) {
|
||||
dns_rdata_ch_a_t *a = target;
|
||||
isc_region_t region;
|
||||
|
|
@ -242,7 +242,7 @@ tostruct_ch_a(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_ch_a(ARGS_FREESTRUCT) {
|
||||
dns_rdata_ch_a_t *a = source;
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ freestruct_ch_a(ARGS_FREESTRUCT) {
|
|||
a->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_ch_a(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_a);
|
||||
REQUIRE(rdata->rdclass == dns_rdataclass_ch);
|
||||
|
|
@ -270,7 +270,7 @@ additionaldata_ch_a(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_ch_a(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
dns_name_t name;
|
||||
|
|
@ -286,7 +286,7 @@ digest_ch_a(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_ch_a(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_a);
|
||||
REQUIRE(rdclass == dns_rdataclass_ch);
|
||||
|
|
@ -296,7 +296,7 @@ checkowner_ch_a(ARGS_CHECKOWNER) {
|
|||
return (dns_name_ishostname(name, wildcard));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_ch_a(ARGS_CHECKNAMES) {
|
||||
isc_region_t region;
|
||||
dns_name_t name;
|
||||
|
|
@ -319,7 +319,7 @@ checknames_ch_a(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_ch_a(ARGS_COMPARE) {
|
||||
return (compare_ch_a(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define RRTYPE_AFSDB_ATTRIBUTES (0)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_afsdb(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
isc_buffer_t buffer;
|
||||
|
|
@ -65,7 +65,7 @@ fromtext_afsdb(ARGS_FROMTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_afsdb(ARGS_TOTEXT) {
|
||||
dns_name_t name;
|
||||
dns_name_t prefix;
|
||||
|
|
@ -90,7 +90,7 @@ totext_afsdb(ARGS_TOTEXT) {
|
|||
return (dns_name_totext(&prefix, sub, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_afsdb(ARGS_FROMWIRE) {
|
||||
dns_name_t name;
|
||||
isc_region_t sr;
|
||||
|
|
@ -119,7 +119,7 @@ fromwire_afsdb(ARGS_FROMWIRE) {
|
|||
return (dns_name_fromwire(&name, source, dctx, options, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_afsdb(ARGS_TOWIRE) {
|
||||
isc_region_t tr;
|
||||
isc_region_t sr;
|
||||
|
|
@ -145,7 +145,7 @@ towire_afsdb(ARGS_TOWIRE) {
|
|||
return (dns_name_towire(&name, cctx, target));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_afsdb(ARGS_COMPARE) {
|
||||
int result;
|
||||
dns_name_t name1;
|
||||
|
|
@ -179,7 +179,7 @@ compare_afsdb(ARGS_COMPARE) {
|
|||
return (dns_name_rdatacompare(&name1, &name2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_afsdb(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_afsdb_t *afsdb = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -197,7 +197,7 @@ fromstruct_afsdb(ARGS_FROMSTRUCT) {
|
|||
return (isc_buffer_copyregion(target, ®ion));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_afsdb(ARGS_TOSTRUCT) {
|
||||
isc_region_t region;
|
||||
dns_rdata_afsdb_t *afsdb = target;
|
||||
|
|
@ -226,7 +226,7 @@ tostruct_afsdb(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_afsdb(ARGS_FREESTRUCT) {
|
||||
dns_rdata_afsdb_t *afsdb = source;
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ freestruct_afsdb(ARGS_FREESTRUCT) {
|
|||
afsdb->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_afsdb(ARGS_ADDLDATA) {
|
||||
dns_name_t name;
|
||||
dns_offsets_t offsets;
|
||||
|
|
@ -259,7 +259,7 @@ additionaldata_afsdb(ARGS_ADDLDATA) {
|
|||
return ((add)(arg, &name, dns_rdatatype_a, NULL));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_afsdb(ARGS_DIGEST) {
|
||||
isc_region_t r1, r2;
|
||||
dns_name_t name;
|
||||
|
|
@ -277,7 +277,7 @@ digest_afsdb(ARGS_DIGEST) {
|
|||
return (dns_name_digest(&name, digest, arg));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_afsdb(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_afsdb);
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ checkowner_afsdb(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_afsdb(ARGS_CHECKNAMES) {
|
||||
isc_region_t region;
|
||||
dns_name_t name;
|
||||
|
|
@ -311,7 +311,7 @@ checknames_afsdb(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_afsdb(ARGS_COMPARE) {
|
||||
return (compare_afsdb(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#define RRTYPE_AMTRELAY_ATTRIBUTES (0)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_amtrelay(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
dns_name_t name;
|
||||
|
|
@ -116,12 +116,11 @@ fromtext_amtrelay(ARGS_FROMTEXT) {
|
|||
return (dns_name_fromtext(&name, &buffer, origin, options,
|
||||
target));
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_amtrelay(ARGS_TOTEXT) {
|
||||
isc_region_t region;
|
||||
dns_name_t name;
|
||||
|
|
@ -178,13 +177,12 @@ totext_amtrelay(ARGS_TOTEXT) {
|
|||
return (dns_name_totext(&name, false, target));
|
||||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_amtrelay(ARGS_FROMWIRE) {
|
||||
dns_name_t name;
|
||||
isc_region_t region;
|
||||
|
|
@ -236,7 +234,7 @@ fromwire_amtrelay(ARGS_FROMWIRE) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_amtrelay(ARGS_TOWIRE) {
|
||||
isc_region_t region;
|
||||
|
||||
|
|
@ -249,7 +247,7 @@ towire_amtrelay(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, region.base, region.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_amtrelay(ARGS_COMPARE) {
|
||||
isc_region_t region1;
|
||||
isc_region_t region2;
|
||||
|
|
@ -266,7 +264,7 @@ compare_amtrelay(ARGS_COMPARE) {
|
|||
return (isc_region_compare(®ion1, ®ion2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_amtrelay(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_amtrelay_t *amtrelay = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -306,7 +304,7 @@ fromstruct_amtrelay(ARGS_FROMSTRUCT) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_amtrelay(ARGS_TOSTRUCT) {
|
||||
isc_region_t region;
|
||||
dns_rdata_amtrelay_t *amtrelay = target;
|
||||
|
|
@ -370,7 +368,7 @@ tostruct_amtrelay(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_amtrelay(ARGS_FREESTRUCT) {
|
||||
dns_rdata_amtrelay_t *amtrelay = source;
|
||||
|
||||
|
|
@ -392,7 +390,7 @@ freestruct_amtrelay(ARGS_FREESTRUCT) {
|
|||
amtrelay->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_amtrelay(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||
|
||||
|
|
@ -404,7 +402,7 @@ additionaldata_amtrelay(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_amtrelay(ARGS_DIGEST) {
|
||||
isc_region_t region;
|
||||
|
||||
|
|
@ -414,7 +412,7 @@ digest_amtrelay(ARGS_DIGEST) {
|
|||
return ((digest)(arg, ®ion));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_amtrelay(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_amtrelay);
|
||||
|
||||
|
|
@ -426,7 +424,7 @@ checkowner_amtrelay(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_amtrelay(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_amtrelay);
|
||||
|
||||
|
|
@ -437,7 +435,7 @@ checknames_amtrelay(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_amtrelay(ARGS_COMPARE) {
|
||||
isc_region_t region1;
|
||||
isc_region_t region2;
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
#define RRTYPE_AVC_ATTRIBUTES (0)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_avc(ARGS_FROMTEXT) {
|
||||
REQUIRE(type == dns_rdatatype_avc);
|
||||
|
||||
return (generic_fromtext_txt(CALL_FROMTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_avc(ARGS_TOTEXT) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_avc);
|
||||
|
|
@ -31,14 +31,14 @@ totext_avc(ARGS_TOTEXT) {
|
|||
return (generic_totext_txt(CALL_TOTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_avc(ARGS_FROMWIRE) {
|
||||
REQUIRE(type == dns_rdatatype_avc);
|
||||
|
||||
return (generic_fromwire_txt(CALL_FROMWIRE));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_avc(ARGS_TOWIRE) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_avc);
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ towire_avc(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, rdata->data, rdata->length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_avc(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -61,14 +61,14 @@ compare_avc(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_avc(ARGS_FROMSTRUCT) {
|
||||
REQUIRE(type == dns_rdatatype_avc);
|
||||
|
||||
return (generic_fromstruct_txt(CALL_FROMSTRUCT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_avc(ARGS_TOSTRUCT) {
|
||||
dns_rdata_avc_t *avc = target;
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ tostruct_avc(ARGS_TOSTRUCT) {
|
|||
return (generic_tostruct_txt(CALL_TOSTRUCT));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_avc(ARGS_FREESTRUCT) {
|
||||
dns_rdata_avc_t *avc = source;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ freestruct_avc(ARGS_FREESTRUCT) {
|
|||
generic_freestruct_txt(source);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_avc(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_avc);
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ additionaldata_avc(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_avc(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ digest_avc(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_avc(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_avc);
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ checkowner_avc(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_avc(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_avc);
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ checknames_avc(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_avc(ARGS_COMPARE) {
|
||||
return (compare_avc(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ static unsigned char const alphanumeric[256] = {
|
|||
0,
|
||||
};
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_caa(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
isc_textregion_t tr;
|
||||
|
|
@ -326,7 +326,7 @@ fromtext_caa(ARGS_FROMTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_caa(ARGS_TOTEXT) {
|
||||
isc_region_t region;
|
||||
uint8_t flags;
|
||||
|
|
@ -360,7 +360,7 @@ totext_caa(ARGS_TOTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_caa(ARGS_FROMWIRE) {
|
||||
isc_region_t sr;
|
||||
unsigned int len, i;
|
||||
|
|
@ -411,7 +411,7 @@ fromwire_caa(ARGS_FROMWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_caa(ARGS_TOWIRE) {
|
||||
isc_region_t region;
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ towire_caa(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, region.base, region.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_caa(ARGS_COMPARE) {
|
||||
isc_region_t r1, r2;
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ compare_caa(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_caa(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_caa_t *caa = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -488,7 +488,7 @@ fromstruct_caa(ARGS_FROMSTRUCT) {
|
|||
return (isc_buffer_copyregion(target, ®ion));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_caa(ARGS_TOSTRUCT) {
|
||||
dns_rdata_caa_t *caa = target;
|
||||
isc_region_t sr;
|
||||
|
|
@ -547,7 +547,7 @@ tostruct_caa(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_caa(ARGS_FREESTRUCT) {
|
||||
dns_rdata_caa_t *caa = (dns_rdata_caa_t *)source;
|
||||
|
||||
|
|
@ -567,7 +567,7 @@ freestruct_caa(ARGS_FREESTRUCT) {
|
|||
caa->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_caa(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_caa);
|
||||
REQUIRE(rdata->data != NULL);
|
||||
|
|
@ -581,7 +581,7 @@ additionaldata_caa(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_caa(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ digest_caa(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_caa(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_caa);
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ checkowner_caa(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_caa(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_caa);
|
||||
REQUIRE(rdata->data != NULL);
|
||||
|
|
@ -619,7 +619,7 @@ checknames_caa(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_caa(ARGS_COMPARE) {
|
||||
return (compare_caa(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
#define RRTYPE_CDNSKEY_ATTRIBUTES 0
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_cdnskey(ARGS_FROMTEXT) {
|
||||
REQUIRE(type == dns_rdatatype_cdnskey);
|
||||
|
||||
return (generic_fromtext_key(CALL_FROMTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_cdnskey(ARGS_TOTEXT) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_cdnskey);
|
||||
|
|
@ -35,14 +35,14 @@ totext_cdnskey(ARGS_TOTEXT) {
|
|||
return (generic_totext_key(CALL_TOTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_cdnskey(ARGS_FROMWIRE) {
|
||||
REQUIRE(type == dns_rdatatype_cdnskey);
|
||||
|
||||
return (generic_fromwire_key(CALL_FROMWIRE));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_cdnskey(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ towire_cdnskey(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_cdnskey(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -73,14 +73,14 @@ compare_cdnskey(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_cdnskey(ARGS_FROMSTRUCT) {
|
||||
REQUIRE(type == dns_rdatatype_cdnskey);
|
||||
|
||||
return (generic_fromstruct_key(CALL_FROMSTRUCT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_cdnskey(ARGS_TOSTRUCT) {
|
||||
dns_rdata_cdnskey_t *dnskey = target;
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ tostruct_cdnskey(ARGS_TOSTRUCT) {
|
|||
return (generic_tostruct_key(CALL_TOSTRUCT));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_cdnskey(ARGS_FREESTRUCT) {
|
||||
dns_rdata_cdnskey_t *dnskey = (dns_rdata_cdnskey_t *)source;
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ freestruct_cdnskey(ARGS_FREESTRUCT) {
|
|||
generic_freestruct_key(source);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_cdnskey(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_cdnskey);
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ additionaldata_cdnskey(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_cdnskey(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ digest_cdnskey(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_cdnskey(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_cdnskey);
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ checkowner_cdnskey(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_cdnskey(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_cdnskey);
|
||||
|
|
@ -153,7 +153,7 @@ checknames_cdnskey(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_cdnskey(ARGS_COMPARE) {
|
||||
/*
|
||||
* Treat ALG 253 (private DNS) subtype name case sensitively.
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
#include <dns/ds.h>
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_cds(ARGS_FROMTEXT) {
|
||||
REQUIRE(type == dns_rdatatype_cds);
|
||||
|
||||
return (generic_fromtext_ds(CALL_FROMTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_cds(ARGS_TOTEXT) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_cds);
|
||||
|
|
@ -35,14 +35,14 @@ totext_cds(ARGS_TOTEXT) {
|
|||
return (generic_totext_ds(CALL_TOTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_cds(ARGS_FROMWIRE) {
|
||||
REQUIRE(type == dns_rdatatype_cds);
|
||||
|
||||
return (generic_fromwire_ds(CALL_FROMWIRE));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_cds(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ towire_cds(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_cds(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -71,14 +71,14 @@ compare_cds(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_cds(ARGS_FROMSTRUCT) {
|
||||
REQUIRE(type == dns_rdatatype_cds);
|
||||
|
||||
return (generic_fromstruct_ds(CALL_FROMSTRUCT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_cds(ARGS_TOSTRUCT) {
|
||||
dns_rdata_cds_t *cds = target;
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ tostruct_cds(ARGS_TOSTRUCT) {
|
|||
return (generic_tostruct_ds(CALL_TOSTRUCT));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_cds(ARGS_FREESTRUCT) {
|
||||
dns_rdata_cds_t *cds = source;
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ freestruct_cds(ARGS_FREESTRUCT) {
|
|||
cds->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_cds(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_cds);
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ additionaldata_cds(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_cds(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ digest_cds(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_cds(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_cds);
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ checkowner_cds(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_cds(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_cds);
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ checknames_cds(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_cds(ARGS_COMPARE) {
|
||||
return (compare_cds(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define RRTYPE_CERT_ATTRIBUTES (0)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_cert(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
dns_secalg_t secalg;
|
||||
|
|
@ -61,7 +61,7 @@ fromtext_cert(ARGS_FROMTEXT) {
|
|||
return (isc_base64_tobuffer(lexer, target, -2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_cert(ARGS_TOTEXT) {
|
||||
isc_region_t sr;
|
||||
char buf[sizeof("64000 ")];
|
||||
|
|
@ -115,7 +115,7 @@ totext_cert(ARGS_TOTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_cert(ARGS_FROMWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ fromwire_cert(ARGS_FROMWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_cert(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ towire_cert(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_cert(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -164,7 +164,7 @@ compare_cert(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_cert(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_cert_t *cert = source;
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ fromstruct_cert(ARGS_FROMSTRUCT) {
|
|||
return (mem_tobuffer(target, cert->certificate, cert->length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_cert(ARGS_TOSTRUCT) {
|
||||
dns_rdata_cert_t *cert = target;
|
||||
isc_region_t region;
|
||||
|
|
@ -215,7 +215,7 @@ tostruct_cert(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_cert(ARGS_FREESTRUCT) {
|
||||
dns_rdata_cert_t *cert = source;
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ freestruct_cert(ARGS_FREESTRUCT) {
|
|||
cert->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_cert(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_cert);
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ additionaldata_cert(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_cert(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -255,7 +255,7 @@ digest_cert(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_cert(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_cert);
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ checkowner_cert(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_cert(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_cert);
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ checknames_cert(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_cert(ARGS_COMPARE) {
|
||||
return (compare_cert(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#define RRTYPE_CNAME_ATTRIBUTES \
|
||||
(DNS_RDATATYPEATTR_EXCLUSIVE | DNS_RDATATYPEATTR_SINGLETON)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_cname(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
dns_name_t name;
|
||||
|
|
@ -41,7 +41,7 @@ fromtext_cname(ARGS_FROMTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_cname(ARGS_TOTEXT) {
|
||||
isc_region_t region;
|
||||
dns_name_t name;
|
||||
|
|
@ -62,7 +62,7 @@ totext_cname(ARGS_TOTEXT) {
|
|||
return (dns_name_totext(&prefix, sub, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_cname(ARGS_FROMWIRE) {
|
||||
dns_name_t name;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ fromwire_cname(ARGS_FROMWIRE) {
|
|||
return (dns_name_fromwire(&name, source, dctx, options, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_cname(ARGS_TOWIRE) {
|
||||
dns_name_t name;
|
||||
dns_offsets_t offsets;
|
||||
|
|
@ -95,7 +95,7 @@ towire_cname(ARGS_TOWIRE) {
|
|||
return (dns_name_towire(&name, cctx, target));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_cname(ARGS_COMPARE) {
|
||||
dns_name_t name1;
|
||||
dns_name_t name2;
|
||||
|
|
@ -120,7 +120,7 @@ compare_cname(ARGS_COMPARE) {
|
|||
return (dns_name_rdatacompare(&name1, &name2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_cname(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_cname_t *cname = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -137,7 +137,7 @@ fromstruct_cname(ARGS_FROMSTRUCT) {
|
|||
return (isc_buffer_copyregion(target, ®ion));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_cname(ARGS_TOSTRUCT) {
|
||||
isc_region_t region;
|
||||
dns_rdata_cname_t *cname = target;
|
||||
|
|
@ -160,7 +160,7 @@ tostruct_cname(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_cname(ARGS_FREESTRUCT) {
|
||||
dns_rdata_cname_t *cname = source;
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ freestruct_cname(ARGS_FREESTRUCT) {
|
|||
cname->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_cname(ARGS_ADDLDATA) {
|
||||
UNUSED(rdata);
|
||||
UNUSED(owner);
|
||||
|
|
@ -186,7 +186,7 @@ additionaldata_cname(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_cname(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
dns_name_t name;
|
||||
|
|
@ -200,7 +200,7 @@ digest_cname(ARGS_DIGEST) {
|
|||
return (dns_name_digest(&name, digest, arg));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_cname(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_cname);
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ checkowner_cname(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_cname(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_cname);
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ checknames_cname(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_cname(ARGS_COMPARE) {
|
||||
return (compare_cname(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define RRTYPE_CSYNC_ATTRIBUTES 0
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_csync(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ fromtext_csync(ARGS_FROMTEXT) {
|
|||
return (typemap_fromtext(lexer, target, true));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_csync(ARGS_TOTEXT) {
|
||||
unsigned long num;
|
||||
char buf[sizeof("0123456789")]; /* Also TYPE65535 */
|
||||
|
|
@ -81,7 +81,7 @@ totext_csync(ARGS_TOTEXT) {
|
|||
return (typemap_totext(&sr, NULL, target));
|
||||
}
|
||||
|
||||
static /* inline */ isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_csync(ARGS_FROMWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ fromwire_csync(ARGS_FROMWIRE) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_csync(ARGS_TOWIRE) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_csync);
|
||||
REQUIRE(rdata->length >= 6);
|
||||
|
|
@ -121,7 +121,7 @@ towire_csync(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, rdata->data, rdata->length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_csync(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -137,7 +137,7 @@ compare_csync(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_csync(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_csync_t *csync = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -160,7 +160,7 @@ fromstruct_csync(ARGS_FROMSTRUCT) {
|
|||
return (mem_tobuffer(target, csync->typebits, csync->len));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_csync(ARGS_TOSTRUCT) {
|
||||
isc_region_t region;
|
||||
dns_rdata_csync_t *csync = target;
|
||||
|
|
@ -194,7 +194,7 @@ cleanup:
|
|||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_csync(ARGS_FREESTRUCT) {
|
||||
dns_rdata_csync_t *csync = source;
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ freestruct_csync(ARGS_FREESTRUCT) {
|
|||
csync->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_csync(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_csync);
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ additionaldata_csync(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_csync(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ digest_csync(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_csync(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_csync);
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ checkowner_csync(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_csync(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_csync);
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ checknames_csync(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_csync(ARGS_COMPARE) {
|
||||
isc_region_t region1;
|
||||
isc_region_t region2;
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
#include <dns/ds.h>
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_dlv(ARGS_FROMTEXT) {
|
||||
REQUIRE(type == dns_rdatatype_dlv);
|
||||
|
||||
return (generic_fromtext_ds(CALL_FROMTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_dlv(ARGS_TOTEXT) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_dlv);
|
||||
|
|
@ -35,14 +35,14 @@ totext_dlv(ARGS_TOTEXT) {
|
|||
return (generic_totext_ds(CALL_TOTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_dlv(ARGS_FROMWIRE) {
|
||||
REQUIRE(type == dns_rdatatype_dlv);
|
||||
|
||||
return (generic_fromwire_ds(CALL_FROMWIRE));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_dlv(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ towire_dlv(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_dlv(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -71,14 +71,14 @@ compare_dlv(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_dlv(ARGS_FROMSTRUCT) {
|
||||
REQUIRE(type == dns_rdatatype_dlv);
|
||||
|
||||
return (generic_fromstruct_ds(CALL_FROMSTRUCT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_dlv(ARGS_TOSTRUCT) {
|
||||
dns_rdata_dlv_t *dlv = target;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ tostruct_dlv(ARGS_TOSTRUCT) {
|
|||
return (generic_tostruct_ds(CALL_TOSTRUCT));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_dlv(ARGS_FREESTRUCT) {
|
||||
dns_rdata_dlv_t *dlv = source;
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ freestruct_dlv(ARGS_FREESTRUCT) {
|
|||
dlv->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_dlv(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_dlv);
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ additionaldata_dlv(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_dlv(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ digest_dlv(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_dlv(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_dlv);
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ checkowner_dlv(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_dlv(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_dlv);
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ checknames_dlv(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_dlv(ARGS_COMPARE) {
|
||||
return (compare_dlv(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define RRTYPE_DNAME_ATTRIBUTES (DNS_RDATATYPEATTR_SINGLETON)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_dname(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
dns_name_t name;
|
||||
|
|
@ -42,7 +42,7 @@ fromtext_dname(ARGS_FROMTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_dname(ARGS_TOTEXT) {
|
||||
isc_region_t region;
|
||||
dns_name_t name;
|
||||
|
|
@ -63,7 +63,7 @@ totext_dname(ARGS_TOTEXT) {
|
|||
return (dns_name_totext(&prefix, sub, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_dname(ARGS_FROMWIRE) {
|
||||
dns_name_t name;
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ fromwire_dname(ARGS_FROMWIRE) {
|
|||
return (dns_name_fromwire(&name, source, dctx, options, target));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_dname(ARGS_TOWIRE) {
|
||||
dns_name_t name;
|
||||
dns_offsets_t offsets;
|
||||
|
|
@ -95,7 +95,7 @@ towire_dname(ARGS_TOWIRE) {
|
|||
return (dns_name_towire(&name, cctx, target));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_dname(ARGS_COMPARE) {
|
||||
dns_name_t name1;
|
||||
dns_name_t name2;
|
||||
|
|
@ -120,7 +120,7 @@ compare_dname(ARGS_COMPARE) {
|
|||
return (dns_name_rdatacompare(&name1, &name2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_dname(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_dname_t *dname = source;
|
||||
isc_region_t region;
|
||||
|
|
@ -137,7 +137,7 @@ fromstruct_dname(ARGS_FROMSTRUCT) {
|
|||
return (isc_buffer_copyregion(target, ®ion));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_dname(ARGS_TOSTRUCT) {
|
||||
isc_region_t region;
|
||||
dns_rdata_dname_t *dname = target;
|
||||
|
|
@ -160,7 +160,7 @@ tostruct_dname(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_dname(ARGS_FREESTRUCT) {
|
||||
dns_rdata_dname_t *dname = source;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ freestruct_dname(ARGS_FREESTRUCT) {
|
|||
dname->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_dname(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_dname);
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ additionaldata_dname(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_dname(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
dns_name_t name;
|
||||
|
|
@ -201,7 +201,7 @@ digest_dname(ARGS_DIGEST) {
|
|||
return (dns_name_digest(&name, digest, arg));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_dname(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_dname);
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ checkowner_dname(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_dname(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_dname);
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ checknames_dname(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_dname(ARGS_COMPARE) {
|
||||
return (compare_dname(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
#define RRTYPE_DNSKEY_ATTRIBUTES (DNS_RDATATYPEATTR_DNSSEC)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_dnskey(ARGS_FROMTEXT) {
|
||||
REQUIRE(type == dns_rdatatype_dnskey);
|
||||
|
||||
return (generic_fromtext_key(CALL_FROMTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_dnskey(ARGS_TOTEXT) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_dnskey);
|
||||
|
|
@ -35,14 +35,14 @@ totext_dnskey(ARGS_TOTEXT) {
|
|||
return (generic_totext_key(CALL_TOTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_dnskey(ARGS_FROMWIRE) {
|
||||
REQUIRE(type == dns_rdatatype_dnskey);
|
||||
|
||||
return (generic_fromwire_key(CALL_FROMWIRE));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_dnskey(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ towire_dnskey(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_dnskey(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -74,14 +74,14 @@ compare_dnskey(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_dnskey(ARGS_FROMSTRUCT) {
|
||||
REQUIRE(type == dns_rdatatype_dnskey);
|
||||
|
||||
return (generic_fromstruct_key(CALL_FROMSTRUCT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_dnskey(ARGS_TOSTRUCT) {
|
||||
dns_rdata_dnskey_t *dnskey = target;
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ tostruct_dnskey(ARGS_TOSTRUCT) {
|
|||
return (generic_tostruct_key(CALL_TOSTRUCT));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_dnskey(ARGS_FREESTRUCT) {
|
||||
dns_rdata_dnskey_t *dnskey = (dns_rdata_dnskey_t *)source;
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ freestruct_dnskey(ARGS_FREESTRUCT) {
|
|||
generic_freestruct_key(source);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_dnskey(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_dnskey);
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ additionaldata_dnskey(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_dnskey(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ digest_dnskey(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_dnskey(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_dnskey);
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ checkowner_dnskey(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_dnskey(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_dnskey);
|
||||
|
|
@ -154,7 +154,7 @@ checknames_dnskey(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_dnskey(ARGS_COMPARE) {
|
||||
/*
|
||||
* Treat ALG 253 (private DNS) subtype name case sensitively.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#define RRTYPE_DOA_ATTRIBUTES (0)
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_doa(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ fromtext_doa(ARGS_FROMTEXT) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_doa(ARGS_TOTEXT) {
|
||||
char buf[sizeof("4294967295 ")];
|
||||
isc_region_t region;
|
||||
|
|
@ -125,7 +125,7 @@ totext_doa(ARGS_TOTEXT) {
|
|||
}
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_doa(ARGS_FROMWIRE) {
|
||||
isc_region_t region;
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ fromwire_doa(ARGS_FROMWIRE) {
|
|||
return (mem_tobuffer(target, region.base, region.length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_doa(ARGS_TOWIRE) {
|
||||
isc_region_t region;
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ towire_doa(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, region.base, region.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_doa(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -188,7 +188,7 @@ compare_doa(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_doa(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_doa_t *doa = source;
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ fromstruct_doa(ARGS_FROMSTRUCT) {
|
|||
return (mem_tobuffer(target, doa->data, doa->data_len));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_doa(ARGS_TOSTRUCT) {
|
||||
dns_rdata_doa_t *doa = target;
|
||||
isc_region_t region;
|
||||
|
|
@ -287,7 +287,7 @@ cleanup:
|
|||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_doa(ARGS_FREESTRUCT) {
|
||||
dns_rdata_doa_t *doa = source;
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ freestruct_doa(ARGS_FREESTRUCT) {
|
|||
doa->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_doa(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_doa);
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ additionaldata_doa(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_doa(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ digest_doa(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_doa(ARGS_CHECKOWNER) {
|
||||
UNUSED(name);
|
||||
UNUSED(type);
|
||||
|
|
@ -343,7 +343,7 @@ checkowner_doa(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_doa(ARGS_CHECKNAMES) {
|
||||
UNUSED(rdata);
|
||||
UNUSED(owner);
|
||||
|
|
@ -354,7 +354,7 @@ checknames_doa(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_doa(ARGS_COMPARE) {
|
||||
return (compare_doa(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <dns/ds.h>
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
generic_fromtext_ds(ARGS_FROMTEXT) {
|
||||
isc_token_t token;
|
||||
unsigned char c;
|
||||
|
|
@ -82,14 +82,14 @@ generic_fromtext_ds(ARGS_FROMTEXT) {
|
|||
return (isc_hex_tobuffer(lexer, target, length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromtext_ds(ARGS_FROMTEXT) {
|
||||
REQUIRE(type == dns_rdatatype_ds);
|
||||
|
||||
return (generic_fromtext_ds(CALL_FROMTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
generic_totext_ds(ARGS_TOTEXT) {
|
||||
isc_region_t sr;
|
||||
char buf[sizeof("64000 ")];
|
||||
|
|
@ -148,7 +148,7 @@ generic_totext_ds(ARGS_TOTEXT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
totext_ds(ARGS_TOTEXT) {
|
||||
REQUIRE(rdata != NULL);
|
||||
REQUIRE(rdata->type == dns_rdatatype_ds);
|
||||
|
|
@ -156,7 +156,7 @@ totext_ds(ARGS_TOTEXT) {
|
|||
return (generic_totext_ds(CALL_TOTEXT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
generic_fromwire_ds(ARGS_FROMWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -198,14 +198,14 @@ generic_fromwire_ds(ARGS_FROMWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromwire_ds(ARGS_FROMWIRE) {
|
||||
REQUIRE(type == dns_rdatatype_ds);
|
||||
|
||||
return (generic_fromwire_ds(CALL_FROMWIRE));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
towire_ds(ARGS_TOWIRE) {
|
||||
isc_region_t sr;
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ towire_ds(ARGS_TOWIRE) {
|
|||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
compare_ds(ARGS_COMPARE) {
|
||||
isc_region_t r1;
|
||||
isc_region_t r2;
|
||||
|
|
@ -234,7 +234,7 @@ compare_ds(ARGS_COMPARE) {
|
|||
return (isc_region_compare(&r1, &r2));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
generic_fromstruct_ds(ARGS_FROMSTRUCT) {
|
||||
dns_rdata_ds_t *ds = source;
|
||||
|
||||
|
|
@ -264,14 +264,14 @@ generic_fromstruct_ds(ARGS_FROMSTRUCT) {
|
|||
return (mem_tobuffer(target, ds->digest, ds->length));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
fromstruct_ds(ARGS_FROMSTRUCT) {
|
||||
REQUIRE(type == dns_rdatatype_ds);
|
||||
|
||||
return (generic_fromstruct_ds(CALL_FROMSTRUCT));
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
generic_tostruct_ds(ARGS_TOSTRUCT) {
|
||||
dns_rdata_ds_t *ds = target;
|
||||
isc_region_t region;
|
||||
|
|
@ -301,7 +301,7 @@ generic_tostruct_ds(ARGS_TOSTRUCT) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
tostruct_ds(ARGS_TOSTRUCT) {
|
||||
dns_rdata_ds_t *ds = target;
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ tostruct_ds(ARGS_TOSTRUCT) {
|
|||
return (generic_tostruct_ds(CALL_TOSTRUCT));
|
||||
}
|
||||
|
||||
static inline void
|
||||
static void
|
||||
freestruct_ds(ARGS_FREESTRUCT) {
|
||||
dns_rdata_ds_t *ds = source;
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ freestruct_ds(ARGS_FREESTRUCT) {
|
|||
ds->mctx = NULL;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
additionaldata_ds(ARGS_ADDLDATA) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_ds);
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ additionaldata_ds(ARGS_ADDLDATA) {
|
|||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
static isc_result_t
|
||||
digest_ds(ARGS_DIGEST) {
|
||||
isc_region_t r;
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ digest_ds(ARGS_DIGEST) {
|
|||
return ((digest)(arg, &r));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checkowner_ds(ARGS_CHECKOWNER) {
|
||||
REQUIRE(type == dns_rdatatype_ds);
|
||||
|
||||
|
|
@ -367,7 +367,7 @@ checkowner_ds(ARGS_CHECKOWNER) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
static bool
|
||||
checknames_ds(ARGS_CHECKNAMES) {
|
||||
REQUIRE(rdata->type == dns_rdatatype_ds);
|
||||
|
||||
|
|
@ -378,7 +378,7 @@ checknames_ds(ARGS_CHECKNAMES) {
|
|||
return (true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static int
|
||||
casecompare_ds(ARGS_COMPARE) {
|
||||
return (compare_ds(rdata1, rdata2));
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue