mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 22:30:00 -04:00
Merge branch '305-misc-fixes-v9_12-v9_11' into 'v9_11'
(v9_11) Miscellaneous style fixes - implicit casts to bool and uninitialized variables fixes See merge request isc-projects/bind9!995
This commit is contained in:
commit
62819dcfba
88 changed files with 694 additions and 377 deletions
|
|
@ -307,3 +307,23 @@ install:debian:sid:amd64:
|
|||
<<: *install_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
noassert:build:debian:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
noassert:unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- noassert:build:debian:sid:amd64
|
||||
|
||||
noassert:systemtest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- noassert:build:debian:sid:amd64
|
||||
|
|
|
|||
|
|
@ -265,8 +265,10 @@ configure_zone(const char *vclass, const char *view,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
|
|
@ -283,8 +285,10 @@ configure_zone(const char *vclass, const char *view,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
|
|
@ -310,8 +314,10 @@ configure_zone(const char *vclass, const char *view,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
|
|
@ -328,8 +334,10 @@ configure_zone(const char *vclass, const char *view,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
|
|
@ -349,8 +357,10 @@ configure_zone(const char *vclass, const char *view,
|
|||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
}
|
||||
|
|
@ -366,8 +376,10 @@ configure_zone(const char *vclass, const char *view,
|
|||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
|
|
@ -377,14 +389,16 @@ configure_zone(const char *vclass, const char *view,
|
|||
fmtobj = NULL;
|
||||
if (get_maps(maps, "masterfile-format", &fmtobj)) {
|
||||
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
||||
masterformat = dns_masterformat_text;
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
||||
masterformat = dns_masterformat_map;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
|
|||
|
|
@ -141,12 +141,14 @@ main(int argc, char **argv) {
|
|||
#define PROGCMP(X) \
|
||||
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
|
||||
|
||||
if (PROGCMP("named-checkzone"))
|
||||
if (PROGCMP("named-checkzone")) {
|
||||
progmode = progmode_check;
|
||||
else if (PROGCMP("named-compilezone"))
|
||||
} else if (PROGCMP("named-compilezone")) {
|
||||
progmode = progmode_compile;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/* Compilation specific defaults */
|
||||
if (progmode == progmode_compile) {
|
||||
|
|
|
|||
|
|
@ -130,10 +130,12 @@ main(int argc, char **argv) {
|
|||
if (PROGCMP("tsig-keygen")) {
|
||||
progmode = progmode_keygen;
|
||||
quiet = true;
|
||||
} else if (PROGCMP("ddns-confgen"))
|
||||
} else if (PROGCMP("ddns-confgen")) {
|
||||
progmode = progmode_confgen;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1236,6 +1236,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
|||
/* NOTREACHED */
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (strlen(option) > 1U)
|
||||
option = &option[1];
|
||||
|
|
|
|||
|
|
@ -2648,7 +2648,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
|
||||
if (lookup->ecs_addr != NULL) {
|
||||
uint8_t addr[16];
|
||||
uint16_t family;
|
||||
uint16_t family = 0;
|
||||
uint32_t plen;
|
||||
struct sockaddr *sa;
|
||||
struct sockaddr_in *sin;
|
||||
|
|
@ -2705,6 +2705,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));
|
||||
|
|
|
|||
|
|
@ -617,6 +617,7 @@ exit_check(ns_client_t *client) {
|
|||
if (ns_g_clienttest && isc_mem_references(client->mctx) != 1) {
|
||||
isc_mem_stats(client->mctx, stderr);
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1230,7 +1231,7 @@ client_send(ns_client_t *client) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
respsize = isc_buffer_usedlength(&buffer);
|
||||
|
|
@ -1256,7 +1257,7 @@ client_send(ns_client_t *client) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1638,7 +1639,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
|
|||
isc_buffer_t buf;
|
||||
uint8_t addr[16];
|
||||
uint32_t plen, addrl;
|
||||
uint16_t family;
|
||||
uint16_t family = 0;
|
||||
|
||||
/* Add CLIENT-SUBNET option. */
|
||||
|
||||
|
|
@ -1664,6 +1665,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_buffer_init(&buf, ecs, sizeof(ecs));
|
||||
|
|
@ -1851,6 +1853,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
isc_hmacsha1_update(&hmacsha1, cp, length);
|
||||
isc_hmacsha1_sign(&hmacsha1, digest, sizeof(digest));
|
||||
|
|
@ -1886,6 +1889,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
isc_hmacsha256_update(&hmacsha256, cp, length);
|
||||
isc_hmacsha256_sign(&hmacsha256, digest, sizeof(digest));
|
||||
|
|
@ -1895,6 +1899,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
|
|||
}
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2439,7 +2444,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
switch (isc_sockaddr_pf(&client->peeraddr)) {
|
||||
|
|
@ -2453,7 +2458,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -423,18 +423,20 @@ ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
|
|||
const char *str;
|
||||
|
||||
str = cfg_obj_asstring(zonetypeobj);
|
||||
if (strcasecmp(str, "master") == 0)
|
||||
if (strcasecmp(str, "master") == 0) {
|
||||
ztype = dns_zone_master;
|
||||
else if (strcasecmp(str, "slave") == 0)
|
||||
} else if (strcasecmp(str, "slave") == 0) {
|
||||
ztype = dns_zone_slave;
|
||||
else if (strcasecmp(str, "stub") == 0)
|
||||
} else if (strcasecmp(str, "stub") == 0) {
|
||||
ztype = dns_zone_stub;
|
||||
else if (strcasecmp(str, "static-stub") == 0)
|
||||
} else if (strcasecmp(str, "static-stub") == 0) {
|
||||
ztype = dns_zone_staticstub;
|
||||
else if (strcasecmp(str, "redirect") == 0)
|
||||
} else if (strcasecmp(str, "redirect") == 0) {
|
||||
ztype = dns_zone_redirect;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
return (ztype);
|
||||
}
|
||||
|
||||
|
|
@ -1008,6 +1010,7 @@ ns_config_getkeyalgorithm2(const char *str, dns_name_t **name,
|
|||
case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (typep != NULL)
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig)
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
type = ISC_LOG_TOFILE;
|
||||
|
|
|
|||
|
|
@ -4471,6 +4471,7 @@ rpz_get_zbits(ns_client_t *client,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -4695,6 +4696,7 @@ rpz_get_p_name(ns_client_t *client, dns_name_t *p_name,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -6009,6 +6011,7 @@ setup_query_sortlist(ns_client_t *client) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
dns_message_setsortorder(client->message, order, order_arg);
|
||||
|
|
@ -9559,7 +9562,7 @@ ns_query_start(ns_client_t *client) {
|
|||
* We don't need to set DNS_DBFIND_PENDINGOK when validation is
|
||||
* disabled as there will be no pending data.
|
||||
*/
|
||||
if (message->flags & DNS_MESSAGEFLAG_CD ||
|
||||
if ((message->flags & DNS_MESSAGEFLAG_CD) != 0 ||
|
||||
qtype == dns_rdatatype_rrsig)
|
||||
{
|
||||
client->query.dboptions |= DNS_DBFIND_PENDINGOK;
|
||||
|
|
@ -9571,8 +9574,9 @@ ns_query_start(ns_client_t *client) {
|
|||
* Allow glue NS records to be added to the authority section
|
||||
* if the answer is secure.
|
||||
*/
|
||||
if (message->flags & DNS_MESSAGEFLAG_CD)
|
||||
if ((message->flags & DNS_MESSAGEFLAG_CD) != 0) {
|
||||
client->query.attributes &= ~NS_QUERYATTR_SECURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set NS_CLIENTATTR_WANTAD if the client has set AD in the query.
|
||||
|
|
|
|||
|
|
@ -1148,6 +1148,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
sa = *(cfg_obj_assockaddr(obj));
|
||||
|
|
@ -1169,6 +1170,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
@ -1276,18 +1278,20 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
|
|||
obj = cfg_tuple_get(ent, "ordering");
|
||||
INSIST(cfg_obj_isstring(obj));
|
||||
str = cfg_obj_asstring(obj);
|
||||
if (!strcasecmp(str, "fixed"))
|
||||
if (!strcasecmp(str, "fixed")) {
|
||||
#if DNS_RDATASET_FIXED
|
||||
mode = DNS_RDATASETATTR_FIXEDORDER;
|
||||
#else
|
||||
mode = 0;
|
||||
#endif /* DNS_RDATASET_FIXED */
|
||||
else if (!strcasecmp(str, "random"))
|
||||
} else if (!strcasecmp(str, "random")) {
|
||||
mode = DNS_RDATASETATTR_RANDOMIZE;
|
||||
else if (!strcasecmp(str, "cyclic"))
|
||||
} else if (!strcasecmp(str, "cyclic")) {
|
||||
mode = 0;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
* "*" should match everything including the root (BIND 8 compat).
|
||||
|
|
@ -1401,14 +1405,16 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
|
|||
(void)cfg_map_get(cpeer, "transfer-format", &obj);
|
||||
if (obj != NULL) {
|
||||
str = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(str, "many-answers") == 0)
|
||||
if (strcasecmp(str, "many-answers") == 0) {
|
||||
CHECK(dns_peer_settransferformat(peer,
|
||||
dns_many_answers));
|
||||
else if (strcasecmp(str, "one-answer") == 0)
|
||||
} else if (strcasecmp(str, "one-answer") == 0) {
|
||||
CHECK(dns_peer_settransferformat(peer,
|
||||
dns_one_answer));
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -2361,7 +2367,7 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin,
|
|||
catz_chgzone_event_t *event;
|
||||
isc_task_t *task;
|
||||
isc_result_t result;
|
||||
isc_taskaction_t action;
|
||||
isc_taskaction_t action = NULL;
|
||||
|
||||
switch (type) {
|
||||
case DNS_EVENT_CATZADDZONE:
|
||||
|
|
@ -3561,8 +3567,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
view->checknames = false;
|
||||
} else if (strcasecmp(str, "ignore") == 0) {
|
||||
view->checknames = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "zero-no-soa-ttl-cache", &obj);
|
||||
|
|
@ -3920,14 +3928,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
obj2 = cfg_tuple_get(obj, "response");
|
||||
if (!cfg_obj_isvoid(obj2)) {
|
||||
const char *resp = cfg_obj_asstring(obj2);
|
||||
isc_result_t r;
|
||||
isc_result_t r = DNS_R_SERVFAIL;
|
||||
|
||||
if (strcasecmp(resp, "drop") == 0)
|
||||
if (strcasecmp(resp, "drop") == 0) {
|
||||
r = DNS_R_DROP;
|
||||
else if (strcasecmp(resp, "fail") == 0)
|
||||
} else if (strcasecmp(resp, "fail") == 0) {
|
||||
r = DNS_R_SERVFAIL;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
dns_resolver_setquotaresponse(view->resolver,
|
||||
dns_quotatype_server, r);
|
||||
|
|
@ -4234,20 +4244,24 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
view->minimalresponses = dns_minimal_noauth;
|
||||
} else if (strcasecmp(str, "no-auth-recursive") == 0) {
|
||||
view->minimalresponses = dns_minimal_noauthrec;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "transfer-format", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
str = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(str, "many-answers") == 0)
|
||||
if (strcasecmp(str, "many-answers") == 0) {
|
||||
view->transfer_format = dns_many_answers;
|
||||
else if (strcasecmp(str, "one-answer") == 0)
|
||||
} else if (strcasecmp(str, "one-answer") == 0) {
|
||||
view->transfer_format = dns_one_answer;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "trust-anchor-telemetry", &obj);
|
||||
|
|
@ -4524,14 +4538,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
obj2 = cfg_tuple_get(obj, "response");
|
||||
if (!cfg_obj_isvoid(obj2)) {
|
||||
const char *resp = cfg_obj_asstring(obj2);
|
||||
isc_result_t r;
|
||||
isc_result_t r = DNS_R_SERVFAIL;
|
||||
|
||||
if (strcasecmp(resp, "drop") == 0)
|
||||
if (strcasecmp(resp, "drop") == 0) {
|
||||
r = DNS_R_DROP;
|
||||
else if (strcasecmp(resp, "fail") == 0)
|
||||
} else if (strcasecmp(resp, "fail") == 0) {
|
||||
r = DNS_R_SERVFAIL;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
dns_resolver_setquotaresponse(view->resolver,
|
||||
dns_quotatype_zone, r);
|
||||
|
|
@ -4548,10 +4564,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
view->v4_aaaa = dns_aaaa_ok;
|
||||
} else {
|
||||
const char *v4_aaaastr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0)
|
||||
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0) {
|
||||
view->v4_aaaa = dns_aaaa_break_dnssec;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -4564,10 +4582,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
view->v6_aaaa = dns_aaaa_ok;
|
||||
} else {
|
||||
const char *v6_aaaastr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0)
|
||||
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0) {
|
||||
view->v6_aaaa = dns_aaaa_break_dnssec;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(configure_view_acl(vconfig, config, ns_g_config,
|
||||
|
|
@ -4775,7 +4795,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
const char *empty_dbtype[4] =
|
||||
{ "_builtin", "empty", NULL, NULL };
|
||||
int empty_dbtypec = 4;
|
||||
dns_zonestat_level_t statlevel;
|
||||
dns_zonestat_level_t statlevel = dns_zonestat_none;
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
|
|
@ -4813,14 +4833,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||
statlevel = dns_zonestat_none;
|
||||
} else {
|
||||
const char *levelstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(levelstr, "full") == 0)
|
||||
if (strcasecmp(levelstr, "full") == 0) {
|
||||
statlevel = dns_zonestat_full;
|
||||
else if (strcasecmp(levelstr, "terse") == 0)
|
||||
} else if (strcasecmp(levelstr, "terse") == 0) {
|
||||
statlevel = dns_zonestat_terse;
|
||||
else if (strcasecmp(levelstr, "none") == 0)
|
||||
} else if (strcasecmp(levelstr, "none") == 0) {
|
||||
statlevel = dns_zonestat_none;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
for (empty = empty_zones[empty_zone];
|
||||
|
|
@ -5139,16 +5161,18 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
|
|||
"forwarding");
|
||||
fwdpolicy = dns_fwdpolicy_none;
|
||||
} else {
|
||||
if (forwardtype == NULL)
|
||||
if (forwardtype == NULL) {
|
||||
fwdpolicy = dns_fwdpolicy_first;
|
||||
else {
|
||||
} else {
|
||||
const char *forwardstr = cfg_obj_asstring(forwardtype);
|
||||
if (strcasecmp(forwardstr, "first") == 0)
|
||||
if (strcasecmp(forwardstr, "first") == 0) {
|
||||
fwdpolicy = dns_fwdpolicy_first;
|
||||
else if (strcasecmp(forwardstr, "only") == 0)
|
||||
} else if (strcasecmp(forwardstr, "only") == 0) {
|
||||
fwdpolicy = dns_fwdpolicy_only;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8358,7 +8382,8 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
cfg_map_get(options, "memstatistics", &obj) == ISC_R_SUCCESS) {
|
||||
ns_g_memstatistics = cfg_obj_asboolean(obj);
|
||||
} else {
|
||||
ns_g_memstatistics = (isc_mem_debugging & ISC_MEM_DEBUGRECORD);
|
||||
ns_g_memstatistics =
|
||||
((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -8449,6 +8474,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
server->cookiealg = ns_cookiealg_aes;
|
||||
#else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
#endif
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "sha1") == 0) {
|
||||
server->cookiealg = ns_cookiealg_sha1;
|
||||
|
|
@ -8456,6 +8482,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
server->cookiealg = ns_cookiealg_sha256;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -12005,7 +12032,7 @@ newzone_parse(ns_server_t *server, char *command, dns_view_t **viewp,
|
|||
const char *viewname = NULL;
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_view_t *view = NULL;
|
||||
const char *bn;
|
||||
const char *bn = NULL;
|
||||
|
||||
REQUIRE(viewp != NULL && *viewp == NULL);
|
||||
REQUIRE(zoneobjp != NULL && *zoneobjp == NULL);
|
||||
|
|
@ -12015,12 +12042,14 @@ newzone_parse(ns_server_t *server, char *command, dns_view_t **viewp,
|
|||
isc_buffer_init(&argbuf, command, (unsigned int) strlen(command));
|
||||
isc_buffer_add(&argbuf, strlen(command));
|
||||
|
||||
if (strncasecmp(command, "add", 3) == 0)
|
||||
if (strncasecmp(command, "add", 3) == 0) {
|
||||
bn = "addzone";
|
||||
else if (strncasecmp(command, "mod", 3) == 0)
|
||||
} else if (strncasecmp(command, "mod", 3) == 0) {
|
||||
bn = "modzone";
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert the "addzone" or "modzone" to just "zone", for
|
||||
|
|
@ -13442,8 +13471,8 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
|
|||
|
||||
/* Security */
|
||||
secure = dns_db_issecure(db);
|
||||
allow = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW);
|
||||
maintain = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN);
|
||||
allow = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW) != 0);
|
||||
maintain = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN) != 0);
|
||||
|
||||
/* Master files */
|
||||
file = dns_zone_getfile(mayberaw);
|
||||
|
|
@ -14030,7 +14059,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
|
|||
snprintf(buf, sizeof(buf), "\n\talgorithm: %s", alg);
|
||||
CHECK(putstr(text, buf));
|
||||
|
||||
revoked = (kd.flags & DNS_KEYFLAG_REVOKE);
|
||||
revoked = ((kd.flags & DNS_KEYFLAG_REVOKE) != 0);
|
||||
snprintf(buf, sizeof(buf), "\n\tflags:%s%s%s",
|
||||
revoked ? " REVOKE" : "",
|
||||
((kd.flags & DNS_KEYFLAG_KSK) != 0)
|
||||
|
|
@ -14207,6 +14236,7 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (viewtxt != NULL)
|
||||
|
|
|
|||
|
|
@ -765,7 +765,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
ns_client_log(client,
|
||||
|
|
@ -1281,7 +1281,7 @@ sendstream(xfrout_ctx_t *xfr) {
|
|||
isc_buffer_clear(&xfr->txlenbuf);
|
||||
isc_buffer_clear(&xfr->txbuf);
|
||||
|
||||
is_tcp = (xfr->client->attributes & NS_CLIENTATTR_TCP);
|
||||
is_tcp = ((xfr->client->attributes & NS_CLIENTATTR_TCP) != 0);
|
||||
if (!is_tcp) {
|
||||
/*
|
||||
* In the UDP case, we put the response data directly into
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
return (ISC_R_FAILURE);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/* First check to see if ACL is defined within the zone */
|
||||
|
|
@ -228,12 +228,14 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
|||
unsigned int i, n;
|
||||
|
||||
str = cfg_obj_asstring(mode);
|
||||
if (strcasecmp(str, "grant") == 0)
|
||||
if (strcasecmp(str, "grant") == 0) {
|
||||
grant = true;
|
||||
else if (strcasecmp(str, "deny") == 0)
|
||||
} else if (strcasecmp(str, "deny") == 0) {
|
||||
grant = false;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
str = cfg_obj_asstring(matchtype);
|
||||
CHECK(dns_ssu_mtypefromstring(str, &mtype));
|
||||
|
|
@ -753,6 +755,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
|
|||
case dns_zone_master: zone = "master"; break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
result = ns_checknames_get(maps, zone, objp);
|
||||
INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
|
||||
|
|
@ -796,7 +799,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
const dns_master_style_t *masterstyle = &dns_master_style_default;
|
||||
isc_stats_t *zoneqrystats;
|
||||
dns_stats_t *rcvquerystats;
|
||||
dns_zonestat_level_t statlevel;
|
||||
dns_zonestat_level_t statlevel = dns_zonestat_none;
|
||||
int seconds;
|
||||
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
|
||||
isc_dscp_t dscp;
|
||||
|
|
@ -920,14 +923,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
if (result == ISC_R_SUCCESS) {
|
||||
const char *masterformatstr = cfg_obj_asstring(obj);
|
||||
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
||||
masterformat = dns_masterformat_text;
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
||||
masterformat = dns_masterformat_map;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -943,12 +948,14 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (strcasecmp(masterstylestr, "full") == 0)
|
||||
if (strcasecmp(masterstylestr, "full") == 0) {
|
||||
masterstyle = &dns_master_style_full;
|
||||
else if (strcasecmp(masterstylestr, "relative") == 0)
|
||||
} else if (strcasecmp(masterstylestr, "relative") == 0) {
|
||||
masterstyle = &dns_master_style_default;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -1034,16 +1041,18 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
dialup = dns_dialuptype_no;
|
||||
} else {
|
||||
const char *dialupstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(dialupstr, "notify") == 0)
|
||||
if (strcasecmp(dialupstr, "notify") == 0) {
|
||||
dialup = dns_dialuptype_notify;
|
||||
else if (strcasecmp(dialupstr, "notify-passive") == 0)
|
||||
} else if (strcasecmp(dialupstr, "notify-passive") == 0) {
|
||||
dialup = dns_dialuptype_notifypassive;
|
||||
else if (strcasecmp(dialupstr, "refresh") == 0)
|
||||
} else if (strcasecmp(dialupstr, "refresh") == 0) {
|
||||
dialup = dns_dialuptype_refresh;
|
||||
else if (strcasecmp(dialupstr, "passive") == 0)
|
||||
} else if (strcasecmp(dialupstr, "passive") == 0) {
|
||||
dialup = dns_dialuptype_passive;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (raw != NULL)
|
||||
dns_zone_setdialup(raw, dialup);
|
||||
|
|
@ -1059,14 +1068,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
statlevel = dns_zonestat_none;
|
||||
} else {
|
||||
const char *levelstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(levelstr, "full") == 0)
|
||||
if (strcasecmp(levelstr, "full") == 0) {
|
||||
statlevel = dns_zonestat_full;
|
||||
else if (strcasecmp(levelstr, "terse") == 0)
|
||||
} else if (strcasecmp(levelstr, "terse") == 0) {
|
||||
statlevel = dns_zonestat_terse;
|
||||
else if (strcasecmp(levelstr, "none") == 0)
|
||||
} else if (strcasecmp(levelstr, "none") == 0) {
|
||||
statlevel = dns_zonestat_none;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
dns_zone_setstatlevel(zone, statlevel);
|
||||
|
||||
|
|
@ -1104,12 +1115,14 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
notifytype = dns_notifytype_no;
|
||||
} else {
|
||||
const char *notifystr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(notifystr, "explicit") == 0)
|
||||
if (strcasecmp(notifystr, "explicit") == 0) {
|
||||
notifytype = dns_notifytype_explicit;
|
||||
else if (strcasecmp(notifystr, "master-only") == 0)
|
||||
} else if (strcasecmp(notifystr, "master-only") == 0) {
|
||||
notifytype = dns_notifytype_masteronly;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (raw != NULL)
|
||||
dns_zone_setnotifytype(raw, dns_notifytype_no);
|
||||
|
|
@ -1250,8 +1263,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
fail = check = true;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (raw != NULL) {
|
||||
dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMES,
|
||||
check);
|
||||
|
|
@ -1286,8 +1301,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
check = true;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
|
||||
|
||||
obj = NULL;
|
||||
|
|
@ -1424,14 +1441,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
result = cfg_map_get(zoptions, "auto-dnssec", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *arg = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(arg, "allow") == 0)
|
||||
if (strcasecmp(arg, "allow") == 0) {
|
||||
allow = true;
|
||||
else if (strcasecmp(arg, "maintain") == 0)
|
||||
} else if (strcasecmp(arg, "maintain") == 0) {
|
||||
allow = maint = true;
|
||||
else if (strcasecmp(arg, "off") == 0)
|
||||
} else if (strcasecmp(arg, "off") == 0) {
|
||||
;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, maint);
|
||||
}
|
||||
|
|
@ -1482,8 +1501,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
fail = check = true;
|
||||
} else if (strcasecmp(dupcheck, "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRRFAIL, fail);
|
||||
|
||||
|
|
@ -1497,8 +1518,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
fail = check = true;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail);
|
||||
|
||||
|
|
@ -1533,8 +1556,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
warn = ignore = false;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
warn = ignore = true;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNOREMXCNAME, ignore);
|
||||
|
||||
|
|
@ -1548,8 +1573,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
warn = ignore = false;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
warn = ignore = true;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNORESRVCNAME,
|
||||
ignore);
|
||||
|
|
@ -1564,13 +1591,15 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
result = cfg_map_get(zoptions, "dnssec-update-mode", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *arg = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(arg, "no-resign") == 0)
|
||||
if (strcasecmp(arg, "no-resign") == 0) {
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
|
||||
true);
|
||||
else if (strcasecmp(arg, "maintain") == 0)
|
||||
} else if (strcasecmp(arg, "maintain") == 0) {
|
||||
;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
|
|
|||
|
|
@ -195,6 +195,9 @@ int sigwait(const unsigned int *set, int *sig);
|
|||
/* Define to 1 if the compiler supports __builtin_expect. */
|
||||
#undef HAVE_BUILTIN_EXPECT
|
||||
|
||||
/* define if the compiler supports __builtin_unreachable(). */
|
||||
#undef HAVE_BUILTIN_UNREACHABLE
|
||||
|
||||
/* Define to 1 if you have the `chroot' function. */
|
||||
#undef HAVE_CHROOT
|
||||
|
||||
|
|
|
|||
38
configure
vendored
38
configure
vendored
|
|
@ -17134,9 +17134,9 @@ int main() {
|
|||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
have_ed448="yes"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5
|
||||
$as_echo "broken" >&6; }
|
||||
have_ed448="no"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
|
@ -21372,6 +21372,38 @@ fi
|
|||
ISC_ARCH_DIR=$arch
|
||||
|
||||
|
||||
#
|
||||
# Check for __builtin_unreachable
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for __builtin_unreachable()" >&5
|
||||
$as_echo_n "checking compiler support for __builtin_unreachable()... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
__builtin_unreachable();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
$as_echo "#define HAVE_BUILTIN_UNREACHABLE 1" >>confdefs.h
|
||||
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
#
|
||||
# Check for __builtin_expect
|
||||
#
|
||||
|
|
|
|||
21
configure.ac
21
configure.ac
|
|
@ -1894,9 +1894,9 @@ int main() {
|
|||
return (0);
|
||||
}
|
||||
],
|
||||
[AC_MSG_RESULT(yes)
|
||||
have_ed448="yes"],
|
||||
[AC_MSG_RESULT(no)
|
||||
[AC_MSG_RESULT([broken])
|
||||
have_ed448="no"],
|
||||
[AC_MSG_RESULT([no])
|
||||
have_ed448="no"],
|
||||
[AC_MSG_RESULT(using --with-eddsa)])
|
||||
case $with_eddsa in
|
||||
|
|
@ -4273,6 +4273,21 @@ AC_SUBST(ISC_PLATFORM_USEMACASM)
|
|||
ISC_ARCH_DIR=$arch
|
||||
AC_SUBST(ISC_ARCH_DIR)
|
||||
|
||||
#
|
||||
# Check for __builtin_unreachable
|
||||
#
|
||||
AC_MSG_CHECKING([compiler support for __builtin_unreachable()])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[]],
|
||||
[[__builtin_unreachable();]]
|
||||
)],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_BUILTIN_UNREACHABLE], [1], [define if the compiler supports __builtin_unreachable().])
|
||||
],
|
||||
[AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
#
|
||||
# Check for __builtin_expect
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1765,6 +1765,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
for (element2 = cfg_list_first(typelist);
|
||||
|
|
@ -2020,6 +2021,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
|
|||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2416,14 +2418,16 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
|
|||
(void)cfg_map_get(zoptions, "masterfile-format", &obj);
|
||||
if (obj != NULL) {
|
||||
const char *masterformatstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
||||
masterformat = dns_masterformat_text;
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
||||
masterformat = dns_masterformat_map;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
if (masterformat == dns_masterformat_map) {
|
||||
|
|
|
|||
|
|
@ -494,8 +494,8 @@ dns_aclelement_match2(const isc_netaddr_t *reqaddr,
|
|||
&e->geoip_elem));
|
||||
#endif
|
||||
default:
|
||||
/* Should be impossible. */
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
result = dns_acl_match2(reqaddr, reqsigner, ecs, ecslen, scope,
|
||||
|
|
@ -673,7 +673,7 @@ dns_acl_isinsecure(const dns_acl_t *a) {
|
|||
|
||||
default:
|
||||
INSIST(0);
|
||||
return (true);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2187,7 +2187,7 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_name_t *qname,
|
|||
|
||||
bucket = DNS_ADB_INVALIDBUCKET;
|
||||
|
||||
if (find->options & DNS_ADBFIND_INET) {
|
||||
if ((find->options & DNS_ADBFIND_INET) != 0) {
|
||||
namehook = ISC_LIST_HEAD(name->v4);
|
||||
while (namehook != NULL) {
|
||||
entry = namehook->entry;
|
||||
|
|
@ -2227,7 +2227,7 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_name_t *qname,
|
|||
}
|
||||
}
|
||||
|
||||
if (find->options & DNS_ADBFIND_INET6) {
|
||||
if ((find->options & DNS_ADBFIND_INET6) != 0) {
|
||||
namehook = ISC_LIST_HEAD(name->v6);
|
||||
while (namehook != NULL) {
|
||||
entry = namehook->entry;
|
||||
|
|
@ -3710,8 +3710,7 @@ dbfind_name(dns_adbname_t *adbname, isc_stdtime_t now, dns_rdatatype_t rdtype)
|
|||
result = dns_view_find2(adb->view, &adbname->name, rdtype, now,
|
||||
NAME_GLUEOK(adbname) ? DNS_DBFIND_GLUEOK : 0,
|
||||
NAME_HINTOK(adbname),
|
||||
(adbname->flags & NAME_STARTATZONE) != 0 ?
|
||||
true : false,
|
||||
((adbname->flags & NAME_STARTATZONE) != 0),
|
||||
NULL, NULL, fname, &rdataset, NULL);
|
||||
|
||||
/* XXXVIX this switch statement is too sparse to gen a jump table. */
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ getudpdispatch(int family, dns_dispatchmgr_t *dispatchmgr,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
attrmask = 0;
|
||||
attrmask |= DNS_DISPATCHATTR_UDP;
|
||||
|
|
@ -1342,10 +1343,10 @@ dns_client_startresolve(dns_client_t *client, dns_name_t *name,
|
|||
mctx = client->mctx;
|
||||
rdataset = NULL;
|
||||
sigrdataset = NULL;
|
||||
want_dnssec = !(options & DNS_CLIENTRESOPT_NODNSSEC);
|
||||
want_validation = !(options & DNS_CLIENTRESOPT_NOVALIDATE);
|
||||
want_cdflag = !(options & DNS_CLIENTRESOPT_NOCDFLAG);
|
||||
want_tcp = (options & DNS_CLIENTRESOPT_TCP);
|
||||
want_dnssec = ((options & DNS_CLIENTRESOPT_NODNSSEC) == 0);
|
||||
want_validation = ((options & DNS_CLIENTRESOPT_NOVALIDATE) == 0);
|
||||
want_cdflag = ((options & DNS_CLIENTRESOPT_NOCDFLAG) == 0);
|
||||
want_tcp = ((options & DNS_CLIENTRESOPT_TCP) != 0);
|
||||
|
||||
/*
|
||||
* Prepare some intermediate resources
|
||||
|
|
@ -2854,7 +2855,7 @@ dns_client_startupdate(dns_client_t *client, dns_rdataclass_t rdclass,
|
|||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
want_tcp = (options & DNS_CLIENTUPDOPT_TCP);
|
||||
want_tcp = ((options & DNS_CLIENTUPDOPT_TCP) != 0);
|
||||
|
||||
/*
|
||||
* Create a context and prepare some resources.
|
||||
|
|
@ -3183,6 +3184,7 @@ dns_client_updaterec(dns_client_updateop_t op, dns_name_t *owner,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
rdatalist->type = rdata->type;
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ free_buffer(dns_dispatch_t *disp, void *buf, unsigned int len) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1170,7 +1170,7 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
|
|||
|
||||
dispatch_log(disp, LVL(92),
|
||||
"got valid DNS message header, /QR %c, id %u",
|
||||
((flags & DNS_MESSAGEFLAG_QR) ? '1' : '0'), id);
|
||||
(((flags & DNS_MESSAGEFLAG_QR) != 0) ? '1' : '0'), id);
|
||||
|
||||
/*
|
||||
* Look at flags. If query, drop it. If response,
|
||||
|
|
@ -1423,7 +1423,7 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
|
|||
|
||||
dispatch_log(disp, LVL(92),
|
||||
"got valid DNS message header, /QR %c, id %u",
|
||||
((flags & DNS_MESSAGEFLAG_QR) ? '1' : '0'), id);
|
||||
(((flags & DNS_MESSAGEFLAG_QR) != 0) ? '1' : '0'), id);
|
||||
|
||||
/*
|
||||
* Allocate an event to send to the query or response client, and
|
||||
|
|
@ -1587,7 +1587,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
LIBDNS_EXTERNAL_DATA isc_stats_t *dns_dnssec_stats;
|
||||
|
||||
#define is_response(msg) (msg->flags & DNS_MESSAGEFLAG_QR)
|
||||
#define is_response(msg) ((msg->flags & DNS_MESSAGEFLAG_QR) != 0)
|
||||
|
||||
#define RETERR(x) do { \
|
||||
result = (x); \
|
||||
|
|
@ -220,10 +220,12 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
|||
* Is the key allowed to sign data?
|
||||
*/
|
||||
flags = dst_key_flags(key);
|
||||
if (flags & DNS_KEYTYPE_NOAUTH)
|
||||
if ((flags & DNS_KEYTYPE_NOAUTH) != 0) {
|
||||
return (DNS_R_KEYUNAUTHORIZED);
|
||||
if ((flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
|
||||
}
|
||||
if ((flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE) {
|
||||
return (DNS_R_KEYUNAUTHORIZED);
|
||||
}
|
||||
|
||||
sig.mctx = mctx;
|
||||
sig.common.rdclass = set->rdclass;
|
||||
|
|
@ -456,7 +458,7 @@ dns_dnssec_verify3(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
|||
* Is the key allowed to sign data?
|
||||
*/
|
||||
flags = dst_key_flags(key);
|
||||
if (flags & DNS_KEYTYPE_NOAUTH) {
|
||||
if ((flags & DNS_KEYTYPE_NOAUTH) != 0) {
|
||||
inc_stat(dns_dnssecstats_fail);
|
||||
return (DNS_R_KEYUNAUTHORIZED);
|
||||
}
|
||||
|
|
@ -1287,7 +1289,7 @@ dns_dnsseckey_create(isc_mem_t *mctx, dst_key_t **dstkey,
|
|||
dk->index = 0;
|
||||
|
||||
/* KSK or ZSK? */
|
||||
dk->ksk = (dst_key_flags(dk->key) & DNS_KEYFLAG_KSK);
|
||||
dk->ksk = ((dst_key_flags(dk->key) & DNS_KEYFLAG_KSK) != 0);
|
||||
|
||||
/* Is this an old-style key? */
|
||||
result = dst_key_getprivateformat(dk->key, &major, &minor);
|
||||
|
|
|
|||
|
|
@ -634,6 +634,7 @@ dnstap_type(dns_dtmsgtype_t msgtype) {
|
|||
return (DNSTAP__MESSAGE__TYPE__TOOL_RESPONSE);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -885,6 +886,7 @@ dns_dt_open(const char *filename, dns_dtmode_t mode, isc_mem_t *mctx,
|
|||
return (ISC_R_NOTIMPLEMENTED);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_mem_attach(mctx, &handle->mctx);
|
||||
|
|
|
|||
|
|
@ -500,13 +500,13 @@ dst_key_tofile(const dst_key_t *key, int type, const char *directory) {
|
|||
if (key->func->tofile == NULL)
|
||||
return (DST_R_UNSUPPORTEDALG);
|
||||
|
||||
if (type & DST_TYPE_PUBLIC) {
|
||||
if ((type & DST_TYPE_PUBLIC) != 0) {
|
||||
ret = write_public_key(key, type, directory);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
if ((type & DST_TYPE_PRIVATE) &&
|
||||
if (((type & DST_TYPE_PRIVATE) != 0) &&
|
||||
(key->key_flags & DNS_KEYFLAG_TYPEMASK) != DNS_KEYTYPE_NOKEY)
|
||||
return (key->func->tofile(key, directory));
|
||||
else
|
||||
|
|
@ -722,7 +722,7 @@ dst_key_todns(const dst_key_t *key, isc_buffer_t *target) {
|
|||
isc_buffer_putuint8(target, (uint8_t)key->key_proto);
|
||||
isc_buffer_putuint8(target, (uint8_t)key->key_alg);
|
||||
|
||||
if (key->key_flags & DNS_KEYFLAG_EXTENDED) {
|
||||
if ((key->key_flags & DNS_KEYFLAG_EXTENDED) != 0) {
|
||||
if (isc_buffer_availablelength(target) < 2)
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint16(target,
|
||||
|
|
@ -760,7 +760,7 @@ dst_key_fromdns(dns_name_t *name, dns_rdataclass_t rdclass,
|
|||
id = dst_region_computeid(&r, alg);
|
||||
rid = dst_region_computerid(&r, alg);
|
||||
|
||||
if (flags & DNS_KEYFLAG_EXTENDED) {
|
||||
if ((flags & DNS_KEYFLAG_EXTENDED) != 0) {
|
||||
if (isc_buffer_remaininglength(source) < 2)
|
||||
return (DST_R_INVALIDPUBLICKEY);
|
||||
extflags = isc_buffer_getuint16(source);
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
|
|||
raw += 2;
|
||||
#endif
|
||||
if (rdataset->type == dns_rdatatype_rrsig) {
|
||||
if (*raw & DNS_RDATASLAB_OFFLINE)
|
||||
if ((*raw & DNS_RDATASLAB_OFFLINE) != 0)
|
||||
flags |= DNS_RDATA_OFFLINE;
|
||||
length--;
|
||||
raw++;
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ country_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (text == NULL)
|
||||
|
|
@ -373,6 +374,7 @@ city_string(GeoIPRecord *record, dns_geoip_subtype_t subtype, int *maxlen) {
|
|||
return (deconst);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -467,6 +469,7 @@ static char * region_string(GeoIPRegion *region, dns_geoip_subtype_t subtype, in
|
|||
return (deconst);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -861,6 +864,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
|
|||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
return (false);
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ journal_header_decode(journal_rawheader_t *raw, journal_header_t *cooked) {
|
|||
journal_pos_decode(&raw->h.end, &cooked->end);
|
||||
cooked->index_size = decode_uint32(raw->h.index_size);
|
||||
cooked->sourceserial = decode_uint32(raw->h.sourceserial);
|
||||
cooked->serialset = (raw->h.flags & JOURNAL_SERIALSET);
|
||||
cooked->serialset = ((raw->h.flags & JOURNAL_SERIALSET) != 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -375,8 +375,9 @@ journal_header_encode(journal_header_t *cooked, journal_rawheader_t *raw) {
|
|||
journal_pos_encode(&raw->h.end, &cooked->end);
|
||||
encode_uint32(cooked->index_size, raw->h.index_size);
|
||||
encode_uint32(cooked->sourceserial, raw->h.sourceserial);
|
||||
if (cooked->serialset)
|
||||
if (cooked->serialset) {
|
||||
flags |= JOURNAL_SERIALSET;
|
||||
}
|
||||
raw->h.flags = flags;
|
||||
}
|
||||
|
||||
|
|
@ -699,8 +700,8 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, unsigned int mode,
|
|||
char backup[1024];
|
||||
bool writable, create;
|
||||
|
||||
create = (mode & DNS_JOURNAL_CREATE);
|
||||
writable = (mode & (DNS_JOURNAL_WRITE|DNS_JOURNAL_CREATE));
|
||||
create = ((mode & DNS_JOURNAL_CREATE) != 0);
|
||||
writable = ((mode & (DNS_JOURNAL_WRITE|DNS_JOURNAL_CREATE)) != 0);
|
||||
|
||||
result = journal_open(mctx, filename, writable, create, journalp);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
|
|
@ -750,6 +751,7 @@ ixfr_order(const void *av, const void *bv) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
switch (b->op) {
|
||||
|
|
@ -763,6 +765,7 @@ ixfr_order(const void *av, const void *bv) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
r = bop - aop;
|
||||
|
|
|
|||
|
|
@ -548,8 +548,6 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
|
|||
|
||||
lctx->format = format;
|
||||
switch (format) {
|
||||
default:
|
||||
INSIST(0);
|
||||
case dns_masterformat_text:
|
||||
lctx->openfile = openfile_text;
|
||||
lctx->load = load_text;
|
||||
|
|
@ -562,6 +560,9 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
|
|||
lctx->openfile = openfile_map;
|
||||
lctx->load = load_map;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (lex != NULL) {
|
||||
|
|
@ -582,7 +583,7 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
|
|||
isc_lex_setcomments(lctx->lex, ISC_LEXCOMMENT_DNSMASTERFILE);
|
||||
}
|
||||
|
||||
lctx->ttl_known = (options & DNS_MASTER_NOTTL);
|
||||
lctx->ttl_known = ((options & DNS_MASTER_NOTTL) != 0);
|
||||
lctx->ttl = 0;
|
||||
lctx->default_ttl_known = lctx->ttl_known;
|
||||
lctx->default_ttl = 0;
|
||||
|
|
|
|||
|
|
@ -1022,7 +1022,7 @@ dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
|
|||
|
||||
for (i = 0; i < n; i++) {
|
||||
dns_rdataset_t *rds = sorted[i];
|
||||
if (ctx->style.flags & DNS_STYLEFLAG_TRUST) {
|
||||
if ((ctx->style.flags & DNS_STYLEFLAG_TRUST) != 0) {
|
||||
if ((ctx->style.flags & DNS_STYLEFLAG_INDENT) != 0 ||
|
||||
(ctx->style.flags & DNS_STYLEFLAG_YAML) != 0)
|
||||
{
|
||||
|
|
@ -1044,8 +1044,8 @@ dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
|
|||
if ((ctx->style.flags & DNS_STYLEFLAG_OMIT_OWNER) != 0)
|
||||
name = NULL;
|
||||
}
|
||||
if (ctx->style.flags & DNS_STYLEFLAG_RESIGN &&
|
||||
rds->attributes & DNS_RDATASETATTR_RESIGN) {
|
||||
if (((ctx->style.flags & DNS_STYLEFLAG_RESIGN) != 0) &&
|
||||
((rds->attributes & DNS_RDATASETATTR_RESIGN) != 0)) {
|
||||
isc_buffer_t b;
|
||||
char buf[sizeof("YYYYMMDDHHMMSS")];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
|
@ -1490,7 +1490,7 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
result = totext_ctx_init(style, &dctx->tctx);
|
||||
|
|
@ -1618,6 +1618,7 @@ writeheader(dns_dumpctx_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_mem_put(dctx->mctx, buffer.base, buffer.length);
|
||||
|
|
|
|||
|
|
@ -915,8 +915,8 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
|
|||
}
|
||||
}
|
||||
|
||||
INSIST(0); /* Cannot get here... */
|
||||
return (ISC_R_UNEXPECTED);
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1003,7 +1003,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
|
||||
section = &msg->sections[DNS_SECTION_QUESTION];
|
||||
|
||||
best_effort = (options & DNS_MESSAGEPARSE_BESTEFFORT);
|
||||
best_effort = ((options & DNS_MESSAGEPARSE_BESTEFFORT) != 0);
|
||||
seen_problem = false;
|
||||
|
||||
name = NULL;
|
||||
|
|
@ -1235,8 +1235,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
bool preserve_order, best_effort, seen_problem;
|
||||
bool issigzero;
|
||||
|
||||
preserve_order = (options & DNS_MESSAGEPARSE_PRESERVEORDER);
|
||||
best_effort = (options & DNS_MESSAGEPARSE_BESTEFFORT);
|
||||
preserve_order = ((options & DNS_MESSAGEPARSE_PRESERVEORDER) != 0);
|
||||
best_effort = ((options & DNS_MESSAGEPARSE_BESTEFFORT) != 0);
|
||||
seen_problem = false;
|
||||
|
||||
section = &msg->sections[sectionid];
|
||||
|
|
@ -1672,7 +1672,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
|
|||
REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTPARSE);
|
||||
|
||||
seen_problem = false;
|
||||
ignore_tc = (options & DNS_MESSAGEPARSE_IGNORETRUNCATION);
|
||||
ignore_tc = ((options & DNS_MESSAGEPARSE_IGNORETRUNCATION) != 0);
|
||||
|
||||
origsource = *source;
|
||||
|
||||
|
|
|
|||
|
|
@ -1114,7 +1114,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
|
||||
(target == NULL && ISC_BUFFER_VALID(name->buffer)));
|
||||
|
||||
downcase = (options & DNS_NAME_DOWNCASE);
|
||||
downcase = ((options & DNS_NAME_DOWNCASE) != 0);
|
||||
|
||||
if (target == NULL && name->buffer != NULL) {
|
||||
target = name->buffer;
|
||||
|
|
@ -1409,7 +1409,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
|
|||
dns_name_totextfilter_t totext_filter_proc = NULL;
|
||||
isc_result_t result;
|
||||
#endif
|
||||
bool omit_final_dot = (options & DNS_NAME_OMITFINALDOT);
|
||||
bool omit_final_dot = ((options & DNS_NAME_OMITFINALDOT) != 0);
|
||||
|
||||
/*
|
||||
* This function assumes the name is in proper uncompressed
|
||||
|
|
@ -1823,7 +1823,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
|
||||
(target == NULL && ISC_BUFFER_VALID(name->buffer)));
|
||||
|
||||
downcase = (options & DNS_NAME_DOWNCASE);
|
||||
downcase = ((options & DNS_NAME_DOWNCASE) != 0);
|
||||
|
||||
if (target == NULL && name->buffer != NULL) {
|
||||
target = name->buffer;
|
||||
|
|
@ -1907,9 +1907,10 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
/*
|
||||
* Ordinary 14-bit pointer.
|
||||
*/
|
||||
if ((dctx->allowed & DNS_COMPRESS_GLOBAL14) ==
|
||||
0)
|
||||
if ((dctx->allowed & DNS_COMPRESS_GLOBAL14) == 0)
|
||||
{
|
||||
return (DNS_R_DISALLOWED);
|
||||
}
|
||||
new_current = c & 0x3F;
|
||||
state = fw_newcurrent;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ dns_nsec_isset(const unsigned char *array, unsigned int type) {
|
|||
shift = 7 - (type % 8);
|
||||
mask = 1 << shift;
|
||||
|
||||
return (byte & mask);
|
||||
return ((byte & mask) != 0);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
|
|
|
|||
|
|
@ -2093,13 +2093,12 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
|
|||
*exists = false;
|
||||
*data = false;
|
||||
if (optout != NULL) {
|
||||
if ((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) != 0)
|
||||
(*logit)(arg, ISC_LOG_DEBUG(3),
|
||||
"NSEC3 indicates optout");
|
||||
else
|
||||
(*logit)(arg, ISC_LOG_DEBUG(3),
|
||||
"NSEC3 indicates secure range");
|
||||
*optout = (nsec3.flags & DNS_NSEC3FLAG_OPTOUT);
|
||||
*optout = ((nsec3.flags & DNS_NSEC3FLAG_OPTOUT)
|
||||
!= 0);
|
||||
(*logit)(arg, ISC_LOG_DEBUG(3),
|
||||
(*optout
|
||||
? "NSEC3 indicates optout"
|
||||
: "NSEC3 indicates secure range"));
|
||||
}
|
||||
answer = ISC_R_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ dst__openssl_toresult3(isc_logcategory_t *category,
|
|||
isc_log_write(dns_lctx, category,
|
||||
DNS_LOGMODULE_CRYPTO, ISC_LOG_INFO,
|
||||
"%s:%s:%d:%s", buf, file, line,
|
||||
(flags & ERR_TXT_STRING) ? data : "");
|
||||
((flags & ERR_TXT_STRING) != 0) ? data : "");
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
|
|||
|
|
@ -476,6 +476,7 @@ openssleddsa_todns(const dst_key_t *key, isc_buffer_t *data) {
|
|||
return (result);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
#if USE_EVP
|
||||
|
|
@ -327,6 +328,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
#endif
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) {
|
||||
|
|
@ -389,6 +391,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -474,6 +477,7 @@ opensslrsa_destroyctx(dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -538,6 +542,7 @@ opensslrsa_adddata(dst_context_t *dctx, const isc_region_t *data) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
#endif
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
@ -659,6 +664,7 @@ opensslrsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00908000L
|
||||
|
|
@ -692,6 +698,7 @@ opensslrsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
|
|||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
#else
|
||||
INSIST(type != 0);
|
||||
|
|
@ -821,6 +828,7 @@ opensslrsa_verify2(dst_context_t *dctx, int maxbits, const isc_region_t *sig) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (sig->length != (unsigned int) RSA_size(rsa))
|
||||
|
|
@ -874,6 +882,7 @@ opensslrsa_verify2(dst_context_t *dctx, int maxbits, const isc_region_t *sig) {
|
|||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
#else
|
||||
INSIST(type != 0);
|
||||
|
|
@ -1022,6 +1031,7 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (rsa == NULL || e == NULL || cb == NULL)
|
||||
|
|
|
|||
|
|
@ -206,10 +206,11 @@ dns_peer_new(isc_mem_t *mem, isc_netaddr_t *addr, dns_peer_t **peerptr) {
|
|||
prefixlen = 32;
|
||||
break;
|
||||
case AF_INET6:
|
||||
prefixlen = 128;
|
||||
prefixlen = 128;
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
return (dns_peer_newprefix(mem, addr, prefixlen, peerptr));
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
rsa = key->keydata.pkey;
|
||||
|
|
@ -257,6 +258,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
PK11_RET(pkcs_C_SignInit,
|
||||
|
|
@ -356,6 +358,7 @@ pkcs11rsa_createctx_verify(dst_key_t *key, unsigned int maxbits,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
rsa = key->keydata.pkey;
|
||||
|
|
@ -425,6 +428,7 @@ pkcs11rsa_createctx_verify(dst_key_t *key, unsigned int maxbits,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
PK11_RET(pkcs_C_VerifyInit,
|
||||
|
|
@ -631,6 +635,7 @@ pkcs11rsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
switch (key->key_alg) {
|
||||
|
|
@ -651,6 +656,7 @@ pkcs11rsa_createctx(dst_key_t *key, dst_context_t *dctx) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
pk11_ctx = (pk11_context_t *) isc_mem_get(dctx->mctx,
|
||||
|
|
@ -787,6 +793,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
switch (key->key_alg) {
|
||||
|
|
@ -815,6 +822,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dgstlen = derlen + hashlen;
|
||||
INSIST(dgstlen <= sizeof(digest));
|
||||
|
|
@ -1039,6 +1047,7 @@ pkcs11rsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dgstlen = derlen + hashlen;
|
||||
INSIST(dgstlen <= sizeof(digest));
|
||||
|
|
@ -1230,6 +1239,7 @@ pkcs11rsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
pk11_ctx = (pk11_context_t *) isc_mem_get(key->mctx,
|
||||
|
|
|
|||
|
|
@ -312,9 +312,9 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
|
|||
|
||||
CHECK(dns_rdata_tostruct(&rdata, &nsec3param, NULL));
|
||||
|
||||
del = (nsec3param.flags & DNS_NSEC3FLAG_REMOVE);
|
||||
init = (nsec3param.flags & DNS_NSEC3FLAG_INITIAL);
|
||||
nonsec = (nsec3param.flags & DNS_NSEC3FLAG_NONSEC);
|
||||
del = ((nsec3param.flags & DNS_NSEC3FLAG_REMOVE) != 0);
|
||||
init = ((nsec3param.flags & DNS_NSEC3FLAG_INITIAL) != 0);
|
||||
nonsec = ((nsec3param.flags & DNS_NSEC3FLAG_NONSEC) != 0);
|
||||
|
||||
nsec3param.flags &= ~(DNS_NSEC3FLAG_CREATE|
|
||||
DNS_NSEC3FLAG_REMOVE|
|
||||
|
|
|
|||
|
|
@ -5711,7 +5711,8 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
|
|||
rbtdbiter->common.methods = &dbiterator_methods;
|
||||
rbtdbiter->common.db = NULL;
|
||||
dns_db_attach(db, &rbtdbiter->common.db);
|
||||
rbtdbiter->common.relative_names = (options & DNS_DB_RELATIVENAMES);
|
||||
rbtdbiter->common.relative_names =
|
||||
((options & DNS_DB_RELATIVENAMES) != 0);
|
||||
rbtdbiter->common.magic = DNS_DBITERATOR_MAGIC;
|
||||
rbtdbiter->common.cleaning = false;
|
||||
rbtdbiter->paused = true;
|
||||
|
|
@ -5721,8 +5722,8 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
|
|||
dns_fixedname_init(&rbtdbiter->origin);
|
||||
rbtdbiter->node = NULL;
|
||||
rbtdbiter->delcnt = 0;
|
||||
rbtdbiter->nsec3only = (options & DNS_DB_NSEC3ONLY);
|
||||
rbtdbiter->nonsec3 = (options & DNS_DB_NONSEC3);
|
||||
rbtdbiter->nsec3only = ((options & DNS_DB_NSEC3ONLY) != 0);
|
||||
rbtdbiter->nonsec3 = ((options & DNS_DB_NONSEC3) != 0);
|
||||
memset(rbtdbiter->deletions, 0, sizeof(rbtdbiter->deletions));
|
||||
dns_rbtnodechain_init(&rbtdbiter->chain, db->mctx);
|
||||
dns_rbtnodechain_init(&rbtdbiter->nsec3chain, db->mctx);
|
||||
|
|
@ -9772,6 +9773,7 @@ rdataset_getadditional(dns_rdataset_t *rdataset, dns_rdatasetadditional_t type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (acarray == NULL) {
|
||||
|
|
@ -9831,6 +9833,7 @@ acache_callback(dns_acacheentry_t *entry, void **arg) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
count = cbarg->count;
|
||||
|
|
@ -9965,6 +9968,7 @@ rdataset_setadditional(dns_rdataset_t *rdataset, dns_rdatasetadditional_t type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (acarray[count].entry != NULL) {
|
||||
|
|
@ -10047,6 +10051,7 @@ rdataset_putadditional(dns_acache_t *acache, dns_rdataset_t *rdataset,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (acarray == NULL) {
|
||||
|
|
|
|||
|
|
@ -129,12 +129,14 @@ totext_keydata(ARGS_TOTEXT) {
|
|||
RETERR(str_totext(buf, target));
|
||||
RETERR(str_totext(" ", target));
|
||||
if ((flags & DNS_KEYFLAG_KSK) != 0) {
|
||||
if (flags & DNS_KEYFLAG_REVOKE)
|
||||
if ((flags & DNS_KEYFLAG_REVOKE) != 0) {
|
||||
keyinfo = "revoked KSK";
|
||||
else
|
||||
} else {
|
||||
keyinfo = "KSK";
|
||||
} else
|
||||
}
|
||||
} else {
|
||||
keyinfo = "ZSK";
|
||||
}
|
||||
|
||||
/* protocol */
|
||||
snprintf(buf, sizeof(buf), "%u", sr.base[0]);
|
||||
|
|
|
|||
|
|
@ -454,11 +454,12 @@ totext_loc(ARGS_TOTEXT) {
|
|||
bool east;
|
||||
bool below;
|
||||
isc_region_t sr;
|
||||
char buf[sizeof("89 59 59.999 N 179 59 59.999 E "
|
||||
"-42849672.95m 90000000m 90000000m 90000000m")];
|
||||
char sbuf[sizeof("90000000m")];
|
||||
char hbuf[sizeof("90000000m")];
|
||||
char vbuf[sizeof("90000000m")];
|
||||
/* "89 59 59.999 N 179 59 59.999 E " */
|
||||
/* "-42849672.95m 90000000m 90000000m 90000000m"; */
|
||||
char buf[8*6 + 12*1 + 2*10 + sizeof(sbuf)+sizeof(hbuf)+sizeof(vbuf)];
|
||||
unsigned char size, hp, vp;
|
||||
unsigned long poweroften[8] = { 1, 10, 100, 1000,
|
||||
10000, 100000, 1000000, 10000000 };
|
||||
|
|
|
|||
|
|
@ -92,9 +92,11 @@ totext_soa(ARGS_TOTEXT) {
|
|||
REQUIRE(rdata->length != 0);
|
||||
|
||||
multiline = (tctx->flags & DNS_STYLEFLAG_MULTILINE);
|
||||
comm = (multiline) ?
|
||||
(tctx->flags & DNS_STYLEFLAG_RRCOMMENT) :
|
||||
false;
|
||||
if (multiline) {
|
||||
comm = ((tctx->flags & DNS_STYLEFLAG_RRCOMMENT) != 0);
|
||||
} else {
|
||||
comm = false;
|
||||
}
|
||||
|
||||
dns_name_init(&mname, NULL);
|
||||
dns_name_init(&rname, NULL);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ fromtext_in_dhcid(ARGS_FROMTEXT) {
|
|||
static inline isc_result_t
|
||||
totext_in_dhcid(ARGS_TOTEXT) {
|
||||
isc_region_t sr, sr2;
|
||||
char buf[sizeof(" ; 64000 255 64000")];
|
||||
size_t n;
|
||||
/* " ; 64000 255 64000" */
|
||||
char buf[5 + 3*11 + 1];
|
||||
|
||||
REQUIRE(rdata->type == dns_rdatatype_dhcid);
|
||||
REQUIRE(rdata->rdclass == dns_rdataclass_in);
|
||||
|
|
@ -55,10 +55,9 @@ totext_in_dhcid(ARGS_TOTEXT) {
|
|||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
|
||||
RETERR(str_totext(/* ( */ " )", target));
|
||||
if (rdata->length > 2) {
|
||||
n = snprintf(buf, sizeof(buf), " ; %u %u %u",
|
||||
sr2.base[0] * 256U + sr2.base[1],
|
||||
sr2.base[2], rdata->length - 3U);
|
||||
INSIST(n < sizeof(buf));
|
||||
snprintf(buf, sizeof(buf), " ; %u %u %u",
|
||||
sr2.base[0] * 256U + sr2.base[1],
|
||||
sr2.base[2], rdata->length - 3U);
|
||||
RETERR(str_totext(buf, target));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1045,8 +1045,8 @@ dns_request_createvia4(dns_requestmgr_t *requestmgr, dns_message_t *message,
|
|||
dns_tsigkey_attach(key, &request->tsigkey);
|
||||
|
||||
use_tcp:
|
||||
tcp = (options & DNS_REQUESTOPT_TCP);
|
||||
share = (options & DNS_REQUESTOPT_SHARE);
|
||||
tcp = ((options & DNS_REQUESTOPT_TCP) != 0);
|
||||
share = ((options & DNS_REQUESTOPT_SHARE) != 0);
|
||||
result = get_dispatch(tcp, false, share,
|
||||
requestmgr, srcaddr, destaddr,
|
||||
dscp, &connected, &request->dispatch);
|
||||
|
|
@ -1307,7 +1307,7 @@ bool
|
|||
dns_request_usedtcp(dns_request_t *request) {
|
||||
REQUIRE(VALID_REQUEST(request));
|
||||
|
||||
return (request->flags & DNS_REQUEST_F_TCP);
|
||||
return ((request->flags & DNS_REQUEST_F_TCP) != 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -2126,7 +2126,7 @@ resquery_send(resquery_t *query) {
|
|||
bool cleanup_cctx = false;
|
||||
bool secure_domain;
|
||||
bool connecting = false;
|
||||
bool tcp = (query->options & DNS_FETCHOPT_TCP);
|
||||
bool tcp = ((query->options & DNS_FETCHOPT_TCP) != 0);
|
||||
dns_ednsopt_t ednsopts[DNS_EDNSOPTIONS];
|
||||
unsigned ednsopt = 0;
|
||||
uint16_t hint = 0, udpsize = 0; /* No EDNS */
|
||||
|
|
@ -2214,7 +2214,7 @@ resquery_send(resquery_t *query) {
|
|||
else if (res->view->enablevalidation &&
|
||||
((fctx->qmessage->flags & DNS_MESSAGEFLAG_RD) != 0))
|
||||
{
|
||||
bool checknta = !(query->options & DNS_FETCHOPT_NONTA);
|
||||
bool checknta = ((query->options & DNS_FETCHOPT_NONTA) == 0);
|
||||
result = issecuredomain(res->view, &fctx->name, fctx->type,
|
||||
isc_time_seconds(&query->start),
|
||||
checknta, &secure_domain);
|
||||
|
|
@ -3096,7 +3096,7 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
|
|||
isc_result_t result;
|
||||
|
||||
res = fctx->res;
|
||||
unshared = (fctx->options & DNS_FETCHOPT_UNSHARED);
|
||||
unshared = ((fctx->options & DNS_FETCHOPT_UNSHARED) != 0);
|
||||
/*
|
||||
* If this name is a subdomain of the query domain, tell
|
||||
* the ADB to start looking using zone/hint data. This keeps us
|
||||
|
|
@ -4846,7 +4846,7 @@ validated(isc_task_t *task, isc_event_t *event) {
|
|||
|
||||
negative = (vevent->rdataset == NULL);
|
||||
|
||||
sentresponse = (fctx->options & DNS_FETCHOPT_NOVALIDATE);
|
||||
sentresponse = ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0);
|
||||
|
||||
/*
|
||||
* If shutting down, ignore the results. Check to see if we're
|
||||
|
|
@ -5441,7 +5441,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
|
|||
/*
|
||||
* Cache or validate each cacheable rdataset.
|
||||
*/
|
||||
fail = (fctx->res->options & DNS_RESOLVER_CHECKNAMESFAIL);
|
||||
fail = ((fctx->res->options & DNS_RESOLVER_CHECKNAMESFAIL) != 0);
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link))
|
||||
|
|
@ -6365,6 +6365,7 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (chainingp != NULL)
|
||||
|
|
|
|||
|
|
@ -247,9 +247,8 @@ dns_rpz_policy2str(dns_rpz_policy_t policy) {
|
|||
str = "MISS";
|
||||
break;
|
||||
default:
|
||||
str = "";
|
||||
POST(str);
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
return (str);
|
||||
}
|
||||
|
|
@ -316,7 +315,7 @@ make_addr_set(dns_rpz_addr_zbits_t *tgt_set, dns_rpz_zbits_t zbits,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +334,7 @@ make_nm_set(dns_rpz_nm_zbits_t *tgt_set,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -550,8 +549,8 @@ adj_trigger_cnt(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
|
|||
const dns_rpz_cidr_key_t *tgt_ip, dns_rpz_prefix_t tgt_prefix,
|
||||
bool inc)
|
||||
{
|
||||
dns_rpz_trigger_counter_t *cnt;
|
||||
dns_rpz_zbits_t *have;
|
||||
dns_rpz_trigger_counter_t *cnt = NULL;
|
||||
dns_rpz_zbits_t *have = NULL;
|
||||
|
||||
switch (rpz_type) {
|
||||
case DNS_RPZ_TYPE_CLIENT_IP:
|
||||
|
|
@ -594,6 +593,7 @@ adj_trigger_cnt(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (inc) {
|
||||
|
|
@ -2166,7 +2166,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
|
|||
dns_rpz_addr_zbits_t tgt_set;
|
||||
dns_rpz_cidr_node_t *found;
|
||||
isc_result_t result;
|
||||
dns_rpz_num_t rpz_num;
|
||||
dns_rpz_num_t rpz_num = 0;
|
||||
dns_rpz_have_t have;
|
||||
int i;
|
||||
|
||||
|
|
@ -2194,7 +2194,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else if (netaddr->family == AF_INET6) {
|
||||
dns_rpz_cidr_key_t src_ip6;
|
||||
|
|
@ -2220,7 +2220,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
return (DNS_RPZ_INVALID_NUM);
|
||||
|
|
@ -2257,7 +2257,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
result = ip2name(&found->ip, found->prefix, dns_rootname, ip_name);
|
||||
RWUNLOCK(&rpzs->search_lock, isc_rwlocktype_read);
|
||||
|
|
|
|||
|
|
@ -465,8 +465,8 @@ get_rate(dns_rrl_t *rrl, dns_rrl_rtype_t rtype) {
|
|||
return (&rrl->all_per_second);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -823,7 +823,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
switch (e->key.s.rtype) {
|
||||
|
|
@ -852,6 +852,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (plural)
|
||||
|
|
|
|||
|
|
@ -1049,7 +1049,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
|||
UNUSED(node);
|
||||
UNUSED(now);
|
||||
INSIST(0);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1084,7 +1084,7 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
|
|||
sdbiter->common.methods = &dbiterator_methods;
|
||||
sdbiter->common.db = NULL;
|
||||
dns_db_attach(db, &sdbiter->common.db);
|
||||
sdbiter->common.relative_names = (options & DNS_DB_RELATIVENAMES);
|
||||
sdbiter->common.relative_names = ((options & DNS_DB_RELATIVENAMES) != 0);
|
||||
sdbiter->common.magic = DNS_DBITERATOR_MAGIC;
|
||||
ISC_LIST_INIT(sdbiter->nodelist);
|
||||
sdbiter->current = NULL;
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
|||
UNUSED(node);
|
||||
UNUSED(now);
|
||||
INSIST(0);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -818,7 +818,8 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
|
|||
sdlziter->common.methods = &dbiterator_methods;
|
||||
sdlziter->common.db = NULL;
|
||||
dns_db_attach(db, &sdlziter->common.db);
|
||||
sdlziter->common.relative_names = (options & DNS_DB_RELATIVENAMES);
|
||||
sdlziter->common.relative_names =
|
||||
((options & DNS_DB_RELATIVENAMES) != 0);
|
||||
sdlziter->common.magic = DNS_DBITERATOR_MAGIC;
|
||||
ISC_LIST_INIT(sdlziter->nodelist);
|
||||
sdlziter->current = NULL;
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ reverse_from_address(dns_name_t *tcpself, isc_netaddr_t *tcpaddr) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
isc_buffer_init(&b, buf, strlen(buf));
|
||||
isc_buffer_add(&b, strlen(buf));
|
||||
|
|
@ -331,6 +332,7 @@ stf_from_address(dns_name_t *stfself, isc_netaddr_t *tcpaddr) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
isc_buffer_init(&b, buf, strlen(buf));
|
||||
isc_buffer_add(&b, strlen(buf));
|
||||
|
|
|
|||
|
|
@ -103,9 +103,13 @@ attachversion(isc_assertioncallback_t callback) {
|
|||
|
||||
isc_assertion_setcallback(callback);
|
||||
dns_db_attachversion(db1, VERSION(callback), &v);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_attachversion did not assert");
|
||||
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(v, v1);
|
||||
dns_db_closeversion(db1, &v, false);
|
||||
ATF_REQUIRE_EQ(v, NULL);
|
||||
|
|
@ -147,8 +151,13 @@ closeversion(isc_assertioncallback_t callback) {
|
|||
|
||||
isc_assertion_setcallback(callback);
|
||||
dns_db_closeversion(db1, VERSIONP(callback), false);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_closeversion did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(v1, NULL);
|
||||
|
||||
close_db();
|
||||
|
|
@ -195,8 +204,13 @@ find(isc_assertioncallback_t callback) {
|
|||
result = dns_db_find(db1, dns_rootname, VERSION(callback),
|
||||
dns_rdatatype_soa, 0, 0, NULL,
|
||||
dns_fixedname_name(&fixed), &rdataset, NULL);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_find did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, DNS_R_NXDOMAIN);
|
||||
|
||||
close_db();
|
||||
|
|
@ -242,8 +256,13 @@ allrdatasets(isc_assertioncallback_t callback) {
|
|||
isc_assertion_setcallback(callback);
|
||||
result = dns_db_allrdatasets(db1, node, VERSION(callback), 0,
|
||||
&iterator);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_allrdatasets did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
dns_rdatasetiter_destroy(&iterator);
|
||||
|
|
@ -300,8 +319,13 @@ findrdataset(isc_assertioncallback_t callback) {
|
|||
isc_assertion_setcallback(callback);
|
||||
result = dns_db_findrdataset(db1, node, VERSION(callback),
|
||||
dns_rdatatype_soa, 0, 0, &rdataset, NULL);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_findrdataset did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, ISC_R_NOTFOUND);
|
||||
|
||||
dns_db_detachnode(db1, &node);
|
||||
|
|
@ -355,8 +379,13 @@ deleterdataset(isc_assertioncallback_t callback) {
|
|||
isc_assertion_setcallback(callback);
|
||||
result = dns_db_deleterdataset(db1, node, VERSION(callback),
|
||||
dns_rdatatype_soa, 0);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_deleterdataset did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, DNS_R_UNCHANGED);
|
||||
|
||||
dns_db_detachnode(db1, &node);
|
||||
|
|
@ -417,8 +446,13 @@ subtract(isc_assertioncallback_t callback) {
|
|||
isc_assertion_setcallback(callback);
|
||||
result = dns_db_subtractrdataset(db1, node, VERSION(callback),
|
||||
&rdataset, 0, NULL);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_subtractrdataset did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, DNS_R_UNCHANGED);
|
||||
|
||||
dns_db_detachnode(db1, &node);
|
||||
|
|
@ -468,8 +502,13 @@ dump(isc_assertioncallback_t callback) {
|
|||
isc_assertion_setcallback(callback);
|
||||
result = dns_db_dump(db1, VERSION(callback), tempname);
|
||||
(void)unlink(tempname);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_dump did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
close_db();
|
||||
|
|
@ -527,8 +566,13 @@ addrdataset(isc_assertioncallback_t callback) {
|
|||
isc_assertion_setcallback(callback);
|
||||
result = dns_db_addrdataset(db1, node, VERSION(callback), 0, &rdataset,
|
||||
0, NULL);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_adddataset did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
|
||||
dns_db_detachnode(db1, &node);
|
||||
|
|
@ -579,8 +623,13 @@ getnsec3parameters(isc_assertioncallback_t callback) {
|
|||
result = dns_db_getnsec3parameters(db1, VERSION(callback), &hash,
|
||||
&flags, &iterations, salt,
|
||||
&salt_length);
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_dump did not assert");
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
ATF_REQUIRE_EQ(result, ISC_R_NOTFOUND);
|
||||
|
||||
close_db();
|
||||
|
|
@ -672,9 +721,13 @@ resigned(isc_assertioncallback_t callback) {
|
|||
|
||||
isc_assertion_setcallback(callback);
|
||||
dns_db_resigned(db1, &added, VERSION(callback));
|
||||
if (callback != NULL)
|
||||
if (callback != NULL) {
|
||||
#ifndef ISC_CHECK_NONE
|
||||
atf_tc_fail("dns_db_resigned did not assert");
|
||||
|
||||
#else
|
||||
atf_tc_pass();
|
||||
#endif
|
||||
}
|
||||
dns_rdataset_disassociate(&added);
|
||||
|
||||
close_db();
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ dns_tsec_create(isc_mem_t *mctx, dns_tsectype_t type, dst_key_t *key,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
tsec->magic = DNS_TSEC_MAGIC;
|
||||
|
|
@ -125,6 +126,7 @@ dns_tsec_destroy(dns_tsec_t **tsecp) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
tsec->magic = 0;
|
||||
|
|
@ -154,5 +156,6 @@ dns_tsec_getkey(dns_tsec_t *tsec, void *keyp) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1429,9 +1429,11 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
|
|||
* and one doesn't.
|
||||
*/
|
||||
state->check_ksk =
|
||||
(dns_zone_getoptions(zone) & DNS_ZONEOPT_UPDATECHECKKSK);
|
||||
((dns_zone_getoptions(zone) &
|
||||
DNS_ZONEOPT_UPDATECHECKKSK) != 0);
|
||||
state->keyset_kskonly =
|
||||
(dns_zone_getoptions(zone) & DNS_ZONEOPT_DNSKEYKSKONLY);
|
||||
((dns_zone_getoptions(zone) &
|
||||
DNS_ZONEOPT_DNSKEYKSKONLY) != 0);
|
||||
|
||||
/*
|
||||
* Get the NSEC/NSEC3 TTL from the SOA MINIMUM field.
|
||||
|
|
@ -1806,6 +1808,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
|
|||
sigs++;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link);
|
||||
ISC_LIST_APPEND(state->work.tuples, t, link);
|
||||
|
|
@ -1979,6 +1982,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
|
|||
sigs++;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link);
|
||||
ISC_LIST_APPEND(state->work.tuples, t, link);
|
||||
|
|
@ -2005,6 +2009,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
failure:
|
||||
|
|
|
|||
|
|
@ -3703,10 +3703,8 @@ validator_start(isc_task_t *task, isc_event_t *event) {
|
|||
val->attributes |= VALATTR_NEEDNODATA;
|
||||
result = nsecvalidate(val, false);
|
||||
} else {
|
||||
/*
|
||||
* This shouldn't happen.
|
||||
*/
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (result != DNS_R_WAIT) {
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ xfr_rr(dns_xfrin_ctx_t *xfr, dns_name_t *name, uint32_t ttl,
|
|||
/* FALLTHROUGH */
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
result = ISC_R_SUCCESS;
|
||||
failure:
|
||||
|
|
@ -651,6 +651,7 @@ dns_xfrin_create(dns_zone_t *zone, dns_rdatatype_t xfrtype,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
return(dns_xfrin_create3(zone, xfrtype, masteraddr, &sourceaddr,
|
||||
|
|
|
|||
|
|
@ -3426,27 +3426,28 @@ zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) {
|
|||
strlcpy(flags, "NONE", sizeof(flags));
|
||||
else {
|
||||
flags[0] = '\0';
|
||||
if (nsec3param->flags & DNS_NSEC3FLAG_REMOVE)
|
||||
if ((nsec3param->flags & DNS_NSEC3FLAG_REMOVE) != 0) {
|
||||
strlcat(flags, "REMOVE", sizeof(flags));
|
||||
if (nsec3param->flags & DNS_NSEC3FLAG_INITIAL) {
|
||||
}
|
||||
if ((nsec3param->flags & DNS_NSEC3FLAG_INITIAL) != 0) {
|
||||
if (flags[0] == '\0')
|
||||
strlcpy(flags, "INITIAL", sizeof(flags));
|
||||
else
|
||||
strlcat(flags, "|INITIAL", sizeof(flags));
|
||||
}
|
||||
if (nsec3param->flags & DNS_NSEC3FLAG_CREATE) {
|
||||
if ((nsec3param->flags & DNS_NSEC3FLAG_CREATE) != 0) {
|
||||
if (flags[0] == '\0')
|
||||
strlcpy(flags, "CREATE", sizeof(flags));
|
||||
else
|
||||
strlcat(flags, "|CREATE", sizeof(flags));
|
||||
}
|
||||
if (nsec3param->flags & DNS_NSEC3FLAG_NONSEC) {
|
||||
if ((nsec3param->flags & DNS_NSEC3FLAG_NONSEC) != 0) {
|
||||
if (flags[0] == '\0')
|
||||
strlcpy(flags, "NONSEC", sizeof(flags));
|
||||
else
|
||||
strlcat(flags, "|NONSEC", sizeof(flags));
|
||||
}
|
||||
if (nsec3param->flags & DNS_NSEC3FLAG_OPTOUT) {
|
||||
if ((nsec3param->flags & DNS_NSEC3FLAG_OPTOUT) != 0) {
|
||||
if (flags[0] == '\0')
|
||||
strlcpy(flags, "OPTOUT", sizeof(flags));
|
||||
else
|
||||
|
|
@ -8957,6 +8958,7 @@ normalize_key(dns_rdata_t *rr, dns_rdata_t *target,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
|
@ -9500,13 +9502,14 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
|
|||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
/* Skip ZSK's */
|
||||
if (!(dnskey.flags & DNS_KEYFLAG_KSK))
|
||||
if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
result = compute_tag(keyname, &dnskey, mctx, &keytag);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
revoked = (dnskey.flags & DNS_KEYFLAG_REVOKE);
|
||||
revoked = ((dnskey.flags & DNS_KEYFLAG_REVOKE) != 0);
|
||||
|
||||
if (matchkey(&kfetch->keydataset, &dnskeyrr)) {
|
||||
dns_rdata_reset(&keydatarr);
|
||||
|
|
@ -11187,7 +11190,7 @@ notify_send(dns_notify_t *notify) {
|
|||
zone_iattach(notify->zone, &newnotify->zone);
|
||||
ISC_LIST_APPEND(newnotify->zone->notifies, newnotify, link);
|
||||
newnotify->dst = dst;
|
||||
startup = (notify->flags & DNS_NOTIFY_STARTUP);
|
||||
startup = ((notify->flags & DNS_NOTIFY_STARTUP) != 0);
|
||||
result = notify_send_queue(newnotify, startup);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
|
@ -15777,7 +15780,8 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
};
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
INSIST(isc_sockaddr_pf(&masteraddr) == isc_sockaddr_pf(&sourceaddr));
|
||||
result = dns_xfrin_create3(zone, xfrtype, &masteraddr, &sourceaddr,
|
||||
|
|
@ -17246,6 +17250,7 @@ dns_zone_setdialup(dns_zone_t *zone, dns_dialuptype_t dialup) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
}
|
||||
|
|
@ -17321,6 +17326,7 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_read);
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
|
|||
goto done;
|
||||
}
|
||||
|
||||
wantcname = (resstate->head->ai_flags & AI_CANONNAME);
|
||||
wantcname = ((resstate->head->ai_flags & AI_CANONNAME) != 0);
|
||||
|
||||
/* Parse the response and construct the addrinfo chain */
|
||||
for (name = ISC_LIST_HEAD(rev->answerlist); name != NULL;
|
||||
|
|
|
|||
|
|
@ -196,8 +196,9 @@ getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen,
|
|||
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
proto = (flags & NI_DGRAM) ? "udp" : "tcp";
|
||||
proto = ((flags & NI_DGRAM) != 0) ? "udp" : "tcp";
|
||||
|
||||
if (serv == NULL || servlen == 0U) {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -408,16 +408,5 @@ isc_hmacmd5_check(int testing) {
|
|||
}
|
||||
|
||||
#else /* !PK11_MD5_DISABLE */
|
||||
#ifdef WIN32
|
||||
/* Make the Visual Studio linker happy */
|
||||
#include <isc/util.h>
|
||||
|
||||
void isc_hmacmd5_init() { INSIST(0); }
|
||||
void isc_hmacmd5_invalidate() { INSIST(0); }
|
||||
void isc_hmacmd5_sign() { INSIST(0); }
|
||||
void isc_hmacmd5_update() { INSIST(0); }
|
||||
void isc_hmacmd5_verify() { INSIST(0); }
|
||||
void isc_hmacmd5_verify2() { INSIST(0); }
|
||||
void isc_hmacmd5_check() { INSIST(0); }
|
||||
#endif
|
||||
EMPTY_TRANSLATION_UNIT
|
||||
#endif /* PK11_MD5_DISABLE */
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev) {
|
|||
}
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
if (httpd->flags & HTTPD_ACCEPT_DEFLATE) {
|
||||
if ((httpd->flags & HTTPD_ACCEPT_DEFLATE) != 0) {
|
||||
result = isc_httpd_compress(httpd);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
is_compressed = true;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
|
|||
isc_assertiontype_require, \
|
||||
#cond), 0)))
|
||||
#else
|
||||
#define ISC_REQUIRE(cond) ((void) 0)
|
||||
#define ISC_REQUIRE(cond) ((void) ISC_LIKELY(cond))
|
||||
#endif /* ISC_CHECK_REQUIRE */
|
||||
|
||||
#if ISC_CHECK_ENSURE != 0
|
||||
|
|
@ -90,7 +90,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
|
|||
isc_assertiontype_ensure, \
|
||||
#cond), 0)))
|
||||
#else
|
||||
#define ISC_ENSURE(cond) ((void) 0)
|
||||
#define ISC_ENSURE(cond) ((void) ISC_LIKELY(cond))
|
||||
#endif /* ISC_CHECK_ENSURE */
|
||||
|
||||
#if ISC_CHECK_INSIST != 0
|
||||
|
|
@ -100,7 +100,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
|
|||
isc_assertiontype_insist, \
|
||||
#cond), 0)))
|
||||
#else
|
||||
#define ISC_INSIST(cond) ((void) 0)
|
||||
#define ISC_INSIST(cond) ((void) ISC_LIKELY(cond))
|
||||
#endif /* ISC_CHECK_INSIST */
|
||||
|
||||
#if ISC_CHECK_INVARIANT != 0
|
||||
|
|
@ -110,7 +110,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
|
|||
isc_assertiontype_invariant, \
|
||||
#cond), 0)))
|
||||
#else
|
||||
#define ISC_INVARIANT(cond) ((void) 0)
|
||||
#define ISC_INVARIANT(cond) ((void) ISC_LIKELY(cond))
|
||||
#endif /* ISC_CHECK_INVARIANT */
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@ typedef void (*isc_radix_processfunc_t)(isc_prefix_t *, void **);
|
|||
#define isc_prefix_tochar(prefix) ((char *)&(prefix)->add.sin)
|
||||
#define isc_prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
|
||||
|
||||
#define BIT_TEST(f, b) ((f) & (b))
|
||||
|
||||
/*
|
||||
* We need "first match" when we search the radix tree to preserve
|
||||
* compatibility with the existing ACL implementation. Radix trees
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@
|
|||
ISC_MSG_UNLOCKED, "UNLOCKED"), \
|
||||
(lp), __FILE__, __LINE__)); \
|
||||
} while (0)
|
||||
#define ISLOCKED(lp) (1)
|
||||
#define DESTROYLOCK(lp) \
|
||||
RUNTIME_CHECK(isc_mutex_destroy((lp)) == ISC_R_SUCCESS)
|
||||
|
||||
|
|
@ -203,6 +202,12 @@
|
|||
*/
|
||||
#include <isc/likely.h>
|
||||
|
||||
#ifdef HAVE_BUILTIN_UNREACHABLE
|
||||
#define ISC_UNREACHABLE() __builtin_unreachable();
|
||||
#else
|
||||
#define ISC_UNREACHABLE()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Assertions
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -650,10 +650,10 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||
goto done;
|
||||
done = true;
|
||||
continue;
|
||||
} else if (!(options & ISC_LEXOPT_CNUMBER) ||
|
||||
} else if ((options & ISC_LEXOPT_CNUMBER) == 0 ||
|
||||
((c != 'x' && c != 'X') ||
|
||||
(curr != &lex->data[1]) ||
|
||||
(lex->data[0] != '0'))) {
|
||||
(curr != &lex->data[1]) ||
|
||||
(lex->data[0] != '0'))) {
|
||||
/* Above test supports hex numbers */
|
||||
state = lexstate_string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1633,16 +1633,16 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
|
|||
}
|
||||
}
|
||||
|
||||
printtime = (channel->flags & ISC_LOG_PRINTTIME);
|
||||
printtime = ((channel->flags & ISC_LOG_PRINTTIME) != 0);
|
||||
printtag = ((channel->flags &
|
||||
(ISC_LOG_PRINTTAG|ISC_LOG_PRINTPREFIX))
|
||||
&& lcfg->tag != NULL);
|
||||
printcolon = ((channel->flags & ISC_LOG_PRINTTAG)
|
||||
&& lcfg->tag != NULL);
|
||||
printcategory = (channel->flags & ISC_LOG_PRINTCATEGORY);
|
||||
printmodule = (channel->flags & ISC_LOG_PRINTMODULE);
|
||||
printlevel = (channel->flags & ISC_LOG_PRINTLEVEL);
|
||||
buffered = (channel->flags & ISC_LOG_BUFFERED);
|
||||
(ISC_LOG_PRINTTAG|ISC_LOG_PRINTPREFIX)) != 0 &&
|
||||
lcfg->tag != NULL);
|
||||
printcolon = ((channel->flags & ISC_LOG_PRINTTAG) != 0 &&
|
||||
lcfg->tag != NULL);
|
||||
printcategory = ((channel->flags & ISC_LOG_PRINTCATEGORY) != 0);
|
||||
printmodule = ((channel->flags & ISC_LOG_PRINTMODULE) != 0);
|
||||
printlevel = ((channel->flags & ISC_LOG_PRINTLEVEL) != 0);
|
||||
buffered = ((channel->flags & ISC_LOG_BUFFERED) != 0);
|
||||
|
||||
switch (channel->type) {
|
||||
case ISC_LOG_TOFILE:
|
||||
|
|
|
|||
|
|
@ -382,14 +382,5 @@ isc_md5_check(bool testing) {
|
|||
}
|
||||
|
||||
#else /* !PK11_MD5_DISABLE */
|
||||
#ifdef WIN32
|
||||
/* Make the Visual Studio linker happy */
|
||||
#include <isc/util.h>
|
||||
|
||||
void isc_md5_final() { INSIST(0); }
|
||||
void isc_md5_init() { INSIST(0); }
|
||||
void isc_md5_invalidate() { INSIST(0); }
|
||||
void isc_md5_update() { INSIST(0); }
|
||||
void isc_md5_check() { INSIST(0); }
|
||||
#endif
|
||||
EMPTY_TRANSLATION_UNIT
|
||||
#endif /* PK11_MD5_DISABLE */
|
||||
|
|
|
|||
|
|
@ -489,6 +489,7 @@ delete_trace_entry(isc__mem_t *mctx, const void *ptr, size_t size,
|
|||
* screwed.
|
||||
*/
|
||||
INSIST(dl != NULL);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
#endif /* ISC_MEM_TRACKLINES */
|
||||
|
||||
|
|
@ -2316,6 +2317,7 @@ isc_mem_checkdestroyed(FILE *file) {
|
|||
}
|
||||
#endif
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
UNLOCK(&contextslock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) {
|
|||
#endif
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -995,6 +995,7 @@ pk11_numbits(CK_BYTE_PTR data, unsigned int bytecnt) {
|
|||
break;
|
||||
}
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
CK_ATTRIBUTE *
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#include <isc/util.h>
|
||||
#include <isc/radix.h>
|
||||
|
||||
#define BIT_TEST(f, b) (((f) & (b)) != 0)
|
||||
|
||||
static isc_result_t
|
||||
_new_prefix(isc_mem_t *mctx, isc_prefix_t **target, int family,
|
||||
void *dest, int bitlen);
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int pf) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -384,6 +385,7 @@ isc_sockaddr_fromnetaddr(isc_sockaddr_t *sockaddr, const isc_netaddr_t *na,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
ISC_LINK_INIT(sockaddr, link);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1767,7 +1767,7 @@ isc__task_setprivilege(isc_task_t *task0, bool priv) {
|
|||
bool oldpriv;
|
||||
|
||||
LOCK(&task->lock);
|
||||
oldpriv = (task->flags & TASK_F_PRIVILEGED);
|
||||
oldpriv = ((task->flags & TASK_F_PRIVILEGED) != 0);
|
||||
if (priv)
|
||||
task->flags |= TASK_F_PRIVILEGED;
|
||||
else
|
||||
|
|
@ -1793,7 +1793,7 @@ isc__task_privilege(isc_task_t *task0) {
|
|||
bool priv;
|
||||
|
||||
LOCK(&task->lock);
|
||||
priv = (task->flags & TASK_F_PRIVILEGED);
|
||||
priv = ((task->flags & TASK_F_PRIVILEGED) != 0);
|
||||
UNLOCK(&task->lock);
|
||||
return (priv);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ event_done(isc_task_t *task, isc_event_t *event) {
|
|||
} else {
|
||||
recv_dscp = false;
|
||||
}
|
||||
recv_trunc = (dev->attributes & ISC_SOCKEVENTATTR_TRUNC);
|
||||
recv_trunc = ((dev->attributes & ISC_SOCKEVENTATTR_TRUNC) != 0);
|
||||
isc_event_free(&event);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1013,7 +1013,7 @@ pg_event2(isc_task_t *task, isc_event_t *event) {
|
|||
}
|
||||
|
||||
if (sender_match && type_match && tag_match) {
|
||||
if (event->ev_attributes & ISC_EVENTATTR_NOPURGE) {
|
||||
if ((event->ev_attributes & ISC_EVENTATTR_NOPURGE) != 0) {
|
||||
printf("event %p,%d,%p matched but was not purgeable\n",
|
||||
event->ev_sender, (int)event->ev_type,
|
||||
event->ev_tag);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
#define ALT_E 0x01
|
||||
#define ALT_O 0x02
|
||||
#define LEGAL_ALT(x) { if (alt_format & ~(x)) return (0); }
|
||||
#define LEGAL_ALT(x) { if ((alt_format & ~(x)) != 0) return (0); }
|
||||
|
||||
#ifndef TM_YEAR_BASE
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -564,6 +564,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
|
|||
#endif
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (sendmsg(s, &msg, 0) < 0) {
|
||||
|
|
|
|||
|
|
@ -194,34 +194,38 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
|
|||
|
||||
isc_result_t
|
||||
isc_resource_getlimit(isc_resource_t resource, isc_resourcevalue_t *value) {
|
||||
int unixresult;
|
||||
int unixresource;
|
||||
struct rlimit rl;
|
||||
isc_result_t result;
|
||||
|
||||
result = resource2rlim(resource, &unixresource);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
unixresult = getrlimit(unixresource, &rl);
|
||||
INSIST(unixresult == 0);
|
||||
*value = rl.rlim_max;
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
return (result);
|
||||
if (getrlimit(unixresource, &rl) != 0) {
|
||||
return (isc__errno2result(errno));
|
||||
}
|
||||
|
||||
*value = rl.rlim_max;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_resource_getcurlimit(isc_resource_t resource, isc_resourcevalue_t *value) {
|
||||
int unixresult;
|
||||
int unixresource;
|
||||
struct rlimit rl;
|
||||
isc_result_t result;
|
||||
|
||||
result = resource2rlim(resource, &unixresource);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
unixresult = getrlimit(unixresource, &rl);
|
||||
INSIST(unixresult == 0);
|
||||
*value = rl.rlim_cur;
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
return (result);
|
||||
if (getrlimit(unixresource, &rl) != 0) {
|
||||
return (isc__errno2result(errno));
|
||||
}
|
||||
|
||||
*value = rl.rlim_cur;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1366,13 +1366,15 @@ process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
|
|||
#ifdef ISC_NET_BSD44MSGHDR
|
||||
|
||||
#ifdef MSG_TRUNC
|
||||
if ((msg->msg_flags & MSG_TRUNC) == MSG_TRUNC)
|
||||
if ((msg->msg_flags & MSG_TRUNC) != 0) {
|
||||
dev->attributes |= ISC_SOCKEVENTATTR_TRUNC;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MSG_CTRUNC
|
||||
if ((msg->msg_flags & MSG_CTRUNC) == MSG_CTRUNC)
|
||||
if ((msg->msg_flags & MSG_CTRUNC) != 0) {
|
||||
dev->attributes |= ISC_SOCKEVENTATTR_CTRUNC;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef USE_CMSG
|
||||
|
|
@ -1994,6 +1996,7 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
|
|||
case isc_sockettype_fdwatch:
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (sock->type == isc_sockettype_udp) {
|
||||
|
|
@ -2623,7 +2626,7 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
|
|||
* sockets.
|
||||
*/
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
sock->fd = dup(dup_socket->fd);
|
||||
|
|
@ -2965,6 +2968,7 @@ socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
sock->pf = pf;
|
||||
|
|
@ -3146,10 +3150,12 @@ isc__socket_fdwatchcreate(isc_socketmgr_t *manager0, int fd, int flags,
|
|||
#endif
|
||||
UNLOCK(&manager->lock);
|
||||
|
||||
if (flags & ISC_SOCKFDWATCH_READ)
|
||||
if ((flags & ISC_SOCKFDWATCH_READ) != 0) {
|
||||
select_poke(sock->manager, sock->fd, SELECT_POKE_READ);
|
||||
if (flags & ISC_SOCKFDWATCH_WRITE)
|
||||
}
|
||||
if ((flags & ISC_SOCKFDWATCH_WRITE) != 0) {
|
||||
select_poke(sock->manager, sock->fd, SELECT_POKE_WRITE);
|
||||
}
|
||||
|
||||
socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
|
||||
ISC_MSG_CREATED, "fdwatch-created");
|
||||
|
|
@ -3427,11 +3433,11 @@ send_recvdone_event(isc__socket_t *sock, isc_socketevent_t **dev) {
|
|||
if (ISC_LINK_LINKED(*dev, ev_link))
|
||||
ISC_LIST_DEQUEUE(sock->recv_list, *dev, ev_link);
|
||||
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
|
||||
== ISC_SOCKEVENTATTR_ATTACHED)
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED) != 0) {
|
||||
isc_task_sendanddetach(&task, (isc_event_t **)dev);
|
||||
else
|
||||
} else {
|
||||
isc_task_send(task, (isc_event_t **)dev);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3451,11 +3457,11 @@ send_senddone_event(isc__socket_t *sock, isc_socketevent_t **dev) {
|
|||
if (ISC_LINK_LINKED(*dev, ev_link))
|
||||
ISC_LIST_DEQUEUE(sock->send_list, *dev, ev_link);
|
||||
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
|
||||
== ISC_SOCKEVENTATTR_ATTACHED)
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED) != 0) {
|
||||
isc_task_sendanddetach(&task, (isc_event_t **)dev);
|
||||
else
|
||||
} else {
|
||||
isc_task_send(task, (isc_event_t **)dev);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -6175,7 +6181,7 @@ isc__socket_cancel(isc_socket_t *sock0, isc_task_t *task, unsigned int how) {
|
|||
* its done event with status of "ISC_R_CANCELED".
|
||||
* o Reset any state needed.
|
||||
*/
|
||||
if (((how & ISC_SOCKCANCEL_RECV) == ISC_SOCKCANCEL_RECV)
|
||||
if (((how & ISC_SOCKCANCEL_RECV) != 0)
|
||||
&& !ISC_LIST_EMPTY(sock->recv_list)) {
|
||||
isc_socketevent_t *dev;
|
||||
isc_socketevent_t *next;
|
||||
|
|
@ -6195,7 +6201,7 @@ isc__socket_cancel(isc_socket_t *sock0, isc_task_t *task, unsigned int how) {
|
|||
}
|
||||
}
|
||||
|
||||
if (((how & ISC_SOCKCANCEL_SEND) == ISC_SOCKCANCEL_SEND)
|
||||
if (((how & ISC_SOCKCANCEL_SEND) != 0)
|
||||
&& !ISC_LIST_EMPTY(sock->send_list)) {
|
||||
isc_socketevent_t *dev;
|
||||
isc_socketevent_t *next;
|
||||
|
|
@ -6215,7 +6221,7 @@ isc__socket_cancel(isc_socket_t *sock0, isc_task_t *task, unsigned int how) {
|
|||
}
|
||||
}
|
||||
|
||||
if (((how & ISC_SOCKCANCEL_ACCEPT) == ISC_SOCKCANCEL_ACCEPT)
|
||||
if (((how & ISC_SOCKCANCEL_ACCEPT) != 0)
|
||||
&& !ISC_LIST_EMPTY(sock->accept_list)) {
|
||||
isc_socket_newconnev_t *dev;
|
||||
isc_socket_newconnev_t *next;
|
||||
|
|
@ -6244,7 +6250,7 @@ isc__socket_cancel(isc_socket_t *sock0, isc_task_t *task, unsigned int how) {
|
|||
}
|
||||
}
|
||||
|
||||
if (((how & ISC_SOCKCANCEL_CONNECT) == ISC_SOCKCANCEL_CONNECT)
|
||||
if (((how & ISC_SOCKCANCEL_CONNECT) != 0)
|
||||
&& !ISC_LIST_EMPTY(sock->connect_list)) {
|
||||
isc_socket_connev_t *dev;
|
||||
isc_socket_connev_t *next;
|
||||
|
|
|
|||
|
|
@ -189,23 +189,30 @@ NTFS_Access_Control(const char *filename, const char *user, int access,
|
|||
/* Owner check */
|
||||
|
||||
NTFSbits = 0;
|
||||
if (caccess & ISC_FSACCESS_READ)
|
||||
if ((caccess & ISC_FSACCESS_READ) != 0) {
|
||||
NTFSbits |= FILE_GENERIC_READ;
|
||||
if (caccess & ISC_FSACCESS_WRITE)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_WRITE) != 0) {
|
||||
NTFSbits |= FILE_GENERIC_WRITE;
|
||||
if (caccess & ISC_FSACCESS_EXECUTE)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_EXECUTE) != 0) {
|
||||
NTFSbits |= FILE_GENERIC_EXECUTE;
|
||||
}
|
||||
|
||||
/* For directories check the directory-specific bits */
|
||||
if (isdir == true) {
|
||||
if (caccess & ISC_FSACCESS_CREATECHILD)
|
||||
if ((caccess & ISC_FSACCESS_CREATECHILD) != 0) {
|
||||
NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE;
|
||||
if (caccess & ISC_FSACCESS_DELETECHILD)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_DELETECHILD) != 0) {
|
||||
NTFSbits |= FILE_DELETE_CHILD;
|
||||
if (caccess & ISC_FSACCESS_LISTDIRECTORY)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_LISTDIRECTORY) != 0) {
|
||||
NTFSbits |= FILE_LIST_DIRECTORY;
|
||||
if (caccess & ISC_FSACCESS_ACCESSCHILD)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_ACCESSCHILD) != 0) {
|
||||
NTFSbits |= FILE_TRAVERSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (NTFSbits == (FILE_GENERIC_READ | FILE_GENERIC_WRITE
|
||||
|
|
@ -238,23 +245,30 @@ NTFS_Access_Control(const char *filename, const char *user, int access,
|
|||
caccess = caccess >> STEP;
|
||||
|
||||
NTFSbits = 0;
|
||||
if (caccess & ISC_FSACCESS_READ)
|
||||
if ((caccess & ISC_FSACCESS_READ) != 0) {
|
||||
NTFSbits |= FILE_GENERIC_READ;
|
||||
if (caccess & ISC_FSACCESS_WRITE)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_WRITE) != 0) {
|
||||
NTFSbits |= FILE_GENERIC_WRITE;
|
||||
if (caccess & ISC_FSACCESS_EXECUTE)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_EXECUTE) != 0) {
|
||||
NTFSbits |= FILE_GENERIC_EXECUTE;
|
||||
}
|
||||
|
||||
/* For directories check the directory-specific bits */
|
||||
if (isdir == TRUE) {
|
||||
if (caccess & ISC_FSACCESS_CREATECHILD)
|
||||
if ((caccess & ISC_FSACCESS_CREATECHILD) != 0) {
|
||||
NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE;
|
||||
if (caccess & ISC_FSACCESS_DELETECHILD)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_DELETECHILD) != 0) {
|
||||
NTFSbits |= FILE_DELETE_CHILD;
|
||||
if (caccess & ISC_FSACCESS_LISTDIRECTORY)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_LISTDIRECTORY) != 0) {
|
||||
NTFSbits |= FILE_LIST_DIRECTORY;
|
||||
if (caccess & ISC_FSACCESS_ACCESSCHILD)
|
||||
}
|
||||
if ((caccess & ISC_FSACCESS_ACCESSCHILD) != 0) {
|
||||
NTFSbits |= FILE_TRAVERSE;
|
||||
}
|
||||
}
|
||||
/* Add the ACE to the ACL */
|
||||
if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1950,11 +1950,11 @@ send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
|
|||
if (ISC_LINK_LINKED(*dev, ev_link))
|
||||
ISC_LIST_DEQUEUE(sock->recv_list, *dev, ev_link);
|
||||
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
|
||||
== ISC_SOCKEVENTATTR_ATTACHED)
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED) != 0) {
|
||||
isc_task_sendanddetach(&task, (isc_event_t **)dev);
|
||||
else
|
||||
} else {
|
||||
isc_task_send(task, (isc_event_t **)dev);
|
||||
}
|
||||
|
||||
CONSISTENT(sock);
|
||||
}
|
||||
|
|
@ -1974,11 +1974,11 @@ send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
|
|||
if (ISC_LINK_LINKED(*dev, ev_link))
|
||||
ISC_LIST_DEQUEUE(sock->send_list, *dev, ev_link);
|
||||
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
|
||||
== ISC_SOCKEVENTATTR_ATTACHED)
|
||||
if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED) != 0) {
|
||||
isc_task_sendanddetach(&task, (isc_event_t **)dev);
|
||||
else
|
||||
} else {
|
||||
isc_task_send(task, (isc_event_t **)dev);
|
||||
}
|
||||
|
||||
CONSISTENT(sock);
|
||||
}
|
||||
|
|
@ -3738,7 +3738,7 @@ isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
|
|||
* o Reset any state needed.
|
||||
*/
|
||||
|
||||
if ((how & ISC_SOCKCANCEL_RECV) == ISC_SOCKCANCEL_RECV) {
|
||||
if ((how & ISC_SOCKCANCEL_RECV) != 0) {
|
||||
isc_socketevent_t *dev;
|
||||
isc_socketevent_t *next;
|
||||
isc_task_t *current_task;
|
||||
|
|
@ -3756,7 +3756,7 @@ isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
|
|||
}
|
||||
how &= ~ISC_SOCKCANCEL_RECV;
|
||||
|
||||
if ((how & ISC_SOCKCANCEL_SEND) == ISC_SOCKCANCEL_SEND) {
|
||||
if ((how & ISC_SOCKCANCEL_SEND) != 0) {
|
||||
isc_socketevent_t *dev;
|
||||
isc_socketevent_t *next;
|
||||
isc_task_t *current_task;
|
||||
|
|
@ -3775,7 +3775,7 @@ isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
|
|||
}
|
||||
how &= ~ISC_SOCKCANCEL_SEND;
|
||||
|
||||
if (((how & ISC_SOCKCANCEL_ACCEPT) == ISC_SOCKCANCEL_ACCEPT)
|
||||
if (((how & ISC_SOCKCANCEL_ACCEPT) != 0)
|
||||
&& !ISC_LIST_EMPTY(sock->accept_list)) {
|
||||
isc_socket_newconnev_t *dev;
|
||||
isc_socket_newconnev_t *next;
|
||||
|
|
@ -3802,7 +3802,7 @@ isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
|
|||
}
|
||||
how &= ~ISC_SOCKCANCEL_ACCEPT;
|
||||
|
||||
if (((how & ISC_SOCKCANCEL_CONNECT) == ISC_SOCKCANCEL_CONNECT)
|
||||
if (((how & ISC_SOCKCANCEL_CONNECT) != 0)
|
||||
&& !ISC_LIST_EMPTY(sock->connect_list)) {
|
||||
isc_socket_connev_t *dev;
|
||||
isc_socket_connev_t *next;
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ isccc_sexpr_print(isccc_sexpr_t *sexpr, FILE *stream) {
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -401,6 +401,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx,
|
|||
return (subtype);
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -595,8 +596,10 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
|
|||
} else if (strcasecmp(stype, "netspeed") == 0) {
|
||||
subtype = dns_geoip_netspeed_id;
|
||||
de.geoip_elem.as_int = atoi(search);
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
de.geoip_elem.subtype = get_subtype(obj, lctx, subtype, dbname);
|
||||
|
||||
|
|
|
|||
|
|
@ -3082,12 +3082,14 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type,
|
|||
unsigned int have_dscp = 0;
|
||||
const unsigned int *flagp = type->of;
|
||||
|
||||
if ((*flagp & CFG_ADDR_V4OK) != 0)
|
||||
if ((*flagp & CFG_ADDR_V4OK) != 0) {
|
||||
isc_netaddr_any(&netaddr);
|
||||
else if ((*flagp & CFG_ADDR_V6OK) != 0)
|
||||
} else if ((*flagp & CFG_ADDR_V6OK) != 0) {
|
||||
isc_netaddr_any6(&netaddr);
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
CHECK(cfg_peektoken(pctx, 0));
|
||||
|
|
@ -3169,20 +3171,24 @@ doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) {
|
|||
const unsigned int *flagp = type->of;
|
||||
|
||||
cfg_print_cstr(pctx, "( ( [ address ] ( ");
|
||||
if (*flagp & CFG_ADDR_V4OK)
|
||||
if ((*flagp & CFG_ADDR_V4OK) != 0) {
|
||||
cfg_print_cstr(pctx, "<ipv4_address>");
|
||||
else if (*flagp & CFG_ADDR_V6OK)
|
||||
} else if ((*flagp & CFG_ADDR_V6OK) != 0) {
|
||||
cfg_print_cstr(pctx, "<ipv6_address>");
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
cfg_print_cstr(pctx, " | * ) [ port ( <integer> | * ) ] ) | "
|
||||
"( [ [ address ] ( ");
|
||||
if (*flagp & CFG_ADDR_V4OK)
|
||||
if ((*flagp & CFG_ADDR_V4OK) != 0) {
|
||||
cfg_print_cstr(pctx, "<ipv4_address>");
|
||||
else if (*flagp & CFG_ADDR_V6OK)
|
||||
} else if ((*flagp & CFG_ADDR_V6OK) != 0) {
|
||||
cfg_print_cstr(pctx, "<ipv6_address>");
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
cfg_print_cstr(pctx, " | * ) ] port ( <integer> | * ) ) )"
|
||||
" [ dscp <integer> ]");
|
||||
}
|
||||
|
|
@ -3992,6 +3998,7 @@ cfg_print_zonegrammar(const unsigned int zonetype,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
for (clause = clauses; clause->name != NULL; clause++) {
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ cfg_tuple_get(const cfg_obj_t *tupleobj, const char* name) {
|
|||
return (tupleobj->value.tuple[i]);
|
||||
}
|
||||
INSIST(0);
|
||||
return (NULL);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1804,7 +1804,8 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
|
|||
/* Single-valued clause */
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
bool callback =
|
||||
(clause->flags & CFG_CLAUSEFLAG_CALLBACK);
|
||||
((clause->flags &
|
||||
CFG_CLAUSEFLAG_CALLBACK) != 0);
|
||||
CHECK(parse_symtab_elt(pctx, clause->name,
|
||||
clause->type,
|
||||
obj->value.map.symtab,
|
||||
|
|
@ -1989,6 +1990,7 @@ cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) {
|
|||
; /* do nothing */
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2304,6 +2306,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
|
|||
return (ISC_R_SUCCESS);
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
if ((flags & (CFG_ADDR_V4OK | CFG_ADDR_V4PREFIXOK)) != 0) {
|
||||
|
|
@ -2505,27 +2508,29 @@ static void
|
|||
cfg_doc_netaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
|
||||
const unsigned int *flagp = type->of;
|
||||
int n = 0;
|
||||
if (*flagp != CFG_ADDR_V4OK && *flagp != CFG_ADDR_V6OK)
|
||||
if (*flagp != CFG_ADDR_V4OK && *flagp != CFG_ADDR_V6OK) {
|
||||
cfg_print_cstr(pctx, "( ");
|
||||
if (*flagp & CFG_ADDR_V4OK) {
|
||||
}
|
||||
if ((*flagp & CFG_ADDR_V4OK) != 0) {
|
||||
cfg_print_cstr(pctx, "<ipv4_address>");
|
||||
n++;
|
||||
}
|
||||
if (*flagp & CFG_ADDR_V6OK) {
|
||||
if ((*flagp & CFG_ADDR_V6OK) != 0) {
|
||||
if (n != 0)
|
||||
cfg_print_cstr(pctx, " | ");
|
||||
cfg_print_cstr(pctx, "<ipv6_address>");
|
||||
n++;
|
||||
}
|
||||
if (*flagp & CFG_ADDR_WILDOK) {
|
||||
if ((*flagp & CFG_ADDR_WILDOK) != 0) {
|
||||
if (n != 0)
|
||||
cfg_print_cstr(pctx, " | ");
|
||||
cfg_print_cstr(pctx, "*");
|
||||
n++;
|
||||
POST(n);
|
||||
}
|
||||
if (*flagp != CFG_ADDR_V4OK && *flagp != CFG_ADDR_V6OK)
|
||||
if (*flagp != CFG_ADDR_V4OK && *flagp != CFG_ADDR_V6OK) {
|
||||
cfg_print_cstr(pctx, " )");
|
||||
}
|
||||
}
|
||||
|
||||
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_netaddr = {
|
||||
|
|
@ -2580,7 +2585,7 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type,
|
|||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
CHECK(cfg_peektoken(pctx, 0));
|
||||
if (pctx->token.type == isc_tokentype_special &&
|
||||
|
|
@ -2753,17 +2758,17 @@ cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
|
|||
REQUIRE(type != NULL);
|
||||
|
||||
cfg_print_cstr(pctx, "( ");
|
||||
if (*flagp & CFG_ADDR_V4OK) {
|
||||
if ((*flagp & CFG_ADDR_V4OK) != 0) {
|
||||
cfg_print_cstr(pctx, "<ipv4_address>");
|
||||
n++;
|
||||
}
|
||||
if (*flagp & CFG_ADDR_V6OK) {
|
||||
if ((*flagp & CFG_ADDR_V6OK) != 0) {
|
||||
if (n != 0)
|
||||
cfg_print_cstr(pctx, " | ");
|
||||
cfg_print_cstr(pctx, "<ipv6_address>");
|
||||
n++;
|
||||
}
|
||||
if (*flagp & CFG_ADDR_WILDOK) {
|
||||
if ((*flagp & CFG_ADDR_WILDOK) != 0) {
|
||||
if (n != 0)
|
||||
cfg_print_cstr(pctx, " | ");
|
||||
cfg_print_cstr(pctx, "*");
|
||||
|
|
@ -2771,7 +2776,7 @@ cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
|
|||
POST(n);
|
||||
}
|
||||
cfg_print_cstr(pctx, " ) ");
|
||||
if (*flagp & CFG_ADDR_WILDOK) {
|
||||
if ((*flagp & CFG_ADDR_WILDOK) != 0) {
|
||||
cfg_print_cstr(pctx, "[ port ( <integer> | * ) ]");
|
||||
} else {
|
||||
cfg_print_cstr(pctx, "[ port <integer> ]");
|
||||
|
|
@ -3012,12 +3017,13 @@ parser_complain(cfg_parser_t *pctx, bool is_warning,
|
|||
}
|
||||
|
||||
/* Choose a preposition. */
|
||||
if (flags & CFG_LOG_NEAR)
|
||||
if ((flags & CFG_LOG_NEAR) != 0) {
|
||||
prep = " near ";
|
||||
else if (flags & CFG_LOG_BEFORE)
|
||||
} else if ((flags & CFG_LOG_BEFORE) != 0) {
|
||||
prep = " before ";
|
||||
else
|
||||
} else {
|
||||
prep = " ";
|
||||
}
|
||||
} else {
|
||||
tokenbuf[0] = '\0';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue