From 42496f3f4a8802c0ba8033a1bcabc8bebf5b0087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 19 Aug 2025 07:14:45 +0200 Subject: [PATCH] Use ControlStatementsExceptControlMacros for SpaceBeforeParens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > Put a space before opening parentheses only after control statement > keywords (for/if/while...) except this option doesn’t apply to ForEach > and If macros. This is useful in projects where ForEach/If macros are > treated as function calls instead of control statements. --- .clang-format | 1 + .clang-format.headers | 1 + bin/check/check-tool.c | 6 +- bin/check/named-checkconf.c | 6 +- bin/delv/delv.c | 18 +- bin/dig/dig.c | 8 +- bin/dig/dighost.c | 38 +-- bin/dig/host.c | 6 +- bin/dig/nslookup.c | 16 +- bin/dnssec/dnssec-cds.c | 14 +- bin/dnssec/dnssec-dsfromkey.c | 2 +- bin/dnssec/dnssec-importkey.c | 2 +- bin/dnssec/dnssec-keygen.c | 2 +- bin/dnssec/dnssec-ksr.c | 26 +- bin/dnssec/dnssec-signzone.c | 62 ++--- bin/dnssec/dnssectool.c | 8 +- bin/named/builtin.c | 8 +- bin/named/config.c | 6 +- bin/named/controlconf.c | 20 +- bin/named/logconf.c | 6 +- bin/named/server.c | 172 +++++++------- bin/named/statschannel.c | 22 +- bin/named/transportconf.c | 6 +- bin/named/tsigconf.c | 2 +- bin/named/zoneconf.c | 14 +- bin/nsupdate/nsupdate.c | 8 +- bin/plugins/filter-a.c | 2 +- bin/plugins/filter-aaaa.c | 2 +- bin/rndc/rndc.c | 6 +- bin/tests/system/dyndb/driver/syncptr.c | 2 +- bin/tools/mdig.c | 8 +- lib/dns/acl.c | 6 +- lib/dns/adb.c | 18 +- lib/dns/cache.c | 2 +- lib/dns/catz.c | 4 +- lib/dns/client.c | 10 +- lib/dns/db.c | 2 +- lib/dns/diff.c | 8 +- lib/dns/dispatch.c | 8 +- lib/dns/dlz.c | 4 +- lib/dns/dns64.c | 12 +- lib/dns/dnssec.c | 40 ++-- lib/dns/dyndb.c | 2 +- lib/dns/forward.c | 6 +- lib/dns/journal.c | 8 +- lib/dns/kasp.c | 8 +- lib/dns/keymgr.c | 50 ++-- lib/dns/keystore.c | 2 +- lib/dns/keytable.c | 10 +- lib/dns/master.c | 30 +-- lib/dns/masterdump.c | 10 +- lib/dns/message.c | 32 +-- lib/dns/ncache.c | 12 +- lib/dns/nsec.c | 8 +- lib/dns/nsec3.c | 28 +-- lib/dns/order.c | 4 +- lib/dns/peer.c | 6 +- lib/dns/private.c | 10 +- lib/dns/qp.c | 2 +- lib/dns/qpzone.c | 6 +- lib/dns/rdatalist.c | 18 +- lib/dns/rdataset.c | 2 +- lib/dns/request.c | 2 +- lib/dns/resconf.c | 4 +- lib/dns/resolver.c | 146 ++++++------ lib/dns/rootns.c | 24 +- lib/dns/rrl.c | 10 +- lib/dns/skr.c | 6 +- lib/dns/ssu.c | 4 +- lib/dns/tkey.c | 8 +- lib/dns/update.c | 42 ++-- lib/dns/validator.c | 14 +- lib/dns/view.c | 12 +- lib/dns/xfrin.c | 8 +- lib/dns/zone.c | 302 ++++++++++++------------ lib/dns/zoneverify.c | 24 +- lib/isc/httpd.c | 6 +- lib/isc/job.c | 2 +- lib/isc/log.c | 10 +- lib/isc/mem.c | 14 +- lib/isc/netmgr/http.c | 14 +- lib/isc/netmgr/netmgr.c | 6 +- lib/isc/ratelimiter.c | 4 +- lib/isc/tls.c | 2 +- lib/isccfg/aclconf.c | 10 +- lib/isccfg/check.c | 118 ++++----- lib/isccfg/kaspconf.c | 10 +- lib/isccfg/parser.c | 10 +- lib/ns/client.c | 8 +- lib/ns/hooks.c | 4 +- lib/ns/interfacemgr.c | 16 +- lib/ns/listenlist.c | 2 +- lib/ns/query.c | 36 +-- lib/ns/server.c | 4 +- lib/ns/update.c | 38 +-- lib/ns/xfrout.c | 4 +- tests/dns/dbdiff_test.c | 4 +- tests/dns/dbiterator_test.c | 2 +- tests/dns/diff_test.c | 2 +- tests/dns/sigs_test.c | 4 +- tests/dns/skr_test.c | 10 +- tests/isccfg/duration_test.c | 2 +- tests/libtest/qp.c | 2 +- 103 files changed, 910 insertions(+), 908 deletions(-) diff --git a/.clang-format b/.clang-format index cee38b60b7..b26764d5d0 100644 --- a/.clang-format +++ b/.clang-format @@ -82,3 +82,4 @@ ContinuationIndentWidth: 8 ForEachMacros: [ 'cds_lfs_for_each', 'cds_lfs_for_each_safe', 'cds_list_for_each_entry_safe', 'ISC_LIST_FOREACH', 'ISC_LIST_FOREACH_SAFE', 'ISC_LIST_FOREACH_REV', 'ISC_LIST_FOREACH_REV_SAFE', 'MSG_SECTION_FOREACH', 'DNS_DBITERATOR_FOREACH', 'DNS_RDATASET_FOREACH', 'DNS_RDATASETITER_FOREACH', 'CFG_LIST_FOREACH' ] RemoveParentheses: ReturnStatement RemoveSemicolon: true +SpaceBeforeParens: ControlStatementsExceptControlMacros diff --git a/.clang-format.headers b/.clang-format.headers index daeb0c2be5..106ad961d2 100644 --- a/.clang-format.headers +++ b/.clang-format.headers @@ -81,3 +81,4 @@ Standard: Cpp11 ContinuationIndentWidth: 8 RemoveParentheses: ReturnStatement RemoveSemicolon: true +SpaceBeforeParens: ControlStatementsExceptControlMacros diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index dd833f6c4d..b7ca8a8936 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -310,7 +310,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner, goto checkaaaa; } - DNS_RDATASET_FOREACH (a) { + DNS_RDATASET_FOREACH(a) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(a, &rdata); match = false; @@ -341,7 +341,7 @@ checkaaaa: if (!dns_rdataset_isassociated(aaaa)) { goto checkmissing; } - DNS_RDATASET_FOREACH (aaaa) { + DNS_RDATASET_FOREACH(aaaa) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(aaaa, &rdata); match = false; @@ -394,7 +394,7 @@ checkmissing: } match = false; if (dns_rdataset_isassociated(rdataset)) { - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); if (memcmp(ptr, rdata.data, diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index 5485837fc9..f9c8013719 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -123,7 +123,7 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) { *obj = checknames; return true; } - CFG_LIST_FOREACH (checknames, element) { + CFG_LIST_FOREACH(checknames, element) { value = cfg_listelt_value(element); type = cfg_tuple_get(value, "type"); if ((strcasecmp(cfg_obj_asstring(type), "primary") != @@ -482,7 +482,7 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config, (void)cfg_map_get(config, "zone", &zonelist); } - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); tresult = configure_zone(vclass, view, zconfig, vconfig, config, list); @@ -518,7 +518,7 @@ load_zones_fromconfig(const cfg_obj_t *config, bool list_zones) { views = NULL; (void)cfg_map_get(config, "view", &views); - CFG_LIST_FOREACH (views, element) { + CFG_LIST_FOREACH(views, element) { const cfg_obj_t *classobj; dns_rdataclass_t viewclass; const char *vname; diff --git a/bin/delv/delv.c b/bin/delv/delv.c index 53b9f25886..6654697977 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -468,7 +468,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner) { isc_buffer_init(&target, t, len); if (short_form) { - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; if (rdataset->attributes.negative) { @@ -790,9 +790,9 @@ load_keys(const cfg_obj_t *keys, dns_client_t *client, dns_view_t *toview) { const cfg_obj_t *key = NULL, *keylist = NULL; isc_result_t result = ISC_R_SUCCESS; - CFG_LIST_FOREACH (keys, elt) { + CFG_LIST_FOREACH(keys, elt) { keylist = cfg_listelt_value(elt); - CFG_LIST_FOREACH (keylist, elt2) { + CFG_LIST_FOREACH(keylist, elt2) { key = cfg_listelt_value(elt2); CHECK(key_fromconfig(key, client, toview)); } @@ -940,7 +940,7 @@ addserver(dns_client_t *client) { CHECK(dns_client_setservers(client, dns_rdataclass_in, name, &servers)); cleanup: - ISC_LIST_FOREACH (servers, s, link) { + ISC_LIST_FOREACH(servers, s, link) { ISC_LIST_UNLINK(servers, s, link); isc_mem_put(isc_g_mctx, s, sizeof(*s)); } @@ -968,7 +968,7 @@ findserver(dns_client_t *client) { /* Get nameservers from resolv.conf */ nameservers = irs_resconf_getnameservers(resconf); - ISC_LIST_FOREACH (*nameservers, sa, link) { + ISC_LIST_FOREACH(*nameservers, sa, link) { /* Set destination port */ if (sa->type.sa.sa_family == AF_INET && use_ipv4) { sa->type.sin.sin_port = htons(destport); @@ -1837,8 +1837,8 @@ resolve_cb(dns_client_t *client, const dns_name_t *query_name, printf("records:\n"); } - ISC_LIST_FOREACH (*namelist, response_name, link) { - ISC_LIST_FOREACH (response_name->list, rdataset, link) { + ISC_LIST_FOREACH(*namelist, response_name, link) { + ISC_LIST_FOREACH(response_name->list, rdataset, link) { printdata(rdataset, response_name); } } @@ -1966,10 +1966,10 @@ recvresponse(void *arg) { goto cleanup; } - MSG_SECTION_FOREACH (response, DNS_SECTION_ANSWER, name) { + MSG_SECTION_FOREACH(response, DNS_SECTION_ANSWER, name) { dns_rdatatype_t prevtype = dns_rdatatype_none; - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { dns_rdataset_t rds, sigs; int options = 0; diff --git a/bin/dig/dig.c b/bin/dig/dig.c index d4dec3f116..a1297a5396 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -605,9 +605,9 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags, isc_buffer_t *buf, UNUSED(flags); dns_name_init(&empty_name); - MSG_SECTION_FOREACH (msg, DNS_SECTION_ANSWER, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { - DNS_RDATASET_FOREACH (rdataset) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_ANSWER, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -629,7 +629,7 @@ isdotlocal(dns_message_t *msg) { static unsigned char local_ndata[] = { "\005local" }; static dns_name_t local = DNS_NAME_INITABSOLUTE(local_ndata); - MSG_SECTION_FOREACH (msg, DNS_SECTION_QUESTION, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_QUESTION, name) { if (dns_name_issubdomain(name, &local)) { return true; } diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 744f2f070e..c7d8016362 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -463,7 +463,7 @@ get_server_list(irs_resconf_t *resconf) { debug("get_server_list()"); isc_sockaddrlist_t *servers = irs_resconf_getnameservers(resconf); - ISC_LIST_FOREACH (*servers, sa, link) { + ISC_LIST_FOREACH(*servers, sa, link) { int pf = isc_sockaddr_pf(sa); char tmp[ISC_NETADDR_FORMATSIZE]; isc_result_t result; @@ -499,7 +499,7 @@ get_server_list(irs_resconf_t *resconf) { void flush_server_list(void) { debug("flush_server_list()"); - ISC_LIST_FOREACH (server_list, s, link) { + ISC_LIST_FOREACH(server_list, s, link) { ISC_LIST_DEQUEUE(server_list, s, link); isc_mem_free(isc_g_mctx, s); } @@ -546,7 +546,7 @@ set_nameserver(char *opt) { void clone_server_list(dig_serverlist_t src, dig_serverlist_t *dest) { debug("clone_server_list()"); - ISC_LIST_FOREACH (src, srv, link) { + ISC_LIST_FOREACH(src, srv, link) { dig_server_t *newsrv = make_server(srv->servername, srv->userarg); ISC_LINK_INIT(newsrv, link); @@ -1200,7 +1200,7 @@ make_searchlist_entry(char *domain) { static void clear_searchlist(void) { - ISC_LIST_FOREACH (search_list, search, link) { + ISC_LIST_FOREACH(search_list, search, link) { ISC_LIST_UNLINK(search_list, search, link); isc_mem_free(isc_g_mctx, search); } @@ -1212,7 +1212,7 @@ create_search_list(irs_resconf_t *resconf) { clear_searchlist(); irs_resconf_searchlist_t *list = irs_resconf_getsearchlist(resconf); - ISC_LIST_FOREACH (*list, entry, link) { + ISC_LIST_FOREACH(*list, entry, link) { dig_searchlist_t *search = make_searchlist_entry(entry->domain); ISC_LIST_APPEND(search_list, search, link); } @@ -1493,7 +1493,7 @@ check_if_done(void) { debug("check_if_done()"); debug("list %s", ISC_LIST_EMPTY(lookup_list) ? "empty" : "full"); - ISC_LIST_FOREACH (lookup_list, lookup, link) { + ISC_LIST_FOREACH(lookup_list, lookup, link) { debug("pending lookup %p", lookup); } @@ -1519,7 +1519,7 @@ static bool check_if_queries_done(dig_lookup_t *l, dig_query_t *except_q) { debug("check_if_queries_done(%p)", l); - ISC_LIST_FOREACH (l->q, q, link) { + ISC_LIST_FOREACH(l->q, q, link) { if (!q->started || isc_refcount_current(&q->references) > 1) { if (!q->canceled && q != except_q) { debug("there is a pending query %p", q); @@ -1540,7 +1540,7 @@ _destroy_lookup(dig_lookup_t *lookup) { isc_refcount_destroy(&lookup->references); - ISC_LIST_FOREACH (lookup->my_server_list, s, link) { + ISC_LIST_FOREACH(lookup->my_server_list, s, link) { debug("freeing server %p belonging to %p", s, lookup); ISC_LIST_DEQUEUE(lookup->my_server_list, s, link); isc_mem_free(isc_g_mctx, s); @@ -1820,7 +1820,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section) { addresses_result = ISC_R_SUCCESS; bad_namestr[0] = '\0'; - MSG_SECTION_FOREACH (msg, section, name) { + MSG_SECTION_FOREACH(msg, section, name) { if (section == DNS_SECTION_AUTHORITY) { rdataset = NULL; result = dns_message_findtype(name, dns_rdatatype_soa, @@ -1861,7 +1861,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section) { } } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; char namestr[DNS_NAME_FORMATSIZE]; dns_rdata_ns_t ns; @@ -2612,7 +2612,7 @@ setup_lookup(dig_lookup_t *lookup) { lookup->pending = false; - ISC_LIST_FOREACH (lookup->my_server_list, serv, link) { + ISC_LIST_FOREACH(lookup->my_server_list, serv, link) { dig_query_t *query = new_query(lookup, serv->servername, serv->userarg); ISC_LIST_ENQUEUE(lookup->q, query, link); @@ -2723,7 +2723,7 @@ send_done(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { static void _cancel_lookup(dig_lookup_t *lookup, const char *file, unsigned int line) { debug("%s:%u:%s()", file, line, __func__); - ISC_LIST_FOREACH (lookup->q, query, link) { + ISC_LIST_FOREACH(lookup->q, query, link) { REQUIRE(DIG_VALID_QUERY(query)); ISC_LIST_DEQUEUE(lookup->q, query, link); debug("canceling pending query %p, belonging to %p", query, @@ -3686,9 +3686,9 @@ check_for_more_data(dig_lookup_t *lookup, dig_query_t *query, puts("; Transfer failed."); return true; } - MSG_SECTION_FOREACH (msg, DNS_SECTION_ANSWER, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { - DNS_RDATASET_FOREACH (rdataset) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_ANSWER, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -4210,8 +4210,8 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, } } else { match = true; - MSG_SECTION_FOREACH (msg, DNS_SECTION_QUESTION, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_QUESTION, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (l->rdtype != rdataset->type || l->rdclass != rdataset->rdclass || !dns_name_equal(l->name, name)) @@ -4644,7 +4644,7 @@ cancel_all(void) { cancel_now = true; while (current_lookup != NULL) { - ISC_LIST_FOREACH (current_lookup->q, q, link) { + ISC_LIST_FOREACH(current_lookup->q, q, link) { debug("canceling pending query %p, belonging to %p", q, current_lookup); q->canceled = true; @@ -4663,7 +4663,7 @@ cancel_all(void) { lookup_detach(¤t_lookup); } } - ISC_LIST_FOREACH (lookup_list, l, link) { + ISC_LIST_FOREACH(lookup_list, l, link) { ISC_LIST_DEQUEUE(lookup_list, l, link); lookup_detach(&l); } diff --git a/bin/dig/host.c b/bin/dig/host.c index c85ba70258..df38b0f24a 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -221,12 +221,12 @@ printsection(dns_message_t *msg, dns_section_t sectionid, dns_name_init(&empty_name); - MSG_SECTION_FOREACH (msg, sectionid, name) { + MSG_SECTION_FOREACH(msg, sectionid, name) { isc_buffer_init(&target, tbuf, sizeof(tbuf)); first = true; print_name = name; - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (query->lookup->rdtype == dns_rdatatype_axfr && !((!list_addresses && (list_type == dns_rdatatype_any || @@ -260,7 +260,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid, UNUSED(first); /* Shut up compiler. */ #endif /* ifdef USEINITALWS */ } else { - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; struct rtype *t; const char *rtt; diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index 9d3e6e36d8..d5ec48464d 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -205,9 +205,9 @@ printsection(dig_query_t *query, dns_message_t *msg, bool headers, debug("printsection()"); - MSG_SECTION_FOREACH (msg, section, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { - DNS_RDATASET_FOREACH (rdataset) { + MSG_SECTION_FOREACH(msg, section, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); switch (rdata.type) { @@ -267,8 +267,8 @@ detailsection(dig_query_t *query, dns_message_t *msg, bool headers, } } - MSG_SECTION_FOREACH (msg, section, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + MSG_SECTION_FOREACH(msg, section, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (section == DNS_SECTION_QUESTION) { dns_name_format(name, namebuf, sizeof(namebuf)); printf("\t%s, ", namebuf); @@ -279,7 +279,7 @@ detailsection(dig_query_t *query, dns_message_t *msg, bool headers, namebuf, sizeof(namebuf)); printf("class = %s\n", namebuf); } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -443,7 +443,7 @@ show_settings(bool full, bool serv_only) { isc_sockaddr_t sockaddr; isc_result_t result; - ISC_LIST_FOREACH (server_list, srv, link) { + ISC_LIST_FOREACH(server_list, srv, link) { char sockstr[ISC_SOCKADDR_FORMATSIZE]; result = get_address(srv->servername, port, &sockaddr); @@ -468,7 +468,7 @@ show_settings(bool full, bool serv_only) { tries, port, ndots); printf(" querytype = %-8s\tclass = %s\n", deftype, defclass); printf(" srchlist = "); - ISC_LIST_FOREACH (search_list, listent, link) { + ISC_LIST_FOREACH(search_list, listent, link) { printf("%s", listent->origin); if (ISC_LIST_NEXT(listent, link) != NULL) { printf("/"); diff --git a/bin/dnssec/dnssec-cds.c b/bin/dnssec/dnssec-cds.c index 83632e784c..9f976e21f1 100644 --- a/bin/dnssec/dnssec-cds.c +++ b/bin/dnssec/dnssec-cds.c @@ -210,7 +210,7 @@ freelist(dns_rdataset_t *rdataset) { dns_rdatalist_fromrdataset(rdataset, &rdlist); - ISC_LIST_FOREACH (rdlist->rdata, rdata, link) { + ISC_LIST_FOREACH(rdlist->rdata, rdata, link) { ISC_LIST_UNLINK(rdlist->rdata, rdata, link); isc_mem_put(isc_g_mctx, rdata, sizeof(*rdata)); } @@ -462,7 +462,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness) { isc_result_t result; unsigned char dsbuf[DNS_DS_BUFFERSIZE]; - DNS_RDATASET_FOREACH (dsset) { + DNS_RDATASET_FOREACH(dsset) { dns_rdata_ds_t ds; dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t newdsrdata = DNS_RDATA_INIT; @@ -528,7 +528,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset, keytable = isc_mem_cget(isc_g_mctx, nkey, sizeof(keytable[0])); ki = keytable; - DNS_RDATASET_FOREACH (keyset) { + DNS_RDATASET_FOREACH(keyset) { dns_rdata_dnskey_t dnskey; dns_rdata_t *keyrdata = NULL; isc_region_t r; @@ -604,7 +604,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset, algo = isc_mem_cget(isc_g_mctx, nkey, sizeof(algo[0])); - DNS_RDATASET_FOREACH (sigset) { + DNS_RDATASET_FOREACH(sigset) { dns_rdata_t sigrdata = DNS_RDATA_INIT; dns_rdata_rrsig_t sig; @@ -698,7 +698,7 @@ signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) { isc_result_t result; bool all_ok = true; - DNS_RDATASET_FOREACH (dsset) { + DNS_RDATASET_FOREACH(dsset) { dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_ds_t ds; bool ds_ok; @@ -778,7 +778,7 @@ append_new_ds_set(ds_maker_func_t *ds_from_rdata, isc_buffer_t *buf, dns_rdataset_t *crdset) { isc_result_t result; - DNS_RDATASET_FOREACH (crdset) { + DNS_RDATASET_FOREACH(crdset) { dns_rdata_t crdata = DNS_RDATA_INIT; dns_rdata_t *ds = NULL; @@ -878,7 +878,7 @@ consistent_digests(dns_rdataset_t *dsset) { arrdata = isc_mem_cget(isc_g_mctx, n, sizeof(dns_rdata_t)); - DNS_RDATASET_FOREACH (dsset) { + DNS_RDATASET_FOREACH(dsset) { dns_rdata_init(&arrdata[i]); dns_rdataset_current(dsset, &arrdata[i]); i++; diff --git a/bin/dnssec/dnssec-dsfromkey.c b/bin/dnssec/dnssec-dsfromkey.c index a6363a0cd9..4d29500180 100644 --- a/bin/dnssec/dnssec-dsfromkey.c +++ b/bin/dnssec/dnssec-dsfromkey.c @@ -520,7 +520,7 @@ main(int argc, char **argv) { isc_result_totext(result)); } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); diff --git a/bin/dnssec/dnssec-importkey.c b/bin/dnssec/dnssec-importkey.c index 71befcbac3..f4dae207bf 100644 --- a/bin/dnssec/dnssec-importkey.c +++ b/bin/dnssec/dnssec-importkey.c @@ -431,7 +431,7 @@ main(int argc, char **argv) { isc_result_totext(result)); } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); emit(dir, &rdata); diff --git a/bin/dnssec/dnssec-keygen.c b/bin/dnssec/dnssec-keygen.c index d52df7ec64..cb40b138ab 100644 --- a/bin/dnssec/dnssec-keygen.c +++ b/bin/dnssec/dnssec-keygen.c @@ -1175,7 +1175,7 @@ main(int argc, char **argv) { ctx.ttl = dns_kasp_dnskeyttl(kasp); ctx.setttl = true; - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kaspkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kaspkey, link) { ctx.use_nsec3 = false; ctx.alg = dns_kasp_key_algorithm(kaspkey); ctx.size = dns_kasp_key_size(kaspkey); diff --git a/bin/dnssec/dnssec-ksr.c b/bin/dnssec/dnssec-ksr.c index 8c1b059232..e891c0a910 100644 --- a/bin/dnssec/dnssec-ksr.c +++ b/bin/dnssec/dnssec-ksr.c @@ -223,15 +223,15 @@ get_dnskeys(ksr_ctx_t *ksr, dns_dnsseckeylist_t *keys) { isc_result_totext(ret)); } /* Sort on keytag. */ - ISC_LIST_FOREACH (keys_read, dk, link) { + ISC_LIST_FOREACH(keys_read, dk, link) { n++; } keys_sorted = isc_mem_cget(isc_g_mctx, n, sizeof(dns_dnsseckey_t *)); - ISC_LIST_FOREACH (keys_read, dk, link) { + ISC_LIST_FOREACH(keys_read, dk, link) { keys_sorted[i++] = dk; } qsort(keys_sorted, n, sizeof(dns_dnsseckey_t *), keyalgtag_cmp); - ISC_LIST_FOREACH (keys_read, key, link) { + ISC_LIST_FOREACH(keys_read, key, link) { ISC_LIST_UNLINK(keys_read, key, link); } /* Save sorted list in 'keys' */ @@ -258,14 +258,14 @@ setcontext(ksr_ctx_t *ksr, dns_kasp_t *kasp) { static void cleanup(dns_dnsseckeylist_t *keys, dns_kasp_t *kasp) { - ISC_LIST_FOREACH (*keys, key, link) { + ISC_LIST_FOREACH(*keys, key, link) { ISC_LIST_UNLINK(*keys, key, link); dst_key_free(&key->key); dns_dnsseckey_destroy(isc_g_mctx, &key); } dns_kasp_detach(&kasp); - ISC_LIST_FOREACH (cleanup_list, cbuf, link) { + ISC_LIST_FOREACH(cleanup_list, cbuf, link) { ISC_LIST_UNLINK(cleanup_list, cbuf, link); isc_buffer_free(&cbuf); } @@ -304,7 +304,7 @@ freerrset(dns_rdataset_t *rdataset) { dns_rdatalist_fromrdataset(rdataset, &rdlist); - ISC_LIST_FOREACH (rdlist->rdata, rdata, link) { + ISC_LIST_FOREACH(rdlist->rdata, rdata, link) { ISC_LIST_UNLINK(rdlist->rdata, rdata, link); isc_mem_put(isc_g_mctx, rdata, sizeof(*rdata)); } @@ -380,7 +380,7 @@ create_key(ksr_ctx_t *ksr, dns_kasp_t *kasp, dns_kasp_key_t *kaspkey, isc_buffer_init(&buf, filename, sizeof(filename) - 1); /* Check existing keys. */ - ISC_LIST_FOREACH (*keys, dk, link) { + ISC_LIST_FOREACH(*keys, dk, link) { isc_stdtime_t act = 0, inact = 0; if (!dns_kasp_key_match(kaspkey, dk)) { @@ -562,7 +562,7 @@ print_dnskeys(dns_kasp_key_t *kaspkey, dns_ttl_t ttl, dns_dnsseckeylist_t *keys, rdatalist->rdclass = dns_rdataclass_in; rdatalist->type = dns_rdatatype_dnskey; rdatalist->ttl = ttl; - ISC_LIST_FOREACH (*keys, dk, link) { + ISC_LIST_FOREACH(*keys, dk, link) { isc_stdtime_t pub = 0, del = 0; (void)dst_key_gettime(dk->key, DST_TIME_PUBLISH, &pub); @@ -667,7 +667,7 @@ sign_rrset(ksr_ctx_t *ksr, isc_stdtime_t inception, isc_stdtime_t expiration, rrsiglist->rdclass = dns_rdataclass_in; rrsiglist->type = dns_rdatatype_rrsig; rrsiglist->ttl = rrset->ttl; - ISC_LIST_FOREACH (*keys, dk, link) { + ISC_LIST_FOREACH(*keys, dk, link) { isc_buffer_t buf; isc_buffer_t *newbuf = NULL; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -753,7 +753,7 @@ get_keymaterial(ksr_ctx_t *ksr, dns_kasp_t *kasp, isc_stdtime_t inception, cdslist->type = dns_rdatatype_cds; cdslist->ttl = ksr->ttl; - ISC_LIST_FOREACH (*keys, dk, link) { + ISC_LIST_FOREACH(*keys, dk, link) { bool published = true; isc_buffer_t buf; isc_buffer_t *newbuf; @@ -842,7 +842,7 @@ get_keymaterial(ksr_ctx_t *ksr, dns_kasp_t *kasp, isc_stdtime_t inception, isc_buffer_clear(newbuf); /* CDS */ - ISC_LIST_FOREACH (digests, alg, link) { + ISC_LIST_FOREACH(digests, alg, link) { isc_buffer_t *newbuf2 = NULL; dns_rdata_t *rdata2 = NULL; dns_rdata_t cds = DNS_RDATA_INIT; @@ -1049,7 +1049,7 @@ keygen(ksr_ctx_t *ksr) { /* Set context */ setcontext(ksr, kasp); /* Key generation */ - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kk, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kk, link) { if (dns_kasp_key_ksk(kk) && !ksr->ksk) { /* only ZSKs allowed */ continue; @@ -1116,7 +1116,7 @@ request(ksr_ctx_t *ksr) { (int)r.length, r.base, timestr); next = ksr->end + 1; - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kk, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kk, link) { /* * Output the DNSKEY records for the current bundle * that starts at 'inception. The 'next' variable is diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 44b1d39fe3..6eb72eebaf 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -209,7 +209,7 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) { isc_buffer_allocate(isc_g_mctx, &buffer, bufsize); - DNS_RDATASETITER_FOREACH (iter) { + DNS_RDATASETITER_FOREACH(iter) { dns_rdataset_t rds = DNS_RDATASET_INIT; dns_rdatasetiter_current(iter, &rds); @@ -347,7 +347,7 @@ keythatsigned_unlocked(dns_rdata_rrsig_t *rrsig) { dst_algorithm_t algorithm = dst_algorithm_fromdata( rrsig->algorithm, rrsig->signature, rrsig->siglen); - ISC_LIST_FOREACH (keylist, key, link) { + ISC_LIST_FOREACH(keylist, key, link) { if (rrsig->keyid == dst_key_id(key->key) && algorithm == dst_key_alg(key->key) && dns_name_equal(&rrsig->signer, dst_key_name(key->key))) @@ -519,7 +519,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name, } if (!nosigs) { - DNS_RDATASET_FOREACH (&sigset) { + DNS_RDATASET_FOREACH(&sigset) { dns_rdata_t sigrdata = DNS_RDATA_INIT; dns_dnsseckey_t *key = NULL; bool expired, refresh, future, offline; @@ -681,7 +681,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name, dns_rdataset_disassociate(&sigset); } - ISC_LIST_FOREACH (keylist, key, link) { + ISC_LIST_FOREACH(keylist, key, link) { if (REVOKE(key->key) && set->type != dns_rdatatype_dnskey) { continue; } @@ -701,7 +701,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name, { bool have_ksk = isksk(key); - ISC_LIST_FOREACH (keylist, curr, link) { + ISC_LIST_FOREACH(keylist, curr, link) { if (dst_key_alg(key->key) != dst_key_alg(curr->key)) { @@ -739,7 +739,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name, * - Have key ID equal to the predecessor id. * - Have a successor that matches 'key' id. */ - ISC_LIST_FOREACH (keylist, curr, link) { + ISC_LIST_FOREACH(keylist, curr, link) { uint32_t suc; if (dst_key_alg(key->key) != @@ -1067,7 +1067,7 @@ loadds(dns_name_t *name, uint32_t ttl, dns_rdataset_t *dsset) { check_result(result, "dns_db_newversion"); dns_diff_init(isc_g_mctx, &diff); - DNS_RDATASET_FOREACH (&keyset) { + DNS_RDATASET_FOREACH(&keyset) { dns_rdata_t key = DNS_RDATA_INIT; dns_rdata_t ds = DNS_RDATA_INIT; dns_rdataset_current(&keyset, &key); @@ -1187,7 +1187,7 @@ signname(dns_dbnode_t *node, bool apex, dns_name_t *name) { rdsiter = NULL; result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); /* If this is a RRSIG set, skip it. */ @@ -1258,7 +1258,7 @@ active_node(dns_dbnode_t *node) { result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); dns_rdatatype_t t = rdataset.type; dns_rdataset_disassociate(&rdataset); @@ -1273,7 +1273,7 @@ active_node(dns_dbnode_t *node) { /*% * The node is empty of everything but NSEC / RRSIG records. */ - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); result = dns_db_deleterdataset(gdb, node, gversion, rdataset.type, @@ -1288,7 +1288,7 @@ active_node(dns_dbnode_t *node) { result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter2); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); type = rdataset.type; covers = rdataset.covers; @@ -1311,7 +1311,7 @@ active_node(dns_dbnode_t *node) { continue; } found = false; - DNS_RDATASETITER_FOREACH (rdsiter2) { + DNS_RDATASETITER_FOREACH(rdsiter2) { dns_rdatasetiter_current(rdsiter2, &rdataset); if (rdataset.type == covers) { found = true; @@ -1687,7 +1687,7 @@ remove_records(dns_dbnode_t *node, dns_rdatatype_t which, bool checknsec) { */ result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); type = rdataset.type; @@ -1727,7 +1727,7 @@ remove_sigs(dns_dbnode_t *node, bool delegation, dns_rdatatype_t which) { result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); type = rdataset.type; @@ -1779,14 +1779,14 @@ nsecify(void) { */ result = dns_db_createiterator(gdb, DNS_DB_NSEC3ONLY, &dbiter); check_result(result, "dns_db_createiterator()"); - DNS_DBITERATOR_FOREACH (dbiter) { + DNS_DBITERATOR_FOREACH(dbiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; result = dns_dbiterator_current(dbiter, &node, name); check_dns_dbiterator_current(result); result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); type = rdataset.type; covers = rdataset.covers; @@ -2053,7 +2053,7 @@ nsec3clean(dns_name_t *name, dns_dbnode_t *node, unsigned int hashalg, * Delete any NSEC3 records which are not part of the current * NSEC3 chain. */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t delrdata = DNS_RDATA_INIT; @@ -2112,14 +2112,14 @@ rrset_cleanup(dns_name_t *name, dns_rdataset_t *rdataset, dns_diff_t *add, dns_rdatatype_format(rdataset->type, typestr, sizeof(typestr)); dns_rdataset_init(&tmprdataset); - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata1 = DNS_RDATA_INIT; unsigned int count2 = 0; count1++; dns_rdataset_current(rdataset, &rdata1); dns_rdataset_clone(rdataset, &tmprdataset); - DNS_RDATASET_FOREACH (&tmprdataset) { + DNS_RDATASET_FOREACH(&tmprdataset) { dns_rdata_t rdata2 = DNS_RDATA_INIT; dns_difftuple_t *tuple = NULL; count2++; @@ -2170,14 +2170,14 @@ cleanup_zone(void) { result = dns_db_createiterator(gdb, 0, &dbiter); check_result(result, "dns_db_createiterator()"); - DNS_DBITERATOR_FOREACH (dbiter) { + DNS_DBITERATOR_FOREACH(dbiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; result = dns_dbiterator_current(dbiter, &node, name); check_dns_dbiterator_current(result); result = dns_db_allrdatasets(gdb, node, gversion, 0, 0, &rdsiter); check_result(result, "dns_db_allrdatasets()"); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); rrset_cleanup(name, &rdataset, &add, &del); dns_rdataset_disassociate(&rdataset); @@ -2359,7 +2359,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations, result = dns_db_createiterator(gdb, DNS_DB_NSEC3ONLY, &dbiter); check_result(result, "dns_db_createiterator()"); - DNS_DBITERATOR_FOREACH (dbiter) { + DNS_DBITERATOR_FOREACH(dbiter) { result = dns_dbiterator_current(dbiter, &node, name); check_dns_dbiterator_current(result); nsec3clean(name, node, hashalg, iterations, salt, salt_len, @@ -2602,7 +2602,7 @@ loadexplicitkeys(char *keyfiles[], int n, bool setksk) { } /* Skip any duplicates */ - ISC_LIST_FOREACH (keylist, k, link) { + ISC_LIST_FOREACH(keylist, k, link) { if (dst_key_id(k->key) == dst_key_id(newkey) && dst_key_alg(k->key) == dst_key_alg(newkey)) { @@ -2646,7 +2646,7 @@ report(const char *format, ...) { static void clear_keylist(dns_dnsseckeylist_t *list) { - ISC_LIST_FOREACH (*list, key, link) { + ISC_LIST_FOREACH(*list, key, link) { ISC_LIST_UNLINK(*list, key, link); dns_dnsseckey_destroy(isc_g_mctx, &key); } @@ -2683,7 +2683,7 @@ add_digest(char *str, size_t dlen, dns_kasp_digestlist_t *digests, } /* Suppress duplicates */ - ISC_LIST_FOREACH (*digests, d, link) { + ISC_LIST_FOREACH(*digests, d, link) { if (d->digest == alg) { return; } @@ -2804,7 +2804,7 @@ findkeys: clear_keylist(&rmkeys); clear_keylist(&matchkeys); - ISC_LIST_FOREACH (digests, d, link) { + ISC_LIST_FOREACH(digests, d, link) { ISC_LIST_UNLINK(digests, d, link); isc_mem_put(isc_g_mctx, d, sizeof(*d)); } @@ -2840,7 +2840,7 @@ warnifallksk(dns_db_t *db) { result = dns_rdataset_first(&rdataset); check_result(result, "dns_rdataset_first"); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3014,7 +3014,7 @@ writeset(const char *prefix, dns_rdatatype_t type) { name = gorigin; - ISC_LIST_FOREACH (keylist, key, link) { + ISC_LIST_FOREACH(keylist, key, link) { if (REVOKE(key->key)) { continue; } @@ -3026,7 +3026,7 @@ writeset(const char *prefix, dns_rdatatype_t type) { have_non_ksk = true; } - ISC_LIST_FOREACH (keylist, curr, link) { + ISC_LIST_FOREACH(keylist, curr, link) { if (dst_key_alg(key->key) != dst_key_alg(curr->key)) { continue; } @@ -3800,7 +3800,7 @@ main(int argc, char *argv[]) { } /* Now enumerate the key list */ - ISC_LIST_FOREACH (keylist, key, link) { + ISC_LIST_FOREACH(keylist, key, link) { key->index = keycount++; } @@ -3986,7 +3986,7 @@ main(int argc, char *argv[]) { hashlist_free(&hashlist); - ISC_LIST_FOREACH (keylist, key, link) { + ISC_LIST_FOREACH(keylist, key, link) { ISC_LIST_UNLINK(keylist, key, link); dns_dnsseckey_destroy(isc_g_mctx, &key); } diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 88c398400b..ed8a244e59 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -606,7 +606,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name, ISC_LIST_INIT(kslist); (void)cfg_map_get(config, "key-store", &keystores); - CFG_LIST_FOREACH (keystores, element) { + CFG_LIST_FOREACH(keystores, element) { cfg_obj_t *kconfig = cfg_listelt_value(element); result = cfg_keystore_fromconfig(kconfig, mctx, &kslist, NULL); if (result != ISC_R_SUCCESS) { @@ -625,7 +625,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name, dns_keystore_detach(&keystore); (void)cfg_map_get(config, "dnssec-policy", &kasps); - CFG_LIST_FOREACH (kasps, element) { + CFG_LIST_FOREACH(kasps, element) { dns_kasp_t *kasp = NULL; cfg_obj_t *kconfig = cfg_listelt_value(element); @@ -652,7 +652,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name, /* * Cleanup kasp list. */ - ISC_LIST_FOREACH (kasplist, kasp, link) { + ISC_LIST_FOREACH(kasplist, kasp, link) { ISC_LIST_UNLINK(kasplist, kasp, link); dns_kasp_detach(&kasp); } @@ -660,7 +660,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name, /* * Cleanup keystore list. */ - ISC_LIST_FOREACH (kslist, ks, link) { + ISC_LIST_FOREACH(kslist, ks, link) { ISC_LIST_UNLINK(kslist, ks, link); dns_keystore_detach(&ks); } diff --git a/bin/named/builtin.c b/bin/named/builtin.c index 664e4b2bd9..f03cf3a8d9 100644 --- a/bin/named/builtin.c +++ b/bin/named/builtin.c @@ -803,8 +803,8 @@ destroynode(bdbnode_t *node) { bdb = node->bdb; mctx = bdb->common.mctx; - ISC_LIST_FOREACH (node->lists, list, link) { - ISC_LIST_FOREACH (list->rdata, rdata, link) { + ISC_LIST_FOREACH(node->lists, list, link) { + ISC_LIST_FOREACH(list->rdata, rdata, link) { ISC_LIST_UNLINK(list->rdata, rdata, link); isc_mem_put(mctx, rdata, sizeof(dns_rdata_t)); } @@ -812,7 +812,7 @@ destroynode(bdbnode_t *node) { isc_mem_put(mctx, list, sizeof(dns_rdatalist_t)); } - ISC_LIST_FOREACH (node->buffers, b, link) { + ISC_LIST_FOREACH(node->buffers, b, link) { ISC_LIST_UNLINK(node->buffers, b, link); isc_buffer_free(&b); } @@ -1107,7 +1107,7 @@ findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, return ISC_R_NOTIMPLEMENTED; } - ISC_LIST_FOREACH (bdbnode->lists, list, link) { + ISC_LIST_FOREACH(bdbnode->lists, list, link) { if (list->type == type) { new_rdataset(list, db, node, rdataset); return ISC_R_SUCCESS; diff --git a/bin/named/config.c b/bin/named/config.c index dc39a35493..cb58713c8a 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -523,7 +523,7 @@ named_checknames_get(const cfg_obj_t **maps, const char *const names[], *obj = checknames; return ISC_R_SUCCESS; } - CFG_LIST_FOREACH (checknames, element) { + CFG_LIST_FOREACH(checknames, element) { value = cfg_listelt_value(element); type = cfg_tuple_get(value, "type"); @@ -546,7 +546,7 @@ int named_config_listcount(const cfg_obj_t *list) { int i = 0; - CFG_LIST_FOREACH (list, e) { + CFG_LIST_FOREACH(list, e) { i++; } @@ -633,7 +633,7 @@ named_config_getremotesdef(const cfg_obj_t *cctx, const char *list, if (result != ISC_R_SUCCESS) { return result; } - CFG_LIST_FOREACH (obj, elt) { + CFG_LIST_FOREACH(obj, elt) { obj = cfg_listelt_value(elt); if (strcasecmp(cfg_obj_asstring(cfg_tuple_get(obj, "name")), name) == 0) diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 890c57076b..b3c730edd8 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -170,7 +170,7 @@ free_controlkey(controlkey_t *key, isc_mem_t *mctx) { static void free_controlkeylist(controlkeylist_t *keylist, isc_mem_t *mctx) { - ISC_LIST_FOREACH (*keylist, key, link) { + ISC_LIST_FOREACH(*keylist, key, link) { ISC_LIST_UNLINK(*keylist, key, link); free_controlkey(key, mctx); } @@ -207,7 +207,7 @@ shutdown_listener(controllistener_t *listener) { } listener->shuttingdown = true; - ISC_LIST_FOREACH (listener->connections, conn, link) { + ISC_LIST_FOREACH(listener->connections, conn, link) { conn_shutdown(conn); } @@ -432,7 +432,7 @@ control_recvmessage(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t result, goto cleanup; } - ISC_LIST_FOREACH (listener->keys, key, link) { + ISC_LIST_FOREACH(listener->keys, key, link) { isccc_region_t ccregion; isccc_ccmsg_toregion(&conn->ccmsg, &ccregion); @@ -647,7 +647,7 @@ control_newconn(isc_nmhandle_t *handle, isc_result_t result, void *arg) { static void controls_shutdown(named_controls_t *controls) { - ISC_LIST_FOREACH (controls->listeners, listener, link) { + ISC_LIST_FOREACH(controls->listeners, listener, link) { /* * As listeners shut down, they will call their callbacks. */ @@ -679,7 +679,7 @@ cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname, const char *str = NULL; const cfg_obj_t *obj = NULL; - CFG_LIST_FOREACH (keylist, element) { + CFG_LIST_FOREACH(keylist, element) { obj = cfg_listelt_value(element); str = cfg_obj_asstring(cfg_map_getname(obj)); if (strcasecmp(str, keyname) == 0) { @@ -699,7 +699,7 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx, const cfg_obj_t *obj = NULL; controlkey_t *key = NULL; - CFG_LIST_FOREACH (keylist, element) { + CFG_LIST_FOREACH(keylist, element) { obj = cfg_listelt_value(element); str = cfg_obj_asstring(obj); newstr = isc_mem_strdup(mctx, str); @@ -724,7 +724,7 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist, /* * Find the keys corresponding to the keyids used by this listener. */ - ISC_LIST_FOREACH (*keyids, keyid, link) { + ISC_LIST_FOREACH(*keyids, keyid, link) { result = cfgkeylist_find(keylist, keyid->keyname, &keydef); if (result != ISC_R_SUCCESS) { cfg_obj_log(control, ISC_LOG_WARNING, @@ -911,7 +911,7 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp, controlkeylist_t keys; isc_result_t result = ISC_R_SUCCESS; - ISC_LIST_FOREACH (cp->listeners, l, link) { + ISC_LIST_FOREACH(cp->listeners, l, link) { if (isc_sockaddr_equal(addr, &l->address)) { listener = l; break; @@ -1156,7 +1156,7 @@ named_controls_configure(named_controls_t *cp, const cfg_obj_t *config, * address-in-use error. */ if (controlslist != NULL) { - CFG_LIST_FOREACH (controlslist, element) { + CFG_LIST_FOREACH(controlslist, element) { const cfg_obj_t *controls = NULL; const cfg_obj_t *inetcontrols = NULL; const cfg_obj_t *unixcontrols = NULL; @@ -1176,7 +1176,7 @@ named_controls_configure(named_controls_t *cp, const cfg_obj_t *config, continue; } - CFG_LIST_FOREACH (inetcontrols, element2) { + CFG_LIST_FOREACH(inetcontrols, element2) { const cfg_obj_t *control = NULL; const cfg_obj_t *obj = NULL; isc_sockaddr_t addr; diff --git a/bin/named/logconf.c b/bin/named/logconf.c index f9311c7cef..1b0412009d 100644 --- a/bin/named/logconf.c +++ b/bin/named/logconf.c @@ -62,7 +62,7 @@ category_fromconf(const cfg_obj_t *ccat, isc_logconfig_t *logconfig) { } destinations = cfg_tuple_get(ccat, "destinations"); - CFG_LIST_FOREACH (destinations, element) { + CFG_LIST_FOREACH(destinations, element) { const cfg_obj_t *channel = cfg_listelt_value(element); const char *channelname = cfg_obj_asstring(channel); @@ -323,13 +323,13 @@ named_logconfig(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) { } (void)cfg_map_get(logstmt, "channel", &channels); - CFG_LIST_FOREACH (channels, element) { + CFG_LIST_FOREACH(channels, element) { const cfg_obj_t *channel = cfg_listelt_value(element); CHECK(channel_fromconf(channel, logconfig)); } (void)cfg_map_get(logstmt, "category", &categories); - CFG_LIST_FOREACH (categories, element) { + CFG_LIST_FOREACH(categories, element) { const cfg_obj_t *category = cfg_listelt_value(element); CHECK(category_fromconf(category, logconfig)); if (!default_set) { diff --git a/bin/named/server.c b/bin/named/server.c index 6d712c94bc..7afd9af9cf 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -654,7 +654,7 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config, } name = dns_fixedname_initname(&fixed); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { nameobj = cfg_listelt_value(element); str = cfg_obj_asstring(nameobj); isc_buffer_constinit(&b, str, strlen(str)); @@ -1041,10 +1041,10 @@ load_view_keys(const cfg_obj_t *keys, dns_view_t *view, bool managed, CHECK(dns_view_getsecroots(view, &secroots)); - CFG_LIST_FOREACH (keys, elt) { + CFG_LIST_FOREACH(keys, elt) { keylist = cfg_listelt_value(elt); - CFG_LIST_FOREACH (keylist, elt2) { + CFG_LIST_FOREACH(keylist, elt2) { CHECK(process_key(cfg_listelt_value(elt2), secroots, keyname, view, managed)); } @@ -1645,7 +1645,7 @@ disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) { CHECK(dns_name_fromtext(name, &b, dns_rootname, 0)); algorithms = cfg_tuple_get(disabled, "algorithms"); - CFG_LIST_FOREACH (algorithms, element) { + CFG_LIST_FOREACH(algorithms, element) { isc_textregion_t r; dst_algorithm_t alg; @@ -1679,7 +1679,7 @@ disable_ds_digests(const cfg_obj_t *disabled, dns_resolver_t *resolver) { CHECK(dns_name_fromtext(name, &b, dns_rootname, 0)); digests = cfg_tuple_get(disabled, "digests"); - CFG_LIST_FOREACH (digests, element) { + CFG_LIST_FOREACH(digests, element) { isc_textregion_t r; dns_dsdigest_t digest; @@ -1710,7 +1710,7 @@ on_disable_list(const cfg_obj_t *disablelist, dns_name_t *zonename) { name = dns_fixedname_initname(&fixed); - CFG_LIST_FOREACH (disablelist, element) { + CFG_LIST_FOREACH(disablelist, element) { value = cfg_listelt_value(element); str = cfg_obj_asstring(value); isc_buffer_constinit(&b, str, strlen(str)); @@ -1773,7 +1773,7 @@ setquerystats(dns_zone_t *zone, isc_mem_t *mctx, dns_zonestat_level_t level) { static named_cache_t * cachelist_find(named_cachelist_t *cachelist, const char *cachename, dns_rdataclass_t rdclass) { - ISC_LIST_FOREACH (*cachelist, nsc, link) { + ISC_LIST_FOREACH(*cachelist, nsc, link) { if (nsc->rdclass == rdclass && strcmp(dns_cache_getname(nsc->cache), cachename) == 0) { @@ -2265,7 +2265,7 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t *rpz_obj, } int i = 0; - CFG_LIST_FOREACH (zonelist, zone_element) { + CFG_LIST_FOREACH(zonelist, zone_element) { INSIST(!*old_rpz_okp || old != NULL); if (*old_rpz_okp && i < old->p.num_zones) { old_zone = old->zones[i]; @@ -2898,7 +2898,7 @@ configure_catz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t *config, &ns_catz_zonemodmethods); } - CFG_LIST_FOREACH (zones, zone_element) { + CFG_LIST_FOREACH(zones, zone_element) { CHECK(configure_catz_zone(view, pview, config, zone_element)); } @@ -3184,7 +3184,7 @@ create_empty_zone(dns_zone_t *pzone, dns_name_t *name, dns_view_t *view, * Look for forward "zones" beneath this empty zone and if so * create a custom db for the empty zone. */ - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); const cfg_obj_t *zoptions = cfg_tuple_get(zconfig, "options"); const cfg_obj_t *toptions = NULL; @@ -3434,7 +3434,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) { return ISC_R_SUCCESS; } - CFG_LIST_FOREACH (dlist, element) { + CFG_LIST_FOREACH(dlist, element) { const char *str = NULL; dns_dtmsgtype_t dt = 0; @@ -3893,7 +3893,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, /* * Load zone configuration */ - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); CHECK(configure_zone(config, zconfig, vconfig, view, viewlist, kasplist, keystores, actx, false, @@ -3944,7 +3944,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, (void)cfg_map_get(config, "dlz", &dlzlist); } - CFG_LIST_FOREACH (dlzlist, element) { + CFG_LIST_FOREACH(dlzlist, element) { dlz = cfg_listelt_value(element); obj = NULL; @@ -4114,7 +4114,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, contact = NULL; } - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { const cfg_obj_t *map = cfg_listelt_value(element); dns_dns64_t *dns64 = NULL; unsigned int dns64options = 0; @@ -4636,7 +4636,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, disabled = NULL; (void)named_config_get(maps, "disable-algorithms", &disabled); if (disabled != NULL) { - CFG_LIST_FOREACH (disabled, element) { + CFG_LIST_FOREACH(disabled, element) { CHECK(disable_algorithms(cfg_listelt_value(element), view->resolver)); } @@ -4648,7 +4648,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, disabled = NULL; (void)named_config_get(maps, "disable-ds-digests", &disabled); if (disabled != NULL) { - CFG_LIST_FOREACH (disabled, element) { + CFG_LIST_FOREACH(disabled, element) { CHECK(disable_ds_digests(cfg_listelt_value(element), view->resolver)); } @@ -4775,7 +4775,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, (void)named_config_get(cfgmaps, "server", &peers); dns_peerlist_new(mctx, &newpeers); - CFG_LIST_FOREACH (peers, element) { + CFG_LIST_FOREACH(peers, element) { const cfg_obj_t *cpeer = cfg_listelt_value(element); dns_peer_t *peer; @@ -4795,7 +4795,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, (void)named_config_get(maps, "rrset-order", &rrsetorder); dns_order_create(mctx, &order); - CFG_LIST_FOREACH (rrsetorder, element) { + CFG_LIST_FOREACH(rrsetorder, element) { const cfg_obj_t *ent = cfg_listelt_value(element); CHECK(configure_order(order, ent)); @@ -5354,7 +5354,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, (void)cfg_map_get(config, "dyndb", &dyndb_list); } - CFG_LIST_FOREACH (dyndb_list, element) { + CFG_LIST_FOREACH(dyndb_list, element) { const cfg_obj_t *dyndb = cfg_listelt_value(element); if (dctx == NULL) { @@ -5682,7 +5682,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, result = dns_view_getntatable(view, &ntatable); } if (result == ISC_R_SUCCESS) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { dns_fixedname_t fntaname; dns_name_t *ntaname; @@ -5776,7 +5776,7 @@ cleanup: } if (zone_element_latest != NULL) { - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); configure_zone_setviewcommit(result, zconfig, @@ -5881,7 +5881,7 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view, addresses = cfg_tuple_get(alternates, "addresses"); } - CFG_LIST_FOREACH (addresses, element) { + CFG_LIST_FOREACH(addresses, element) { const cfg_obj_t *alternate = cfg_listelt_value(element); isc_sockaddr_t sa; @@ -6016,7 +6016,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view, faddresses = cfg_tuple_get(forwarders, "addresses"); } - CFG_LIST_FOREACH (faddresses, element) { + CFG_LIST_FOREACH(faddresses, element) { const cfg_obj_t *forwarder = cfg_listelt_value(element); const char *cur_tls = NULL; @@ -6086,7 +6086,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view, cleanup: - ISC_LIST_FOREACH (fwdlist, fwd, link) { + ISC_LIST_FOREACH(fwdlist, fwd, link) { ISC_LIST_UNLINK(fwdlist, fwd, link); if (fwd->tlsname != NULL) { dns_name_free(fwd->tlsname, view->mctx); @@ -6824,7 +6824,7 @@ get_tat_qname(dns_name_t *target, dns_name_t *keyname, dns_keynode_t *keynode) { if (dns_keynode_dsset(keynode, &dsset)) { isc_result_t result; - DNS_RDATASET_FOREACH (&dsset) { + DNS_RDATASET_FOREACH(&dsset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_ds_t ds; @@ -6999,7 +6999,7 @@ tat_timer_tick(void *arg) { struct dotat_arg dotat_arg = { 0 }; dns_keytable_t *secroots = NULL; - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (!view->trust_anchor_telemetry || !view->enablevalidation) { continue; } @@ -7475,7 +7475,7 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, zonelist = NULL; cfg_map_get(nzctx->nzf_config, "zone", &zonelist); - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); CHECK(configure_zone(config, zconfig, vconfig, view, &named_g_server->viewlist, @@ -7487,7 +7487,7 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, result = ISC_R_SUCCESS; cleanup: - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); configure_zone_setviewcommit(result, zconfig, view); } @@ -8496,7 +8496,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, */ keystores = NULL; (void)cfg_map_get(config, "key-store", &keystores); - CFG_LIST_FOREACH (keystores, element) { + CFG_LIST_FOREACH(keystores, element) { cfg_obj_t *kconfig = cfg_listelt_value(element); result = cfg_keystore_fromconfig(kconfig, isc_g_mctx, @@ -8511,7 +8511,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, */ kasps = NULL; (void)cfg_map_get(named_g_defaultconfig, "dnssec-policy", &kasps); - CFG_LIST_FOREACH (kasps, element) { + CFG_LIST_FOREACH(kasps, element) { cfg_obj_t *kconfig = cfg_listelt_value(element); dns_kasp_t *kasp = NULL; @@ -8539,7 +8539,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, */ kasps = NULL; (void)cfg_map_get(config, "dnssec-policy", &kasps); - CFG_LIST_FOREACH (kasps, element) { + CFG_LIST_FOREACH(kasps, element) { cfg_obj_t *kconfig = cfg_listelt_value(element); dns_kasp_t *kasp = NULL; @@ -8575,7 +8575,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, /* * Create the views. */ - CFG_LIST_FOREACH (views, element) { + CFG_LIST_FOREACH(views, element) { cfg_obj_t *vconfig = cfg_listelt_value(element); dns_view_t *view = NULL; @@ -8621,7 +8621,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, * views that have zones were already created at parsing * time, but views with no zones must be created here. */ - CFG_LIST_FOREACH (views, element) { + CFG_LIST_FOREACH(views, element) { cfg_obj_t *vconfig = cfg_listelt_value(element); dns_view_t *view = NULL; @@ -8673,7 +8673,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, builtin_views = NULL; RUNTIME_CHECK(cfg_map_get(named_g_defaultconfig, "view", &builtin_views) == ISC_R_SUCCESS); - CFG_LIST_FOREACH (builtin_views, element) { + CFG_LIST_FOREACH(builtin_views, element) { cfg_obj_t *vconfig = cfg_listelt_value(element); dns_view_t *view = NULL; @@ -8702,7 +8702,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, * Commit any dns_zone_setview() calls on all zones in the new * view. */ - ISC_LIST_FOREACH (viewlist, view, link) { + ISC_LIST_FOREACH(viewlist, view, link) { dns_view_setviewcommit(view); } @@ -8712,7 +8712,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, viewlist = tmpviewlist; /* Make the view list available to each of the views */ - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { view->viewlist = &server->viewlist; } @@ -8748,7 +8748,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, * after relinquishing privileges them. */ if (first_time) { - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { nzd_env_close(view); } } @@ -8779,7 +8779,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, * Reopen NZD databases. */ if (first_time) { - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { nzd_env_reopen(view); } } @@ -8886,7 +8886,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, &categories); } if (categories != NULL) { - CFG_LIST_FOREACH (categories, element) { + CFG_LIST_FOREACH(categories, element) { const cfg_obj_t *catobj; const char *str; @@ -9016,7 +9016,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, unsigned int usedlength; unsigned int expectedlength; - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { obj = cfg_listelt_value(element); str = cfg_obj_asstring(obj); @@ -9133,7 +9133,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, * were swapped above or not. */ cleanup_altsecrets: - ISC_LIST_FOREACH (altsecrets, as, link) { + ISC_LIST_FOREACH(altsecrets, as, link) { ISC_LIST_UNLINK(altsecrets, as, link); isc_mem_put(server->sctx->mctx, as, sizeof(*as)); } @@ -9144,7 +9144,7 @@ cleanup_logc: } cleanup_cachelist: - ISC_LIST_FOREACH (cachelist, nsc, link) { + ISC_LIST_FOREACH(cachelist, nsc, link) { ISC_LIST_UNLINK(cachelist, nsc, link); dns_cache_detach(&nsc->cache); isc_mem_put(server->mctx, nsc, sizeof(*nsc)); @@ -9153,7 +9153,7 @@ cleanup_cachelist: ISC_LIST_APPENDLIST(viewlist, builtin_viewlist, link); cleanup_viewlist: - ISC_LIST_FOREACH (viewlist, view, link) { + ISC_LIST_FOREACH(viewlist, view, link) { ISC_LIST_UNLINK(viewlist, view, link); if (result == ISC_R_SUCCESS && strcmp(view->name, "_bind") != 0) { @@ -9164,13 +9164,13 @@ cleanup_viewlist: } cleanup_kasplist: - ISC_LIST_FOREACH (kasplist, kasp, link) { + ISC_LIST_FOREACH(kasplist, kasp, link) { ISC_LIST_UNLINK(kasplist, kasp, link); dns_kasp_detach(&kasp); } cleanup_keystorelist: - ISC_LIST_FOREACH (keystorelist, keystore, link) { + ISC_LIST_FOREACH(keystorelist, keystore, link) { ISC_LIST_UNLINK(keystorelist, keystore, link); dns_keystore_detach(&keystore); } @@ -9266,7 +9266,7 @@ view_loaded(void *arg) { "all zones loaded"); } - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (view->managed_keys != NULL) { result = dns_zone_synckeyzone( view->managed_keys); @@ -9324,7 +9324,7 @@ load_zones(named_server_t *server, bool reconfig) { /* * Schedule zones to be loaded from disk. */ - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (view->managed_keys != NULL) { result = dns_zone_load(view->managed_keys, false); if (result != ISC_R_SUCCESS && @@ -9471,17 +9471,17 @@ shutdown_server(void *arg) { (void)named_server_saventa(server); - ISC_LIST_FOREACH (server->kasplist, kasp, link) { + ISC_LIST_FOREACH(server->kasplist, kasp, link) { ISC_LIST_UNLINK(server->kasplist, kasp, link); dns_kasp_detach(&kasp); } - ISC_LIST_FOREACH (server->keystorelist, keystore, link) { + ISC_LIST_FOREACH(server->keystorelist, keystore, link) { ISC_LIST_UNLINK(server->keystorelist, keystore, link); dns_keystore_detach(&keystore); } - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { view_next = ISC_LIST_NEXT(view, link); ISC_LIST_UNLINK(server->viewlist, view, link); dns_view_flushonshutdown(view, flush); @@ -9493,7 +9493,7 @@ shutdown_server(void *arg) { */ dns_dyndb_cleanup(); - ISC_LIST_FOREACH (server->cachelist, nsc, link) { + ISC_LIST_FOREACH(server->cachelist, nsc, link) { ISC_LIST_UNLINK(server->cachelist, nsc, link); dns_cache_detach(&nsc->cache); isc_mem_put(server->mctx, nsc, sizeof(*nsc)); @@ -9530,7 +9530,7 @@ get_matching_view_sync(isc_netaddr_t *srcaddr, isc_netaddr_t *destaddr, INSIST(message->tsigkey != NULL || message->tsig != NULL || message->sig0 == NULL); - ISC_LIST_FOREACH (named_g_server->viewlist, view, link) { + ISC_LIST_FOREACH(named_g_server->viewlist, view, link) { if (message->rdclass == view->rdclass || message->rdclass == dns_rdataclass_any) { @@ -10590,7 +10590,7 @@ listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config, return result; } - CFG_LIST_FOREACH (listenlist, element) { + CFG_LIST_FOREACH(listenlist, element) { ns_listenelt_t *delt = NULL; const cfg_obj_t *listener = cfg_listelt_value(element); result = listenelt_fromconfig(listener, config, actx, mctx, @@ -10621,7 +10621,7 @@ find_maplist(const cfg_obj_t *config, const char *listname, const char *name) { return NULL; } - CFG_LIST_FOREACH (maplist, elt) { + CFG_LIST_FOREACH(maplist, elt) { const cfg_obj_t *map = cfg_listelt_value(elt); if (strcasecmp(cfg_obj_asstring(cfg_map_getname(map)), name) == 0) @@ -10710,7 +10710,7 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config, ISC_R_SUCCESS) { INSIST(tls_proto_list != NULL); - CFG_LIST_FOREACH (tls_proto_list, proto) { + CFG_LIST_FOREACH(tls_proto_list, proto) { const cfg_obj_t *tls_proto_obj = cfg_listelt_value(proto); const char *tls_sver = @@ -10945,7 +10945,7 @@ listenelt_http(const cfg_obj_t *http, const uint16_t family, bool tls, endpoints = isc_mem_allocate(mctx, sizeof(endpoints[0]) * len); if (http != NULL && eplist != NULL) { - CFG_LIST_FOREACH (eplist, elt) { + CFG_LIST_FOREACH(eplist, elt) { const cfg_obj_t *ep = cfg_listelt_value(elt); const char *path = cfg_obj_asstring(ep); endpoints[i++] = isc_mem_strdup(mctx, path); @@ -11019,7 +11019,7 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) { /* * Prevent duplicate views. */ - ISC_LIST_FOREACH (dctx->viewlist, vle, link) { + ISC_LIST_FOREACH(dctx->viewlist, vle, link) { if (vle->view == view) { return ISC_R_SUCCESS; } @@ -11040,9 +11040,9 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) { static void dumpcontext_destroy(struct dumpcontext *dctx) { - ISC_LIST_FOREACH (dctx->viewlist, vle, link) { + ISC_LIST_FOREACH(dctx->viewlist, vle, link) { ISC_LIST_UNLINK(dctx->viewlist, vle, link); - ISC_LIST_FOREACH (vle->zonelist, zle, link) { + ISC_LIST_FOREACH(vle->zonelist, zle, link) { ISC_LIST_UNLINK(vle->zonelist, zle, link); dns_zone_detach(&zle->zone); isc_mem_put(dctx->mctx, zle, sizeof *zle); @@ -11287,7 +11287,7 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex, nextview: found = false; - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (ptr != NULL && strcmp(view->name, ptr) != 0) { continue; } @@ -11360,7 +11360,7 @@ named_server_dumpsecroots(named_server_t *server, isc_lex_t *lex, used = isc_buffer_usedlength(*text); do { - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (ptr != NULL && strcmp(view->name, ptr) != 0) { continue; } @@ -11444,7 +11444,7 @@ named_server_dumprecursing(named_server_t *server) { fprintf(fp, ";\n; Recursing Queries\n;\n"); ns_interfacemgr_dumprecursing(fp, server->interfacemgr); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { fprintf(fp, ";\n; Active fetch domains [view: %s]\n;\n", view->name); dns_resolver_dumpfetches(view->resolver, isc_statsformat_file, @@ -11542,7 +11542,7 @@ named_server_validation(named_server_t *server, isc_lex_t *lex, ptr = next_token(lex, text); isc_loopmgr_pause(); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if ((ptr != NULL && strcasecmp(ptr, view->name) != 0) || strcasecmp("_bind", view->name) == 0) { @@ -11614,13 +11614,13 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) { * much more lightweight because only a few (most typically just * one) views will match. */ - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (strcasecmp(ptr, view->name) != 0) { continue; } found = true; - ISC_LIST_FOREACH (server->cachelist, nsc, link) { + ISC_LIST_FOREACH(server->cachelist, nsc, link) { if (nsc->cache == view->cache) { nsc->needflush = true; break; @@ -11632,7 +11632,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) { } /* Perform flush */ - ISC_LIST_FOREACH (server->cachelist, nsc, link) { + ISC_LIST_FOREACH(server->cachelist, nsc, link) { if (ptr != NULL && !nsc->needflush) { continue; } @@ -11657,12 +11657,12 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) { * A worst case is that we have n views and n/2 caches, each shared by * two views. Then this will be a O(n^2/4) operation. */ - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (!dns_view_iscacheshared(view)) { continue; } - ISC_LIST_FOREACH (server->cachelist, nsc, link) { + ISC_LIST_FOREACH(server->cachelist, nsc, link) { if (!nsc->needflush || nsc->cache != view->cache) { continue; } @@ -11680,7 +11680,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) { } /* Cleanup the cache list. */ - ISC_LIST_FOREACH (server->cachelist, nsc, link) { + ISC_LIST_FOREACH(server->cachelist, nsc, link) { nsc->needflush = false; } @@ -11750,7 +11750,7 @@ named_server_flushnode(named_server_t *server, isc_lex_t *lex, bool tree) { isc_loopmgr_pause(); flushed = true; found = false; - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (viewname != NULL && strcasecmp(viewname, view->name) != 0) { continue; } @@ -12094,7 +12094,7 @@ named_server_sync(named_server_t *server, isc_lex_t *lex, isc_buffer_t **text) { if (zone == NULL) { isc_loopmgr_pause(); tresult = ISC_R_SUCCESS; - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { result = dns_view_apply(view, false, NULL, synczone, &cleanup); if (result != ISC_R_SUCCESS && tresult == ISC_R_SUCCESS) @@ -12160,7 +12160,7 @@ named_server_freeze(named_server_t *server, bool freeze, isc_lex_t *lex, if (mayberaw == NULL) { isc_loopmgr_pause(); tresult = ISC_R_SUCCESS; - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { result = dns_view_freezezones(view, freeze); if (result != ISC_R_SUCCESS && tresult == ISC_R_SUCCESS) { @@ -12374,7 +12374,7 @@ nzf_writeconf(const cfg_obj_t *config, dns_view_t *view) { CHECK(add_comment(fp, view->name)); /* force a comment */ - ISC_LIST_FOREACH (*list, elt, link) { + ISC_LIST_FOREACH(*list, elt, link) { const cfg_obj_t *zconfig = cfg_listelt_value(elt); CHECK(isc_stdio_write("zone ", 5, 1, fp, NULL)); @@ -12805,7 +12805,7 @@ load_nzf(dns_view_t *view, ns_cfgctx_t *nzcfg) { isc_buffer_allocate(view->mctx, &text, 256); - CFG_LIST_FOREACH (zonelist, element) { + CFG_LIST_FOREACH(zonelist, element) { const cfg_obj_t *zconfig = cfg_listelt_value(element); const cfg_obj_t *zoptions; char zname[DNS_NAME_FORMATSIZE]; @@ -13047,7 +13047,7 @@ delete_zoneconf(dns_view_t *view, cfg_parser_t *pctx, const cfg_obj_t *config, } cfg_list_t *list = UNCONST(&zl->value.list); - ISC_LIST_FOREACH (*list, elt, link) { + ISC_LIST_FOREACH(*list, elt, link) { dns_fixedname_t myfixed; dns_name_t *myname = dns_fixedname_initname(&myfixed); const cfg_obj_t *zconf = cfg_listelt_value(elt); @@ -13927,7 +13927,7 @@ find_name_in_list_from_map(const cfg_obj_t *config, } cfg_map_get(config, map_key_for_list, &list); - CFG_LIST_FOREACH (list, element) { + CFG_LIST_FOREACH(list, element) { const char *vname = NULL; obj = cfg_listelt_value(element); @@ -14283,7 +14283,7 @@ named_server_signing(named_server_t *server, isc_lex_t *lex, goto cleanup; } - DNS_RDATASET_FOREACH (&privset) { + DNS_RDATASET_FOREACH(&privset) { dns_rdata_t priv = DNS_RDATA_INIT; /* * In theory, the output buffer could hold a full RDATA @@ -14647,7 +14647,7 @@ cleanup: dns_db_detach(&db); } - ISC_LIST_FOREACH (keys, key, link) { + ISC_LIST_FOREACH(keys, key, link) { ISC_LIST_UNLINK(keys, key, link); dns_dnsseckey_destroy(dns_zone_getmctx(zone), &key); } @@ -15060,7 +15060,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly, if (dump) { size_t last = 0; - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (ntatable != NULL) { dns_ntatable_detach(&ntatable); } @@ -15125,7 +15125,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly, now = isc_stdtime_now(); isc_loopmgr_pause(); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (viewname != NULL && strcmp(view->name, viewname) != 0) { continue; } @@ -15251,7 +15251,7 @@ cleanup: isc_result_t named_server_saventa(named_server_t *server) { - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { isc_result_t result = dns_view_saventa(view); if (result != ISC_R_SUCCESS) { @@ -15268,7 +15268,7 @@ named_server_saventa(named_server_t *server) { isc_result_t named_server_loadnta(named_server_t *server) { - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { isc_result_t result = dns_view_loadnta(view); if ((result != ISC_R_SUCCESS) && @@ -15399,7 +15399,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) { CHECK(putstr(text, buf)); } - DNS_RDATASET_FOREACH (kdset) { + DNS_RDATASET_FOREACH(kdset) { char alg[DNS_SECALG_FORMATSIZE]; char tbuf[ISC_FORMATHTTPTIMESTAMP_SIZE]; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -15561,7 +15561,7 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex, viewtxt = next_token(lex, text); } - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (viewtxt != NULL && (rdclass != view->rdclass || strcmp(view->name, viewtxt) != 0)) { @@ -15862,7 +15862,7 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex, isc_loopmgr_pause(); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { dns_ttl_t stale_ttl = 0; uint32_t stale_refresh = 0; dns_db_t *db = NULL; @@ -15974,7 +15974,7 @@ named_server_fetchlimit(named_server_t *server, isc_lex_t *lex, /* Look for the view name. */ viewname = next_token(lex, text); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { char tbuf[100]; unsigned int used; uint32_t val; diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 89c3c825a5..97d6ba11e6 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -3035,7 +3035,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg, json_object_object_add(bindstats, "views", viewlist); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { json_object *za, *xa, *v = json_object_new_object(); dns_adb_t *adb = NULL; @@ -3758,7 +3758,7 @@ update_listener(named_server_t *server, named_statschannel_t **listenerp, dns_acl_t *new_acl = NULL; isc_result_t result = ISC_R_SUCCESS; - ISC_LIST_FOREACH (server->statschannels, l, link) { + ISC_LIST_FOREACH(server->statschannels, l, link) { if (isc_sockaddr_equal(addr, &l->address)) { listener = l; break; @@ -3844,7 +3844,7 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config, #endif /* !HAVE_JSON_C */ #endif /* EXTENDED_STATS */ - CFG_LIST_FOREACH (statschannellist, element) { + CFG_LIST_FOREACH(statschannellist, element) { const cfg_obj_t *statschannel = NULL; const cfg_obj_t *listenercfg = NULL; @@ -3854,7 +3854,7 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config, continue; } - CFG_LIST_FOREACH (listenercfg, element2) { + CFG_LIST_FOREACH(listenercfg, element2) { named_statschannel_t *listener = NULL; const cfg_obj_t *listen_params = NULL; const cfg_obj_t *obj = NULL; @@ -3921,7 +3921,7 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config, } } - ISC_LIST_FOREACH (server->statschannels, listener, link) { + ISC_LIST_FOREACH(server->statschannels, listener, link) { ISC_LIST_UNLINK(server->statschannels, listener, link); shutdown_listener(listener); } @@ -3932,7 +3932,7 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config, void named_statschannels_shutdown(named_server_t *server) { - ISC_LIST_FOREACH (server->statschannels, listener, link) { + ISC_LIST_FOREACH(server->statschannels, listener, link) { ISC_LIST_UNLINK(server->statschannels, listener, link); shutdown_listener(listener); } @@ -3972,7 +3972,7 @@ named_stats_dump(named_server_t *server, FILE *fp) { 0); fprintf(fp, "++ Outgoing Queries ++\n"); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { dns_stats_t *dstats = NULL; dns_resolver_getquerystats(view->resolver, &dstats); if (dstats == NULL) { @@ -4002,7 +4002,7 @@ named_stats_dump(named_server_t *server, FILE *fp) { (void)dump_stats(server->resolverstats, isc_statsformat_file, fp, NULL, resstats_desc, dns_resstatscounter_max, resstats_index, resstat_values, 0); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { isc_stats_t *istats = NULL; dns_resolver_getstats(view->resolver, &istats); if (istats == NULL) { @@ -4020,7 +4020,7 @@ named_stats_dump(named_server_t *server, FILE *fp) { } fprintf(fp, "++ Cache Statistics ++\n"); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { if (strcmp(view->name, "_default") == 0) { fprintf(fp, "[View: default]\n"); } else { @@ -4037,7 +4037,7 @@ named_stats_dump(named_server_t *server, FILE *fp) { } fprintf(fp, "++ Cache DB RRsets ++\n"); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { dns_stats_t *cacherrstats; cacherrstats = dns_db_getrrsetstats(view->cachedb); @@ -4062,7 +4062,7 @@ named_stats_dump(named_server_t *server, FILE *fp) { } fprintf(fp, "++ ADB stats ++\n"); - ISC_LIST_FOREACH (server->viewlist, view, link) { + ISC_LIST_FOREACH(server->viewlist, view, link) { dns_adb_t *adb = NULL; isc_stats_t *adbstats = NULL; diff --git a/bin/named/transportconf.c b/bin/named/transportconf.c index 81a8f4994b..bedb3d5243 100644 --- a/bin/named/transportconf.c +++ b/bin/named/transportconf.c @@ -56,7 +56,7 @@ { \ uint32_t tls_protos = 0; \ INSIST(obj != NULL); \ - CFG_LIST_FOREACH (obj, proto) { \ + CFG_LIST_FOREACH(obj, proto) { \ const cfg_obj_t *tls_proto_obj = \ cfg_listelt_value(proto); \ const char *tls_sver = \ @@ -93,7 +93,7 @@ add_doh_transports(const cfg_obj_t *transportlist, dns_transport_list_t *list) { const char *dohid = NULL; isc_result_t result; - CFG_LIST_FOREACH (transportlist, element) { + CFG_LIST_FOREACH(transportlist, element) { dns_name_t *dohname = NULL; dns_transport_t *transport = NULL; @@ -139,7 +139,7 @@ add_tls_transports(const cfg_obj_t *transportlist, dns_transport_list_t *list) { const char *tlsid = NULL; isc_result_t result; - CFG_LIST_FOREACH (transportlist, element) { + CFG_LIST_FOREACH(transportlist, element) { dns_name_t *tlsname = NULL; dns_transport_t *transport = NULL; diff --git a/bin/named/tsigconf.c b/bin/named/tsigconf.c index fd6e94c0c2..9133bc750e 100644 --- a/bin/named/tsigconf.c +++ b/bin/named/tsigconf.c @@ -40,7 +40,7 @@ add_initial_keys(const cfg_obj_t *list, dns_tsigkeyring_t *ring, int secretalloc = 0; isc_result_t ret; - CFG_LIST_FOREACH (list, element) { + CFG_LIST_FOREACH(list, element) { const cfg_obj_t *algobj = NULL; const cfg_obj_t *secretobj = NULL; dns_fixedname_t fkey; diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 339479a1d4..beba0aba46 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -223,7 +223,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, const cfg_obj_t *tconfig, dns_ssutable_create(mctx, &table); - CFG_LIST_FOREACH (updatepolicy, element) { + CFG_LIST_FOREACH(updatepolicy, element) { const cfg_obj_t *stmt = cfg_listelt_value(element); const cfg_obj_t *mode = cfg_tuple_get(stmt, "mode"); const cfg_obj_t *identity = cfg_tuple_get(stmt, "identity"); @@ -306,7 +306,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, const cfg_obj_t *tconfig, } i = 0; - CFG_LIST_FOREACH (typelist, element2) { + CFG_LIST_FOREACH(typelist, element2) { const cfg_obj_t *typeobj; const char *bracket; isc_textregion_t r; @@ -417,7 +417,7 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone, dns_rdata_t *rdata = NULL; isc_result_t result = ISC_R_SUCCESS; - CFG_LIST_FOREACH (zconfig, element) { + CFG_LIST_FOREACH(zconfig, element) { const isc_sockaddr_t *sa; isc_netaddr_t na; const cfg_obj_t *address = cfg_listelt_value(element); @@ -499,7 +499,7 @@ configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone, isc_region_t sregion, region; isc_result_t result = ISC_R_SUCCESS; - CFG_LIST_FOREACH (zconfig, element) { + CFG_LIST_FOREACH(zconfig, element) { const cfg_obj_t *obj = NULL; const char *str = NULL; dns_fixedname_t fixed_name; @@ -670,7 +670,7 @@ cleanup: dns_db_detach(&db); } for (i = 0; rdatalists[i] != NULL; i++) { - ISC_LIST_FOREACH (rdatalists[i]->rdata, rdata, link) { + ISC_LIST_FOREACH(rdatalists[i]->rdata, rdata, link) { ISC_LIST_UNLINK(rdatalists[i]->rdata, rdata, link); dns_rdata_toregion(rdata, ®ion); isc_mem_put(mctx, rdata, @@ -797,7 +797,7 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey, const isc_sockaddr_t *srcaddr, isc_netaddr_fromsockaddr(&netdst, dstaddr); env = ns_interfacemgr_getaclenv(named_g_server->interfacemgr); - ISC_LIST_FOREACH (named_g_server->viewlist, view, link) { + ISC_LIST_FOREACH(named_g_server->viewlist, view, link) { const dns_name_t *tsig = NULL; if (view->matchrecursiveonly) { @@ -2087,7 +2087,7 @@ named_zone_templateopts(const cfg_obj_t *config, const cfg_obj_t *zoptions) { (void)cfg_map_get(zoptions, "template", &obj); if (obj != NULL && templates != NULL) { const char *tmplname = cfg_obj_asstring(obj); - CFG_LIST_FOREACH (templates, e) { + CFG_LIST_FOREACH(templates, e) { const cfg_obj_t *t = cfg_tuple_get(cfg_listelt_value(e), "name"); if (strcasecmp(cfg_obj_asstring(t), tmplname) == 0) { diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 8d03a49e44..8f8b47af15 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -860,7 +860,7 @@ setup_system(void *arg ISC_ATTR_UNUSED) { * the servers array. */ ns_total = 0; - ISC_LIST_FOREACH (*nslist, sa, link) { + ISC_LIST_FOREACH(*nslist, sa, link) { switch (sa->type.sa.sa_family) { case AF_INET: if (have_ipv4) { @@ -882,7 +882,7 @@ setup_system(void *arg ISC_ATTR_UNUSED) { sizeof(isc_sockaddr_t)); i = 0; - ISC_LIST_FOREACH (*nslist, sa, link) { + ISC_LIST_FOREACH(*nslist, sa, link) { switch (sa->type.sa.sa_family) { case AF_INET: if (have_ipv4) { @@ -2188,7 +2188,7 @@ setzone(dns_name_t *zonename) { name = ISC_LIST_HEAD(secs[DNS_SECTION_ZONE]); ISC_LIST_UNLINK(secs[DNS_SECTION_ZONE], name, link); - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { ISC_LIST_UNLINK(name->list, rdataset, link); dns_rdataset_disassociate(rdataset); dns_message_puttemprdataset(updatemsg, &rdataset); @@ -2824,7 +2824,7 @@ lookforsoa: goto lookforsoa; } - ISC_LIST_FOREACH (rcvmsg->sections[section], n, link) { + ISC_LIST_FOREACH(rcvmsg->sections[section], n, link) { soaset = NULL; result = dns_message_findtype(n, dns_rdatatype_soa, 0, &soaset); if (result == ISC_R_SUCCESS) { diff --git a/bin/plugins/filter-a.c b/bin/plugins/filter-a.c index 745bfe4b9c..23421b31de 100644 --- a/bin/plugins/filter-a.c +++ b/bin/plugins/filter-a.c @@ -592,7 +592,7 @@ process_section(const section_filter_t *filter) { dns_message_t *message = qctx->client->message; - MSG_SECTION_FOREACH (message, section, cur) { + MSG_SECTION_FOREACH(message, section, cur) { if (name != NULL && !dns_name_equal(name, cur)) { /* * We only want to process 'name' and this is not it. diff --git a/bin/plugins/filter-aaaa.c b/bin/plugins/filter-aaaa.c index 938b7389ae..62281208ec 100644 --- a/bin/plugins/filter-aaaa.c +++ b/bin/plugins/filter-aaaa.c @@ -596,7 +596,7 @@ process_section(const section_filter_t *filter) { dns_message_t *message = qctx->client->message; - MSG_SECTION_FOREACH (message, section, cur) { + MSG_SECTION_FOREACH(message, section, cur) { if (name != NULL && !dns_name_equal(name, cur)) { /* * We only want to process 'name' and this is not it. diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index e60f96ce37..d191fd97d1 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -608,7 +608,7 @@ parse_config(isc_mem_t *mctx, const char *keyname, cfg_parser_t **pctxp, if (!key_only) { (void)cfg_map_get(config, "server", &servers); if (servers != NULL) { - CFG_LIST_FOREACH (servers, elt) { + CFG_LIST_FOREACH(servers, elt) { const char *name = NULL; server = cfg_listelt_value(elt); name = cfg_obj_asstring( @@ -645,7 +645,7 @@ parse_config(isc_mem_t *mctx, const char *keyname, cfg_parser_t **pctxp, } else { DO("get config key list", cfg_map_get(config, "key", &keys)); bool match = false; - CFG_LIST_FOREACH (keys, elt) { + CFG_LIST_FOREACH(keys, elt) { const char *name = NULL; key = cfg_listelt_value(elt); @@ -718,7 +718,7 @@ parse_config(isc_mem_t *mctx, const char *keyname, cfg_parser_t **pctxp, result = ISC_R_NOTFOUND; } if (result == ISC_R_SUCCESS) { - CFG_LIST_FOREACH (addresses, element) { + CFG_LIST_FOREACH(addresses, element) { isc_sockaddr_t sa; address = cfg_listelt_value(element); diff --git a/bin/tests/system/dyndb/driver/syncptr.c b/bin/tests/system/dyndb/driver/syncptr.c index 0ff33e158b..490c460ab8 100644 --- a/bin/tests/system/dyndb/driver/syncptr.c +++ b/bin/tests/system/dyndb/driver/syncptr.c @@ -296,7 +296,7 @@ isc_result_t syncptrs(sample_instance_t *inst, dns_name_t *name, dns_rdataset_t *rdataset, dns_diffop_t op) { isc_result_t result = ISC_R_SUCCESS; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); result = syncptr(inst, name, &rdata, rdataset->ttl, op); diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 68a6beefee..339b75644a 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -436,9 +436,9 @@ repopulate_buffer: dns_name_init(&empty_name); - MSG_SECTION_FOREACH (response, DNS_SECTION_ANSWER, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { - DNS_RDATASET_FOREACH (rdataset) { + MSG_SECTION_FOREACH(response, DNS_SECTION_ANSWER, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tofmttext( @@ -2154,7 +2154,7 @@ main(int argc, char *argv[]) { isc_loopmgr_run(); - ISC_LIST_FOREACH (queries, query, link) { + ISC_LIST_FOREACH(queries, query, link) { if (query->ednsopts != NULL) { for (i = 0; i < EDNSOPTS; i++) { if (query->ednsopts[i].value != NULL) { diff --git a/lib/dns/acl.c b/lib/dns/acl.c index 73da955088..d0a65a62d1 100644 --- a/lib/dns/acl.c +++ b/lib/dns/acl.c @@ -231,7 +231,7 @@ dns_acl_match_port_transport(const isc_netaddr_t *reqaddr, REQUIRE(DNS_ACL_VALID(acl)); dns_acl_t *a = UNCONST(acl); /* for ISC_LIST_FOREACH */ - ISC_LIST_FOREACH (a->ports_and_transports, next, link) { + ISC_LIST_FOREACH(a->ports_and_transports, next, link) { bool match_port = true; bool match_transport = true; result = ISC_R_FAILURE; @@ -456,7 +456,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr, const dns_name_t *reqsigner, static void dns__acl_destroy_port_transports(dns_acl_t *acl) { - ISC_LIST_FOREACH (acl->ports_and_transports, port_proto, link) { + ISC_LIST_FOREACH(acl->ports_and_transports, port_proto, link) { ISC_LIST_DEQUEUE(acl->ports_and_transports, port_proto, link); isc_mem_put(acl->mctx, port_proto, sizeof(*port_proto)); } @@ -768,7 +768,7 @@ dns_acl_merge_ports_transports(dns_acl_t *dest, dns_acl_t *source, bool pos) { /* * Merge ports and transports */ - ISC_LIST_FOREACH (source->ports_and_transports, next, link) { + ISC_LIST_FOREACH(source->ports_and_transports, next, link) { const bool next_positive = !next->negative; bool add_negative; diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 096dee62de..0680d77466 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -578,7 +578,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset, REQUIRE(dns_rdatatype_isaddr(rdtype)); - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { /* FIXME: Move to a separate function */ dns_adbnamehooklist_t *hookhead = NULL; dns_adbentry_t *entry = NULL; @@ -608,7 +608,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset, entry = get_attached_and_locked_entry(adb, now, &sockaddr); bool found = false; - ISC_LIST_FOREACH (*hookhead, anh, name_link) { + ISC_LIST_FOREACH(*hookhead, anh, name_link) { if (anh->entry == entry) { found = true; } @@ -766,7 +766,7 @@ shutdown_entries(dns_adb_t *adb) { */ static void clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) { - ISC_LIST_FOREACH (*namehooks, namehook, name_link) { + ISC_LIST_FOREACH(*namehooks, namehook, name_link) { INSIST(DNS_ADBNAMEHOOK_VALID(namehook)); INSIST(DNS_ADBENTRY_VALID(namehook->entry)); @@ -1363,7 +1363,7 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_adbname_t *name) { dns_adbentry_t *entry = NULL; if ((find->options & DNS_ADBFIND_INET) != 0) { - ISC_LIST_FOREACH (name->v4, namehook, name_link) { + ISC_LIST_FOREACH(name->v4, namehook, name_link) { dns_adbaddrinfo_t *addrinfo = NULL; entry = namehook->entry; @@ -1384,7 +1384,7 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_adbname_t *name) { } if ((find->options & DNS_ADBFIND_INET6) != 0) { - ISC_LIST_FOREACH (name->v6, namehook, name_link) { + ISC_LIST_FOREACH(name->v6, namehook, name_link) { dns_adbaddrinfo_t *addrinfo = NULL; entry = namehook->entry; @@ -2054,7 +2054,7 @@ dns_adb_destroyfind(dns_adbfind_t **findp) { * we also need to decrement the reference counter in the * associated adbentry every time we remove one from the list. */ - ISC_LIST_FOREACH (find->list, ai, publink) { + ISC_LIST_FOREACH(find->list, ai, publink) { ISC_LIST_UNLINK(find->list, ai, publink); free_adbaddrinfo(adb, &ai); } @@ -2286,7 +2286,7 @@ dumpfind(dns_adbfind_t *find, FILE *f) { if (!ISC_LIST_EMPTY(find->list)) { fprintf(f, "\tAddresses:\n"); } - ISC_LIST_FOREACH (find->list, ai, publink) { + ISC_LIST_FOREACH(find->list, ai, publink) { sa = &ai->sockaddr; switch (sa->type.sa.sa_family) { case AF_INET: @@ -2318,7 +2318,7 @@ static void print_namehook_list(FILE *f, const char *legend, dns_adb_t *adb, dns_adbnamehooklist_t *list, bool debug, isc_stdtime_t now) { - ISC_LIST_FOREACH (*list, nh, name_link) { + ISC_LIST_FOREACH(*list, nh, name_link) { if (debug) { fprintf(f, ";\tHook(%s) %p\n", legend, nh); } @@ -2345,7 +2345,7 @@ print_fetch_list(FILE *f, dns_adbname_t *n) { static void print_find_list(FILE *f, dns_adbname_t *name) { - ISC_LIST_FOREACH (name->finds, find, plink) { + ISC_LIST_FOREACH(name->finds, find, plink) { dumpfind(find, f); } } diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 7d6b5440e6..faf414b379 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -372,7 +372,7 @@ clearnode(dns_db_t *db, dns_dbnode_t *node) { return result; } - DNS_RDATASETITER_FOREACH (iter) { + DNS_RDATASETITER_FOREACH(iter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iter, &rdataset); diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 155084b4dd..fa0724db42 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -1519,7 +1519,7 @@ catz_process_primaries(dns_catz_zone_t *catz, dns_ipkeylist_t *ipkl, dns_ipkeylist_resize(mctx, ipkl, rcount); - DNS_RDATASET_FOREACH (value) { + DNS_RDATASET_FOREACH(value) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(value, &rdata); /* @@ -2380,7 +2380,7 @@ dns__catz_update_cb(void *data) { } dns_rdataset_init(&rdataset); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &rdataset); /* diff --git a/lib/dns/client.c b/lib/dns/client.c index 21baa0ff25..4a2f4c5000 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -765,7 +765,7 @@ client_resfind(resctx_t *rctx, dns_fetchresponse_t *resp) { * Free temporary resources */ if (ansname != NULL) { - ISC_LIST_FOREACH (ansname->list, rdataset, link) { + ISC_LIST_FOREACH(ansname->list, rdataset, link) { ISC_LIST_UNLINK(ansname->list, rdataset, link); putrdataset(mctx, &rdataset); } @@ -814,7 +814,7 @@ client_resfind(resctx_t *rctx, dns_fetchresponse_t *resp) { } while (want_restart); if (send_event) { - ISC_LIST_FOREACH (rctx->namelist, n, link) { + ISC_LIST_FOREACH(rctx->namelist, n, link) { ISC_LIST_UNLINK(rctx->namelist, n, link); ISC_LIST_APPEND(rctx->rev->answerlist, n, link); } @@ -834,7 +834,7 @@ resolve_done(void *arg) { resarg->result = rev->result; resarg->vresult = rev->vresult; - ISC_LIST_FOREACH (rev->answerlist, name, link) { + ISC_LIST_FOREACH(rev->answerlist, name, link) { ISC_LIST_UNLINK(rev->answerlist, name, link); ISC_LIST_APPEND(*resarg->namelist, name, link); } @@ -993,10 +993,10 @@ dns_client_freeresanswer(dns_client_t *client, dns_namelist_t *namelist) { REQUIRE(DNS_CLIENT_VALID(client)); REQUIRE(namelist != NULL); - ISC_LIST_FOREACH (*namelist, name, link) { + ISC_LIST_FOREACH(*namelist, name, link) { ISC_LIST_UNLINK(*namelist, name, link); - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { ISC_LIST_UNLINK(name->list, rdataset, link); putrdataset(client->mctx, &rdataset); } diff --git a/lib/dns/db.c b/lib/dns/db.c index 29a557a84e..acb8051e39 100644 --- a/lib/dns/db.c +++ b/lib/dns/db.c @@ -101,7 +101,7 @@ dns__db_shutdown(void) { static dns_dbimplementation_t * impfind(const char *name) { - ISC_LIST_FOREACH (implementations, imp, link) { + ISC_LIST_FOREACH(implementations, imp, link) { if (strcasecmp(name, imp->name) == 0) { return imp; } diff --git a/lib/dns/diff.c b/lib/dns/diff.c index 2ea9876e8d..e49ef6e9a5 100644 --- a/lib/dns/diff.c +++ b/lib/dns/diff.c @@ -130,7 +130,7 @@ dns_diff_init(isc_mem_t *mctx, dns_diff_t *diff) { void dns_diff_clear(dns_diff_t *diff) { REQUIRE(DNS_DIFF_VALID(diff)); - ISC_LIST_FOREACH (diff->tuples, t, link) { + ISC_LIST_FOREACH(diff->tuples, t, link) { ISC_LIST_UNLINK(diff->tuples, t, link); dns_difftuple_free(&t); } @@ -184,7 +184,7 @@ dns_diff_appendminimal(dns_diff_t *diff, dns_difftuple_t **tuplep) { * the one we are doing, there must be a programming * error. We report it but try to continue anyway. */ - ISC_LIST_FOREACH (diff->tuples, ot, link) { + ISC_LIST_FOREACH(diff->tuples, ot, link) { if (dns_name_caseequal(&ot->name, &(*tuplep)->name) && dns_rdata_compare(&ot->rdata, &(*tuplep)->rdata) == 0 && ot->ttl == (*tuplep)->ttl) @@ -618,7 +618,7 @@ dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) { dns_difftuple_t **v = NULL; REQUIRE(DNS_DIFF_VALID(diff)); - ISC_LIST_FOREACH (diff->tuples, p, link) { + ISC_LIST_FOREACH(diff->tuples, p, link) { length++; } if (length == 0) { @@ -674,7 +674,7 @@ dns_diff_print(dns_diff_t *diff, FILE *file) { mem = isc_mem_get(diff->mctx, size); - ISC_LIST_FOREACH (diff->tuples, t, link) { + ISC_LIST_FOREACH(diff->tuples, t, link) { isc_buffer_t buf; isc_region_t r; diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 752815fabe..3927ef1162 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -737,7 +737,7 @@ tcp_recv_shutdown(dns_dispatch_t *disp, dns_displist_t *resps, /* * If there are any active responses, shut them all down. */ - ISC_LIST_FOREACH (disp->active, resp, alink) { + ISC_LIST_FOREACH(disp->active, resp, alink) { tcp_recv_add(resps, resp, result); } disp->state = DNS_DISPATCHSTATE_CANCELED; @@ -745,7 +745,7 @@ tcp_recv_shutdown(dns_dispatch_t *disp, dns_displist_t *resps, static void tcp_recv_processall(dns_displist_t *resps, isc_region_t *region) { - ISC_LIST_FOREACH (*resps, resp, rlink) { + ISC_LIST_FOREACH(*resps, resp, rlink) { ISC_LIST_UNLINK(*resps, resp, rlink); dispentry_log(resp, ISC_LOG_DEBUG(90), "read callback: %s", @@ -1837,7 +1837,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { * If there are pending responses, call the connect * callbacks for all of them. */ - ISC_LIST_FOREACH (disp->pending, resp, plink) { + ISC_LIST_FOREACH(disp->pending, resp, plink) { ISC_LIST_UNLINK(disp->pending, resp, plink); ISC_LIST_APPEND(resps, resp, rlink); resp->result = eresult; @@ -1871,7 +1871,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { disp->state = DNS_DISPATCHSTATE_NONE; } - ISC_LIST_FOREACH (resps, resp, rlink) { + ISC_LIST_FOREACH(resps, resp, rlink) { ISC_LIST_UNLINK(resps, resp, rlink); resp_connected(resp); diff --git a/lib/dns/dlz.c b/lib/dns/dlz.c index e220e75937..452a6ee90f 100644 --- a/lib/dns/dlz.c +++ b/lib/dns/dlz.c @@ -97,7 +97,7 @@ dns__dlz_shutdown(void) { */ static dns_dlzimplementation_t * dlz_impfind(const char *name) { - ISC_LIST_FOREACH (dlz_implementations, imp, link) { + ISC_LIST_FOREACH(dlz_implementations, imp, link) { if (strcasecmp(name, imp->name) == 0) { return imp; } @@ -124,7 +124,7 @@ dns_dlzallowzonexfr(dns_view_t *view, const dns_name_t *name, /* * Find a driver in which the zone exists and transfer is supported */ - ISC_LIST_FOREACH (view->dlz_searched, dlzdb, link) { + ISC_LIST_FOREACH(view->dlz_searched, dlzdb, link) { REQUIRE(DNS_DLZ_VALID(dlzdb)); allowzonexfr = dlzdb->implementation->methods->allowzonexfr; diff --git a/lib/dns/dns64.c b/lib/dns/dns64.c index 9d82849de3..f13c06ec12 100644 --- a/lib/dns/dns64.c +++ b/lib/dns/dns64.c @@ -270,7 +270,7 @@ dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr, i = 0; ok = 0; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; if (aaaaok == NULL || !aaaaok[i]) { dns_rdataset_current(rdataset, &rdata); @@ -413,7 +413,7 @@ dns_dns64_findprefix(dns_rdataset_t *rdataset, isc_netprefix_t *prefix, dns_rdataset_clone(rdataset, &outer); dns_rdataset_clone(rdataset, &inner); - DNS_RDATASET_FOREACH (&outer) { + DNS_RDATASET_FOREACH(&outer) { dns_rdata_t rd1 = DNS_RDATA_INIT; dns_rdataset_current(&outer, &rd1); oplen = 0; @@ -426,7 +426,7 @@ dns_dns64_findprefix(dns_rdataset_t *rdataset, isc_netprefix_t *prefix, /* Look for the 192.0.0.171 match. */ bool matched = false; - DNS_RDATASET_FOREACH (&inner) { + DNS_RDATASET_FOREACH(&inner) { dns_rdata_t rd2 = DNS_RDATA_INIT; dns_rdataset_current(&inner, &rd2); @@ -484,11 +484,11 @@ dns_dns64_apply(isc_mem_t *mctx, dns_dns64list_t dns64s, unsigned int count, aaaalist->rdclass = dns_rdataclass_in; aaaalist->type = dns_rdatatype_aaaa; - DNS_RDATASET_FOREACH (a) { + DNS_RDATASET_FOREACH(a) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(a, &rdata); - ISC_LIST_FOREACH (dns64s, dns64, link) { + ISC_LIST_FOREACH(dns64s, dns64, link) { dns_rdata_t *dns64_rdata = NULL; isc_region_t r; @@ -522,7 +522,7 @@ dns_dns64_apply(isc_mem_t *mctx, dns_dns64list_t dns64s, unsigned int count, /* No applicable dns64; free the resources */ isc_buffer_free(&buffer); - ISC_LIST_FOREACH (aaaalist->rdata, rdata, link) { + ISC_LIST_FOREACH(aaaalist->rdata, rdata, link) { ISC_LIST_UNLINK(aaaalist->rdata, rdata, link); dns_message_puttemprdata(message, &rdata); } diff --git a/lib/dns/dnssec.c b/lib/dns/dnssec.c index 12b096a88f..dffddd9a0b 100644 --- a/lib/dns/dnssec.c +++ b/lib/dns/dnssec.c @@ -1049,7 +1049,7 @@ dns_dnssec_signs(dns_rdata_t *rdata, const dns_name_t *name, RUNTIME_CHECK(result == ISC_R_SUCCESS); keytag = dst_key_id(dstkey); - DNS_RDATASET_FOREACH (sigrdataset) { + DNS_RDATASET_FOREACH(sigrdataset) { dns_rdata_t sigrdata = DNS_RDATA_INIT; dns_rdataset_current(sigrdataset, &sigrdata); result = dns_rdata_tostruct(&sigrdata, &sig, NULL); @@ -1084,7 +1084,7 @@ dns_dnssec_haszonekey(dns_rdataset_t *keyset) { return false; } - DNS_RDATASET_FOREACH (keyset) { + DNS_RDATASET_FOREACH(keyset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_dnskey_t key; @@ -1361,8 +1361,8 @@ dns_dnssec_findmatchingkeys(const dns_name_t *origin, dns_kasp_t *kasp, RETERR(findmatchingkeys(keydir, namebuf, len, mctx, now, &list)); } else if (keystores != NULL) { - ISC_LIST_FOREACH (*keystores, keystore, link) { - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(*keystores, keystore, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { if (dns_kasp_key_keystore(kkey) == keystore) { const char *directory = dns_keystore_directory(keystore, @@ -1384,7 +1384,7 @@ dns_dnssec_findmatchingkeys(const dns_name_t *origin, dns_kasp_t *kasp, } failure: - ISC_LIST_FOREACH (list, key, link) { + ISC_LIST_FOREACH(list, key, link) { ISC_LIST_UNLINK(list, key, link); INSIST(key->key != NULL); dst_key_free(&key->key); @@ -1406,7 +1406,7 @@ addkey(dns_dnsseckeylist_t *keylist, dst_key_t **newkey, bool savekeys, dns_dnsseckey_t *key = NULL; /* Skip duplicates */ - ISC_LIST_FOREACH (*keylist, k, link) { + ISC_LIST_FOREACH(*keylist, k, link) { if (dst_key_id(k->key) == dst_key_id(*newkey) && dst_key_alg(k->key) == dst_key_alg(*newkey) && dns_name_equal(dst_key_name(k->key), dst_key_name(*newkey))) @@ -1465,13 +1465,13 @@ mark_active_keys(dns_dnsseckeylist_t *keylist, dns_rdataset_t *rrsigs) { dns_rdataset_init(&sigs); dns_rdataset_clone(rrsigs, &sigs); - ISC_LIST_FOREACH (*keylist, key, link) { + ISC_LIST_FOREACH(*keylist, key, link) { uint16_t keyid, sigid; dst_algorithm_t keyalg, sigalg; keyid = dst_key_id(key->key); keyalg = dst_key_alg(key->key); - DNS_RDATASET_FOREACH (&sigs) { + DNS_RDATASET_FOREACH(&sigs) { dns_rdata_rrsig_t sig; dns_rdata_reset(&rdata); @@ -1507,7 +1507,7 @@ keyfromfile(dns_kasp_t *kasp, const char *keydir, dst_key_t *key, int type, dst_key_alg(key), type, directory, mctx, savekey); } else { - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { dns_keystore_t *ks = dns_kasp_key_keystore(kkey); directory = dns_keystore_directory(ks, keydir); result = dst_key_fromfile(dst_key_name(key), @@ -1541,7 +1541,7 @@ dns_dnssec_keylistfromrdataset(const dns_name_t *origin, dns_kasp_t *kasp, dns_rdataset_init(&keys); dns_rdataset_clone(keyset, &keys); - DNS_RDATASET_FOREACH (&keys) { + DNS_RDATASET_FOREACH(&keys) { dns_rdata_t rdata = DNS_RDATA_INIT; dst_algorithm_t algorithm; dns_rdata_dnskey_t keystruct; @@ -1817,7 +1817,7 @@ exists(dns_rdataset_t *rdataset, dns_rdata_t *rdata) { dns_rdataset_t trdataset = DNS_RDATASET_INIT; dns_rdataset_clone(rdataset, &trdataset); - DNS_RDATASET_FOREACH (&trdataset) { + DNS_RDATASET_FOREACH(&trdataset) { dns_rdata_t current = DNS_RDATA_INIT; dns_rdataset_current(&trdataset, ¤t); @@ -1918,7 +1918,7 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys, cdnskeyttl = cdnskey->ttl; } - ISC_LIST_FOREACH (*keys, key, link) { + ISC_LIST_FOREACH(*keys, key, link) { dns_rdata_t cdnskeyrdata = DNS_RDATA_INIT; dns_name_t *origin = dst_key_name(key->key); @@ -1930,7 +1930,7 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys, char keystr[DST_KEY_FORMATSIZE]; dst_key_format(key->key, keystr, sizeof(keystr)); - ISC_LIST_FOREACH (*digests, alg, link) { + ISC_LIST_FOREACH(*digests, alg, link) { RETERR(add_cds(key, &cdnskeyrdata, (const char *)keystr, cds, alg->digest, cdsttl, diff, @@ -1992,7 +1992,7 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys, /* * Unconditionally remove CDS/DNSKEY records for removed keys. */ - ISC_LIST_FOREACH (*rmkeys, key, link) { + ISC_LIST_FOREACH(*rmkeys, key, link) { dns_rdata_t cdnskeyrdata = DNS_RDATA_INIT; dns_name_t *origin = dst_key_name(key->key); @@ -2128,7 +2128,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys, * Also, if there are keys published in the zone already, * use their TTL for all subsequent published keys. */ - ISC_LIST_FOREACH (*keys, key, link) { + ISC_LIST_FOREACH(*keys, key, link) { if (key->source == dns_keysource_user && (key->hint_publish || key->force_publish)) { @@ -2148,7 +2148,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys, if (!found_ttl && !ISC_LIST_EMPTY(*newkeys)) { dns_ttl_t shortest = 0; - ISC_LIST_FOREACH (*newkeys, key, link) { + ISC_LIST_FOREACH(*newkeys, key, link) { dns_ttl_t thisttl = dst_key_getttl(key->key); if (thisttl != 0 && (shortest == 0 || thisttl < shortest)) @@ -2166,13 +2166,13 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys, * Second, scan the list of newly found keys looking for matches * with known keys, and update accordingly. */ - ISC_LIST_FOREACH (*newkeys, key1, link) { + ISC_LIST_FOREACH(*newkeys, key1, link) { bool key_revoked = false; char keystr1[DST_KEY_FORMATSIZE]; char keystr2[DST_KEY_FORMATSIZE]; dns_dnsseckey_t *key2 = NULL; - ISC_LIST_FOREACH (*keys, k2, link) { + ISC_LIST_FOREACH(*keys, k2, link) { int f1 = dst_key_flags(key1->key); int f2 = dst_key_flags(k2->key); int nr1 = f1 & ~DNS_KEYFLAG_REVOKE; @@ -2323,7 +2323,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys, } /* Free any leftover keys in newkeys */ - ISC_LIST_FOREACH (*newkeys, key1, link) { + ISC_LIST_FOREACH(*newkeys, key1, link) { ISC_LIST_UNLINK(*newkeys, key1, link); dns_dnsseckey_destroy(mctx, &key1); } @@ -2347,7 +2347,7 @@ dns_dnssec_matchdskey(dns_name_t *name, dns_rdata_t *dsrdata, result = dns_rdata_tostruct(dsrdata, &ds, NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); - DNS_RDATASET_FOREACH (keyset) { + DNS_RDATASET_FOREACH(keyset) { dns_rdata_t newdsrdata = DNS_RDATA_INIT; dns_rdata_reset(keyrdata); diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c index 3387be4cbf..646d179cf8 100644 --- a/lib/dns/dyndb.c +++ b/lib/dns/dyndb.c @@ -70,7 +70,7 @@ dns__dyndb_shutdown(void) { static dyndb_implementation_t * impfind(const char *name) { - ISC_LIST_FOREACH (dyndb_implementations, imp, link) { + ISC_LIST_FOREACH(dyndb_implementations, imp, link) { if (strcasecmp(name, imp->name) == 0) { return imp; } diff --git a/lib/dns/forward.c b/lib/dns/forward.c index aa2ba37016..14e296ffe1 100644 --- a/lib/dns/forward.c +++ b/lib/dns/forward.c @@ -97,7 +97,7 @@ dns_fwdtable_addfwd(dns_fwdtable_t *fwdtable, const dns_name_t *name, forwarders = new_forwarders(fwdtable->mctx, name, fwdpolicy); - ISC_LIST_FOREACH (*fwdrs, fwd, link) { + ISC_LIST_FOREACH(*fwdrs, fwd, link) { dns_forwarder_t *nfwd = isc_mem_get(fwdtable->mctx, sizeof(*nfwd)); *nfwd = *fwd; @@ -135,7 +135,7 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, const dns_name_t *name, forwarders = new_forwarders(fwdtable->mctx, name, fwdpolicy); - ISC_LIST_FOREACH (*addrs, sa, link) { + ISC_LIST_FOREACH(*addrs, sa, link) { dns_forwarder_t *fwd = isc_mem_get(fwdtable->mctx, sizeof(*fwd)); *fwd = (dns_forwarder_t){ .addr = *sa, @@ -196,7 +196,7 @@ dns_fwdtable_destroy(dns_fwdtable_t **fwdtablep) { static void destroy_forwarders(dns_forwarders_t *forwarders) { - ISC_LIST_FOREACH (forwarders->fwdrs, fwd, link) { + ISC_LIST_FOREACH(forwarders->fwdrs, fwd, link) { ISC_LIST_UNLINK(forwarders->fwdrs, fwd, link); if (fwd->tlsname != NULL) { dns_name_free(fwd->tlsname, forwarders->mctx); diff --git a/lib/dns/journal.c b/lib/dns/journal.c index 30c5ddbc58..894fbea9f3 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -1207,7 +1207,7 @@ dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff) { * Pass 1: determine the buffer size needed, and * keep track of SOA serial numbers. */ - ISC_LIST_FOREACH (diff->tuples, t, link) { + ISC_LIST_FOREACH(diff->tuples, t, link) { if (t->rdata.type == dns_rdatatype_soa) { if (j->x.n_soa < 2) { j->x.pos[j->x.n_soa].serial = @@ -1237,7 +1237,7 @@ dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff) { /* * Pass 2. Write RRs to buffer. */ - ISC_LIST_FOREACH (diff->tuples, t, link) { + ISC_LIST_FOREACH(diff->tuples, t, link) { /* * Write the RR header. */ @@ -2140,11 +2140,11 @@ get_name_diff(dns_db_t *db, dns_dbversion_t *ver, isc_stdtime_t now, goto cleanup_node; } - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); dns_difftuple_create(diff->mctx, op, name, rdataset.ttl, diff --git a/lib/dns/kasp.c b/lib/dns/kasp.c index 8fac378ce6..722c069d3a 100644 --- a/lib/dns/kasp.c +++ b/lib/dns/kasp.c @@ -69,13 +69,13 @@ static void destroy(dns_kasp_t *kasp) { REQUIRE(!ISC_LINK_LINKED(kasp, link)); - ISC_LIST_FOREACH (kasp->keys, key, link) { + ISC_LIST_FOREACH(kasp->keys, key, link) { ISC_LIST_UNLINK(kasp->keys, key, link); dns_kasp_key_destroy(key); } INSIST(ISC_LIST_EMPTY(kasp->keys)); - ISC_LIST_FOREACH (kasp->digests, digest, link) { + ISC_LIST_FOREACH(kasp->digests, digest, link) { ISC_LIST_UNLINK(kasp->digests, digest, link); isc_mem_put(kasp->mctx, digest, sizeof(*digest)); } @@ -348,7 +348,7 @@ dns_kasplist_find(dns_kasplist_t *list, const char *name, dns_kasp_t **kaspp) { return ISC_R_NOTFOUND; } - ISC_LIST_FOREACH (*list, kasp, link) { + ISC_LIST_FOREACH(*list, kasp, link) { if (strcmp(kasp->name, name) == 0) { dns_kasp_attach(kasp, kaspp); return ISC_R_SUCCESS; @@ -654,7 +654,7 @@ dns_kasp_adddigest(dns_kasp_t *kasp, dns_dsdigest_t alg) { } /* Suppress duplicates */ - ISC_LIST_FOREACH (kasp->digests, d, link) { + ISC_LIST_FOREACH(kasp->digests, d, link) { if (d->digest == alg) { return; } diff --git a/lib/dns/keymgr.c b/lib/dns/keymgr.c index 30039ca519..3a18b26224 100644 --- a/lib/dns/keymgr.c +++ b/lib/dns/keymgr.c @@ -452,7 +452,7 @@ keymgr_keyid_conflict(dst_key_t *newkey, uint16_t min, uint16_t max, return true; } - ISC_LIST_FOREACH (*keys, dkey, link) { + ISC_LIST_FOREACH(*keys, dkey, link) { if (dst_key_alg(dkey->key) != alg) { continue; } @@ -657,7 +657,7 @@ keymgr_direct_dep(dst_key_t *d, dst_key_t *k) { */ static bool keymgr_dep(dst_key_t *k, dns_dnsseckeylist_t *keyring, uint32_t *dep) { - ISC_LIST_FOREACH (*keyring, d, link) { + ISC_LIST_FOREACH(*keyring, d, link) { /* * Check if k is a direct successor of d, e.g. d depends on k. */ @@ -732,7 +732,7 @@ keymgr_key_is_successor(dst_key_t *x, dst_key_t *z, dst_key_t *key, int type, zst[i] = state; } - ISC_LIST_FOREACH (*keyring, y, link) { + ISC_LIST_FOREACH(*keyring, y, link) { if (dst_key_id(y->key) == dst_key_id(z)) { continue; } @@ -775,7 +775,7 @@ keymgr_key_exists_with_state(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key, dst_key_state_t states[NUM_KEYSTATES], dst_key_state_t states2[NUM_KEYSTATES], bool check_successor, bool match_algorithms) { - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { if (match_algorithms && (dst_key_alg(dkey->key) != dst_key_alg(key->key))) { @@ -797,7 +797,7 @@ keymgr_key_exists_with_state(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key, * We have to make sure that the key we are checking, also * has a successor relationship with another key. */ - ISC_LIST_FOREACH (*keyring, skey, link) { + ISC_LIST_FOREACH(*keyring, skey, link) { if (skey == dkey) { continue; } @@ -829,7 +829,7 @@ keymgr_key_exists_with_state(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key, static bool keymgr_key_has_successor(dns_dnsseckey_t *predecessor, dns_dnsseckeylist_t *keyring) { - ISC_LIST_FOREACH (*keyring, successor, link) { + ISC_LIST_FOREACH(*keyring, successor, link) { if (keymgr_direct_dep(predecessor->key, successor->key)) { return true; } @@ -857,7 +857,7 @@ keymgr_ds_hidden_or_chained(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key, /* successor n/a */ dst_key_state_t na[NUM_KEYSTATES] = { NA, NA, NA, NA }; - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { if (match_algorithms && (dst_key_alg(dkey->key) != dst_key_alg(key->key))) { @@ -924,7 +924,7 @@ keymgr_dnskey_hidden_or_chained(dns_dnsseckeylist_t *keyring, /* successor n/a */ dst_key_state_t na[NUM_KEYSTATES] = { NA, NA, NA, NA }; - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { if (match_algorithms && (dst_key_alg(dkey->key) != dst_key_alg(key->key))) { @@ -1456,7 +1456,7 @@ transition: changed = false; /* For all keys in the zone. */ - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { char keystr[DST_KEY_FORMATSIZE]; dst_key_format(dkey->key, keystr, sizeof(keystr)); @@ -1820,7 +1820,7 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key, * Check if there is a key available in pool because keys * may have been pregenerated with dnssec-keygen. */ - ISC_LIST_FOREACH (*keyring, candidate, link) { + ISC_LIST_FOREACH(*keyring, candidate, link) { if (dns_kasp_key_match(kaspkey, candidate) && dst_key_is_unused(candidate->key)) { @@ -2023,7 +2023,7 @@ static bool dst_key_doublematch(dns_dnsseckey_t *key, dns_kasp_t *kasp) { int matches = 0; - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { if (dns_kasp_key_match(kkey, key)) { matches++; } @@ -2068,14 +2068,14 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass, namebuf, dns_kasp_getname(kasp)); } - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { dst_key_format(dkey->key, keystr, sizeof(keystr)); isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1), "keymgr: keyring: %s (policy %s)", keystr, dns_kasp_getname(kasp)); } - ISC_LIST_FOREACH (*dnskeys, dkey, link) { + ISC_LIST_FOREACH(*dnskeys, dkey, link) { dst_key_format(dkey->key, keystr, sizeof(keystr)); isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1), @@ -2084,17 +2084,17 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass, } } - ISC_LIST_FOREACH (*dnskeys, dkey, link) { + ISC_LIST_FOREACH(*dnskeys, dkey, link) { numkeys++; } /* Do we need to remove keys? */ - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { bool found_match = false; keymgr_key_init(dkey, kasp, now, numkeys == 1); - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { if (dns_kasp_key_match(kkey, dkey)) { found_match = true; break; @@ -2126,13 +2126,13 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass, } /* Create keys according to the policy, if come in short. */ - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { uint32_t lifetime = dns_kasp_key_lifetime(kkey); dns_dnsseckey_t *active_key = NULL; bool rollover_allowed = true; /* Do we have keys available for this kasp key? */ - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { if (dns_kasp_key_match(kkey, dkey)) { /* Found a match. */ dst_key_format(dkey->key, keystr, @@ -2192,7 +2192,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass, * a successor key. Check if we have an appropriate * state file. */ - ISC_LIST_FOREACH (*dnskeys, dnskey, link) { + ISC_LIST_FOREACH(*dnskeys, dnskey, link) { if (dns_kasp_key_match(kkey, dnskey)) { /* Found a match. */ dst_key_format(dnskey->key, keystr, @@ -2235,7 +2235,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass, keymgr_update(keyring, kasp, now, nexttime, secure_to_insecure); /* Store key states and update hints. */ - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { bool modified = dst_key_ismodified(dkey->key); if (dst_key_getttl(dkey->key) != dns_kasp_dnskeyttl(kasp)) { dst_key_setttl(dkey->key, dns_kasp_dnskeyttl(kasp)); @@ -2269,7 +2269,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass, failure: if (result != ISC_R_SUCCESS) { - ISC_LIST_FOREACH (newkeys, newkey, link) { + ISC_LIST_FOREACH(newkeys, newkey, link) { ISC_LIST_UNLINK(newkeys, newkey, link); INSIST(newkey->key != NULL); dst_key_free(&newkey->key); @@ -2298,7 +2298,7 @@ keymgr_checkds(dns_kasp_t *kasp, dns_dnsseckeylist_t *keyring, REQUIRE(DNS_KASP_VALID(kasp)); REQUIRE(keyring != NULL); - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { isc_result_t ret; bool ksk = false; @@ -2544,7 +2544,7 @@ dns_keymgr_status(dns_kasp_t *kasp, dns_dnsseckeylist_t *keyring, isc_stdtime_tostring(now, timestr, sizeof(timestr)); RETERR(isc_buffer_printf(&buf, "%s\n", timestr)); - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { char algstr[DNS_NAME_FORMATSIZE]; bool ksk = false, zsk = false; @@ -2612,7 +2612,7 @@ dns_keymgr_rollover(dns_kasp_t *kasp, dns_dnsseckeylist_t *keyring, REQUIRE(DNS_KASP_VALID(kasp)); REQUIRE(keyring != NULL); - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { if (dst_key_id(dkey->key) != id) { continue; } @@ -2685,7 +2685,7 @@ dns_keymgr_offline(const dns_name_t *origin, dns_dnsseckeylist_t *keyring, *nexttime = 0; /* Store key states and update hints. */ - ISC_LIST_FOREACH (*keyring, dkey, link) { + ISC_LIST_FOREACH(*keyring, dkey, link) { bool modified; bool ksk = false, zsk = false; isc_stdtime_t active = 0, published = 0, inactive = 0, diff --git a/lib/dns/keystore.c b/lib/dns/keystore.c index 2e87484807..ff05486f16 100644 --- a/lib/dns/keystore.c +++ b/lib/dns/keystore.c @@ -262,7 +262,7 @@ dns_keystorelist_find(dns_keystorelist_t *list, const char *name, return ISC_R_NOTFOUND; } - ISC_LIST_FOREACH (*list, keystore, link) { + ISC_LIST_FOREACH(*list, keystore, link) { if (strcmp(keystore->name, name) == 0) { dns_keystore_attach(keystore, kspp); return ISC_R_SUCCESS; diff --git a/lib/dns/keytable.c b/lib/dns/keytable.c index 54b7a5633f..f7a926c698 100644 --- a/lib/dns/keytable.c +++ b/lib/dns/keytable.c @@ -103,7 +103,7 @@ static void destroy_keynode(dns_keynode_t *knode) { isc_rwlock_destroy(&knode->rwlock); if (knode->dslist != NULL) { - ISC_LIST_FOREACH (knode->dslist->rdata, rdata, link) { + ISC_LIST_FOREACH(knode->dslist->rdata, rdata, link) { ISC_LIST_UNLINK(knode->dslist->rdata, rdata, link); isc_mem_put(knode->mctx, rdata->data, DNS_DS_BUFFERSIZE); @@ -200,7 +200,7 @@ add_ds(dns_keynode_t *knode, dns_rdata_ds_t *ds, isc_mem_t *mctx) { knode->dsset.trust = dns_trust_ultimate; } - ISC_LIST_FOREACH (knode->dslist->rdata, rdata, link) { + ISC_LIST_FOREACH(knode->dslist->rdata, rdata, link) { if (dns_rdata_compare(rdata, dsrdata) == 0) { exists = true; break; @@ -243,7 +243,7 @@ delete_ds(dns_qp_t *qp, dns_keytable_t *keytable, dns_keynode_t *knode, return result; } - ISC_LIST_FOREACH (knode->dslist->rdata, rdata, link) { + ISC_LIST_FOREACH(knode->dslist->rdata, rdata, link) { if (dns_rdata_compare(rdata, &dsrdata) == 0) { found = true; break; @@ -264,7 +264,7 @@ delete_ds(dns_qp_t *qp, dns_keytable_t *keytable, dns_keynode_t *knode, */ newnode = new_keynode(&knode->name, NULL, keytable, knode->managed, knode->initial); - ISC_LIST_FOREACH (knode->dslist->rdata, rdata, link) { + ISC_LIST_FOREACH(knode->dslist->rdata, rdata, link) { if (dns_rdata_compare(rdata, &dsrdata) != 0) { dns_rdata_ds_t ds0; result = dns_rdata_tostruct(rdata, &ds0, NULL); @@ -611,7 +611,7 @@ keynode_dslist_totext(dns_keynode_t *keynode, isc_buffer_t **text) { dns_name_format(&keynode->name, namebuf, sizeof(namebuf)); - DNS_RDATASET_FOREACH (&dsset) { + DNS_RDATASET_FOREACH(&dsset) { char algbuf[DNS_SECALG_FORMATSIZE]; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_ds_t ds; diff --git a/lib/dns/master.c b/lib/dns/master.c index 7be4920a1a..35a935e5ac 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -2116,10 +2116,10 @@ cleanup: callbacks->commit(callbacks->add_private); } - ISC_LIST_FOREACH (current_list, this, link) { + ISC_LIST_FOREACH(current_list, this, link) { ISC_LIST_UNLINK(current_list, this, link); } - ISC_LIST_FOREACH (glue_list, this, link) { + ISC_LIST_FOREACH(glue_list, this, link) { ISC_LIST_UNLINK(glue_list, this, link); } if (rdatalist != NULL) { @@ -2757,11 +2757,11 @@ grow_rdatalist(int new_len, dns_rdatalist_t *oldlist, int old_len, newlist = isc_mem_cget(mctx, new_len, sizeof(newlist[0])); ISC_LIST_INIT(save); - ISC_LIST_FOREACH (*current, this, link) { + ISC_LIST_FOREACH(*current, this, link) { ISC_LIST_UNLINK(*current, this, link); ISC_LIST_APPEND(save, this, link); } - ISC_LIST_FOREACH (save, this, link) { + ISC_LIST_FOREACH(save, this, link) { ISC_LIST_UNLINK(save, this, link); INSIST(rdlcount < new_len); newlist[rdlcount] = *this; @@ -2770,11 +2770,11 @@ grow_rdatalist(int new_len, dns_rdatalist_t *oldlist, int old_len, } ISC_LIST_INIT(save); - ISC_LIST_FOREACH (*glue, this, link) { + ISC_LIST_FOREACH(*glue, this, link) { ISC_LIST_UNLINK(*glue, this, link); ISC_LIST_APPEND(save, this, link); } - ISC_LIST_FOREACH (save, this, link) { + ISC_LIST_FOREACH(save, this, link) { ISC_LIST_UNLINK(save, this, link); INSIST(rdlcount < new_len); newlist[rdlcount] = *this; @@ -2805,13 +2805,13 @@ grow_rdata(int new_len, dns_rdata_t *oldlist, int old_len, /* * Copy current relinking. */ - ISC_LIST_FOREACH (*current, this, link) { + ISC_LIST_FOREACH(*current, this, link) { ISC_LIST_INIT(save); - ISC_LIST_FOREACH (this->rdata, rdata, link) { + ISC_LIST_FOREACH(this->rdata, rdata, link) { ISC_LIST_UNLINK(this->rdata, rdata, link); ISC_LIST_APPEND(save, rdata, link); } - ISC_LIST_FOREACH (save, rdata, link) { + ISC_LIST_FOREACH(save, rdata, link) { ISC_LIST_UNLINK(save, rdata, link); INSIST(rdcount < new_len); newlist[rdcount] = *rdata; @@ -2823,13 +2823,13 @@ grow_rdata(int new_len, dns_rdata_t *oldlist, int old_len, /* * Copy glue relinking. */ - ISC_LIST_FOREACH (*glue, this, link) { + ISC_LIST_FOREACH(*glue, this, link) { ISC_LIST_INIT(save); - ISC_LIST_FOREACH (this->rdata, rdata, link) { + ISC_LIST_FOREACH(this->rdata, rdata, link) { ISC_LIST_UNLINK(this->rdata, rdata, link); ISC_LIST_APPEND(save, rdata, link); } - ISC_LIST_FOREACH (save, rdata, link) { + ISC_LIST_FOREACH(save, rdata, link) { ISC_LIST_UNLINK(save, rdata, link); INSIST(rdcount < new_len); newlist[rdcount] = *rdata; @@ -2888,7 +2888,7 @@ commit(dns_rdatacallbacks_t *callbacks, dns_loadctx_t *lctx, error = callbacks->error; - ISC_LIST_FOREACH (*head, this, link) { + ISC_LIST_FOREACH(*head, this, link) { dns_rdataset_init(&dataset); dns_rdatalist_tordataset(this, &dataset); dataset.trust = dns_trust_ultimate; @@ -2939,7 +2939,7 @@ is_glue(rdatalist_head_t *head, dns_name_t *owner) { /* * Find NS rrset. */ - ISC_LIST_FOREACH (*head, this, link) { + ISC_LIST_FOREACH(*head, this, link) { if (this->type == dns_rdatatype_ns) { nslist = this; break; @@ -2949,7 +2949,7 @@ is_glue(rdatalist_head_t *head, dns_name_t *owner) { return false; } - ISC_LIST_FOREACH (nslist->rdata, rdata, link) { + ISC_LIST_FOREACH(nslist->rdata, rdata, link) { dns_name_init(&name); dns_rdata_toregion(rdata, ®ion); dns_name_fromregion(&name, ®ion); diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index ca5b031318..08a30a824c 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -514,7 +514,7 @@ ncache_summary(dns_rdataset_t *rdataset, bool omit_final_dot, do { dns_ncache_current(rdataset, &name, &rds); - DNS_RDATASET_FOREACH (&rds) { + DNS_RDATASET_FOREACH(&rds) { if ((ctx->style.flags & DNS_STYLEFLAG_INDENT) != 0 || (ctx->style.flags & DNS_STYLEFLAG_YAML) != 0) { @@ -605,7 +605,7 @@ rdataset_totext(dns_rdataset_t *rdataset, const dns_name_t *owner_name, dns_rdataset_getownercase(rdataset, name); } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { column = 0; /* @@ -1252,7 +1252,7 @@ restart: isc_buffer_copyregion(buffer, &r); totallen += sizeof(dlen) + r.length; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -1317,7 +1317,7 @@ dump_rdatasets_raw(isc_mem_t *mctx, const dns_name_t *owner_name, dns_name_t *name = dns_fixedname_initname(&fixed); dns_name_copy(owner_name, name); - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); @@ -1708,7 +1708,7 @@ dumptostream(dns_dumpctx_t *dctx) { CHECK(writeheader(dctx)); - DNS_DBITERATOR_FOREACH (dctx->dbiter) { + DNS_DBITERATOR_FOREACH(dctx->dbiter) { dns_rdatasetiter_t *rdsiter = NULL; dns_dbnode_t *node = NULL; diff --git a/lib/dns/message.c b/lib/dns/message.c index 18e19c3d13..c4727bab51 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -449,7 +449,7 @@ msginit(dns_message_t *m) { static void msgresetname(dns_message_t *msg, dns_name_t *name) { - ISC_LIST_FOREACH (name->list, rds, link) { + ISC_LIST_FOREACH(name->list, rds, link) { ISC_LIST_UNLINK(name->list, rds, link); dns__message_putassociatedrdataset(msg, &rds); } @@ -459,7 +459,7 @@ static void msgresetnames(dns_message_t *msg, unsigned int first_section) { /* Clean up name lists. */ for (size_t i = first_section; i < DNS_SECTION_MAX; i++) { - ISC_LIST_FOREACH (msg->sections[i], name, link) { + ISC_LIST_FOREACH(msg->sections[i], name, link) { ISC_LIST_UNLINK(msg->sections[i], name, link); msgresetname(msg, name); dns_message_puttempname(msg, &name); @@ -537,10 +537,10 @@ msgreset(dns_message_t *msg, bool everything) { * The memory isn't lost since these are part of message blocks we * have allocated. */ - ISC_LIST_FOREACH (msg->freerdata, rdata, link) { + ISC_LIST_FOREACH(msg->freerdata, rdata, link) { ISC_LIST_UNLINK(msg->freerdata, rdata, link); } - ISC_LIST_FOREACH (msg->freerdatalist, rdatalist, link) { + ISC_LIST_FOREACH(msg->freerdatalist, rdatalist, link) { ISC_LIST_UNLINK(msg->freerdatalist, rdatalist, link); } @@ -757,7 +757,7 @@ name_match(void *node, const void *key) { static isc_result_t findname(dns_name_t **foundname, const dns_name_t *target, dns_namelist_t *section) { - ISC_LIST_FOREACH_REV (*section, name, link) { + ISC_LIST_FOREACH_REV(*section, name, link) { if (dns_name_equal(name, target)) { if (foundname != NULL) { *foundname = name; @@ -796,7 +796,7 @@ dns_message_findtype(dns_name_t *name, dns_rdatatype_t type, REQUIRE(name != NULL); REQUIRE(rdatasetp == NULL || *rdatasetp == NULL); - ISC_LIST_FOREACH_REV (name->list, rds, link) { + ISC_LIST_FOREACH_REV(name->list, rds, link) { if (rds->type == type && rds->covers == covers) { SET_IF_NOT_NULL(rdatasetp, rds); return ISC_R_SUCCESS; @@ -910,7 +910,7 @@ getrdata(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t dctx, static void cleanup_name_hashmaps(dns_namelist_t *section) { - ISC_LIST_FOREACH (*section, name, link) { + ISC_LIST_FOREACH(*section, name, link) { if (name->hashmap != NULL) { isc_hashmap_destroy(&name->hashmap); } @@ -1973,8 +1973,8 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid, return ISC_R_SUCCESS; } - ISC_LIST_FOREACH (*section, n, link) { - ISC_LIST_FOREACH (n->list, rds, link) { + ISC_LIST_FOREACH(*section, n, link) { + ISC_LIST_FOREACH(n->list, rds, link) { if (rds->attributes.rendered) { continue; } @@ -2276,8 +2276,8 @@ dns_message_renderreset(dns_message_t *msg) { for (size_t i = 0; i < DNS_SECTION_MAX; i++) { msg->cursors[i] = NULL; msg->counts[i] = 0; - MSG_SECTION_FOREACH (msg, i, name) { - ISC_LIST_FOREACH (name->list, rds, link) { + MSG_SECTION_FOREACH(msg, i, name) { + ISC_LIST_FOREACH(name->list, rds, link) { rds->attributes.rendered = false; } } @@ -3275,8 +3275,8 @@ dns_message_sectiontotext(dns_message_t *msg, dns_section_t section, bool has_yaml = (sflags & DNS_STYLEFLAG_YAML) != 0; msg->indent.count += has_yaml; - MSG_SECTION_FOREACH (msg, section, name) { - ISC_LIST_FOREACH (name->list, rds, link) { + MSG_SECTION_FOREACH(msg, section, name) { + ISC_LIST_FOREACH(name->list, rds, link) { if (section == DNS_SECTION_ANSWER && rds->type == dns_rdatatype_soa) { @@ -4971,7 +4971,7 @@ dns_message_clonebuffer(dns_message_t *msg) { static isc_result_t rdataset_soa_min(dns_rdataset_t *rds, dns_ttl_t *ttlp) { /* loop over the rdatas */ - DNS_RDATASET_FOREACH (rds) { + DNS_RDATASET_FOREACH(rds) { dns_name_t tmp; isc_region_t r = { 0 }; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -5021,8 +5021,8 @@ message_authority_soa_min(dns_message_t *msg, dns_ttl_t *ttlp) { return ISC_R_NOTFOUND; } - MSG_SECTION_FOREACH (msg, DNS_SECTION_AUTHORITY, name) { - ISC_LIST_FOREACH (name->list, rds, link) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_AUTHORITY, name) { + ISC_LIST_FOREACH(name->list, rds, link) { if (!rds->attributes.rendered) { continue; } diff --git a/lib/dns/ncache.c b/lib/dns/ncache.c index 5051185862..3436321105 100644 --- a/lib/dns/ncache.c +++ b/lib/dns/ncache.c @@ -67,7 +67,7 @@ copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) { INSIST(count <= 65535); isc_buffer_putuint16(buffer, (uint16_t)count); - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { isc_result_t result; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -141,11 +141,11 @@ dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, trust = 0xffff; isc_buffer_init(&buffer, data, sizeof(data)); - MSG_SECTION_FOREACH (message, DNS_SECTION_AUTHORITY, name) { + MSG_SECTION_FOREACH(message, DNS_SECTION_AUTHORITY, name) { result = ISC_R_SUCCESS; if (name->attributes.ncache) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (!rdataset->attributes.ncache) { continue; } @@ -281,7 +281,7 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx, savedbuffer = *target; count = 0; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -499,7 +499,7 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name, dns_rdataset_init(&rclone); dns_rdataset_clone(ncacherdataset, &rclone); - DNS_RDATASET_FOREACH (&rclone) { + DNS_RDATASET_FOREACH(&rclone) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rclone, &rdata); @@ -564,7 +564,7 @@ dns_ncache_getsigrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name, dns_rdataset_init(&rclone); dns_rdataset_clone(ncacherdataset, &rclone); - DNS_RDATASET_FOREACH (&rclone) { + DNS_RDATASET_FOREACH(&rclone) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rclone, &rdata); diff --git a/lib/dns/nsec.c b/lib/dns/nsec.c index 03f1240492..20e1c34fe3 100644 --- a/lib/dns/nsec.c +++ b/lib/dns/nsec.c @@ -122,7 +122,7 @@ dns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node, if (result != ISC_R_SUCCESS) { return result; } - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); if (!dns_rdatatype_isnsec(rdataset.type) && @@ -262,7 +262,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version, dns_diff_t *diff, return result; } bool matched = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -275,7 +275,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version, dns_diff_t *diff, { bool deleted = false; if (diff != NULL) { - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (tuple->rdata.type != dns_rdatatype_dnskey || tuple->op != DNS_DIFFOP_DEL) @@ -488,7 +488,7 @@ dns_nsec_requiredtypespresent(dns_rdataset_t *nsecset) { dns_rdataset_clone(nsecset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); if (!dns_nsec_typepresent(&rdata, dns_rdatatype_nsec) || diff --git a/lib/dns/nsec3.c b/lib/dns/nsec3.c index a0c5f070df..64ddbc3614 100644 --- a/lib/dns/nsec3.c +++ b/lib/dns/nsec3.c @@ -120,7 +120,7 @@ dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node, return result; } found = found_ns = need_rrsig = false; - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); if (!dns_rdatatype_isnsec(rdataset.type) && @@ -423,7 +423,7 @@ delnsec3(dns_db_t *db, dns_dbversion_t *version, const dns_name_t *name, goto cleanup_node; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); CHECK(dns_rdata_tostruct(&rdata, &nsec3, NULL)); @@ -459,7 +459,7 @@ better_param(dns_rdataset_t *nsec3paramset, dns_rdata_t *param) { } dns_rdataset_clone(nsec3paramset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; @@ -498,7 +498,7 @@ better_param(dns_rdataset_t *nsec3paramset, dns_rdata_t *param) { static isc_result_t find_nsec3(dns_rdata_nsec3_t *nsec3, dns_rdataset_t *rdataset, const dns_rdata_nsec3param_t *nsec3param) { - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); dns_rdata_tostruct(&rdata, nsec3, NULL); @@ -912,7 +912,7 @@ dns_nsec3_addnsec3s(dns_db_t *db, dns_dbversion_t *version, /* * Update each active NSEC3 chain. */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -1005,7 +1005,7 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, const dns_name_t *name, } bool matched = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t myrdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &myrdata); if (dns_rdata_casecompare(&myrdata, rdata) == 0) { @@ -1091,7 +1091,7 @@ dns_nsec3param_deletechains(dns_db_t *db, dns_dbversion_t *ver, goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t private = DNS_RDATA_INIT; @@ -1128,7 +1128,7 @@ try_private: goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); INSIST(rdata.length <= sizeof(buf)); @@ -1217,7 +1217,7 @@ dns_nsec3_addnsec3sx(dns_db_t *db, dns_dbversion_t *version, /* * Update each active NSEC3 chain. */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -1243,7 +1243,7 @@ try_private: /* * Update each active NSEC3 chain. */ - DNS_RDATASET_FOREACH (&prdataset) { + DNS_RDATASET_FOREACH(&prdataset) { dns_rdata_t rdata1 = DNS_RDATA_INIT; dns_rdata_t rdata2 = DNS_RDATA_INIT; unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; @@ -1624,7 +1624,7 @@ dns_nsec3_delnsec3sx(dns_db_t *db, dns_dbversion_t *version, /* * Update each active NSEC3 chain. */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -1656,7 +1656,7 @@ try_private: /* * Update each NSEC3 chain being built. */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata1 = DNS_RDATA_INIT; dns_rdata_t rdata2 = DNS_RDATA_INIT; unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; @@ -1732,7 +1732,7 @@ dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version, bool complete, } bool found = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); dns_rdata_tostruct(&rdata, &nsec3param, NULL); @@ -1764,7 +1764,7 @@ try_private: } found = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata1 = DNS_RDATA_INIT; dns_rdata_t rdata2 = DNS_RDATA_INIT; unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; diff --git a/lib/dns/order.c b/lib/dns/order.c index 95db8ccceb..da7bc18397 100644 --- a/lib/dns/order.c +++ b/lib/dns/order.c @@ -98,7 +98,7 @@ dns_order_find(dns_order_t *order, const dns_name_t *name, dns_rdatatype_t rdtype, dns_rdataclass_t rdclass) { REQUIRE(DNS_ORDER_VALID(order)); - ISC_LIST_FOREACH (order->ents, ent, link) { + ISC_LIST_FOREACH(order->ents, ent, link) { if (ent->rdtype != rdtype && ent->rdtype != dns_rdatatype_any) { continue; } @@ -131,7 +131,7 @@ dns_order_detach(dns_order_t **orderp) { if (isc_refcount_decrement(&order->references) == 1) { isc_refcount_destroy(&order->references); order->magic = 0; - ISC_LIST_FOREACH (order->ents, ent, link) { + ISC_LIST_FOREACH(order->ents, ent, link) { ISC_LIST_UNLINK(order->ents, ent, link); isc_mem_put(order->mctx, ent, sizeof(*ent)); } diff --git a/lib/dns/peer.c b/lib/dns/peer.c index 63cc9828fd..194f55b004 100644 --- a/lib/dns/peer.c +++ b/lib/dns/peer.c @@ -167,7 +167,7 @@ peerlist_delete(dns_peerlist_t **list) { isc_refcount_destroy(&l->refs); - ISC_LIST_FOREACH (l->elements, server, next) { + ISC_LIST_FOREACH(l->elements, server, next) { ISC_LIST_UNLINK(l->elements, server, next); dns_peer_detach(&server); } @@ -182,7 +182,7 @@ dns_peerlist_addpeer(dns_peerlist_t *peers, dns_peer_t *peer) { * More specifics to front of list. */ dns_peer_attach(peer, &(dns_peer_t *){ NULL }); - ISC_LIST_FOREACH (peers->elements, p, next) { + ISC_LIST_FOREACH(peers->elements, p, next) { if (p->prefixlen < peer->prefixlen) { ISC_LIST_INSERTBEFORE(peers->elements, p, peer, next); return; @@ -198,7 +198,7 @@ dns_peerlist_peerbyaddr(dns_peerlist_t *servers, const isc_netaddr_t *addr, REQUIRE(retval != NULL); REQUIRE(DNS_PEERLIST_VALID(servers)); - ISC_LIST_FOREACH (servers->elements, server, next) { + ISC_LIST_FOREACH(servers->elements, server, next) { if (isc_netaddr_eqprefix(addr, &server->address, server->prefixlen)) { diff --git a/lib/dns/private.c b/lib/dns/private.c index 33d7292691..ca2d74d7ab 100644 --- a/lib/dns/private.c +++ b/lib/dns/private.c @@ -60,7 +60,7 @@ static bool ignore(dns_rdata_t *param, dns_rdataset_t *privateset) { - DNS_RDATASET_FOREACH (privateset) { + DNS_RDATASET_FOREACH(privateset) { unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; dns_rdata_t private = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -157,7 +157,7 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver, if (!dns_rdataset_isassociated(&privateset)) { goto success; } - DNS_RDATASET_FOREACH (&privateset) { + DNS_RDATASET_FOREACH(&privateset) { dns_rdata_t private = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -188,7 +188,7 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver, * If we are in the process of building a new NSEC3 chain * then we don't need to build a NSEC chain. */ - DNS_RDATASET_FOREACH (&privateset) { + DNS_RDATASET_FOREACH(&privateset) { dns_rdata_t private = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -208,7 +208,7 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver, * the changes queued complete. */ count = 0; - DNS_RDATASET_FOREACH (&nsec3paramset) { + DNS_RDATASET_FOREACH(&nsec3paramset) { dns_rdata_t rdata = DNS_RDATA_INIT; /* @@ -248,7 +248,7 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver, signing = false; nsec3chain = false; - DNS_RDATASET_FOREACH (&privateset) { + DNS_RDATASET_FOREACH(&privateset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t private = DNS_RDATA_INIT; diff --git a/lib/dns/qp.c b/lib/dns/qp.c index d3930677c6..d5b22c0646 100644 --- a/lib/dns/qp.c +++ b/lib/dns/qp.c @@ -858,7 +858,7 @@ marksweep_chunks(dns_qpmulti_t *multi) { dns_qp_t *qpw = &multi->writer; - ISC_LIST_FOREACH (multi->snapshots, qps, link) { + ISC_LIST_FOREACH(multi->snapshots, qps, link) { for (dns_qpchunk_t chunk = 0; chunk < qps->chunk_max; chunk++) { if (qps->base->ptr[chunk] != NULL) { INSIST(qps->base->ptr[chunk] == diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 16f67d3ded..53503c7668 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -1167,7 +1167,7 @@ cleanup_nondirty(qpz_version_t *version, qpz_changedlist_t *cleanup_list) { * * The caller must be holding the database lock. */ - ISC_LIST_FOREACH (version->changed_list, changed, link) { + ISC_LIST_FOREACH(version->changed_list, changed, link) { if (!changed->dirty) { ISC_LIST_UNLINK(version->changed_list, changed, link); ISC_LIST_APPEND(*cleanup_list, changed, link); @@ -1545,7 +1545,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, /* * Commit/rollback re-signed headers. */ - ISC_LIST_FOREACH (resigned_list, resigned, link) { + ISC_LIST_FOREACH(resigned_list, resigned, link) { isc_rwlock_t *nlock = NULL; isc_rwlocktype_t nlocktype = isc_rwlocktype_none; dns_slabheader_t *header = resigned->header; @@ -1569,7 +1569,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, return; } - ISC_LIST_FOREACH (cleanup_list, changed, link) { + ISC_LIST_FOREACH(cleanup_list, changed, link) { isc_rwlock_t *nlock = NULL; isc_rwlocktype_t nlocktype = isc_rwlocktype_none; diff --git a/lib/dns/rdatalist.c b/lib/dns/rdatalist.c index fbcf15c121..3302f3a24f 100644 --- a/lib/dns/rdatalist.c +++ b/lib/dns/rdatalist.c @@ -163,7 +163,7 @@ dns_rdatalist_count(dns_rdataset_t *rdataset) { rdatalist = rdataset->rdlist.list; count = 0; - ISC_LIST_FOREACH (rdatalist->rdata, rdata, link) { + ISC_LIST_FOREACH(rdatalist->rdata, rdata, link) { count++; } @@ -178,7 +178,7 @@ dns_rdatalist_addnoqname(dns_rdataset_t *rdataset, dns_name_t *name) { REQUIRE(rdataset != NULL); - ISC_LIST_FOREACH (name->list, rdset, link) { + ISC_LIST_FOREACH(name->list, rdset, link) { if (rdset->rdclass != rdataset->rdclass) { continue; } @@ -190,7 +190,7 @@ dns_rdatalist_addnoqname(dns_rdataset_t *rdataset, dns_name_t *name) { return ISC_R_NOTFOUND; } - ISC_LIST_FOREACH (name->list, rdset, link) { + ISC_LIST_FOREACH(name->list, rdset, link) { if (rdset->type == dns_rdatatype_rrsig && rdset->covers == neg->type) { @@ -235,7 +235,7 @@ dns_rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name, (void)dns_name_dynamic(noqname); /* Sanity Check. */ - ISC_LIST_FOREACH (noqname->list, rdset, link) { + ISC_LIST_FOREACH(noqname->list, rdset, link) { if (rdset->rdclass != rdclass) { continue; } @@ -247,7 +247,7 @@ dns_rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name, return ISC_R_NOTFOUND; } - ISC_LIST_FOREACH (noqname->list, rdset, link) { + ISC_LIST_FOREACH(noqname->list, rdset, link) { if (rdset->type == dns_rdatatype_rrsig && rdset->covers == tneg->type) { @@ -272,7 +272,7 @@ dns_rdatalist_addclosest(dns_rdataset_t *rdataset, dns_name_t *name) { REQUIRE(rdataset != NULL); - ISC_LIST_FOREACH (name->list, rdset, link) { + ISC_LIST_FOREACH(name->list, rdset, link) { if (rdset->rdclass != rdataset->rdclass) { continue; } @@ -284,7 +284,7 @@ dns_rdatalist_addclosest(dns_rdataset_t *rdataset, dns_name_t *name) { return ISC_R_NOTFOUND; } - ISC_LIST_FOREACH (name->list, rdset, link) { + ISC_LIST_FOREACH(name->list, rdset, link) { if (rdset->type == dns_rdatatype_rrsig && rdset->covers == neg->type) { @@ -328,7 +328,7 @@ dns_rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name, (void)dns_name_dynamic(closest); /* Sanity Check. */ - ISC_LIST_FOREACH (closest->list, rdset, link) { + ISC_LIST_FOREACH(closest->list, rdset, link) { if (rdset->rdclass != rdclass) { continue; } @@ -340,7 +340,7 @@ dns_rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name, return ISC_R_NOTFOUND; } - ISC_LIST_FOREACH (closest->list, rdset, link) { + ISC_LIST_FOREACH(closest->list, rdset, link) { if (rdset->type == dns_rdatatype_rrsig && rdset->covers == tneg->type) { diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c index 56babead7b..fb7a919459 100644 --- a/lib/dns/rdataset.c +++ b/lib/dns/rdataset.c @@ -487,7 +487,7 @@ dns_rdataset_additionaldata(dns_rdataset_t *rdataset, return DNS_R_TOOMANYRECORDS; } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { isc_result_t result; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); diff --git a/lib/dns/request.c b/lib/dns/request.c index f189ad2476..2d9d445624 100644 --- a/lib/dns/request.c +++ b/lib/dns/request.c @@ -171,7 +171,7 @@ requests_cancel(void *arg) { dns_requestmgr_t *requestmgr = arg; isc_tid_t tid = isc_tid(); - ISC_LIST_FOREACH (requestmgr->requests[tid], request, link) { + ISC_LIST_FOREACH(requestmgr->requests[tid], request, link) { req_log(ISC_LOG_DEBUG(3), "%s(%" PRItid ": request %p", __func__, tid, request); if (DNS_REQUEST_COMPLETE(request)) { diff --git a/lib/dns/resconf.c b/lib/dns/resconf.c index 0b7c3eb151..fda0fcddf9 100644 --- a/lib/dns/resconf.c +++ b/lib/dns/resconf.c @@ -348,7 +348,7 @@ resconf_parsedomain(irs_resconf_t *conf, FILE *fp) { static void free_search(irs_resconf_t *conf) { - ISC_LIST_FOREACH (conf->searchlist, searchentry, link) { + ISC_LIST_FOREACH(conf->searchlist, searchentry, link) { ISC_LIST_UNLINK(conf->searchlist, searchentry, link); isc_mem_free(conf->mctx, searchentry->domain); isc_mem_put(conf->mctx, searchentry, sizeof(*searchentry)); @@ -642,7 +642,7 @@ irs_resconf_destroy(irs_resconf_t **confp) { free_search(conf); - ISC_LIST_FOREACH (conf->nameservers, address, link) { + ISC_LIST_FOREACH(conf->nameservers, address, link) { ISC_LIST_UNLINK(conf->nameservers, address, link); isc_mem_put(conf->mctx, address, sizeof(*address)); } diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index f3cadf3a6f..69424f4a89 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1228,7 +1228,7 @@ fctx_cancelquery(resquery_t **queryp, isc_time_t *finish, bool no_response, * Age RTTs of servers not tried. */ if (finish != NULL || age_untried) { - ISC_LIST_FOREACH (fctx->forwaddrs, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->forwaddrs, addrinfo, publink) { if (UNMARKED(addrinfo)) { dns_adb_agesrtt(fctx->adb, addrinfo, now); } @@ -1236,8 +1236,8 @@ fctx_cancelquery(resquery_t **queryp, isc_time_t *finish, bool no_response, } if ((finish != NULL || age_untried) && TRIEDFIND(fctx)) { - ISC_LIST_FOREACH (fctx->finds, find, publink) { - ISC_LIST_FOREACH (find->list, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->finds, find, publink) { + ISC_LIST_FOREACH(find->list, addrinfo, publink) { if (UNMARKED(addrinfo)) { dns_adb_agesrtt(fctx->adb, addrinfo, now); @@ -1247,13 +1247,13 @@ fctx_cancelquery(resquery_t **queryp, isc_time_t *finish, bool no_response, } if ((finish != NULL || age_untried) && TRIEDALT(fctx)) { - ISC_LIST_FOREACH (fctx->altaddrs, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->altaddrs, addrinfo, publink) { if (UNMARKED(addrinfo)) { dns_adb_agesrtt(fctx->adb, addrinfo, now); } } - ISC_LIST_FOREACH (fctx->altfinds, find, publink) { - ISC_LIST_FOREACH (find->list, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->altfinds, find, publink) { + ISC_LIST_FOREACH(find->list, addrinfo, publink) { if (UNMARKED(addrinfo)) { dns_adb_agesrtt(fctx->adb, addrinfo, now); @@ -1283,26 +1283,26 @@ static void fctx_cleanup(fetchctx_t *fctx) { REQUIRE(ISC_LIST_EMPTY(fctx->queries)); - ISC_LIST_FOREACH (fctx->finds, find, publink) { + ISC_LIST_FOREACH(fctx->finds, find, publink) { ISC_LIST_UNLINK(fctx->finds, find, publink); dns_adb_destroyfind(&find); fetchctx_unref(fctx); } fctx->find = NULL; - ISC_LIST_FOREACH (fctx->altfinds, find, publink) { + ISC_LIST_FOREACH(fctx->altfinds, find, publink) { ISC_LIST_UNLINK(fctx->altfinds, find, publink); dns_adb_destroyfind(&find); fetchctx_unref(fctx); } fctx->altfind = NULL; - ISC_LIST_FOREACH (fctx->forwaddrs, addr, publink) { + ISC_LIST_FOREACH(fctx->forwaddrs, addr, publink) { ISC_LIST_UNLINK(fctx->forwaddrs, addr, publink); dns_adb_freeaddrinfo(fctx->adb, &addr); } - ISC_LIST_FOREACH (fctx->altaddrs, addr, publink) { + ISC_LIST_FOREACH(fctx->altaddrs, addr, publink) { ISC_LIST_UNLINK(fctx->altaddrs, addr, publink); dns_adb_freeaddrinfo(fctx->adb, &addr); } @@ -1324,7 +1324,7 @@ fctx_cancelqueries(fetchctx_t *fctx, bool no_response, bool age_untried) { ISC_LIST_MOVE(queries, fctx->queries); UNLOCK(&fctx->lock); - ISC_LIST_FOREACH (queries, query, link) { + ISC_LIST_FOREACH(queries, query, link) { /* * Note that we have to unlink the query here, * because if it's still linked in fctx_cancelquery(), @@ -1534,7 +1534,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) { now = isc_time_now(); fctx->duration = isc_time_microdiff(&now, &fctx->start); - ISC_LIST_FOREACH (fctx->resps, resp, link) { + ISC_LIST_FOREACH(fctx->resps, resp, link) { ISC_LIST_UNLINK(fctx->resps, resp, link); count++; @@ -2176,7 +2176,7 @@ cleanup_query: static struct tried * triededns(fetchctx_t *fctx, isc_sockaddr_t *address) { - ISC_LIST_FOREACH (fctx->edns, tried, link) { + ISC_LIST_FOREACH(fctx->edns, tried, link) { if (isc_sockaddr_equal(&tried->addr, address)) { return tried; } @@ -2906,7 +2906,7 @@ fctx_finddone(void *arg) { static bool bad_server(fetchctx_t *fctx, isc_sockaddr_t *address) { - ISC_LIST_FOREACH (fctx->bad, sa, link) { + ISC_LIST_FOREACH(fctx->bad, sa, link) { if (isc_sockaddr_equal(sa, address)) { return true; } @@ -2933,8 +2933,8 @@ mark_bad(fetchctx_t *fctx) { /* * Mark any bad nameservers. */ - ISC_LIST_FOREACH (fctx->finds, curr, publink) { - ISC_LIST_FOREACH (curr->list, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->finds, curr, publink) { + ISC_LIST_FOREACH(curr->list, addrinfo, publink) { if (bad_server(fctx, &addrinfo->sockaddr)) { addrinfo->flags |= FCTX_ADDRINFO_MARK; } else { @@ -2946,7 +2946,7 @@ mark_bad(fetchctx_t *fctx) { /* * Mark any bad forwarders. */ - ISC_LIST_FOREACH (fctx->forwaddrs, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->forwaddrs, addrinfo, publink) { if (bad_server(fctx, &addrinfo->sockaddr)) { addrinfo->flags |= FCTX_ADDRINFO_MARK; } else { @@ -2957,8 +2957,8 @@ mark_bad(fetchctx_t *fctx) { /* * Mark any bad alternates. */ - ISC_LIST_FOREACH (fctx->altfinds, curr, publink) { - ISC_LIST_FOREACH (curr->list, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->altfinds, curr, publink) { + ISC_LIST_FOREACH(curr->list, addrinfo, publink) { if (bad_server(fctx, &addrinfo->sockaddr)) { addrinfo->flags |= FCTX_ADDRINFO_MARK; } else { @@ -2967,7 +2967,7 @@ mark_bad(fetchctx_t *fctx) { } } - ISC_LIST_FOREACH (fctx->altaddrs, addrinfo, publink) { + ISC_LIST_FOREACH(fctx->altaddrs, addrinfo, publink) { if (bad_server(fctx, &addrinfo->sockaddr)) { addrinfo->flags |= FCTX_ADDRINFO_MARK; } else { @@ -3109,7 +3109,7 @@ sort_finds(dns_adbfindlist_t *findlist, unsigned int bias) { dns_adbaddrinfo_t *addrinfo, *bestaddrinfo; /* Sort each find's addrinfo list by SRTT. */ - ISC_LIST_FOREACH (*findlist, curr, publink) { + ISC_LIST_FOREACH(*findlist, curr, publink) { sort_adbfind(curr, bias); } @@ -3258,7 +3258,7 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port, */ INSIST((find->options & DNS_ADBFIND_WANTEVENT) == 0); if (flags != 0 || port != 0) { - ISC_LIST_FOREACH (find->list, ai, publink) { + ISC_LIST_FOREACH(find->list, ai, publink) { ai->flags |= flags; if (port != 0) { isc_sockaddr_setport(&ai->sockaddr, @@ -3543,7 +3543,7 @@ normal_nses: INSIST(ISC_LIST_EMPTY(fctx->finds)); INSIST(ISC_LIST_EMPTY(fctx->altfinds)); - DNS_RDATASET_FOREACH (&fctx->nameservers) { + DNS_RDATASET_FOREACH(&fctx->nameservers) { dns_rdata_t rdata = DNS_RDATA_INIT; bool overquota = false; unsigned int static_stub = 0; @@ -3589,7 +3589,7 @@ normal_nses: if (need_alternate) { int family; family = (res->dispatches6 != NULL) ? AF_INET6 : AF_INET; - ISC_LIST_FOREACH (res->alternates, a, link) { + ISC_LIST_FOREACH(res->alternates, a, link) { if (!a->isaddress) { findname(fctx, &a->_u._n.name, a->_u._n.port, stdoptions, FCTX_ADDRINFO_DUALSTACK, @@ -3761,7 +3761,7 @@ fctx_nextaddress(fetchctx_t *fctx) { /* * Find the first unmarked forwarder (if any). */ - ISC_LIST_FOREACH (fctx->forwaddrs, ai, publink) { + ISC_LIST_FOREACH(fctx->forwaddrs, ai, publink) { if (!UNMARKED(ai)) { continue; } @@ -3805,7 +3805,7 @@ fctx_nextaddress(fetchctx_t *fctx) { if (find != NULL) { start = find; do { - ISC_LIST_FOREACH (find->list, ai, publink) { + ISC_LIST_FOREACH(find->list, ai, publink) { if (!UNMARKED(ai)) { continue; } @@ -3853,7 +3853,7 @@ fctx_nextaddress(fetchctx_t *fctx) { if (find != NULL) { start = find; do { - ISC_LIST_FOREACH (find->list, ai, publink) { + ISC_LIST_FOREACH(find->list, ai, publink) { if (!UNMARKED(ai)) { continue; } @@ -3877,7 +3877,7 @@ fctx_nextaddress(fetchctx_t *fctx) { /* * See if we have a better alternate server by address. */ - ISC_LIST_FOREACH (fctx->altaddrs, ai, publink) { + ISC_LIST_FOREACH(fctx->altaddrs, ai, publink) { if (!UNMARKED(ai)) { continue; } @@ -4385,12 +4385,12 @@ fctx_destroy(fetchctx_t *fctx) { dec_stats(res, dns_resstatscounter_nfetch); /* Free bad */ - ISC_LIST_FOREACH (fctx->bad, sa, link) { + ISC_LIST_FOREACH(fctx->bad, sa, link) { ISC_LIST_UNLINK(fctx->bad, sa, link); isc_mem_put(fctx->mctx, sa, sizeof(*sa)); } - ISC_LIST_FOREACH (fctx->edns, tried, link) { + ISC_LIST_FOREACH(fctx->edns, tried, link) { ISC_LIST_UNLINK(fctx->edns, tried, link); isc_mem_put(fctx->mctx, tried, sizeof(*tried)); } @@ -4886,8 +4886,8 @@ is_lame(fetchctx_t *fctx, dns_message_t *message) { return false; } - MSG_SECTION_FOREACH (message, DNS_SECTION_AUTHORITY, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + MSG_SECTION_FOREACH(message, DNS_SECTION_AUTHORITY, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { dns_namereln_t namereln; int order; unsigned int labels; @@ -5025,7 +5025,7 @@ clone_results(fetchctx_t *fctx) { FCTXTRACE("clone_results"); - ISC_LIST_FOREACH (fctx->resps, resp, link) { + ISC_LIST_FOREACH(fctx->resps, resp, link) { /* This is the head resp; keep a pointer and move on */ if (hresp == NULL) { hresp = ISC_LIST_HEAD(fctx->resps); @@ -5081,7 +5081,7 @@ maybe_cancel_validators(fetchctx_t *fctx) { } REQUIRE(SHUTTINGDOWN(fctx)); - ISC_LIST_FOREACH (fctx->validators, validator, link) { + ISC_LIST_FOREACH(fctx->validators, validator, link) { dns_validator_cancel(validator); } } @@ -5106,7 +5106,7 @@ is_minimal_nsec(dns_rdataset_t *nsecset) { dns_rdataset_clone(nsecset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { isc_result_t result; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_nsec_t nsec; @@ -5135,7 +5135,7 @@ check_soa_and_dnskey(dns_rdataset_t *nsecset) { dns_rdataset_clone(nsecset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); if (dns_nsec_typepresent(&rdata, dns_rdatatype_soa) && @@ -5159,7 +5159,7 @@ has_000_label(dns_rdataset_t *nsecset) { dns_rdataset_clone(nsecset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); if (rdata.length > 1 && rdata.data[0] == 1 && @@ -5332,8 +5332,8 @@ fctx_cacheauthority(fetchctx_t *fctx, dns_message_t *message, /* * Cache any SOA/NS/NSEC records that happened to be validated. */ - MSG_SECTION_FOREACH (message, DNS_SECTION_AUTHORITY, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + MSG_SECTION_FOREACH(message, DNS_SECTION_AUTHORITY, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { dns_rdataset_t *sigrdataset = NULL; if ((rdataset->type != dns_rdatatype_ns && @@ -5656,7 +5656,7 @@ findnoqname(fetchctx_t *fctx, dns_message_t *message, dns_name_t *name, labels = dns_name_countlabels(name); result = ISC_R_NOTFOUND; - DNS_RDATASET_FOREACH (sigrdataset) { + DNS_RDATASET_FOREACH(sigrdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(sigrdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rrsig, NULL); @@ -5679,8 +5679,8 @@ findnoqname(fetchctx_t *fctx, dns_message_t *message, dns_name_t *name, #define NXND(x) ((x) == ISC_R_SUCCESS) - MSG_SECTION_FOREACH (message, DNS_SECTION_AUTHORITY, nsec) { - ISC_LIST_FOREACH (nsec->list, nrdataset, link) { + MSG_SECTION_FOREACH(message, DNS_SECTION_AUTHORITY, nsec) { + ISC_LIST_FOREACH(nsec->list, nrdataset, link) { bool data = false, exists = false; bool optout = false, unknown = false; bool setclosest = false; @@ -5974,7 +5974,7 @@ rctx_cachename(respctx_t *rctx, dns_message_t *message, dns_name_t *name) { * Cache or validate each cacheable rdataset. */ bool fail = ((res->options & DNS_RESOLVER_CHECKNAMESFAIL) != 0); - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { result = check_cacheable(name, rdataset, fail); if (result == DNS_R_CONTINUE) { result = ISC_R_SUCCESS; @@ -6076,7 +6076,7 @@ rctx_cachemessage(respctx_t *rctx) { for (dns_section_t section = DNS_SECTION_ANSWER; section <= DNS_SECTION_ADDITIONAL; section++) { - MSG_SECTION_FOREACH (message, section, name) { + MSG_SECTION_FOREACH(message, section, name) { if (name->attributes.cache) { result = rctx_cachename(rctx, message, name); if (result != ISC_R_SUCCESS) { @@ -6205,8 +6205,8 @@ rctx_ncache(respctx_t *rctx) { * any domain under a trust anchor, regardless * of whether we're actually validating.) */ - MSG_SECTION_FOREACH (message, DNS_SECTION_AUTHORITY, tname) { - ISC_LIST_FOREACH (tname->list, trdataset, link) { + MSG_SECTION_FOREACH(message, DNS_SECTION_AUTHORITY, tname) { + ISC_LIST_FOREACH(tname->list, trdataset, link) { trdataset->trust = dns_trust_pending_answer; } } @@ -6412,7 +6412,7 @@ check_section(void *arg, const dns_name_t *addname, dns_rdatatype_t type, if (result == ISC_R_SUCCESS) { external = name_external(name, type, fctx); if (type == dns_rdatatype_a) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (dns_rdatatype_issig(rdataset->type)) { rtype = rdataset->covers; } else { @@ -6499,7 +6499,7 @@ is_answeraddress_allowed(dns_view_t *view, dns_name_t *name, * address record. If a match is found, the address should be * filtered, so should the entire answer. */ - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_reset(&rdata); dns_rdataset_current(rdataset, &rdata); if (rdataset->type == dns_rdatatype_a) { @@ -6843,9 +6843,9 @@ cleanup: static void checknamessection(dns_message_t *message, dns_section_t section) { - MSG_SECTION_FOREACH (message, section, name) { - ISC_LIST_FOREACH (name->list, rdataset, link) { - DNS_RDATASET_FOREACH (rdataset) { + MSG_SECTION_FOREACH(message, section, name) { + ISC_LIST_FOREACH(name->list, rdataset, link) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); if (!dns_rdata_checkowner(name, rdata.rdclass, @@ -7027,12 +7027,12 @@ static bool betterreferral(respctx_t *rctx) { dns_message_t *msg = rctx->query->rmessage; - MSG_SECTION_FOREACH (msg, DNS_SECTION_AUTHORITY, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_AUTHORITY, name) { if (!isstrictsubdomain(name, rctx->fctx->domain)) { continue; } - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (rdataset->type == dns_rdatatype_ns) { return true; } @@ -8085,7 +8085,7 @@ rctx_answer_scan(respctx_t *rctx) { fetchctx_t *fctx = rctx->fctx; dns_message_t *msg = rctx->query->rmessage; - MSG_SECTION_FOREACH (msg, DNS_SECTION_ANSWER, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_ANSWER, name) { int order; unsigned int nlabels; dns_namereln_t namereln; @@ -8094,7 +8094,7 @@ rctx_answer_scan(respctx_t *rctx) { &nlabels); switch (namereln) { case dns_namereln_equal: - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (rdataset->type == rctx->type || rctx->type == dns_rdatatype_any) { @@ -8137,7 +8137,7 @@ rctx_answer_scan(respctx_t *rctx) { * there are multiple ones (which there * shouldn't be). */ - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (rdataset->type != dns_rdatatype_dname) { continue; } @@ -8179,7 +8179,7 @@ static isc_result_t rctx_answer_any(respctx_t *rctx) { fetchctx_t *fctx = rctx->fctx; - ISC_LIST_FOREACH (rctx->aname->list, rdataset, link) { + ISC_LIST_FOREACH(rctx->aname->list, rdataset, link) { if (!validinanswer(rdataset, fctx)) { rctx->result = DNS_R_FORMERR; return ISC_R_COMPLETE; @@ -8263,7 +8263,7 @@ rctx_answer_match(respctx_t *rctx) { check_related, rctx, DNS_RDATASET_MAXADDITIONAL); - ISC_LIST_FOREACH (rctx->aname->list, sigrdataset, link) { + ISC_LIST_FOREACH(rctx->aname->list, sigrdataset, link) { if (!validinanswer(sigrdataset, fctx)) { rctx->result = DNS_R_FORMERR; return ISC_R_COMPLETE; @@ -8321,7 +8321,7 @@ rctx_answer_cname(respctx_t *rctx) { rctx->crdataset->attributes.chaining = true; rctx->crdataset->trust = rctx->trust; - ISC_LIST_FOREACH (rctx->cname->list, sigrdataset, link) { + ISC_LIST_FOREACH(rctx->cname->list, sigrdataset, link) { if (!validinanswer(sigrdataset, fctx)) { rctx->result = DNS_R_FORMERR; return ISC_R_COMPLETE; @@ -8371,7 +8371,7 @@ rctx_answer_dname(respctx_t *rctx) { rctx->drdataset->attributes.chaining = true; rctx->drdataset->trust = rctx->trust; - ISC_LIST_FOREACH (rctx->dname->list, sigrdataset, link) { + ISC_LIST_FOREACH(rctx->dname->list, sigrdataset, link) { if (!validinanswer(sigrdataset, fctx)) { rctx->result = DNS_R_FORMERR; return ISC_R_COMPLETE; @@ -8408,13 +8408,13 @@ rctx_authority_positive(respctx_t *rctx) { fetchctx_t *fctx = rctx->fctx; dns_message_t *msg = rctx->query->rmessage; - MSG_SECTION_FOREACH (msg, DNS_SECTION_AUTHORITY, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_AUTHORITY, name) { if (!name_external(name, dns_rdatatype_ns, fctx)) { /* * We expect to find NS or SIG NS rdatasets, and * nothing else. */ - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (dns_rdataset_matchestype(rdataset, dns_rdatatype_ns)) { @@ -8603,12 +8603,12 @@ rctx_authority_negative(respctx_t *rctx) { section = DNS_SECTION_AUTHORITY; dns_message_t *msg = rctx->query->rmessage; - MSG_SECTION_FOREACH (msg, section, name) { + MSG_SECTION_FOREACH(msg, section, name) { if (!dns_name_issubdomain(name, fctx->domain)) { continue; } - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { dns_rdatatype_t type = rdataset->type; if (dns_rdatatype_issig(rdataset->type)) { type = rdataset->covers; @@ -8707,7 +8707,7 @@ rctx_authority_dnssec(respctx_t *rctx) { fetchctx_t *fctx = rctx->fctx; dns_message_t *msg = rctx->query->rmessage; - MSG_SECTION_FOREACH (msg, DNS_SECTION_AUTHORITY, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_AUTHORITY, name) { if (!dns_name_issubdomain(name, fctx->domain)) { /* * Invalid name found; preserve it for logging @@ -8718,7 +8718,7 @@ rctx_authority_dnssec(respctx_t *rctx) { continue; } - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { bool secure_domain = false; dns_rdatatype_t type = rdataset->type; @@ -8950,12 +8950,12 @@ again: rescan = false; dns_message_t *msg = rctx->query->rmessage; - MSG_SECTION_FOREACH (msg, section, name) { + MSG_SECTION_FOREACH(msg, section, name) { if (!name->attributes.chase) { continue; } name->attributes.chase = false; - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (CHASE(rdataset)) { rdataset->attributes.chase = false; (void)dns_rdataset_additionaldata( @@ -10063,7 +10063,7 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name, /* Is this a duplicate? */ if (client != NULL) { - ISC_LIST_FOREACH (fctx->resps, resp, link) { + ISC_LIST_FOREACH(fctx->resps, resp, link) { if (resp->client != NULL && resp->id == id && isc_sockaddr_equal(resp->client, client)) { @@ -10148,7 +10148,7 @@ dns_resolver_cancelfetch(dns_fetch_t *fetch) { * the callback asynchronously with a ISC_R_CANCELED result. */ if (fctx->state != fetchstate_done) { - ISC_LIST_FOREACH (fctx->resps, resp, link) { + ISC_LIST_FOREACH(fctx->resps, resp, link) { if (resp->fetch == fetch) { resp->result = ISC_R_CANCELED; ISC_LIST_UNLINK(fctx->resps, resp, link); @@ -10193,7 +10193,7 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) { * trying to destroy the fetch. */ if (fctx->state != fetchstate_done) { - ISC_LIST_FOREACH (fctx->resps, resp, link) { + ISC_LIST_FOREACH(fctx->resps, resp, link) { RUNTIME_CHECK(resp->fetch != fetch); } } @@ -10513,11 +10513,11 @@ dns_resolver_dumpfetches(dns_resolver_t *res, isc_statsformat_t format, fctx->state == fetchstate_active ? "active" : "done", timebuf); - ISC_LIST_FOREACH (fctx->resps, resp, link) { + ISC_LIST_FOREACH(fctx->resps, resp, link) { resp_count++; } - ISC_LIST_FOREACH (fctx->queries, query, link) { + ISC_LIST_FOREACH(fctx->queries, query, link) { query_count++; } diff --git a/lib/dns/rootns.c b/lib/dns/rootns.c index 21183550c9..48bd1e1673 100644 --- a/lib/dns/rootns.c +++ b/lib/dns/rootns.c @@ -108,7 +108,7 @@ in_rootns(dns_rdataset_t *rootns, dns_name_t *name) { return ISC_R_NOTFOUND; } - DNS_RDATASET_FOREACH (rootns) { + DNS_RDATASET_FOREACH(rootns) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rootns, &rdata); result = dns_rdata_tostruct(&rdata, &ns, NULL); @@ -125,7 +125,7 @@ in_rootns(dns_rdataset_t *rootns, dns_name_t *name) { static isc_result_t check_node(dns_rdataset_t *rootns, dns_name_t *name, dns_rdatasetiter_t *rdsiter) { - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); dns_rdatatype_t type = rdataset.type; @@ -168,7 +168,7 @@ check_hints(dns_db_t *db) { if (result != ISC_R_SUCCESS) { goto cleanup; } - DNS_DBITERATOR_FOREACH (dbiter) { + DNS_DBITERATOR_FOREACH(dbiter) { result = dns_dbiterator_current(dbiter, &node, name); if (result != ISC_R_SUCCESS) { goto cleanup; @@ -314,7 +314,7 @@ report(dns_view_t *view, dns_name_t *name, bool missing, dns_rdata_t *rdata) { static bool inrrset(dns_rdataset_t *rrset, dns_rdata_t *rdata) { - DNS_RDATASET_FOREACH (rrset) { + DNS_RDATASET_FOREACH(rrset) { dns_rdata_t current = DNS_RDATA_INIT; dns_rdataset_current(rrset, ¤t); if (dns_rdata_compare(rdata, ¤t) == 0) { @@ -362,7 +362,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db, if (hresult == ISC_R_SUCCESS && (rresult == ISC_R_SUCCESS || rresult == DNS_R_GLUE)) { - DNS_RDATASET_FOREACH (&rootrrset) { + DNS_RDATASET_FOREACH(&rootrrset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rootrrset, &rdata); if (!inrrset(&hintrrset, &rdata) && @@ -371,7 +371,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db, report(view, name, true, &rdata); } } - DNS_RDATASET_FOREACH (&hintrrset) { + DNS_RDATASET_FOREACH(&hintrrset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&hintrrset, &rdata); if (!inrrset(&rootrrset, &rdata) && @@ -384,7 +384,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db, if (hresult == ISC_R_NOTFOUND && (rresult == ISC_R_SUCCESS || rresult == DNS_R_GLUE)) { - DNS_RDATASET_FOREACH (&rootrrset) { + DNS_RDATASET_FOREACH(&rootrrset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rootrrset, &rdata); report(view, name, true, &rdata); @@ -408,7 +408,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db, if (hresult == ISC_R_SUCCESS && (rresult == ISC_R_SUCCESS || rresult == DNS_R_GLUE)) { - DNS_RDATASET_FOREACH (&rootrrset) { + DNS_RDATASET_FOREACH(&rootrrset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rootrrset, &rdata); if (!inrrset(&hintrrset, &rdata) && @@ -417,7 +417,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db, report(view, name, true, &rdata); } } - DNS_RDATASET_FOREACH (&hintrrset) { + DNS_RDATASET_FOREACH(&hintrrset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&hintrrset, &rdata); if (!inrrset(&rootrrset, &rdata) && @@ -430,7 +430,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db, if (hresult == ISC_R_NOTFOUND && (rresult == ISC_R_SUCCESS || rresult == DNS_R_GLUE)) { - DNS_RDATASET_FOREACH (&rootrrset) { + DNS_RDATASET_FOREACH(&rootrrset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rootrrset, &rdata); report(view, name, true, &rdata); @@ -494,7 +494,7 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) { /* * Look for missing root NS names. */ - DNS_RDATASET_FOREACH (&rootns) { + DNS_RDATASET_FOREACH(&rootns) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rootns, &rdata); result = dns_rdata_tostruct(&rdata, &ns, NULL); @@ -517,7 +517,7 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) { /* * Look for extra root NS names. */ - DNS_RDATASET_FOREACH (&hintns) { + DNS_RDATASET_FOREACH(&hintns) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&hintns, &rdata); result = dns_rdata_tostruct(&rdata, &ns, NULL); diff --git a/lib/dns/rrl.c b/lib/dns/rrl.c index c936bc724d..9a5d568aa0 100644 --- a/lib/dns/rrl.c +++ b/lib/dns/rrl.c @@ -268,7 +268,7 @@ free_old_hash(dns_rrl_t *rrl) { for (old_bin = &old_hash->bins[0]; old_bin < &old_hash->bins[old_hash->length]; ++old_bin) { - ISC_LIST_FOREACH (*old_bin, e, hlink) { + ISC_LIST_FOREACH(*old_bin, e, hlink) { ISC_LINK_INIT(e, hlink); } } @@ -520,7 +520,7 @@ get_entry(dns_rrl_t *rrl, const isc_sockaddr_t *client_addr, dns_zone_t *zone, */ new_bin = get_bin(rrl->hash, hval); probes = 1; - ISC_LIST_FOREACH (*new_bin, e, hlink) { + ISC_LIST_FOREACH(*new_bin, e, hlink) { if (key_cmp(&e->key, &key)) { ref_entry(rrl, e, probes, now); return e; @@ -533,7 +533,7 @@ get_entry(dns_rrl_t *rrl, const isc_sockaddr_t *client_addr, dns_zone_t *zone, */ if (rrl->old_hash != NULL) { old_bin = get_bin(rrl->old_hash, hval); - ISC_LIST_FOREACH (*old_bin, e, hlink) { + ISC_LIST_FOREACH(*old_bin, e, hlink) { if (key_cmp(&e->key, &key)) { ISC_LIST_UNLINK(*old_bin, e, hlink); ISC_LIST_PREPEND(*new_bin, e, hlink); @@ -563,7 +563,7 @@ get_entry(dns_rrl_t *rrl, const isc_sockaddr_t *client_addr, dns_zone_t *zone, * Steal the oldest entry if we cannot create more. */ dns_rrl_entry_t *entry = NULL; - ISC_LIST_FOREACH_REV (rrl->lru, e, lru) { + ISC_LIST_FOREACH_REV(rrl->lru, e, lru) { entry = e; if (!ISC_LINK_LINKED(e, hlink)) { break; @@ -1280,7 +1280,7 @@ dns_rrl_view_destroy(dns_view_t *view) { isc_mutex_destroy(&rrl->lock); - ISC_LIST_FOREACH (rrl->blocks, b, link) { + ISC_LIST_FOREACH(rrl->blocks, b, link) { ISC_LIST_UNLINK(rrl->blocks, b, link); isc_mem_put(rrl->mctx, b, STRUCT_FLEX_SIZE(b, entries, b->count)); diff --git a/lib/dns/skr.c b/lib/dns/skr.c index 835c0c3358..ab08ec1cd8 100644 --- a/lib/dns/skr.c +++ b/lib/dns/skr.c @@ -166,7 +166,7 @@ dns_skrbundle_getsig(dns_skrbundle_t *bundle, dst_key_t *key, REQUIRE(DNS_SKRBUNDLE_VALID(bundle)); REQUIRE(DNS_DIFF_VALID(&bundle->diff)); - ISC_LIST_FOREACH (bundle->diff.tuples, tuple, link) { + ISC_LIST_FOREACH(bundle->diff.tuples, tuple, link) { dns_rdata_rrsig_t rrsig; if (tuple->op != DNS_DIFFOP_ADDRESIGN) { @@ -391,7 +391,7 @@ dns_skrbundle_t * dns_skr_lookup(dns_skr_t *skr, isc_stdtime_t time, uint32_t sigval) { REQUIRE(DNS_SKR_VALID(skr)); - ISC_LIST_FOREACH (skr->bundles, b, link) { + ISC_LIST_FOREACH(skr->bundles, b, link) { dns_skrbundle_t *next = ISC_LIST_NEXT(b, link); isc_stdtime_t expired = (next != NULL) ? next->inception @@ -429,7 +429,7 @@ void dns_skr_destroy(dns_skr_t *skr) { REQUIRE(DNS_SKR_VALID(skr)); - ISC_LIST_FOREACH (skr->bundles, b, link) { + ISC_LIST_FOREACH(skr->bundles, b, link) { ISC_LIST_UNLINK(skr->bundles, b, link); dns_diff_clear(&b->diff); isc_mem_put(skr->mctx, b, sizeof(*b)); diff --git a/lib/dns/ssu.c b/lib/dns/ssu.c index 368b1e85c8..321fdacaab 100644 --- a/lib/dns/ssu.c +++ b/lib/dns/ssu.c @@ -82,7 +82,7 @@ destroy(dns_ssutable_t *table) { REQUIRE(VALID_SSUTABLE(table)); mctx = table->mctx; - ISC_LIST_FOREACH (table->rules, rule, link) { + ISC_LIST_FOREACH(table->rules, rule, link) { if (rule->identity != NULL) { dns_name_free(rule->identity, mctx); isc_mem_put(mctx, rule->identity, @@ -373,7 +373,7 @@ dns_ssutable_checkrules(dns_ssutable_t *table, const dns_name_t *signer, return false; } - ISC_LIST_FOREACH (table->rules, rule, link) { + ISC_LIST_FOREACH(table->rules, rule, link) { if (logit) { isc_log_write(DNS_LOGCATEGORY_UPDATE_POLICY, DNS_LOGMODULE_SSU, ISC_LOG_DEBUG(99), diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c index 2a60538779..cec72ac442 100644 --- a/lib/dns/tkey.c +++ b/lib/dns/tkey.c @@ -154,9 +154,9 @@ add_rdata_to_list(dns_message_t *msg, dns_name_t *name, dns_rdata_t *rdata, static void free_namelist(dns_message_t *msg, dns_namelist_t *namelist) { - ISC_LIST_FOREACH (*namelist, name, link) { + ISC_LIST_FOREACH(*namelist, name, link) { ISC_LIST_UNLINK(*namelist, name, link); - ISC_LIST_FOREACH (name->list, set, link) { + ISC_LIST_FOREACH(name->list, set, link) { ISC_LIST_UNLINK(name->list, set, link); if (dns_rdataset_isassociated(set)) { dns_rdataset_disassociate(set); @@ -503,7 +503,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx, RETERR(dns_message_reply(msg, true)); add_rdata_to_list(msg, keyname, &rdata, 0, &namelist); - ISC_LIST_FOREACH (namelist, name, link) { + ISC_LIST_FOREACH(namelist, name, link) { ISC_LIST_UNLINK(namelist, name, link); dns_message_addname(msg, name, DNS_SECTION_ANSWER); } @@ -611,7 +611,7 @@ find_tkey(dns_message_t *msg, dns_name_t **name, dns_rdata_t *rdata, int section) { isc_result_t result; - MSG_SECTION_FOREACH (msg, section, cur) { + MSG_SECTION_FOREACH(msg, section, cur) { dns_rdataset_t *tkeyset = NULL; result = dns_message_findtype(cur, dns_rdatatype_tkey, 0, &tkeyset); diff --git a/lib/dns/update.c b/lib/dns/update.c index 16b287c3c0..c5a749e503 100644 --- a/lib/dns/update.c +++ b/lib/dns/update.c @@ -316,7 +316,7 @@ static isc_result_t foreach_node_rr_action(void *data, dns_rdataset_t *rdataset) { isc_result_t result; foreach_node_rr_ctx_t *ctx = data; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { rr_t rr = { 0, DNS_RDATA_INIT }; dns_rdataset_current(rdataset, &rr.rdata); @@ -357,7 +357,7 @@ foreach_rrset(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, goto cleanup_node; } - DNS_RDATASETITER_FOREACH (iter) { + DNS_RDATASETITER_FOREACH(iter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iter, &rdataset); @@ -442,7 +442,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, goto cleanup_node; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { rr_t rr = { 0, DNS_RDATA_INIT }; dns_rdataset_current(&rdataset, &rr.rdata); rr.ttl = rdataset.ttl; @@ -794,7 +794,7 @@ uniqify_name_list(dns_diff_t *list) { CHECK(dns_diff_sort(list, name_order)); dns_name_t *curr_name = NULL; - ISC_LIST_FOREACH (list->tuples, p, link) { + ISC_LIST_FOREACH(list->tuples, p, link) { if (curr_name == NULL || !dns_name_equal(curr_name, &p->name)) { curr_name = &(p->name); } else { @@ -1045,7 +1045,7 @@ find_zone_keys(dns_zone_t *zone, isc_mem_t *mctx, unsigned int maxkeys, } /* Add new 'dnskeys' to 'keys' */ - ISC_LIST_FOREACH (keylist, k, link) { + ISC_LIST_FOREACH(keylist, k, link) { if (count >= maxkeys) { ISC_LIST_UNLINK(keylist, k, link); dns_dnsseckey_destroy(mctx, &k); @@ -1296,7 +1296,7 @@ del_keysigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rrsig, NULL); @@ -1367,7 +1367,7 @@ add_exposed_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db, goto cleanup_node; } - DNS_RDATASETITER_FOREACH (iter) { + DNS_RDATASETITER_FOREACH(iter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatatype_t type; bool flag; @@ -1673,7 +1673,7 @@ next_state: state->state = remove_orphaned; /* Remove orphaned NSECs and RRSIG NSECs. */ - ISC_LIST_FOREACH (state->diffnames.tuples, t, link) { + ISC_LIST_FOREACH(state->diffnames.tuples, t, link) { CHECK(non_nsec_rrset_exists(db, newver, &t->name, &flag)); if (!flag) { @@ -1705,7 +1705,7 @@ next_state: * When a name is created or deleted, its predecessor needs to * have its NSEC updated. */ - ISC_LIST_FOREACH (state->diffnames.tuples, t, link) { + ISC_LIST_FOREACH(state->diffnames.tuples, t, link) { bool existed, exists; dns_fixedname_t fixedname; dns_name_t *prevname; @@ -1744,7 +1744,7 @@ next_state: * (obscured by adding an NS or DNAME, or unobscured by * removing one). */ - ISC_LIST_FOREACH (state->diffnames.tuples, t, link) { + ISC_LIST_FOREACH(state->diffnames.tuples, t, link) { bool ns_existed, dname_existed; bool ns_exists, dname_exists; @@ -1796,7 +1796,7 @@ next_state: * contents to indicate that their respective owner names * should be part of the NSEC chain. */ - ISC_LIST_FOREACH (state->affected.tuples, t, link) { + ISC_LIST_FOREACH(state->affected.tuples, t, link) { bool exists; dns_name_t *name = &t->name; @@ -1857,7 +1857,7 @@ next_state: * Now we know which names are part of the NSEC chain. * Make them all point at their correct targets. */ - ISC_LIST_FOREACH (state->affected.tuples, t, link) { + ISC_LIST_FOREACH(state->affected.tuples, t, link) { CHECK(rrset_exists(db, newver, &t->name, dns_rdatatype_nsec, 0, &flag)); if (flag) { @@ -1891,7 +1891,7 @@ next_state: * have to regenerate the RRSIG NSECs for NSECs that were * replaced with identical ones. */ - ISC_LIST_FOREACH (state->nsec_diff.tuples, t, link) { + ISC_LIST_FOREACH(state->nsec_diff.tuples, t, link) { ISC_LIST_UNLINK(state->nsec_diff.tuples, t, link); dns_diff_appendminimal(&state->nsec_mindiff, &t); } @@ -1903,7 +1903,7 @@ next_state: case sign_nsec: state->state = sign_nsec; /* Update RRSIG NSECs. */ - ISC_LIST_FOREACH (state->nsec_mindiff.tuples, t, link) { + ISC_LIST_FOREACH(state->nsec_mindiff.tuples, t, link) { if (t->op == DNS_DIFFOP_DEL) { CHECK(delete_if(true_p, db, newver, &t->name, dns_rdatatype_rrsig, @@ -1933,11 +1933,11 @@ next_state: state->state = update_nsec3; /* Record our changes for the journal. */ - ISC_LIST_FOREACH (state->sig_diff.tuples, t, link) { + ISC_LIST_FOREACH(state->sig_diff.tuples, t, link) { ISC_LIST_UNLINK(state->sig_diff.tuples, t, link); dns_diff_appendminimal(diff, &t); } - ISC_LIST_FOREACH (state->nsec_mindiff.tuples, t, link) { + ISC_LIST_FOREACH(state->nsec_mindiff.tuples, t, link) { ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link); dns_diff_appendminimal(diff, &t); } @@ -2025,7 +2025,7 @@ next_state: FALLTHROUGH; case process_nsec3: state->state = process_nsec3; - ISC_LIST_FOREACH (state->affected.tuples, t, link) { + ISC_LIST_FOREACH(state->affected.tuples, t, link) { dns_name_t *name = &t->name; unsecure = false; /* Silence compiler warning. */ @@ -2065,7 +2065,7 @@ next_state: * have to regenerate the RRSIG NSEC3s for NSEC3s that were * replaced with identical ones. */ - ISC_LIST_FOREACH (state->nsec_diff.tuples, t, link) { + ISC_LIST_FOREACH(state->nsec_diff.tuples, t, link) { ISC_LIST_UNLINK(state->nsec_diff.tuples, t, link); dns_diff_appendminimal(&state->nsec_mindiff, &t); } @@ -2077,7 +2077,7 @@ next_state: case sign_nsec3: state->state = sign_nsec3; /* Update RRSIG NSEC3s. */ - ISC_LIST_FOREACH (state->nsec_mindiff.tuples, t, link) { + ISC_LIST_FOREACH(state->nsec_mindiff.tuples, t, link) { if (t->op == DNS_DIFFOP_DEL) { CHECK(delete_if(true_p, db, newver, &t->name, dns_rdatatype_rrsig, @@ -2104,11 +2104,11 @@ next_state: state->work.tuples, link); /* Record our changes for the journal. */ - ISC_LIST_FOREACH (state->sig_diff.tuples, t, link) { + ISC_LIST_FOREACH(state->sig_diff.tuples, t, link) { ISC_LIST_UNLINK(state->sig_diff.tuples, t, link); dns_diff_appendminimal(diff, &t); } - ISC_LIST_FOREACH (state->nsec_mindiff.tuples, t, link) { + ISC_LIST_FOREACH(state->nsec_mindiff.tuples, t, link) { ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link); dns_diff_appendminimal(diff, &t); } diff --git a/lib/dns/validator.c b/lib/dns/validator.c index bf176aa509..6ce9607f22 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -307,7 +307,7 @@ trynsec3: dns_fixedname_init(&fixed); dns_name_downcase(name, dns_fixedname_name(&fixed)); name = dns_fixedname_name(&fixed); - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_ncache_current(rdataset, &nsec3name, &set); if (set.type != dns_rdatatype_nsec3) { dns_rdataset_disassociate(&set); @@ -321,7 +321,7 @@ trynsec3: dns_rdataset_disassociate(&set); continue; } - DNS_RDATASET_FOREACH (&set) { + DNS_RDATASET_FOREACH(&set) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&set, &rdata); (void)dns_rdata_tostruct(&rdata, &nsec3, NULL); @@ -1316,7 +1316,7 @@ selfsigned_dnskey(dns_validator_t *val) { return DNS_R_NOKEYMATCH; } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t keyrdata = DNS_RDATA_INIT; dns_rdata_dnskey_t key; dns_rdata_rrsig_t sig; @@ -1327,7 +1327,7 @@ selfsigned_dnskey(dns_validator_t *val) { RUNTIME_CHECK(result == ISC_R_SUCCESS); keytag = compute_keytag(&keyrdata); - DNS_RDATASET_FOREACH (sigrdataset) { + DNS_RDATASET_FOREACH(sigrdataset) { dns_rdata_t sigrdata = DNS_RDATA_INIT; dst_key_t *dstkey = NULL; @@ -1878,7 +1878,7 @@ check_signer(dns_validator_t *val, dns_rdata_t *keyrdata, uint16_t keyid, dns_rdataset_clone(val->sigrdataset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -2291,7 +2291,7 @@ validate_dnskey(void *arg) { * DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present. */ val->digest_sha1 = true; - DNS_RDATASET_FOREACH (val->dsset) { + DNS_RDATASET_FOREACH(val->dsset) { dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdataset_current(val->dsset, &dsrdata); result = dns_rdata_tostruct(&dsrdata, &ds, NULL); @@ -3026,7 +3026,7 @@ check_ds_algs(dns_validator_t *val, dns_name_t *name, uint16_t key_tag = 0; uint8_t algorithm = 0; - DNS_RDATASET_FOREACH (dsrdataset) { + DNS_RDATASET_FOREACH(dsrdataset) { isc_result_t result; dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t keyrdata = DNS_RDATA_INIT; diff --git a/lib/dns/view.c b/lib/dns/view.c index e8a711f434..164b54becb 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -243,11 +243,11 @@ destroy(dns_view_t *view) { dns_catz_zones_shutdown(view->catzs); dns_catz_zones_detach(&view->catzs); } - ISC_LIST_FOREACH (view->dlz_searched, dlzdb, link) { + ISC_LIST_FOREACH(view->dlz_searched, dlzdb, link) { ISC_LIST_UNLINK(view->dlz_searched, dlzdb, link); dns_dlzdestroy(&dlzdb); } - ISC_LIST_FOREACH (view->dlz_unsearched, dlzdb, link) { + ISC_LIST_FOREACH(view->dlz_unsearched, dlzdb, link) { ISC_LIST_UNLINK(view->dlz_unsearched, dlzdb, link); dns_dlzdestroy(&dlzdb); } @@ -1240,7 +1240,7 @@ dns_viewlist_find(dns_viewlist_t *list, const char *name, dns_rdataclass_t rdclass, dns_view_t **viewp) { REQUIRE(list != NULL); - ISC_LIST_FOREACH (*list, view, link) { + ISC_LIST_FOREACH(*list, view, link) { if (strcmp(view->name, name) == 0 && view->rdclass == rdclass) { dns_view_attach(view, viewp); return ISC_R_SUCCESS; @@ -1260,7 +1260,7 @@ dns_viewlist_findzone(dns_viewlist_t *list, const dns_name_t *name, REQUIRE(list != NULL); REQUIRE(zonep != NULL && *zonep == NULL); - ISC_LIST_FOREACH (*list, view, link) { + ISC_LIST_FOREACH(*list, view, link) { dns_zt_t *zonetable = NULL; if (!allclasses && view->rdclass != rdclass) { continue; @@ -1658,7 +1658,7 @@ dns_view_istrusted(dns_view_t *view, const dns_name_t *keyname, goto finish; } - DNS_RDATASET_FOREACH (&dsset) { + DNS_RDATASET_FOREACH(&dsset) { dns_rdata_t this = DNS_RDATA_INIT; dns_rdataset_current(&dsset, &this); if (dns_rdata_compare(&rdata, &this) == 0) { @@ -1884,7 +1884,7 @@ dns_view_searchdlz(dns_view_t *view, const dns_name_t *name, /* count the number of labels in the name */ namelabels = dns_name_countlabels(name); - ISC_LIST_FOREACH (view->dlz_searched, dlzdb, link) { + ISC_LIST_FOREACH(view->dlz_searched, dlzdb, link) { REQUIRE(DNS_DLZ_VALID(dlzdb)); /* diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 91515fdab1..132df2aa08 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -1915,7 +1915,7 @@ xfrin_recv_done(isc_result_t result, isc_region_t *region, void *arg) { goto failure; } - MSG_SECTION_FOREACH (msg, DNS_SECTION_QUESTION, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_QUESTION, name) { dns_rdataset_t *rds = NULL; LIBDNS_XFRIN_RECV_QUESTION(xfr, xfr->info, msg); @@ -1971,11 +1971,11 @@ xfrin_recv_done(isc_result_t result, isc_region_t *region, void *arg) { goto failure; } - MSG_SECTION_FOREACH (msg, DNS_SECTION_ANSWER, name) { + MSG_SECTION_FOREACH(msg, DNS_SECTION_ANSWER, name) { LIBDNS_XFRIN_RECV_ANSWER(xfr, xfr->info, msg); - ISC_LIST_FOREACH (name->list, rds, link) { - DNS_RDATASET_FOREACH (rds) { + ISC_LIST_FOREACH(name->list, rds, link) { + DNS_RDATASET_FOREACH(rds) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rds, &rdata); CHECK(xfr_rr(xfr, name, rds->ttl, &rdata)); diff --git a/lib/dns/zone.c b/lib/dns/zone.c index beb7f1b900..0ca4efad23 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -1211,7 +1211,7 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx, isc_tid_t tid) { static void clear_keylist(dns_dnsseckeylist_t *list, isc_mem_t *mctx) { - ISC_LIST_FOREACH (*list, key, link) { + ISC_LIST_FOREACH(*list, key, link) { ISC_LIST_UNLINK(*list, key, link); dns_dnsseckey_destroy(mctx, &key); } @@ -1242,32 +1242,32 @@ zone_free(dns_zone_t *zone) { INSIST(zone->prev_view == NULL); /* Unmanaged objects */ - ISC_LIST_FOREACH (zone->setnsec3param_queue, npe, link) { + ISC_LIST_FOREACH(zone->setnsec3param_queue, npe, link) { ISC_LIST_UNLINK(zone->setnsec3param_queue, npe, link); isc_mem_put(zone->mctx, npe, sizeof(*npe)); } - ISC_LIST_FOREACH (zone->signing, signing, link) { + ISC_LIST_FOREACH(zone->signing, signing, link) { ISC_LIST_UNLINK(zone->signing, signing, link); dns_db_detach(&signing->db); dns_dbiterator_destroy(&signing->dbiterator); isc_mem_put(zone->mctx, signing, sizeof *signing); } - ISC_LIST_FOREACH (zone->nsec3chain, nsec3chain, link) { + ISC_LIST_FOREACH(zone->nsec3chain, nsec3chain, link) { ISC_LIST_UNLINK(zone->nsec3chain, nsec3chain, link); dns_db_detach(&nsec3chain->db); dns_dbiterator_destroy(&nsec3chain->dbiterator); isc_mem_put(zone->mctx, nsec3chain, sizeof *nsec3chain); } - ISC_LIST_FOREACH (zone->includes, include, link) { + ISC_LIST_FOREACH(zone->includes, include, link) { ISC_LIST_UNLINK(zone->includes, include, link); isc_mem_free(zone->mctx, include->name); isc_mem_put(zone->mctx, include, sizeof *include); } - ISC_LIST_FOREACH (zone->newincludes, include, link) { + ISC_LIST_FOREACH(zone->newincludes, include, link) { ISC_LIST_UNLINK(zone->newincludes, include, link); isc_mem_free(zone->mctx, include->name); isc_mem_put(zone->mctx, include, sizeof *include); @@ -2187,7 +2187,7 @@ zone_touched(dns_zone_t *zone) { return true; } - ISC_LIST_FOREACH (zone->includes, include, link) { + ISC_LIST_FOREACH(zone->includes, include, link) { result = isc_file_getmodtime(include->name, &modtime); if (result != ISC_R_SUCCESS || isc_time_compare(&modtime, &include->filetime) > 0) @@ -2399,7 +2399,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, bool locked) { dns_dlzdb_t *dlzdb = NULL; dns_dlzfindzone_t findzone; - ISC_LIST_FOREACH (zone->view->dlz_unsearched, d, link) { + ISC_LIST_FOREACH(zone->view->dlz_unsearched, d, link) { INSIST(DNS_DLZ_VALID(d)); if (strcmp(zone->db_argv[1], d->dlzname) == 0) { dlzdb = d; @@ -2714,7 +2714,7 @@ zone_registerinclude(const char *filename, void *arg) { /* * Suppress duplicates. */ - ISC_LIST_FOREACH (zone->newincludes, inc, link) { + ISC_LIST_FOREACH(zone->newincludes, inc, link) { if (strcmp(filename, inc->name) == 0) { return; } @@ -3238,14 +3238,14 @@ zone_rrset_check_dup(dns_zone_t *zone, dns_name_t *owner, } dns_rdataset_init(&tmprdataset); - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata1 = DNS_RDATA_INIT; unsigned int count2 = 0; count1++; dns_rdataset_current(rdataset, &rdata1); dns_rdataset_clone(rdataset, &tmprdataset); - DNS_RDATASET_FOREACH (&tmprdataset) { + DNS_RDATASET_FOREACH(&tmprdataset) { dns_rdata_t rdata2 = DNS_RDATA_INIT; count2++; if (count1 >= count2) { @@ -3294,7 +3294,7 @@ zone_check_dup(dns_zone_t *zone, dns_db_t *db) { return true; } - DNS_DBITERATOR_FOREACH (dbiterator) { + DNS_DBITERATOR_FOREACH(dbiterator) { result = dns_dbiterator_current(dbiterator, &node, name); if (result != ISC_R_SUCCESS) { continue; @@ -3305,7 +3305,7 @@ zone_check_dup(dns_zone_t *zone, dns_db_t *db) { continue; } - DNS_RDATASETITER_FOREACH (rdsit) { + DNS_RDATASETITER_FOREACH(rdsit) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsit, &rdataset); if (!zone_rrset_check_dup(zone, name, &rdataset)) { @@ -3426,7 +3426,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { return true; } - DNS_DBITERATOR_FOREACH (dbiterator) { + DNS_DBITERATOR_FOREACH(dbiterator) { result = dns_dbiterator_current(dbiterator, &node, name); if (result != ISC_R_SUCCESS) { goto cleanup; @@ -3454,7 +3454,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { } memset(logged_algorithm, 0, sizeof(logged_algorithm)); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_key_t key; dns_rdataset_current(&rdataset, &rdata); @@ -3508,7 +3508,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { */ dns_name_copy(name, bottom); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3533,7 +3533,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { memset(logged_algorithm, 0, sizeof(logged_algorithm)); memset(logged_digest_type, 0, sizeof(logged_digest_type)); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); dns_rdata_ds_t ds; @@ -3623,7 +3623,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { if (result != ISC_R_SUCCESS) { goto checksrv; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3644,7 +3644,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { if (result != ISC_R_SUCCESS) { goto checkforaaaa; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3701,7 +3701,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { if (result != ISC_R_SUCCESS) { goto notxt; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3737,7 +3737,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3769,7 +3769,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3827,7 +3827,7 @@ zone_check_dnskeys(dns_zone_t *zone, dns_db_t *db) { goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { char algbuf[DNS_SECALG_FORMATSIZE]; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -3943,7 +3943,7 @@ resume_signingwithkey(dns_zone_t *zone) { goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dst_algorithm_t alg; @@ -4099,7 +4099,7 @@ zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) { * currently being processed, interrupt its processing to avoid * simultaneously adding and removing records for the same NSEC3 chain. */ - ISC_LIST_FOREACH (zone->nsec3chain, current, link) { + ISC_LIST_FOREACH(zone->nsec3chain, current, link) { if ((current->db == db) && (current->nsec3param.hash == nsec3param->hash) && (current->nsec3param.iterations == @@ -4222,7 +4222,7 @@ resume_addnsec3chain(dns_zone_t *zone) { goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t private = DNS_RDATA_INIT; @@ -4356,7 +4356,7 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) { goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -4523,7 +4523,7 @@ delete_keydata(dns_db_t *db, dns_dbversion_t *ver, dns_diff_t *diff, dns_name_t *name, dns_rdataset_t *rdataset) { isc_result_t uresult; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); uresult = update_one_rr(db, ver, diff, DNS_DIFFOP_DEL, name, 0, @@ -4650,7 +4650,7 @@ load_secroots(dns_zone_t *zone, dns_name_t *name, dns_rdataset_t *rdataset) { } /* Now insert all the accepted trust anchors from this keydata set. */ - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); @@ -4996,7 +4996,7 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) { * legitimate data, in which case we will not use it, and we * will try to refresh it. */ - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { isc_result_t iresult; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -5150,7 +5150,7 @@ zone_unchanged(dns_db_t *db1, dns_db_t *db2, isc_mem_t *mctx) { static void process_zone_setnsec3param(dns_zone_t *zone) { - ISC_LIST_FOREACH (zone->setnsec3param_queue, npe, link) { + ISC_LIST_FOREACH(zone->setnsec3param_queue, npe, link) { ISC_LIST_UNLINK(zone->setnsec3param_queue, npe, link); zone_iattach(zone, &npe->zone); isc_async_run(zone->loop, setnsec3param, npe); @@ -5696,7 +5696,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, /* * Clear old include list. */ - ISC_LIST_FOREACH (zone->includes, inc, link) { + ISC_LIST_FOREACH(zone->includes, inc, link) { ISC_LIST_UNLINK(zone->includes, inc, link); isc_mem_free(zone->mctx, inc->name); isc_mem_put(zone->mctx, inc, sizeof(*inc)); @@ -5706,7 +5706,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, /* * Transfer new include list. */ - ISC_LIST_FOREACH (zone->newincludes, inc, link) { + ISC_LIST_FOREACH(zone->newincludes, inc, link) { ISC_LIST_UNLINK(zone->newincludes, inc, link); ISC_LIST_APPEND(zone->includes, inc, link); zone->nincludes++; @@ -5732,7 +5732,7 @@ cleanup: dns_zone_catz_disable_db(zone, db); } - ISC_LIST_FOREACH (zone->newincludes, inc, link) { + ISC_LIST_FOREACH(zone->newincludes, inc, link) { ISC_LIST_UNLINK(zone->newincludes, inc, link); isc_mem_free(zone->mctx, inc->name); isc_mem_put(zone->mctx, inc, sizeof(*inc)); @@ -5911,7 +5911,7 @@ zone_count_ns_rr(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node, goto invalidate_rdataset; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { if (errors != NULL && zone->rdclass == dns_rdataclass_in && (zone->type == dns_zone_primary || zone->type == dns_zone_secondary || @@ -5982,7 +5982,7 @@ zone_load_soa_rr(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, goto invalidate_rdataset; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -6606,7 +6606,7 @@ keyfromfile(dns_zone_t *zone, dst_key_t *pubkey, isc_mem_t *mctx, DST_TYPE_PUBLIC | DST_TYPE_PRIVATE | DST_TYPE_STATE, directory, mctx, &foundkey); } else { - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { dns_keystore_t *ks = dns_kasp_key_keystore(kkey); directory = dns_keystore_directory(ks, zone->keydirectory); @@ -6875,10 +6875,10 @@ dns_zone_getdnsseckeys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver, } /* Add new 'dnskeys' to 'keys'. */ - ISC_LIST_FOREACH (dnskeys, k1, link) { + ISC_LIST_FOREACH(dnskeys, k1, link) { bool match = false; - ISC_LIST_FOREACH (*keys, k2, link) { + ISC_LIST_FOREACH(*keys, k2, link) { if (dst_key_compare(k1->key, k2->key)) { match = true; break; @@ -6899,7 +6899,7 @@ failure: if (node != NULL) { dns_db_detachnode(&node); } - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { ISC_LIST_UNLINK(dnskeys, key, link); dns_dnsseckey_destroy(dns_zone_getmctx(zone), &key); } @@ -7102,7 +7102,7 @@ del_sigs(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dst_algorithm_t algorithm; @@ -7782,7 +7782,7 @@ signed_with_good_key(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node, INSIST(!dns_rdataset_isassociated(&rdataset)); return false; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rrsig, NULL); @@ -7806,7 +7806,7 @@ signed_with_good_key(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node, bool approved; KASP_LOCK(kasp); - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { if (dns_kasp_key_algorithm(kkey) != dst_key_alg(key)) { continue; } @@ -7872,7 +7872,7 @@ check_if_bottom_of_zone(dns_db_t *db, dns_dbnode_t *node, return result; } - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iterator, &rdataset); switch (rdataset.type) { @@ -7928,7 +7928,7 @@ sign_a_node(dns_db_t *db, dns_zone_t *zone, dns_name_t *name, isc_buffer_init(&buffer, data, sizeof(data)); seen_rr = seen_soa = seen_ns = seen_nsec = seen_nsec3 = seen_ds = false; - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { dns_rdatasetiter_current(iterator, &rdataset); if (rdataset.type == dns_rdatatype_soa) { seen_soa = true; @@ -7973,7 +7973,7 @@ sign_a_node(dns_db_t *db, dns_zone_t *zone, dns_name_t *name, } } - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { isc_stdtime_t when; if (dns_rdataset_isassociated(&rdataset)) { @@ -8131,7 +8131,7 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing, goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; unsigned char alg = dst_algorithm_tosecalg(signing->algorithm); @@ -8300,7 +8300,7 @@ fixup_nsec3param(dns_db_t *db, dns_dbversion_t *ver, dns_nsec3chain_t *chain, /* * Delete all NSEC3PARAM records which match that in nsec3chain. */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdataset_current(&rdataset, &rdata); CHECK(dns_rdata_tostruct(&rdata, &nsec3param, NULL)); @@ -8334,7 +8334,7 @@ fixup_nsec3param(dns_db_t *db, dns_dbversion_t *ver, dns_nsec3chain_t *chain, * Restore any NSEC3PARAM records that we deleted to change the TTL. */ if (rdataset.ttl != ttl) { - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdataset_current(&rdataset, &rdata); CHECK(dns_rdata_tostruct(&rdata, &nsec3param, NULL)); @@ -8378,7 +8378,7 @@ try_private: goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t private = DNS_RDATA_INIT; unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; @@ -8451,7 +8451,7 @@ delete_nsec(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node, return result; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -8482,7 +8482,7 @@ deletematchingnsec3(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node, return result; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); @@ -8543,7 +8543,7 @@ need_nsec_chain(dns_db_t *db, dns_dbversion_t *ver, } bool active = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); CHECK(dns_rdata_tostruct(&rdata, &myparam, NULL)); @@ -8880,7 +8880,7 @@ zone_nsec3chain(dns_zone_t *zone) { } seen_soa = seen_ns = seen_dname = seen_ds = seen_nsec = false; - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iterator, &rdataset); INSIST(rdataset.type != dns_rdatatype_nsec3); @@ -9144,7 +9144,7 @@ zone_nsec3chain(dns_zone_t *zone) { seen_soa = seen_ns = seen_dname = seen_nsec3 = seen_nsec = seen_rr = false; - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iterator, &rdataset); if (rdataset.type == dns_rdatatype_soa) { @@ -9260,7 +9260,7 @@ skip_removals: isc_result_totext(result)); goto failure; } - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iterator, &rdataset); if (rdataset.type == dns_rdatatype_nsec) { @@ -9411,7 +9411,7 @@ done: * Pause all iterators so that dns_db_closeversion() can succeed. */ LOCK_ZONE(zone); - ISC_LIST_FOREACH (zone->nsec3chain, chain, link) { + ISC_LIST_FOREACH(zone->nsec3chain, chain, link) { dns_dbiterator_pause(chain->dbiterator); } UNLOCK_ZONE(zone); @@ -9425,7 +9425,7 @@ done: /* * Everything succeeded so we can clean these up now. */ - ISC_LIST_FOREACH (cleanup, chain, link) { + ISC_LIST_FOREACH(cleanup, chain, link) { ISC_LIST_UNLINK(cleanup, chain, link); dns_db_detach(&chain->db); dns_dbiterator_destroy(&chain->dbiterator); @@ -9461,7 +9461,7 @@ failure: /* * Rollback the cleanup list. */ - ISC_LIST_FOREACH_REV (cleanup, chain, link) { + ISC_LIST_FOREACH_REV(cleanup, chain, link) { ISC_LIST_UNLINK(cleanup, chain, link); if (chain->done) { dns_db_detach(&chain->db); @@ -9479,7 +9479,7 @@ failure: } LOCK_ZONE(zone); - ISC_LIST_FOREACH (zone->nsec3chain, chain, link) { + ISC_LIST_FOREACH(zone->nsec3chain, chain, link) { dns_dbiterator_pause(chain->dbiterator); } UNLOCK_ZONE(zone); @@ -9553,11 +9553,11 @@ del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name, } dns_rdataset_init(&rdataset); - DNS_RDATASETITER_FOREACH (iterator) { + DNS_RDATASETITER_FOREACH(iterator) { bool has_alg = false; dns_rdatasetiter_current(iterator, &rdataset); if (nkeys == 0 && rdataset.type == dns_rdatatype_nsec) { - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); CHECK(update_one_rr(db, version, diff, @@ -9571,7 +9571,7 @@ del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name, dns_rdataset_disassociate(&rdataset); continue; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dst_algorithm_t sigalg; @@ -9638,7 +9638,7 @@ dns_zone_check_dnskey_nsec3(dns_zone_t *zone, dns_db_t *db, /* Scan the tuples for an NSEC-only DNSKEY */ if (diff != NULL) { - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (nseconly && nsec3) { break; } @@ -10179,11 +10179,11 @@ pauseall: /* * Pause all iterators so that dns_db_closeversion() can succeed. */ - ISC_LIST_FOREACH (zone->signing, s, link) { + ISC_LIST_FOREACH(zone->signing, s, link) { dns_dbiterator_pause(s->dbiterator); } - ISC_LIST_FOREACH (cleanup, s, link) { + ISC_LIST_FOREACH(cleanup, s, link) { dns_dbiterator_pause(s->dbiterator); } @@ -10195,7 +10195,7 @@ pauseall: /* * Everything succeeded so we can clean these up now. */ - ISC_LIST_FOREACH (cleanup, s, link) { + ISC_LIST_FOREACH(cleanup, s, link) { ISC_LIST_UNLINK(cleanup, s, link); dns_db_detach(&s->db); dns_dbiterator_destroy(&s->dbiterator); @@ -10220,14 +10220,14 @@ cleanup: /* * Pause all dbiterators. */ - ISC_LIST_FOREACH (zone->signing, s, link) { + ISC_LIST_FOREACH(zone->signing, s, link) { dns_dbiterator_pause(s->dbiterator); } /* * Rollback the cleanup list. */ - ISC_LIST_FOREACH (cleanup, s, link) { + ISC_LIST_FOREACH(cleanup, s, link) { ISC_LIST_UNLINK(cleanup, s, link); ISC_LIST_PREPEND(zone->signing, s, link); dns_dbiterator_first(s->dbiterator); @@ -10326,7 +10326,7 @@ matchkey(dns_rdataset_t *rdset, dns_rdata_t *rr) { return false; } - DNS_RDATASET_FOREACH (rdset) { + DNS_RDATASET_FOREACH(rdset) { unsigned char data2[4096]; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t rdata2 = DNS_RDATA_INIT; @@ -10435,7 +10435,7 @@ minimal_update(dns_keyfetch_t *kfetch, dns_dbversion_t *ver, dns_diff_t *diff) { name = dns_fixedname_name(&kfetch->name); - DNS_RDATASET_FOREACH (&kfetch->keydataset) { + DNS_RDATASET_FOREACH(&kfetch->keydataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&kfetch->keydataset, &rdata); @@ -10503,7 +10503,7 @@ revocable(dns_keyfetch_t *kfetch, dns_rdata_keydata_t *keydata) { } /* See if that key generated any of the signatures */ - DNS_RDATASET_FOREACH (&kfetch->dnskeysigset) { + DNS_RDATASET_FOREACH(&kfetch->dnskeysigset) { dns_rdata_t sigrr = DNS_RDATA_INIT; dns_fixedname_t fixed; dns_fixedname_init(&fixed); @@ -10657,7 +10657,7 @@ keyfetch_done(void *arg) { */ dns_rdataset_init(&dsset); if (dns_keynode_dsset(keynode, &dsset)) { - DNS_RDATASET_FOREACH (dnskeysigs) { + DNS_RDATASET_FOREACH(dnskeysigs) { isc_result_t tresult = ISC_R_NOTFOUND; dns_rdata_t keyrdata = DNS_RDATA_INIT; dns_rdata_t sigrr = DNS_RDATA_INIT; @@ -10665,7 +10665,7 @@ keyfetch_done(void *arg) { dns_rdataset_current(dnskeysigs, &sigrr); dns_rdata_tostruct(&sigrr, &sig, NULL); - DNS_RDATASET_FOREACH (&dsset) { + DNS_RDATASET_FOREACH(&dsset) { dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_ds_t ds; @@ -10748,7 +10748,7 @@ anchors_done: * updated */ initializing = true; - DNS_RDATASET_FOREACH (keydataset) { + DNS_RDATASET_FOREACH(keydataset) { dns_keytag_t keytag; dns_rdata_reset(&keydatarr); @@ -10864,7 +10864,7 @@ anchors_done: * - All keys not being removed have their refresh * timers updated */ - DNS_RDATASET_FOREACH (dnskeys) { + DNS_RDATASET_FOREACH(dnskeys) { dns_rdata_t dnskeyrr = DNS_RDATA_INIT; bool revoked = false; bool newkey = false; @@ -11331,7 +11331,7 @@ zone_refreshkeys(dns_zone_t *zone) { * Scan the stored keys looking for ones that need * removal or refreshing */ - DNS_RDATASET_FOREACH (kdset) { + DNS_RDATASET_FOREACH(kdset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(kdset, &rdata); result = dns_rdata_tostruct(&rdata, &kd, NULL); @@ -12418,7 +12418,7 @@ notify_cancel(dns_zone_t *zone) { REQUIRE(LOCKED_ZONE(zone)); - ISC_LIST_FOREACH (zone->notifies, notify, link) { + ISC_LIST_FOREACH(zone->notifies, notify, link) { if (notify->find != NULL) { dns_adb_cancelfind(notify->find); } @@ -12436,7 +12436,7 @@ checkds_cancel(dns_zone_t *zone) { REQUIRE(LOCKED_ZONE(zone)); - ISC_LIST_FOREACH (zone->checkds_requests, checkds, link) { + ISC_LIST_FOREACH(zone->checkds_requests, checkds, link) { if (checkds->find != NULL) { dns_adb_cancelfind(checkds->find); } @@ -12454,7 +12454,7 @@ forward_cancel(dns_zone_t *zone) { REQUIRE(LOCKED_ZONE(zone)); - ISC_LIST_FOREACH (zone->forwards, forward, link) { + ISC_LIST_FOREACH(zone->forwards, forward, link) { if (forward->request != NULL) { dns_request_cancel(forward->request); } @@ -12563,7 +12563,7 @@ notify_isqueued(dns_zone_t *zone, unsigned int flags, dns_name_t *name, dns_zonemgr_t *zmgr = NULL; isc_result_t result; - ISC_LIST_FOREACH (zone->notifies, n, link) { + ISC_LIST_FOREACH(zone->notifies, n, link) { if (n->request != NULL) { continue; } @@ -12997,7 +12997,7 @@ notify_send(dns_notify_t *notify) { return; } - ISC_LIST_FOREACH (notify->find->list, ai, publink) { + ISC_LIST_FOREACH(notify->find->list, ai, publink) { dst = ai->sockaddr; if (notify_isqueued(notify->zone, notify->flags, NULL, &dst, NULL, NULL)) @@ -13275,7 +13275,7 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) { goto cleanup3; } - DNS_RDATASET_FOREACH (&nsrdset) { + DNS_RDATASET_FOREACH(&nsrdset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&nsrdset, &rdata); @@ -13761,7 +13761,7 @@ save_nsrrset(dns_message_t *message, dns_name_t *name, /* * Add glue rdatasets. */ - DNS_RDATASET_FOREACH (nsrdataset) { + DNS_RDATASET_FOREACH(nsrdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(nsrdataset, &rdata); result = dns_rdata_tostruct(&rdata, &ns, NULL); @@ -13828,7 +13828,7 @@ save_nsrrset(dns_message_t *message, dns_name_t *name, * for each NS entry found in the answer. */ if (!has_glue) { - ISC_LIST_FOREACH (ns_list, ns_name, link) { + ISC_LIST_FOREACH(ns_list, ns_name, link) { /* * Resolve NS IPv4 address/A. */ @@ -13851,7 +13851,7 @@ save_nsrrset(dns_message_t *message, dns_name_t *name, result = ISC_R_SUCCESS; done: - ISC_LIST_FOREACH (ns_list, ns_name, link) { + ISC_LIST_FOREACH(ns_list, ns_name, link) { ISC_LIST_UNLINK(ns_list, ns_name, link); dns_name_free(ns_name, cb_args->stub->mctx); isc_mem_put(cb_args->stub->mctx, ns_name, sizeof(*ns_name)); @@ -16335,8 +16335,8 @@ static int message_count(dns_message_t *msg, dns_section_t section, dns_rdatatype_t type) { int count = 0; - MSG_SECTION_FOREACH (msg, section, name) { - ISC_LIST_FOREACH_REV (name->list, curr, link) { + MSG_SECTION_FOREACH(msg, section, name) { + ISC_LIST_FOREACH_REV(name->list, curr, link) { if (curr->type == type) { count++; } @@ -16567,7 +16567,7 @@ dnskey_inuse(dns_zone_t *zone, dns_rdata_t *rdata, isc_mem_t *mctx, return result; } - ISC_LIST_FOREACH (*keylist, k, link) { + ISC_LIST_FOREACH(*keylist, k, link) { if (dst_key_pubcompare(k->key, dstkey, false)) { *inuse = true; break; @@ -16592,7 +16592,7 @@ cdnskey_inuse(dns_zone_t *zone, dns_rdata_t *rdata, return result; } - ISC_LIST_FOREACH (*keylist, k, link) { + ISC_LIST_FOREACH(*keylist, k, link) { dns_rdata_t cdnskeyrdata = DNS_RDATA_INIT; unsigned char keybuf[DST_KEY_MAXSIZE]; @@ -16629,7 +16629,7 @@ cds_inuse(dns_zone_t *zone, dns_rdata_t *rdata, dns_dnsseckeylist_t *keylist, return result; } - ISC_LIST_FOREACH (*keylist, k, link) { + ISC_LIST_FOREACH(*keylist, k, link) { dns_rdata_t dnskey = DNS_RDATA_INIT; dns_rdata_t cdsrdata = DNS_RDATA_INIT; unsigned char keybuf[DST_KEY_MAXSIZE]; @@ -16724,7 +16724,7 @@ dns_zone_dnskey_inuse(dns_zone_t *zone, dns_rdata_t *rdata, bool *inuse) { break; } - ISC_LIST_FOREACH (keylist, key, link) { + ISC_LIST_FOREACH(keylist, key, link) { ISC_LIST_UNLINK(keylist, key, link); dns_dnsseckey_destroy(mctx, &key); } @@ -16973,7 +16973,7 @@ sync_secure_db(dns_zone_t *seczone, dns_zone_t *raw, dns_db_t *secdb, dns_db_detachnode(&node); } - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { dns_difftuplelist_t *al = &add, *dl = &del; /* @@ -17463,7 +17463,7 @@ save_nsec3param(dns_zone_t *zone, nsec3paramlist_t *nsec3list) { * is why we use an nsec3list, even though we will usually only * have one). */ - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t private = DNS_RDATA_INIT; @@ -17497,7 +17497,7 @@ getprivate: * using dns_nsec3param_fromprivate(), do the right thing based on * CREATE and REMOVE flags */ - DNS_RDATASET_FOREACH (&prdataset) { + DNS_RDATASET_FOREACH(&prdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t private = DNS_RDATA_INIT; @@ -17524,7 +17524,7 @@ getprivate: */ rdata.data[1] = 0; - ISC_LIST_FOREACH (*nsec3list, nsec3p, link) { + ISC_LIST_FOREACH(*nsec3list, nsec3p, link) { if (nsec3p->length == (unsigned int)rdata.length + 1 && memcmp(rdata.data, nsec3p->data + 1, @@ -17596,7 +17596,7 @@ restore_nsec3param(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version, * and CREATE flags, and the add the record to the apex of the tree * in db. */ - ISC_LIST_FOREACH (*nsec3list, nsec3p, link) { + ISC_LIST_FOREACH(*nsec3list, nsec3p, link) { dns_rdata_init(&rdata); nsec3p->data[2] = DNS_NSEC3FLAG_CREATE | DNS_NSEC3FLAG_INITIAL; rdata.length = nsec3p->length; @@ -17640,7 +17640,7 @@ copy_non_dnssec_records(dns_db_t *db, dns_dbversion_t *version, dns_db_t *rawdb, goto cleanup; } - DNS_RDATASETITER_FOREACH (rdsit) { + DNS_RDATASETITER_FOREACH(rdsit) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsit, &rdataset); if (rdataset.type == dns_rdatatype_nsec || @@ -17745,7 +17745,7 @@ receive_secure_db(void *arg) { goto failure; } - DNS_DBITERATOR_FOREACH (dbiterator) { + DNS_DBITERATOR_FOREACH(dbiterator) { result = copy_non_dnssec_records(db, version, rawdb, dbiterator, oldserialp); if (result != ISC_R_SUCCESS) { @@ -19483,7 +19483,7 @@ dns_zonemgr_forcemaint(dns_zonemgr_t *zmgr) { REQUIRE(DNS_ZONEMGR_VALID(zmgr)); RWLOCK(&zmgr->rwlock, isc_rwlocktype_read); - ISC_LIST_FOREACH (zmgr->zones, zone, link) { + ISC_LIST_FOREACH(zmgr->zones, zone, link) { isc_time_t now; LOCK_ZONE(zone); @@ -19520,7 +19520,7 @@ dns_zonemgr_shutdown(dns_zonemgr_t *zmgr) { } RWLOCK(&zmgr->rwlock, isc_rwlocktype_read); - ISC_LIST_FOREACH (zmgr->zones, zone, link) { + ISC_LIST_FOREACH(zmgr->zones, zone, link) { LOCK_ZONE(zone); forward_cancel(zone); UNLOCK_ZONE(zone); @@ -19592,7 +19592,7 @@ dns_zonemgr_gettransfersperns(dns_zonemgr_t *zmgr) { */ static void zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi) { - ISC_LIST_FOREACH (zmgr->waiting_for_xfrin, zone, statelink) { + ISC_LIST_FOREACH(zmgr->waiting_for_xfrin, zone, statelink) { isc_result_t result; result = zmgr_start_xfrin_ifquota(zmgr, zone); if (result == ISC_R_SUCCESS) { @@ -19679,7 +19679,7 @@ zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) { * out to be too slow, we could hash on the primary address. */ nxfrsin = nxfrsperns = 0; - ISC_LIST_FOREACH (zmgr->xfrin_in_progress, x, statelink) { + ISC_LIST_FOREACH(zmgr->xfrin_in_progress, x, statelink) { isc_netaddr_t xip; isc_sockaddr_t xaddr; @@ -20039,31 +20039,31 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, dns_zonestate_t state) { RWLOCK(&zmgr->rwlock, isc_rwlocktype_read); switch (state) { case DNS_ZONESTATE_XFERRUNNING: - ISC_LIST_FOREACH (zmgr->xfrin_in_progress, zone, statelink) { + ISC_LIST_FOREACH(zmgr->xfrin_in_progress, zone, statelink) { count++; } break; case DNS_ZONESTATE_XFERDEFERRED: - ISC_LIST_FOREACH (zmgr->waiting_for_xfrin, zone, statelink) { + ISC_LIST_FOREACH(zmgr->waiting_for_xfrin, zone, statelink) { count++; } break; case DNS_ZONESTATE_XFERFIRSTREFRESH: - ISC_LIST_FOREACH (zmgr->zones, zone, link) { + ISC_LIST_FOREACH(zmgr->zones, zone, link) { if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FIRSTREFRESH)) { count++; } } break; case DNS_ZONESTATE_SOAQUERY: - ISC_LIST_FOREACH (zmgr->zones, zone, link) { + ISC_LIST_FOREACH(zmgr->zones, zone, link) { if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_REFRESH)) { count++; } } break; case DNS_ZONESTATE_ANY: - ISC_LIST_FOREACH (zmgr->zones, zone, link) { + ISC_LIST_FOREACH(zmgr->zones, zone, link) { dns_view_t *view = zone->view; if (view != NULL && strcmp(view->name, "_bind") == 0) { continue; @@ -20072,7 +20072,7 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, dns_zonestate_t state) { } break; case DNS_ZONESTATE_AUTOMATIC: - ISC_LIST_FOREACH (zmgr->zones, zone, link) { + ISC_LIST_FOREACH(zmgr->zones, zone, link) { dns_view_t *view = zone->view; if (view != NULL && strcmp(view->name, "_bind") == 0) { continue; @@ -20404,7 +20404,7 @@ zone_signwithkey(dns_zone_t *zone, dst_algorithm_t algorithm, uint16_t keyid, dns_db_attach(db, &signing->db); - ISC_LIST_FOREACH (zone->signing, current, link) { + ISC_LIST_FOREACH(zone->signing, current, link) { if (current->db == signing->db && current->algorithm == signing->algorithm && current->keyid == signing->keyid) @@ -20498,7 +20498,7 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, } bool matched = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t myrdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &myrdata); if (dns_rdata_compare(&myrdata, rdata) == 0) { @@ -20539,7 +20539,7 @@ add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype, * Move non DNSKEY and not DNSSEC DNSKEY records to tuples * and sort the remaining DNSKEY records to add and del. */ - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (tuple->rdata.type != dns_rdatatype_dnskey) { ISC_LIST_UNLINK(diff->tuples, tuple, link); ISC_LIST_APPEND(tuples, tuple, link); @@ -20579,8 +20579,8 @@ add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype, /* * Filter out DNSKEY TTL changes and put them back onto diff->tuples. */ - ISC_LIST_FOREACH (del, deltuple, link) { - ISC_LIST_FOREACH (add, addtuple, link) { + ISC_LIST_FOREACH(del, deltuple, link) { + ISC_LIST_FOREACH(add, addtuple, link) { int n = dns_rdata_compare(&deltuple->rdata, &addtuple->rdata); if (n == 0) { @@ -20603,7 +20603,7 @@ add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype, * Add private records for keys that have been removed * or added. */ - ISC_LIST_FOREACH (tuples, tuple, link) { + ISC_LIST_FOREACH(tuples, tuple, link) { dst_algorithm_t algorithm; dns_rdata_toregion(&tuple->rdata, &r); @@ -20675,7 +20675,7 @@ tickle_apex_rrset(dns_rdatatype_t rrtype, dns_zone_t *zone, dns_db_t *db, isc_result_t result; bool apexsig = false; - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (tuple->rdata.type == rrtype && dns_name_equal(&tuple->name, &zone->origin)) { @@ -20817,7 +20817,7 @@ signed_with_alg(dns_rdataset_t *rdataset, dst_algorithm_t alg) { return false; } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_rrsig_t rrsig; @@ -21085,12 +21085,12 @@ checkds_done(void *arg) { /* Lookup DS RRset. */ - MSG_SECTION_FOREACH (message, DNS_SECTION_ANSWER, name) { + MSG_SECTION_FOREACH(message, DNS_SECTION_ANSWER, name) { if (dns_name_compare(&zone->origin, name) != 0) { continue; } - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (rdataset->type != dns_rdatatype_ds) { goto next; } @@ -21120,7 +21120,7 @@ checkds_done(void *arg) { KASP_LOCK(kasp); LOCK_ZONE(zone); - ISC_LIST_FOREACH (zone->checkds_ok, key, link) { + ISC_LIST_FOREACH(zone->checkds_ok, key, link) { bool alldone = false, found = false; bool checkdspub = false, checkdsdel = false, ksk = false; dst_key_state_t ds_state = DST_KEY_STATE_NA; @@ -21153,7 +21153,7 @@ checkds_done(void *arg) { } /* Find the appropriate DS record. */ - DNS_RDATASET_FOREACH (ds_rrset) { + DNS_RDATASET_FOREACH(ds_rrset) { dns_rdata_ds_t ds; dns_rdata_t dnskey = DNS_RDATA_INIT; dns_rdata_t dsrdata = DNS_RDATA_INIT; @@ -21228,7 +21228,7 @@ failure: dns_db_detach(&db); } - ISC_LIST_FOREACH (keys, key, link) { + ISC_LIST_FOREACH(keys, key, link) { ISC_LIST_UNLINK(keys, key, link); dns_dnsseckey_destroy(dns_zone_getmctx(zone), &key); } @@ -21240,7 +21240,7 @@ failure: static bool checkds_isqueued(dns_zone_t *zone, dns_name_t *name, isc_sockaddr_t *addr, dns_tsigkey_t *key, dns_transport_t *transport) { - ISC_LIST_FOREACH (zone->checkds_requests, checkds, link) { + ISC_LIST_FOREACH(zone->checkds_requests, checkds, link) { if (checkds->request != NULL) { continue; } @@ -21557,7 +21557,7 @@ checkds_send_tons(dns_checkds_t *checkds) { return; } - ISC_LIST_FOREACH (checkds->find->list, ai, publink) { + ISC_LIST_FOREACH(checkds->find->list, ai, publink) { dst = ai->sockaddr; if (checkds_isqueued(zone, NULL, &dst, NULL, NULL)) { continue; @@ -21822,7 +21822,7 @@ nsfetch_done(void *arg) { UNLOCK_ZONE(zone); /* Look up the addresses for the found parental name servers. */ - DNS_RDATASET_FOREACH (nsrrset) { + DNS_RDATASET_FOREACH(nsrrset) { dns_checkds_t *checkds = NULL; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_ns_t ns; @@ -22016,7 +22016,7 @@ zone_checkds(dns_zone_t *zone) { return; } - ISC_LIST_FOREACH (zone->checkds_ok, key, link) { + ISC_LIST_FOREACH(zone->checkds_ok, key, link) { dst_key_state_t ds_state = DST_KEY_STATE_NA; bool ksk = false; isc_stdtime_t published = 0, withdrawn = 0; @@ -22093,7 +22093,7 @@ update_ttl(dns_rdataset_t *rdataset, dns_name_t *name, dns_ttl_t ttl, /* * Delete everything using the existing TTL. */ - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_difftuple_t *tuple = NULL; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -22106,7 +22106,7 @@ update_ttl(dns_rdataset_t *rdataset, dns_name_t *name, dns_ttl_t ttl, /* * Add everything using the new TTL. */ - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_difftuple_t *tuple = NULL; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -22123,7 +22123,7 @@ zone_verifykeys(dns_zone_t *zone, dns_dnsseckeylist_t *newkeys, /* * Make sure that the existing keys are also present in the new keylist. */ - ISC_LIST_FOREACH (zone->keyring, key1, link) { + ISC_LIST_FOREACH(zone->keyring, key1, link) { bool found = false; if (dst_key_is_unused(key1->key)) { @@ -22136,7 +22136,7 @@ zone_verifykeys(dns_zone_t *zone, dns_dnsseckeylist_t *newkeys, continue; } - ISC_LIST_FOREACH (*newkeys, key2, link) { + ISC_LIST_FOREACH(*newkeys, key2, link) { if (dst_key_compare(key1->key, key2->key)) { found = true; break; @@ -22163,7 +22163,7 @@ remove_rdataset(dns_zone_t *zone, dns_diff_t *diff, dns_rdataset_t *rdataset) { return; } - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_difftuple_t *tuple = NULL; @@ -22199,7 +22199,7 @@ zone_apply_skrbundle(dns_zone_t *zone, dns_skrbundle_t *bundle, remove_rdataset(zone, diff, cdnskeyset); /* Add the records from the bundle. */ - ISC_LIST_FOREACH (bundle->diff.tuples, tuple, link) { + ISC_LIST_FOREACH(bundle->diff.tuples, tuple, link) { switch (tuple->rdata.type) { case dns_rdatatype_dnskey: add_tuple(diff, tuple); @@ -22535,7 +22535,7 @@ zone_rekey(dns_zone_t *zone) { } else { /* Check if there is a CDS DELETE record. */ if (dns_rdataset_isassociated(&cdsset)) { - DNS_RDATASET_FOREACH (&cdsset) { + DNS_RDATASET_FOREACH(&cdsset) { dns_rdata_t crdata = DNS_RDATA_INIT; dns_rdataset_current(&cdsset, &crdata); /* @@ -22556,7 +22556,7 @@ zone_rekey(dns_zone_t *zone) { /* Check if there is a CDNSKEY DELETE record. */ if (dns_rdataset_isassociated(&cdnskeyset)) { - DNS_RDATASET_FOREACH (&cdnskeyset) { + DNS_RDATASET_FOREACH(&cdnskeyset) { dns_rdata_t crdata = DNS_RDATA_INIT; dns_rdataset_current(&cdnskeyset, &crdata); @@ -22601,7 +22601,7 @@ zone_rekey(dns_zone_t *zone) { * published and is used for signing. */ bool allow = false; - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { dst_key_t *dstk = key->key; if (dst_key_is_published(dstk, now, &when) && @@ -22638,7 +22638,7 @@ zone_rekey(dns_zone_t *zone) { * key, but it's for an already-existing algorithm, then * the zone signing can be handled incrementally.) */ - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { if (!key->first_sign) { continue; } @@ -22707,7 +22707,7 @@ zone_rekey(dns_zone_t *zone) { zone_settimer(zone, &timenow); /* Remove any signatures from removed keys. */ - ISC_LIST_FOREACH (rmkeys, key, link) { + ISC_LIST_FOREACH(rmkeys, key, link) { result = zone_signwithkey(zone, dst_key_alg(key->key), dst_key_id(key->key), true); if (result != ISC_R_SUCCESS) { @@ -22737,7 +22737,7 @@ zone_rekey(dns_zone_t *zone) { * "rndc sign" was called, so we now sign the zone * with all active keys, whether they're new or not. */ - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { if (!key->force_sign && !key->hint_sign) { continue; } @@ -22759,7 +22759,7 @@ zone_rekey(dns_zone_t *zone) { * the full zone, but only with newly active * keys. */ - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { if (!key->first_sign) { continue; } @@ -22786,7 +22786,7 @@ zone_rekey(dns_zone_t *zone) { * Cause the zone to add/delete NSEC3 chains for the * deferred NSEC3PARAM changes. */ - ISC_LIST_FOREACH (zonediff.diff->tuples, tuple, link) { + ISC_LIST_FOREACH(zonediff.diff->tuples, tuple, link) { unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_nsec3param_t nsec3param; @@ -22872,7 +22872,7 @@ zone_rekey(dns_zone_t *zone) { &timethen); zone->refreshkeytime = timethen; - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { then = now; result = next_keyevent(key->key, &then); if (result != ISC_R_SUCCESS) { @@ -22901,7 +22901,7 @@ zone_rekey(dns_zone_t *zone) { clear_keylist(&zone->keyring, zone->mctx); } - ISC_LIST_FOREACH (dnskeys, key, link) { + ISC_LIST_FOREACH(dnskeys, key, link) { if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) { /* This debug log is used in the kasp system test */ char algbuf[DNS_SECALG_FORMATSIZE]; @@ -23068,7 +23068,7 @@ dns_zone_cdscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version) { bool logged_digest_type[DNS_DSDIGEST_MAX + 1] = { 0 }; bool delete = false; memset(algorithms, notexpected, sizeof(algorithms)); - DNS_RDATASET_FOREACH (&cds) { + DNS_RDATASET_FOREACH(&cds) { dns_rdata_t crdata = DNS_RDATA_INIT; dns_rdata_cds_t structcds; @@ -23122,7 +23122,7 @@ dns_zone_cdscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version) { algorithms[structcds.algorithm] = expected; } - DNS_RDATASET_FOREACH (&dnskey) { + DNS_RDATASET_FOREACH(&dnskey) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_dnskey_t structdnskey; @@ -23181,7 +23181,7 @@ dns_zone_cdscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version) { if (dns_rdataset_isassociated(&cdnskey)) { bool delete = false; memset(algorithms, notexpected, sizeof(algorithms)); - DNS_RDATASET_FOREACH (&cdnskey) { + DNS_RDATASET_FOREACH(&cdnskey) { dns_rdata_t crdata = DNS_RDATA_INIT; dns_rdata_cdnskey_t structcdnskey; dst_algorithm_t cdnskeyalg; @@ -23213,7 +23213,7 @@ dns_zone_cdscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version) { if (algorithms[cdnskeyalg] == 0) { algorithms[cdnskeyalg] = expected; } - DNS_RDATASET_FOREACH (&dnskey) { + DNS_RDATASET_FOREACH(&dnskey) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_dnskey_t structdnskey; dst_algorithm_t dnskeyalg; @@ -23542,7 +23542,7 @@ keydone(void *arg) { goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; bool found = false; @@ -23855,7 +23855,7 @@ rss_post(void *arg) { result = dns_db_findrdataset(db, node, newver, zone->privatetype, dns_rdatatype_none, 0, &prdataset, NULL); if (result == ISC_R_SUCCESS) { - DNS_RDATASET_FOREACH (&prdataset) { + DNS_RDATASET_FOREACH(&prdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&prdataset, &rdata); @@ -23877,7 +23877,7 @@ rss_post(void *arg) { result = dns_db_findrdataset(db, node, newver, dns_rdatatype_nsec3param, dns_rdatatype_none, 0, &nrdataset, NULL); if (result == ISC_R_SUCCESS) { - DNS_RDATASET_FOREACH (&nrdataset) { + DNS_RDATASET_FOREACH(&nrdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&nrdataset, &rdata); @@ -24046,7 +24046,7 @@ dns__zone_lookup_nsec3param(dns_zone_t *zone, dns_rdata_nsec3param_t *lookup, } result = ISC_R_NOTFOUND; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); dns_rdata_tostruct(&rdata, &nsec3param, NULL); @@ -24338,7 +24338,7 @@ dns_zone_getincludes(dns_zone_t *zone, char ***includesp) { } array = isc_mem_allocate(zone->mctx, sizeof(char *) * zone->nincludes); - ISC_LIST_FOREACH (zone->includes, include, link) { + ISC_LIST_FOREACH(zone->includes, include, link) { INSIST(n < zone->nincludes); array[n++] = isc_mem_strdup(zone->mctx, include->name); } diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index 181e31cff8..cf5c65e84f 100644 --- a/lib/dns/zoneverify.c +++ b/lib/dns/zoneverify.c @@ -316,7 +316,7 @@ check_no_rrsig(const vctx_t *vctx, const dns_rdataset_t *rdataset, isc_result_totext(result)); return result; } - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &sigrdataset); if (sigrdataset.type == dns_rdatatype_rrsig && sigrdataset.covers == rdataset->type) @@ -432,7 +432,7 @@ find_nsec3_match(const dns_rdata_nsec3param_t *nsec3param, /* * Find matching NSEC3 record. */ - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(rdataset, &rdata); dns_rdata_tostruct(&rdata, nsec3_match, NULL); @@ -530,7 +530,7 @@ innsec3params(const dns_rdata_nsec3_t *nsec3, dns_rdataset_t *nsec3paramset) { dns_rdata_nsec3param_t nsec3param; isc_result_t result; - DNS_RDATASET_FOREACH (nsec3paramset) { + DNS_RDATASET_FOREACH(nsec3paramset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(nsec3paramset, &rdata); @@ -580,7 +580,7 @@ record_found(const vctx_t *vctx, const dns_name_t *name, dns_dbnode_t *node, goto cleanup; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &nsec3, NULL); @@ -776,7 +776,7 @@ verifynsec3s(const vctx_t *vctx, const dns_name_t *name, isc_result_t *vresult) { isc_result_t result = ISC_R_NOMORE; - DNS_RDATASET_FOREACH (nsec3paramset) { + DNS_RDATASET_FOREACH(nsec3paramset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(nsec3paramset, &rdata); @@ -811,7 +811,7 @@ verifyset(vctx_t *vctx, dns_rdataset_t *rdataset, const dns_name_t *name, isc_result_totext(result)); return result; } - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, &sigrdataset); if (sigrdataset.type == dns_rdatatype_rrsig && sigrdataset.covers == rdataset->type) @@ -836,7 +836,7 @@ verifyset(vctx_t *vctx, dns_rdataset_t *rdataset, const dns_name_t *name, goto done; } - DNS_RDATASET_FOREACH (&sigrdataset) { + DNS_RDATASET_FOREACH(&sigrdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_rrsig_t sig; dst_algorithm_t algorithm; @@ -916,7 +916,7 @@ verifynode(vctx_t *vctx, const dns_name_t *name, dns_dbnode_t *node, return result; } - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(rdsiter, &rdataset); @@ -1501,7 +1501,7 @@ check_dnskey_sigs(vctx_t *vctx, const dns_rdata_dnskey_t *dnskey, */ dns_rdataset_init(&dsset); if (dns_keynode_dsset(keynode, &dsset)) { - DNS_RDATASET_FOREACH (&dsset) { + DNS_RDATASET_FOREACH(&dsset) { dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t newdsrdata = DNS_RDATA_INIT; unsigned char buf[DNS_DS_BUFFERSIZE]; @@ -1559,7 +1559,7 @@ check_dnskey(vctx_t *vctx) { isc_result_t result; bool is_ksk; - DNS_RDATASET_FOREACH (&vctx->keyset) { + DNS_RDATASET_FOREACH(&vctx->keyset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&vctx->keyset, &rdata); result = dns_rdata_tostruct(&rdata, &dnskey, NULL); @@ -1696,7 +1696,7 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) { count = dns_rdataset_count(&vctx->keyset); dstkeys = isc_mem_cget(vctx->mctx, count, sizeof(*dstkeys)); - DNS_RDATASET_FOREACH (&vctx->keyset) { + DNS_RDATASET_FOREACH(&vctx->keyset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&vctx->keyset, &rdata); dstkeys[nkeys] = NULL; @@ -1852,7 +1852,7 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) { return result; } - DNS_DBITERATOR_FOREACH (dbiter) { + DNS_DBITERATOR_FOREACH(dbiter) { result = dns_dbiterator_current(dbiter, &node, name); if (result != ISC_R_SUCCESS && result != DNS_R_NEWORIGIN) { zoneverify_log_error(vctx, diff --git a/lib/isc/httpd.c b/lib/isc/httpd.c index 83cbb41722..06c61e316b 100644 --- a/lib/isc/httpd.c +++ b/lib/isc/httpd.c @@ -289,7 +289,7 @@ destroy_httpdmgr(isc_httpdmgr_t *httpdmgr) { * Clear out the list of all actions we know about. Just free the * memory. */ - ISC_LIST_FOREACH (httpdmgr->urls, url, link) { + ISC_LIST_FOREACH(httpdmgr->urls, url, link) { isc_mem_free(httpdmgr->mctx, url->url); ISC_LIST_UNLINK(httpdmgr->urls, url, link); isc_mem_put(httpdmgr->mctx, url, sizeof(isc_httpdurl_t)); @@ -778,7 +778,7 @@ prepare_response(void *arg) { } LOCK(&mgr->lock); - ISC_LIST_FOREACH (mgr->urls, u, link) { + ISC_LIST_FOREACH(mgr->urls, u, link) { if (strncmp(path, u->url, path_len) == 0) { url = u; break; @@ -977,7 +977,7 @@ isc_httpdmgr_shutdown(isc_httpdmgr_t **httpdmgrp) { LOCK(&httpdmgr->lock); - ISC_LIST_FOREACH (httpdmgr->running, httpd, link) { + ISC_LIST_FOREACH(httpdmgr->running, httpd, link) { if (httpd->handle != NULL) { httpd_request(httpd->handle, ISC_R_SUCCESS, NULL, httpd); diff --git a/lib/isc/job.c b/lib/isc/job.c index dc206f3ecd..09ed7360e5 100644 --- a/lib/isc/job.c +++ b/lib/isc/job.c @@ -64,7 +64,7 @@ isc__job_cb(uv_idle_t *handle) { ISC_LIST_MOVE(jobs, loop->run_jobs); - ISC_LIST_FOREACH (jobs, job, link) { + ISC_LIST_FOREACH(jobs, job, link) { isc_job_cb cb = job->cb; void *cbarg = job->cbarg; ISC_LIST_UNLINK(jobs, job, link); diff --git a/lib/isc/log.c b/lib/isc/log.c index 512e724704..5c2bfe314b 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -413,7 +413,7 @@ isc_logconfig_destroy(isc_logconfig_t **lcfgp) { mctx = lcfg->lctx->mctx; - ISC_LIST_FOREACH (lcfg->channels, channel, link) { + ISC_LIST_FOREACH(lcfg->channels, channel, link) { if (channel->type == ISC_LOG_TOFILE) { /* * The filename for the channel may have ultimately @@ -434,7 +434,7 @@ isc_logconfig_destroy(isc_logconfig_t **lcfgp) { } for (size_t i = 0; i < ARRAY_SIZE(lcfg->channellists); i++) { - ISC_LIST_FOREACH (lcfg->channellists[i], item, link) { + ISC_LIST_FOREACH(lcfg->channellists[i], item, link) { ISC_LIST_UNLINK(lcfg->channellists[i], item, link); isc_mem_put(mctx, item, sizeof(*item)); } @@ -558,7 +558,7 @@ isc_log_usechannel(isc_logconfig_t *lcfg, const char *name, category < ISC_LOGCATEGORY_MAX); REQUIRE(module >= ISC_LOGMODULE_DEFAULT && module < ISC_LOGMODULE_MAX); - ISC_LIST_FOREACH (lcfg->channels, c, link) { + ISC_LIST_FOREACH(lcfg->channels, c, link) { if (strcmp(name, c->name) == 0) { channel = c; break; @@ -643,7 +643,7 @@ isc_log_setdebuglevel(unsigned int level) { isc_logconfig_t *lcfg = rcu_dereference(isc__lctx->logconfig); if (lcfg != NULL) { LOCK(&isc__lctx->lock); - ISC_LIST_FOREACH (lcfg->channels, channel, link) { + ISC_LIST_FOREACH(lcfg->channels, channel, link) { if (channel->type == ISC_LOG_TOFILE && (channel->flags & ISC_LOG_DEBUGONLY) != 0 && FILE_STREAM(channel) != NULL) @@ -702,7 +702,7 @@ isc_log_closefilelogs(void) { isc_logconfig_t *lcfg = rcu_dereference(isc__lctx->logconfig); if (lcfg != NULL) { LOCK(&isc__lctx->lock); - ISC_LIST_FOREACH (lcfg->channels, channel, link) { + ISC_LIST_FOREACH(lcfg->channels, channel, link) { if (channel->type == ISC_LOG_TOFILE && FILE_STREAM(channel) != NULL) { diff --git a/lib/isc/mem.c b/lib/isc/mem.c index f9e807f12b..d06a8dbb64 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -284,7 +284,7 @@ delete_trace_entry(isc_mem_t *mctx, const void *ptr, size_t size FLARG) { #endif idx = hash % DEBUG_TABLE_COUNT; - ISC_LIST_FOREACH (mctx->debuglist[idx], dl, link) { + ISC_LIST_FOREACH(mctx->debuglist[idx], dl, link) { if (dl->ptr == ptr) { ISC_LIST_UNLINK(mctx->debuglist[idx], dl, link); sdallocx(dl, dl->dlsize, mctx->jemalloc_flags); @@ -564,7 +564,7 @@ mem_destroy(isc_mem_t *ctx) { #if ISC_MEM_TRACKLINES if (ctx->debuglist != NULL) { for (size_t i = 0; i < DEBUG_TABLE_COUNT; i++) { - ISC_LIST_FOREACH (ctx->debuglist[i], dl, link) { + ISC_LIST_FOREACH(ctx->debuglist[i], dl, link) { if (ctx->checkfree && dl->ptr != NULL) { print_active(ctx, stderr); } @@ -658,7 +658,7 @@ print_active(isc_mem_t *mctx, FILE *out) { "allocations:\n"); found = false; for (i = 0; i < DEBUG_TABLE_COUNT; i++) { - ISC_LIST_FOREACH (mctx->debuglist[i], dl, link) { + ISC_LIST_FOREACH(mctx->debuglist[i], dl, link) { found = true; if (dl->ptr != NULL) { fprintf(out, @@ -700,7 +700,7 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out) { "size", "allocated", "freecount", "freemax", "fillcount", "gets", "L"); } - ISC_LIST_FOREACH (ctx->pools, pool, link) { + ISC_LIST_FOREACH(ctx->pools, pool, link) { fprintf(out, "%15s %10zu %10zu %10zu %10zu %10zu %10zu %10zu %s\n", pool->name, pool->size, (size_t)0, pool->allocated, @@ -1199,7 +1199,7 @@ isc_mempool_getfillcount(isc_mempool_t *restrict mpctx) { #if ISC_MEM_TRACKLINES static void print_contexts(FILE *file) { - ISC_LIST_FOREACH (contexts, ctx, link) { + ISC_LIST_FOREACH(contexts, ctx, link) { fprintf(file, "context: %p (%s): %" PRIuFAST32 " references\n", ctx, ctx->name[0] == 0 ? "" : ctx->name, isc_refcount_current(&ctx->references)); @@ -1318,7 +1318,7 @@ isc_mem_renderxml(void *writer0) { TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "contexts")); LOCK(&contextslock); - ISC_LIST_FOREACH (contexts, ctx, link) { + ISC_LIST_FOREACH(contexts, ctx, link) { xmlrc = xml_renderctx(ctx, &inuse, writer); if (xmlrc < 0) { UNLOCK(&contextslock); @@ -1417,7 +1417,7 @@ isc_mem_renderjson(void *memobj0) { CHECKMEM(ctxarray); LOCK(&contextslock); - ISC_LIST_FOREACH (contexts, ctx, link) { + ISC_LIST_FOREACH(contexts, ctx, link) { result = json_renderctx(ctx, &inuse, ctxarray); if (result != ISC_R_SUCCESS) { UNLOCK(&contextslock); diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index 15eb00a3a2..814deaf371 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -430,7 +430,7 @@ find_http_cstream(int32_t stream_id, isc_nm_http_session_t *session) { return NULL; } - ISC_LIST_FOREACH (session->cstreams, cstream, link) { + ISC_LIST_FOREACH(session->cstreams, cstream, link) { if (cstream->stream_id == stream_id) { /* LRU-like behaviour */ if (ISC_LIST_HEAD(session->cstreams) != cstream) { @@ -1310,7 +1310,7 @@ done: static void call_pending_callbacks(isc__nm_http_pending_callbacks_t pending_callbacks, isc_result_t result) { - ISC_LIST_FOREACH (pending_callbacks, cbreq, link) { + ISC_LIST_FOREACH(pending_callbacks, cbreq, link) { ISC_LIST_UNLINK(pending_callbacks, cbreq, link); isc__nm_sendcb(cbreq->handle->sock, cbreq, result, true); } @@ -3043,7 +3043,7 @@ isc_nm_http_endpoints_detach(isc_nm_http_endpoints_t **restrict epsp) { mctx = eps->mctx; /* Delete all handlers */ - ISC_LIST_FOREACH (eps->handlers, handler, link) { + ISC_LIST_FOREACH(eps->handlers, handler, link) { ISC_LIST_DEQUEUE(eps->handlers, handler, link); isc_mem_free(mctx, handler->path); handler->magic = 0; @@ -3076,7 +3076,7 @@ http_endpoints_find(const char *request_path, return NULL; } - ISC_LIST_FOREACH (eps->handlers, handler, link) { + ISC_LIST_FOREACH(eps->handlers, handler, link) { if (!strcmp(request_path, handler->path)) { INSIST(VALID_HTTP_HANDLER(handler)); INSIST(handler->cb != NULL); @@ -3210,7 +3210,7 @@ client_call_failed_read_cb(isc_result_t result, REQUIRE(VALID_HTTP2_SESSION(session)); REQUIRE(result != ISC_R_SUCCESS); - ISC_LIST_FOREACH (session->cstreams, cstream, link) { + ISC_LIST_FOREACH(session->cstreams, cstream, link) { /* * read_cb could be NULL if cstream was allocated and added * to the tracking list, but was not properly initialized due @@ -3240,11 +3240,11 @@ server_call_failed_read_cb(isc_result_t result, REQUIRE(VALID_HTTP2_SESSION(session)); REQUIRE(result != ISC_R_SUCCESS); - ISC_LIST_FOREACH (session->sstreams, h2data, link) { + ISC_LIST_FOREACH(session->sstreams, h2data, link) { failed_httpstream_read_cb(h2data->psock, result, session); } - ISC_LIST_FOREACH (session->sstreams, h2data, link) { + ISC_LIST_FOREACH(session->sstreams, h2data, link) { ISC_LIST_DEQUEUE(session->sstreams, h2data, link); /* Cleanup socket in place */ diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index cd706a848c..1b7281a8a5 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -481,7 +481,7 @@ nmsocket_cleanup(void *arg) { isc__nmsocket_detach(&sock->outer); } - ISC_LIST_FOREACH (sock->inactive_handles, handle, inactive_link) { + ISC_LIST_FOREACH(sock->inactive_handles, handle, inactive_link) { ISC_LIST_DEQUEUE(sock->inactive_handles, handle, inactive_link); nmhandle_free(sock, handle); } @@ -2971,7 +2971,7 @@ nmsocket_dump(isc_nmsocket_t *sock) { STDERR_FILENO); fprintf(stderr, "\n"); - ISC_LIST_FOREACH (sock->active_handles, handle, active_link) { + ISC_LIST_FOREACH(sock->active_handles, handle, active_link) { static bool first = true; if (first) { fprintf(stderr, "Active handles:\n"); @@ -2987,7 +2987,7 @@ void isc__nm_dump_active(isc__networker_t *worker) { bool first = true; - ISC_LIST_FOREACH (worker->active_sockets, sock, active_link) { + ISC_LIST_FOREACH(worker->active_sockets, sock, active_link) { if (first) { fprintf(stderr, "Outstanding sockets\n"); first = false; diff --git a/lib/isc/ratelimiter.c b/lib/isc/ratelimiter.c index b1066deb6b..f8b7b95d9f 100644 --- a/lib/isc/ratelimiter.c +++ b/lib/isc/ratelimiter.c @@ -262,7 +262,7 @@ isc__ratelimiter_tick(void *arg) { unlock: UNLOCK(&rl->lock); - ISC_LIST_FOREACH (pending, rle, link) { + ISC_LIST_FOREACH(pending, rle, link) { ISC_LIST_UNLINK(pending, rle, link); isc_async_run(rle->loop, rle->cb, rle->arg); } @@ -302,7 +302,7 @@ isc_ratelimiter_shutdown(isc_ratelimiter_t *restrict rl) { } UNLOCK(&rl->lock); - ISC_LIST_FOREACH (pending, rle, link) { + ISC_LIST_FOREACH(pending, rle, link) { ISC_LIST_UNLINK(pending, rle, link); rle->canceled = true; isc_async_run(rl->loop, rle->cb, rle->arg); diff --git a/lib/isc/tls.c b/lib/isc/tls.c index 9aaeb25567..215730d76b 100644 --- a/lib/isc/tls.c +++ b/lib/isc/tls.c @@ -1354,7 +1354,7 @@ isc_tlsctx_client_session_cache_detach( isc_refcount_destroy(&cache->references); - ISC_LIST_FOREACH (cache->lru_entries, entry, cache_link) { + ISC_LIST_FOREACH(cache->lru_entries, entry, cache_link) { client_cache_entry_delete(cache, entry); } diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index cebe9430bb..46cc43d811 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -76,7 +76,7 @@ cfg_aclconfctx_detach(cfg_aclconfctx_t **actxp) { if (isc_refcount_decrement(&actx->references) == 1) { isc_refcount_destroy(&actx->references); - ISC_LIST_FOREACH (actx->named_acl_cache, dacl, nextincache) { + ISC_LIST_FOREACH(actx->named_acl_cache, dacl, nextincache) { ISC_LIST_UNLINK(actx->named_acl_cache, dacl, nextincache); dns_acl_detach(&dacl); @@ -97,7 +97,7 @@ get_acl_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret) { if (result != ISC_R_SUCCESS) { return result; } - CFG_LIST_FOREACH (acls, elt) { + CFG_LIST_FOREACH(acls, elt) { const cfg_obj_t *acl = cfg_listelt_value(elt); const char *aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name")); @@ -121,7 +121,7 @@ convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx, const char *aclname = cfg_obj_asstring(nameobj); /* Look for an already-converted version. */ - ISC_LIST_FOREACH (ctx->named_acl_cache, dacl, nextincache) { + ISC_LIST_FOREACH(ctx->named_acl_cache, dacl, nextincache) { if (strcasecmp(aclname, dacl->name) == 0) { if (ISC_MAGIC_VALID(dacl, LOOP_MAGIC)) { cfg_obj_log(nameobj, ISC_LOG_ERROR, @@ -202,7 +202,7 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx, SET_IF_NOT_NULL(has_negative, false); - CFG_LIST_FOREACH (caml, elt) { + CFG_LIST_FOREACH(caml, elt) { const cfg_obj_t *ce = cfg_listelt_value(elt); /* might be a negated element, in which case get the value. */ @@ -730,7 +730,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx, } de = dacl->elements; - CFG_LIST_FOREACH (caml, elt) { + CFG_LIST_FOREACH(caml, elt) { const cfg_obj_t *ce = cfg_listelt_value(elt); bool neg = false; diff --git a/lib/isccfg/check.c b/lib/isccfg/check.c index af78c88c42..3569f7fc18 100644 --- a/lib/isccfg/check.c +++ b/lib/isccfg/check.c @@ -189,7 +189,7 @@ check_order(const cfg_obj_t *options) { return result; } - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { tresult = check_orderent(cfg_listelt_value(element)); if (result == ISC_R_SUCCESS && tresult != ISC_R_SUCCESS) { result = tresult; @@ -228,7 +228,7 @@ check_dual_stack(const cfg_obj_t *options) { } } obj = cfg_tuple_get(alternates, "addresses"); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { value = cfg_listelt_value(element); if (cfg_obj_issockaddr(value)) { continue; @@ -325,7 +325,7 @@ check_forward(const cfg_obj_t *config, const cfg_obj_t *options, } faddresses = cfg_tuple_get(forwarders, "addresses"); - CFG_LIST_FOREACH (faddresses, element) { + CFG_LIST_FOREACH(faddresses, element) { const cfg_obj_t *forwarder = cfg_listelt_value(element); const char *tls = cfg_obj_getsockaddrtls(forwarder); if (tls != NULL) { @@ -363,7 +363,7 @@ disabled_algorithms(const cfg_obj_t *disabled) { obj = cfg_tuple_get(disabled, "algorithms"); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { isc_textregion_t r; dst_algorithm_t alg; @@ -403,7 +403,7 @@ disabled_ds_digests(const cfg_obj_t *disabled) { obj = cfg_tuple_get(disabled, "digests"); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { isc_textregion_t r; dns_dsdigest_t digest; @@ -586,7 +586,7 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions, return ISC_R_SUCCESS; } - CFG_LIST_FOREACH (dns64, element) { + CFG_LIST_FOREACH(dns64, element) { map = cfg_listelt_value(element); obj = cfg_map_getname(map); @@ -995,7 +995,7 @@ find_maplist(const cfg_obj_t *config, const char *listname, const char *name) { return NULL; } - CFG_LIST_FOREACH (maplist, elt) { + CFG_LIST_FOREACH(maplist, elt) { const cfg_obj_t *map = cfg_listelt_value(elt); if (strcasecmp(cfg_obj_asstring(cfg_map_getname(map)), name) == 0) @@ -1128,7 +1128,7 @@ check_listeners(const cfg_obj_t *list, const cfg_obj_t *config, cfg_aclconfctx_t *actx, isc_mem_t *mctx) { isc_result_t tresult, result = ISC_R_SUCCESS; - CFG_LIST_FOREACH (list, elt) { + CFG_LIST_FOREACH(list, elt) { const cfg_obj_t *obj = cfg_listelt_value(elt); tresult = check_listener(obj, config, actx, mctx); if (result == ISC_R_SUCCESS) { @@ -1309,7 +1309,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, result = ISC_R_FAILURE; } } else if (cfg_obj_islist(obj)) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { isc_result_t ret; const char *val = NULL; cfg_obj_t *kconfig = cfg_listelt_value(element); @@ -1407,7 +1407,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, ISC_LIST_INIT(list); if (cfg_obj_islist(obj)) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { isc_result_t ret; cfg_obj_t *kconfig = cfg_listelt_value(element); @@ -1436,7 +1436,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, } } - ISC_LIST_FOREACH (list, k, link) { + ISC_LIST_FOREACH(list, k, link) { ISC_LIST_UNLINK(list, k, link); dns_kasp_detach(&k); } @@ -1464,7 +1464,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, /* * Cleanup key-store. */ - ISC_LIST_FOREACH (kslist, ks, link) { + ISC_LIST_FOREACH(kslist, ks, link) { ISC_LIST_UNLINK(kslist, ks, link); dns_keystore_detach(&ks); } @@ -1506,7 +1506,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, obj = NULL; (void)cfg_map_get(options, "disable-algorithms", &obj); if (obj != NULL) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { obj = cfg_listelt_value(element); tresult = disabled_algorithms(obj); if (tresult != ISC_R_SUCCESS) { @@ -1521,7 +1521,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, obj = NULL; (void)cfg_map_get(options, "disable-ds-digests", &obj); if (obj != NULL) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { obj = cfg_listelt_value(element); tresult = disabled_ds_digests(obj); if (tresult != ISC_R_SUCCESS) { @@ -1574,7 +1574,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, */ obj = NULL; (void)cfg_map_get(options, "disable-empty-zone", &obj); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { obj = cfg_listelt_value(element); str = cfg_obj_asstring(obj); if (check_name(str) != ISC_R_SUCCESS) { @@ -1662,7 +1662,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, if (obj != NULL) { unsigned char secret[32]; - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { unsigned int usedlength; obj = cfg_listelt_value(element); @@ -1863,7 +1863,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config, if (obj != NULL) { /* Note: SEC is defined in on some platforms. */ enum { MAS = 1, PRI = 2, SLA = 4, SCN = 8 } values = 0; - CFG_LIST_FOREACH (obj, el) { + CFG_LIST_FOREACH(obj, el) { const cfg_obj_t *tuple = cfg_listelt_value(el); const cfg_obj_t *type = cfg_tuple_get(tuple, "type"); const char *keyword = cfg_obj_asstring(type); @@ -2012,7 +2012,7 @@ check_remoteserverlist(const cfg_obj_t *cctx, const char *list, return ISC_R_SUCCESS; } - CFG_LIST_FOREACH (obj, elt) { + CFG_LIST_FOREACH(obj, elt) { char *tmp = NULL; const char *name = NULL; @@ -2121,7 +2121,7 @@ check_httpserver(const cfg_obj_t *http, isc_symtab_t *symtab) { /* Check endpoints are valid */ tresult = cfg_map_get(http, "endpoints", &eps); if (tresult == ISC_R_SUCCESS) { - CFG_LIST_FOREACH (eps, elt) { + CFG_LIST_FOREACH(eps, elt) { const cfg_obj_t *ep = cfg_listelt_value(elt); const char *path = cfg_obj_asstring(ep); if (!isc_nm_http_path_isvalid(path)) { @@ -2153,7 +2153,7 @@ check_httpservers(const cfg_obj_t *config, isc_mem_t *mctx) { goto done; } - CFG_LIST_FOREACH (obj, elt) { + CFG_LIST_FOREACH(obj, elt) { obj = cfg_listelt_value(elt); tresult = check_httpserver(obj, symtab); if (result == ISC_R_SUCCESS) { @@ -2224,7 +2224,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name, tresult = cfg_map_get(tlsobj, "protocols", &tls_proto_list); if (tresult == ISC_R_SUCCESS) { INSIST(tls_proto_list != NULL); - CFG_LIST_FOREACH (tls_proto_list, proto) { + CFG_LIST_FOREACH(tls_proto_list, proto) { const cfg_obj_t *tls_proto_obj = cfg_listelt_value(proto); const char *tls_sver = cfg_obj_asstring(tls_proto_obj); @@ -2313,7 +2313,7 @@ check_tls_definitions(const cfg_obj_t *config, isc_mem_t *mctx) { isc_symtab_create(mctx, NULL, NULL, false, &symtab); - CFG_LIST_FOREACH (obj, elt) { + CFG_LIST_FOREACH(obj, elt) { const char *name; obj = cfg_listelt_value(elt); name = cfg_obj_asstring(cfg_map_getname(obj)); @@ -2339,7 +2339,7 @@ get_remotes(const cfg_obj_t *cctx, const char *list, const char *name, return result; } - CFG_LIST_FOREACH (obj, elt) { + CFG_LIST_FOREACH(obj, elt) { const char *listname = NULL; obj = cfg_listelt_value(elt); @@ -2525,7 +2525,7 @@ check_update_policy(const cfg_obj_t *policy) { } /* Now check the grant policy */ - CFG_LIST_FOREACH (policy, element) { + CFG_LIST_FOREACH(policy, element) { const cfg_obj_t *stmt = cfg_listelt_value(element); const cfg_obj_t *identity = cfg_tuple_get(stmt, "identity"); const cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype"); @@ -2640,7 +2640,7 @@ check_update_policy(const cfg_obj_t *policy) { UNREACHABLE(); } - CFG_LIST_FOREACH (typelist, element2) { + CFG_LIST_FOREACH(typelist, element2) { const cfg_obj_t *typeobj; const char *bracket; @@ -2842,7 +2842,7 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig, /* * Build the keystore list. */ - CFG_LIST_FOREACH (keystores, element) { + CFG_LIST_FOREACH(keystores, element) { cfg_obj_t *kcfg = cfg_listelt_value(element); (void)cfg_keystore_fromconfig(kcfg, mctx, &kslist, NULL); } @@ -2852,7 +2852,7 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig, * Look for the dnssec-policy by name, which is the dnssec-policy * for the zone in question. */ - CFG_LIST_FOREACH (kasps, element) { + CFG_LIST_FOREACH(kasps, element) { cfg_obj_t *kconfig = cfg_listelt_value(element); const cfg_obj_t *kaspobj = NULL; @@ -2879,7 +2879,7 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig, /* Check key-stores of keys */ dns_kasp_freeze(kasp); - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { dns_keystore_t *kks = dns_kasp_key_keystore(kkey); dir = dns_keystore_directory(kks, keydir); keystore = (kks != NULL && strcmp(DNS_KEYSTORE_KEYDIRECTORY, @@ -2909,11 +2909,11 @@ check: if (kasp != NULL) { dns_kasp_detach(&kasp); } - ISC_LIST_FOREACH (kasplist, k, link) { + ISC_LIST_FOREACH(kasplist, k, link) { ISC_LIST_UNLINK(kasplist, k, link); dns_kasp_detach(&k); } - ISC_LIST_FOREACH (kslist, ks, link) { + ISC_LIST_FOREACH(kslist, ks, link) { ISC_LIST_UNLINK(kslist, ks, link); dns_keystore_detach(&ks); } @@ -3007,7 +3007,7 @@ isccfg_check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, if (obj != NULL) { tmplname = cfg_obj_asstring(obj); - CFG_LIST_FOREACH (templates, e) { + CFG_LIST_FOREACH(templates, e) { const cfg_obj_t *t = cfg_tuple_get(cfg_listelt_value(e), "name"); if (strcasecmp(cfg_obj_asstring(t), tmplname) == 0) { @@ -3239,7 +3239,7 @@ isccfg_check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, } else { const cfg_obj_t *kasps = NULL; (void)cfg_map_get(config, "dnssec-policy", &kasps); - CFG_LIST_FOREACH (kasps, element) { + CFG_LIST_FOREACH(kasps, element) { const cfg_obj_t *kobj = cfg_tuple_get( cfg_listelt_value(element), "name"); if (strcmp(kaspname, cfg_obj_asstring(kobj)) == @@ -3640,7 +3640,7 @@ isccfg_check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, (void)get_zoneopt(zoptions, toptions, NULL, NULL, "server-addresses", &obj); if (ztype == CFG_ZONE_STATICSTUB && obj != NULL) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { isc_sockaddr_t sa; isc_netaddr_t na; obj = cfg_listelt_value(element); @@ -3663,7 +3663,7 @@ isccfg_check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, obj = NULL; (void)get_zoneopt(zoptions, toptions, NULL, NULL, "server-names", &obj); if (zname != NULL && ztype == CFG_ZONE_STATICSTUB && obj != NULL) { - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { const char *snamestr = NULL; dns_fixedname_t fixed_sname; isc_buffer_t b2; @@ -4171,7 +4171,7 @@ check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_mem_t *mctx) { isc_result_t tresult; name = dns_fixedname_initname(&fname); - CFG_LIST_FOREACH (keys, element) { + CFG_LIST_FOREACH(keys, element) { const cfg_obj_t *key = cfg_listelt_value(element); const char *keyid = cfg_obj_asstring(cfg_map_getname(key)); isc_symvalue_t symvalue; @@ -4235,7 +4235,7 @@ rndckey_exists(const cfg_obj_t *keylist, const char *keyname) { return false; } - CFG_LIST_FOREACH (keylist, element) { + CFG_LIST_FOREACH(keylist, element) { const cfg_obj_t *obj = cfg_listelt_value(element); const char *str = cfg_obj_asstring(cfg_map_getname(obj)); if (!strcasecmp(str, keyname)) { @@ -4304,7 +4304,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions, return ISC_R_SUCCESS; } - CFG_LIST_FOREACH (servers, e1) { + CFG_LIST_FOREACH(servers, e1) { const cfg_obj_t *v1 = cfg_listelt_value(e1); isc_netaddr_t n1; unsigned int p1; @@ -4760,7 +4760,7 @@ record_static_keys(isc_symtab_t *symtab, isc_mem_t *mctx, name = dns_fixedname_initname(&fixed); - CFG_LIST_FOREACH (keylist, elt) { + CFG_LIST_FOREACH(keylist, elt) { const char *initmethod; const cfg_obj_t *init = NULL; const cfg_obj_t *obj = cfg_listelt_value(elt); @@ -4820,7 +4820,7 @@ check_initializing_keys(isc_symtab_t *symtab, const cfg_obj_t *keylist) { name = dns_fixedname_initname(&fixed); - CFG_LIST_FOREACH (keylist, elt) { + CFG_LIST_FOREACH(keylist, elt) { const cfg_obj_t *obj = cfg_listelt_value(elt); const cfg_obj_t *init = NULL; const char *str; @@ -4874,7 +4874,7 @@ record_ds_keys(isc_symtab_t *symtab, isc_mem_t *mctx, name = dns_fixedname_initname(&fixed); - CFG_LIST_FOREACH (keylist, elt) { + CFG_LIST_FOREACH(keylist, elt) { const char *initmethod; const cfg_obj_t *init = NULL; const cfg_obj_t *obj = cfg_listelt_value(elt); @@ -4927,7 +4927,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta, * First we record all the static keys (trust-anchors configured with * "static-key"), and all the DS-style trust anchors. */ - CFG_LIST_FOREACH (global_ta, elt) { + CFG_LIST_FOREACH(global_ta, elt) { keylist = cfg_listelt_value(elt); tresult = record_static_keys(statictab, mctx, keylist, autovalidation); @@ -4941,7 +4941,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta, } } - CFG_LIST_FOREACH (view_ta, elt) { + CFG_LIST_FOREACH(view_ta, elt) { keylist = cfg_listelt_value(elt); tresult = record_static_keys(statictab, mctx, keylist, autovalidation); @@ -4959,7 +4959,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta, * Next, ensure that there's no conflict between the * static keys and the trust-anchors configured with "initial-key". */ - CFG_LIST_FOREACH (global_ta, elt) { + CFG_LIST_FOREACH(global_ta, elt) { keylist = cfg_listelt_value(elt); tresult = check_initializing_keys(statictab, keylist); if (result == ISC_R_SUCCESS) { @@ -4967,7 +4967,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta, } } - CFG_LIST_FOREACH (view_ta, elt) { + CFG_LIST_FOREACH(view_ta, elt) { keylist = cfg_listelt_value(elt); tresult = check_initializing_keys(statictab, keylist); if (result == ISC_R_SUCCESS) { @@ -5009,7 +5009,7 @@ check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj, name = dns_fixedname_initname(&fixed); obj = cfg_tuple_get(rpz_obj, "zone list"); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { obj = cfg_listelt_value(element); nameobj = cfg_tuple_get(obj, "zone name"); zonename = cfg_obj_asstring(nameobj); @@ -5077,7 +5077,7 @@ check_rpz(const cfg_obj_t *rpz_obj) { obj = cfg_tuple_get(rpz_obj, "zone list"); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { obj = cfg_listelt_value(element); nameobj = cfg_tuple_get(obj, "zone name"); zonename = cfg_obj_asstring(nameobj); @@ -5127,7 +5127,7 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx) { obj = cfg_tuple_get(catz_obj, "zone list"); - CFG_LIST_FOREACH (obj, element) { + CFG_LIST_FOREACH(obj, element) { char namebuf[DNS_NAME_FORMATSIZE]; obj = cfg_listelt_value(element); @@ -5311,7 +5311,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions, (void)cfg_map_get(config, "zone", &zones); } - CFG_LIST_FOREACH (zones, element) { + CFG_LIST_FOREACH(zones, element) { const cfg_obj_t *zone = cfg_listelt_value(element); tresult = isccfg_check_zoneconf(zone, voptions, config, symtab, @@ -5458,10 +5458,10 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions, if (check_keys[i] != NULL) { unsigned int taflags = 0; - CFG_LIST_FOREACH (check_keys[i], element) { + CFG_LIST_FOREACH(check_keys[i], element) { const cfg_obj_t *keylist = cfg_listelt_value(element); - CFG_LIST_FOREACH (keylist, element2) { + CFG_LIST_FOREACH(keylist, element2) { obj = cfg_listelt_value(element2); tresult = check_trust_anchor(obj, &taflags); @@ -5646,7 +5646,7 @@ check_logging(const cfg_obj_t *config, isc_mem_t *mctx) { cfg_map_get(logobj, "channel", &channels); - CFG_LIST_FOREACH (channels, element) { + CFG_LIST_FOREACH(channels, element) { channel = cfg_listelt_value(element); channelname = cfg_obj_asstring(cfg_map_getname(channel)); fileobj = syslogobj = nullobj = stderrobj = NULL; @@ -5682,7 +5682,7 @@ check_logging(const cfg_obj_t *config, isc_mem_t *mctx) { cfg_map_get(logobj, "category", &categories); - CFG_LIST_FOREACH (categories, element) { + CFG_LIST_FOREACH(categories, element) { category = cfg_listelt_value(element); catname = cfg_obj_asstring(cfg_tuple_get(category, "name")); if (isc_log_categorybyname(catname) == ISC_LOGCATEGORY_INVALID) @@ -5692,7 +5692,7 @@ check_logging(const cfg_obj_t *config, isc_mem_t *mctx) { result = ISC_R_FAILURE; } channels = cfg_tuple_get(category, "destinations"); - CFG_LIST_FOREACH (channels, delement) { + CFG_LIST_FOREACH(channels, delement) { channel = cfg_listelt_value(delement); channelname = cfg_obj_asstring(channel); tresult = isc_symtab_lookup(symtab, channelname, 1, @@ -5721,7 +5721,7 @@ check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist) { return ISC_R_SUCCESS; } - CFG_LIST_FOREACH (control_keylist, element) { + CFG_LIST_FOREACH(control_keylist, element) { key = cfg_listelt_value(element); keyval = cfg_obj_asstring(key); @@ -5765,13 +5765,13 @@ check_controls(const cfg_obj_t *config, isc_mem_t *mctx) { * INET: Check allow clause. * UNIX: Not supported. */ - CFG_LIST_FOREACH (controlslist, element) { + CFG_LIST_FOREACH(controlslist, element) { controls = cfg_listelt_value(element); unixcontrols = NULL; inetcontrols = NULL; (void)cfg_map_get(controls, "unix", &unixcontrols); (void)cfg_map_get(controls, "inet", &inetcontrols); - CFG_LIST_FOREACH (inetcontrols, element2) { + CFG_LIST_FOREACH(inetcontrols, element2) { char socktext[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_t addr; @@ -5804,7 +5804,7 @@ check_controls(const cfg_obj_t *config, isc_mem_t *mctx) { result = tresult; } } - CFG_LIST_FOREACH (unixcontrols, element2) { + CFG_LIST_FOREACH(unixcontrols, element2) { control = cfg_listelt_value(element2); path = cfg_obj_asstring(cfg_tuple_get(control, "path")); cfg_obj_log(control, ISC_LOG_ERROR, @@ -5921,7 +5921,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags, isc_symtab_create(mctx, NULL, NULL, true, &symtab); - CFG_LIST_FOREACH (views, velement) { + CFG_LIST_FOREACH(views, velement) { const cfg_obj_t *view = cfg_listelt_value(velement); const cfg_obj_t *vname = cfg_tuple_get(view, "name"); const cfg_obj_t *voptions = cfg_tuple_get(view, "options"); @@ -5991,7 +5991,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags, if (acls != NULL) { const char *aclname = NULL; - CFG_LIST_FOREACH (acls, elt) { + CFG_LIST_FOREACH(acls, elt) { const cfg_obj_t *acl = cfg_listelt_value(elt); unsigned int line = cfg_obj_line(acl); unsigned int i; diff --git a/lib/isccfg/kaspconf.c b/lib/isccfg/kaspconf.c index aba487a33b..4bc62c0ba4 100644 --- a/lib/isccfg/kaspconf.c +++ b/lib/isccfg/kaspconf.c @@ -362,7 +362,7 @@ cfg_nsec3param_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp) { iter = cfg_obj_asuint32(obj); } dns_kasp_freeze(kasp); - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { unsigned int keysize = dns_kasp_key_size(kkey); uint32_t keyalg = dns_kasp_key_algorithm(kkey); @@ -611,7 +611,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp, (void)confget(maps, "cds-digest-types", &cds); if (cds != NULL) { - CFG_LIST_FOREACH (cds, element) { + CFG_LIST_FOREACH(cds, element) { result = add_digest(kasp, cfg_listelt_value(element)); if (result != ISC_R_SUCCESS) { goto cleanup; @@ -648,7 +648,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp, char role[DST_MAX_ALGS] = { 0 }; bool warn[DST_MAX_ALGS][2] = { { false } }; - CFG_LIST_FOREACH (keys, element) { + CFG_LIST_FOREACH(keys, element) { cfg_obj_t *kobj = cfg_listelt_value(element); result = cfg_kaspkey_fromconfig( kobj, kasp, check_algorithms, offline_ksk, @@ -663,7 +663,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp, } } dns_kasp_freeze(kasp); - ISC_LIST_FOREACH (dns_kasp_keys(kasp), kkey, link) { + ISC_LIST_FOREACH(dns_kasp_keys(kasp), kkey, link) { uint32_t keyalg = dns_kasp_key_algorithm(kkey); INSIST(keyalg < ARRAY_SIZE(role)); @@ -719,7 +719,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp, * inherit from the default policy (except for the built-in * "insecure" policy). */ - ISC_LIST_FOREACH (dns_kasp_keys(default_kasp), key, link) { + ISC_LIST_FOREACH(dns_kasp_keys(default_kasp), key, link) { dns_kasp_key_t *new_key = NULL; /* Create a new key reference. */ diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index faf64099cb..46a8012dbb 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -1949,7 +1949,7 @@ free_listelt(cfg_parser_t *pctx, cfg_listelt_t *elt) { static void free_list(cfg_parser_t *pctx, cfg_obj_t *obj) { - ISC_LIST_FOREACH (obj->value.list, elt, link) { + ISC_LIST_FOREACH(obj->value.list, elt, link) { free_listelt(pctx, elt); } } @@ -2022,7 +2022,7 @@ static void print_list(cfg_printer_t *pctx, const cfg_obj_t *obj) { cfg_list_t *list = UNCONST(&obj->value.list); - ISC_LIST_FOREACH (*list, elt, link) { + ISC_LIST_FOREACH(*list, elt, link) { if ((pctx->flags & CFG_PRINTER_ONELINE) != 0) { cfg_print_obj(pctx, elt->obj); cfg_print_cstr(pctx, "; "); @@ -2119,7 +2119,7 @@ cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) { list = UNCONST(&obj->value.list); - ISC_LIST_FOREACH (*list, elt, link) { + ISC_LIST_FOREACH(*list, elt, link) { cfg_print_obj(pctx, elt->obj); if (ISC_LIST_NEXT(elt, link) != NULL) { cfg_print_cstr(pctx, " "); @@ -2543,7 +2543,7 @@ cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) { if (symobj->type == &cfg_type_implicitlist) { /* Multivalued. */ cfg_list_t *list = &symobj->value.list; - ISC_LIST_FOREACH (*list, elt, link) { + ISC_LIST_FOREACH(*list, elt, link) { print_symval(pctx, clause->name, elt->obj); } @@ -3951,7 +3951,7 @@ cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list, REQUIRE(config != NULL); REQUIRE(callback != NULL); - CFG_LIST_FOREACH (list, element) { + CFG_LIST_FOREACH(list, element) { const cfg_obj_t *plugin = cfg_listelt_value(element); const cfg_obj_t *obj; const char *type, *library; diff --git a/lib/ns/client.c b/lib/ns/client.c index 4af61516fe..f3a3dc44b3 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -1400,7 +1400,7 @@ process_cookie(ns_client_t *client, isc_buffer_t *buf, size_t optlen) { return; } - ISC_LIST_FOREACH (client->manager->sctx->altsecrets, altsecret, link) { + ISC_LIST_FOREACH(client->manager->sctx->altsecrets, altsecret, link) { isc_buffer_init(&db, dbuf, sizeof(dbuf)); compute_cookie(client, when, altsecret->secret, &db); if (isc_safe_memequal(old, dbuf, COOKIE_SIZE)) { @@ -2698,7 +2698,7 @@ ns_clientmgr_shutdown(ns_clientmgr_t *manager) { MTRACE("destroy"); LOCK(&manager->reclock); - ISC_LIST_FOREACH (manager->recursing, client, inner.rlink) { + ISC_LIST_FOREACH(manager->recursing, client, inner.rlink) { ns_query_cancel(client); } UNLOCK(&manager->reclock); @@ -2927,7 +2927,7 @@ ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager) { REQUIRE(VALID_MANAGER(manager)); LOCK(&manager->reclock); - ISC_LIST_FOREACH (manager->recursing, client, inner.rlink) { + ISC_LIST_FOREACH(manager->recursing, client, inner.rlink) { INSIST(client->inner.state == NS_CLIENTSTATE_RECURSING); ns_client_name(client, peerbuf, sizeof(peerbuf)); @@ -3160,7 +3160,7 @@ client_getdbversion(ns_client_t *client) { ns_dbversion_t * ns_client_findversion(ns_client_t *client, dns_db_t *db) { - ISC_LIST_FOREACH (client->query.activeversions, dbversion, link) { + ISC_LIST_FOREACH(client->query.activeversions, dbversion, link) { if (dbversion->db == db) { return dbversion; } diff --git a/lib/ns/hooks.c b/lib/ns/hooks.c index fd45b7ed03..4fd2aae6bb 100644 --- a/lib/ns/hooks.c +++ b/lib/ns/hooks.c @@ -307,7 +307,7 @@ ns_hooktable_free(isc_mem_t *mctx, void **tablep) { *tablep = NULL; for (i = 0; i < NS_HOOKPOINTS_COUNT; i++) { - ISC_LIST_FOREACH ((*table)[i], hook, link) { + ISC_LIST_FOREACH((*table)[i], hook, link) { ISC_LIST_UNLINK((*table)[i], hook, link); if (hook->mctx != NULL) { isc_mem_putanddetach(&hook->mctx, hook, @@ -362,7 +362,7 @@ ns_plugins_free(isc_mem_t *mctx, void **listp) { list = *listp; *listp = NULL; - ISC_LIST_FOREACH (*list, plugin, link) { + ISC_LIST_FOREACH(*list, plugin, link) { ISC_LIST_UNLINK(*list, plugin, link); unload_plugin(&plugin); } diff --git a/lib/ns/interfacemgr.c b/lib/ns/interfacemgr.c index 14805db6a5..9cc1a74be8 100644 --- a/lib/ns/interfacemgr.c +++ b/lib/ns/interfacemgr.c @@ -130,7 +130,7 @@ need_rescan(ns_interfacemgr_t *mgr, struct MSGHDR *rtm, size_t len) { * router advertisements?) */ LOCK(&mgr->lock); - ISC_LIST_FOREACH (mgr->interfaces, ifp, link) { + ISC_LIST_FOREACH(mgr->interfaces, ifp, link) { isc_netaddr_t tmp = { 0 }; isc_netaddr_fromsockaddr(&tmp, &ifp->addr); @@ -781,7 +781,7 @@ interface_destroy(ns_interface_t **interfacep) { static ns_interface_t * find_matching_interface(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr) { LOCK(&mgr->lock); - ISC_LIST_FOREACH (mgr->interfaces, ifp, link) { + ISC_LIST_FOREACH(mgr->interfaces, ifp, link) { if (isc_sockaddr_equal(&ifp->addr, addr)) { UNLOCK(&mgr->lock); return ifp; @@ -810,7 +810,7 @@ purge_old_interfaces(ns_interfacemgr_t *mgr) { ISC_LIST_INIT(interfaces); LOCK(&mgr->lock); - ISC_LIST_FOREACH (mgr->interfaces, ifp, link) { + ISC_LIST_FOREACH(mgr->interfaces, ifp, link) { INSIST(NS_INTERFACE_VALID(ifp)); if (ifp->generation != mgr->generation) { ISC_LIST_UNLINK(ifp->mgr->interfaces, ifp, link); @@ -819,7 +819,7 @@ purge_old_interfaces(ns_interfacemgr_t *mgr) { } UNLOCK(&mgr->lock); - ISC_LIST_FOREACH (interfaces, ifp, link) { + ISC_LIST_FOREACH(interfaces, ifp, link) { if (LISTENING(ifp)) { log_interface_shutdown(ifp); ns_interface_shutdown(ifp); @@ -891,7 +891,7 @@ setup_listenon(ns_interfacemgr_t *mgr, isc_interface_t *interface, isc_sockaddr_fromnetaddr(addr, &interface->address, port); LOCK(&mgr->lock); - ISC_LIST_FOREACH (mgr->listenon, old, link) { + ISC_LIST_FOREACH(mgr->listenon, old, link) { if (isc_sockaddr_equal(addr, old)) { /* We found an existing address */ isc_mem_put(mgr->mctx, addr, sizeof(*addr)); @@ -912,7 +912,7 @@ clearlistenon(ns_interfacemgr_t *mgr) { ISC_LIST_MOVE(listenon, mgr->listenon); UNLOCK(&mgr->lock); - ISC_LIST_FOREACH (listenon, old, link) { + ISC_LIST_FOREACH(listenon, old, link) { ISC_LIST_UNLINK(listenon, old, link); isc_mem_put(mgr->mctx, old, sizeof(*old)); } @@ -1154,7 +1154,7 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) { listenon: ll = (family == AF_INET) ? mgr->listenon4 : mgr->listenon6; dolistenon = true; - ISC_LIST_FOREACH (ll->elts, le, link) { + ISC_LIST_FOREACH(ll->elts, le, link) { int match; bool addr_in_use = false; isc_sockaddr_t listen_sockaddr; @@ -1330,7 +1330,7 @@ ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, return true; } LOCK(&mgr->lock); - ISC_LIST_FOREACH (mgr->listenon, old, link) { + ISC_LIST_FOREACH(mgr->listenon, old, link) { if (isc_sockaddr_equal(old, addr)) { result = true; break; diff --git a/lib/ns/listenlist.c b/lib/ns/listenlist.c index 1288e69165..763f2bc3d1 100644 --- a/lib/ns/listenlist.c +++ b/lib/ns/listenlist.c @@ -297,7 +297,7 @@ ns_listenlist_create(isc_mem_t *mctx, ns_listenlist_t **target) { static void destroy(ns_listenlist_t *list) { - ISC_LIST_FOREACH (list->elts, elt, link) { + ISC_LIST_FOREACH(list->elts, elt, link) { ns_listenelt_destroy(elt); } isc_mem_put(list->mctx, list, sizeof(*list)); diff --git a/lib/ns/query.c b/lib/ns/query.c index 19c83ee5c3..227a404778 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -726,7 +726,7 @@ static void query_freefreeversions(ns_client_t *client, bool everything) { unsigned int i = 0; - ISC_LIST_FOREACH (client->query.freeversions, dbversion, link) { + ISC_LIST_FOREACH(client->query.freeversions, dbversion, link) { /* * If we're not freeing everything, we keep the first three * dbversions structures around. @@ -775,7 +775,7 @@ query_reset(ns_client_t *client, bool everything) { /* * Cleanup any active versions. */ - ISC_LIST_FOREACH (client->query.activeversions, dbversion, link) { + ISC_LIST_FOREACH(client->query.activeversions, dbversion, link) { dns_db_closeversion(dbversion->db, &dbversion->version, false); dns_db_detach(&dbversion->db); ISC_LIST_INITANDAPPEND(client->query.freeversions, dbversion, @@ -816,7 +816,7 @@ query_reset(ns_client_t *client, bool everything) { query_freefreeversions(client, everything); - ISC_LIST_FOREACH (client->query.namebufs, dbuf, link) { + ISC_LIST_FOREACH(client->query.namebufs, dbuf, link) { if (ISC_LIST_NEXT(dbuf, link) != NULL || everything) { ISC_LIST_UNLINK(client->query.namebufs, dbuf, link); isc_buffer_free(&dbuf); @@ -2466,7 +2466,7 @@ validate(ns_client_t *client, dns_db_t *db, dns_name_t *name, return false; } - DNS_RDATASET_FOREACH (sigrdataset) { + DNS_RDATASET_FOREACH(sigrdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(sigrdataset, &rdata); result = dns_rdata_tostruct(&rdata, &rrsig, NULL); @@ -3298,7 +3298,7 @@ rpz_find_p(ns_client_t *client, dns_name_t *self_name, dns_rdatatype_t qtype, if (qtype == dns_rdatatype_aaaa && !ISC_LIST_EMPTY(client->inner.view->dns64)) { - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, *rdatasetp); if ((*rdatasetp)->type == dns_rdatatype_a) { found_a = true; @@ -3306,7 +3306,7 @@ rpz_find_p(ns_client_t *client, dns_name_t *self_name, dns_rdatatype_t qtype, dns_rdataset_disassociate(*rdatasetp); } } - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, *rdatasetp); if ((*rdatasetp)->type == dns_rdatatype_cname || (*rdatasetp)->type == qtype) @@ -3641,7 +3641,7 @@ rpz_rewrite_ip_rrset(ns_client_t *client, dns_name_t *name, /* * Check all of the IP addresses in the rdataset. */ - DNS_RDATASET_FOREACH (*ip_rdatasetp) { + DNS_RDATASET_FOREACH(*ip_rdatasetp) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(*ip_rdatasetp, &rdata); switch (rdata.type) { @@ -4390,7 +4390,7 @@ rpz_ck_dnssec(ns_client_t *client, isc_result_t qresult, } found = dns_fixedname_initname(&fixed); dns_rdataset_init(&trdataset); - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_ncache_current(rdataset, found, &trdataset); type = trdataset.type; dns_rdataset_disassociate(&trdataset); @@ -4734,7 +4734,7 @@ redirect(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, return ISC_R_NOTFOUND; } if (rdataset->attributes.negative) { - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_ncache_current(rdataset, found, &trdataset); type = trdataset.type; dns_rdataset_disassociate(&trdataset); @@ -4866,7 +4866,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, return ISC_R_NOTFOUND; } if (rdataset->attributes.negative) { - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { dns_ncache_current(rdataset, found, &trdataset); type = trdataset.type; dns_rdataset_disassociate(&trdataset); @@ -6861,7 +6861,7 @@ query_checkrrl(query_ctx_t *qctx, isc_result_t result) { dns_rdataset_t nc_rdataset = DNS_RDATASET_INIT; dns_fixedname_t fixed; dns_name_t *n = dns_fixedname_initname(&fixed); - DNS_RDATASET_FOREACH (qctx->rdataset) { + DNS_RDATASET_FOREACH(qctx->rdataset) { dns_ncache_current(qctx->rdataset, n, &nc_rdataset); if (nc_rdataset.type == dns_rdatatype_soa) { @@ -7264,7 +7264,7 @@ has_ta(query_ctx_t *qctx) { dns_rdataset_init(&dsset); if (dns_keynode_dsset(keynode, &dsset)) { - DNS_RDATASET_FOREACH (&dsset) { + DNS_RDATASET_FOREACH(&dsset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_ds_t ds; @@ -7628,7 +7628,7 @@ query_respond_any(query_ctx_t *qctx) { ns_client_keepname(qctx->client, qctx->fname, qctx->dbuf); qctx->tname = qctx->fname; - DNS_RDATASETITER_FOREACH (rdsiter) { + DNS_RDATASETITER_FOREACH(rdsiter) { dns_rdatasetiter_current(rdsiter, qctx->rdataset); /* @@ -8246,7 +8246,7 @@ query_filter64(query_ctx_t *qctx) { myrdatalist->ttl = qctx->rdataset->ttl; i = 0; - DNS_RDATASET_FOREACH (qctx->rdataset) { + DNS_RDATASET_FOREACH(qctx->rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t *myrdata = NULL; isc_region_t r; @@ -8760,7 +8760,7 @@ query_addds(query_ctx_t *qctx) { * the first name in the AUTHORITY section when wildcard processing is * involved. */ - MSG_SECTION_FOREACH (client->message, DNS_SECTION_AUTHORITY, rname) { + MSG_SECTION_FOREACH(client->message, DNS_SECTION_AUTHORITY, rname) { result = dns_message_findtype(rname, dns_rdatatype_ns, 0, NULL); if (result == ISC_R_SUCCESS) { /* @@ -9617,7 +9617,7 @@ query_synthnxdomainnodata(query_ctx_t *qctx, bool nodata, dns_name_t *nowild, */ static isc_result_t checksignames(dns_name_t *signer, dns_rdataset_t *sigrdataset) { - DNS_RDATASET_FOREACH (sigrdataset) { + DNS_RDATASET_FOREACH(sigrdataset) { isc_result_t result; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_rrsig_t rrsig; @@ -11172,9 +11172,9 @@ query_glueanswer(query_ctx_t *qctx) { } msg = qctx->client->message; - MSG_SECTION_FOREACH (msg, section, name) { + MSG_SECTION_FOREACH(msg, section, name) { if (dns_name_equal(name, qctx->client->query.qname)) { - ISC_LIST_FOREACH (name->list, rdataset, link) { + ISC_LIST_FOREACH(name->list, rdataset, link) { if (rdataset->type == qctx->qtype) { ISC_LIST_UNLINK(msg->sections[section], name, link); diff --git a/lib/ns/server.c b/lib/ns/server.c index 44fb9cc0c7..e0843905d9 100644 --- a/lib/ns/server.c +++ b/lib/ns/server.c @@ -127,7 +127,7 @@ ns_server_detach(ns_server_t **sctxp) { *sctxp = NULL; if (isc_refcount_decrement(&sctx->references) == 1) { - ISC_LIST_FOREACH (sctx->altsecrets, altsecret, link) { + ISC_LIST_FOREACH(sctx->altsecrets, altsecret, link) { ISC_LIST_UNLINK(sctx->altsecrets, altsecret, link); isc_mem_put(sctx->mctx, altsecret, sizeof(*altsecret)); } @@ -142,7 +142,7 @@ ns_server_detach(ns_server_t **sctxp) { isc_quota_destroy(&sctx->tcpquota); isc_quota_destroy(&sctx->xfroutquota); - ISC_LIST_FOREACH (sctx->http_quotas, http_quota, link) { + ISC_LIST_FOREACH(sctx->http_quotas, http_quota, link) { ISC_LIST_DEQUEUE(sctx->http_quotas, http_quota, link); isc_quota_destroy(http_quota); isc_mem_put(sctx->mctx, http_quota, diff --git a/lib/ns/update.c b/lib/ns/update.c index b5473d15b3..664607a508 100644 --- a/lib/ns/update.c +++ b/lib/ns/update.c @@ -485,7 +485,7 @@ static isc_result_t do_diff(dns_diff_t *updates, dns_db_t *db, dns_dbversion_t *ver, dns_diff_t *diff) { isc_result_t result; - ISC_LIST_FOREACH (updates->tuples, t, link) { + ISC_LIST_FOREACH(updates->tuples, t, link) { ISC_LIST_UNLINK(updates->tuples, t, link); CHECK(do_one_tuple(&t, db, ver, diff)); } @@ -553,7 +553,7 @@ static isc_result_t foreach_node_rr_action(void *data, dns_rdataset_t *rdataset) { isc_result_t result; foreach_node_rr_ctx_t *ctx = data; - DNS_RDATASET_FOREACH (rdataset) { + DNS_RDATASET_FOREACH(rdataset) { rr_t rr = { 0, DNS_RDATA_INIT }; dns_rdataset_current(rdataset, &rr.rdata); @@ -608,7 +608,7 @@ foreach_rrset(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, goto cleanup_node; } - DNS_RDATASETITER_FOREACH (iter) { + DNS_RDATASETITER_FOREACH(iter) { dns_rdataset_t rdataset = DNS_RDATASET_INIT; dns_rdatasetiter_current(iter, &rdataset); @@ -714,7 +714,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, dns_rdataset_getownercase(&rdataset, ctx->oldname); } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { rr_t rr = { 0, DNS_RDATA_INIT }; dns_rdataset_current(&rdataset, &rr.rdata); rr.ttl = rdataset.ttl; @@ -933,7 +933,7 @@ ssu_checkrule(void *data, dns_rdataset_t *rrset) { dns_rdataset_init(&rdataset); dns_rdataset_clone(rrset, &rdataset); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); if (rrset->type == dns_rdatatype_ptr) { @@ -1167,7 +1167,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db, dns_diff_init(mctx, &d_rrs); dns_diff_init(mctx, &u_rrs); - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); temp_append(&d_rrs, name, &rdata); @@ -1657,7 +1657,7 @@ send_update(ns_client_t *client, dns_zone_t *zone) { } update = 0; - MSG_SECTION_FOREACH (request, DNS_SECTION_UPDATE, name) { + MSG_SECTION_FOREACH(request, DNS_SECTION_UPDATE, name) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_ttl_t ttl; dns_rdataclass_t update_class; @@ -2010,7 +2010,7 @@ remove_orphaned_ds(dns_db_t *db, dns_dbversion_t *newver, dns_diff_t *diff) { dns_diff_init(diff->mctx, &temp_diff); - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (!((tuple->op == DNS_DIFFOP_DEL && tuple->rdata.type == dns_rdatatype_ns) || (tuple->op == DNS_DIFFOP_ADD && @@ -2032,7 +2032,7 @@ remove_orphaned_ds(dns_db_t *db, dns_dbversion_t *newver, dns_diff_t *diff) { result = ISC_R_SUCCESS; failure: - ISC_LIST_FOREACH (temp_diff.tuples, tuple, link) { + ISC_LIST_FOREACH(temp_diff.tuples, tuple, link) { ISC_LIST_UNLINK(temp_diff.tuples, tuple, link); dns_diff_appendminimal(diff, &tuple); } @@ -2064,7 +2064,7 @@ check_mx(ns_client_t *client, dns_zone_t *zone, dns_db_t *db, dns_rdata_init(&rdata); options = dns_zone_getoptions(zone); - ISC_LIST_FOREACH (diff->tuples, t, link) { + ISC_LIST_FOREACH(diff->tuples, t, link) { if (t->op != DNS_DIFFOP_ADD || t->rdata.type != dns_rdatatype_mx) { @@ -2177,7 +2177,7 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, } bool matched = false; - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t myrdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &myrdata); if (dns_rdata_casecompare(&myrdata, rdata) == 0) { @@ -2219,7 +2219,7 @@ get_iterations(dns_db_t *db, dns_dbversion_t *ver, dns_rdatatype_t privatetype, goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_current(&rdataset, &rdata); CHECK(dns_rdata_tostruct(&rdata, &nsec3param, NULL)); @@ -2247,7 +2247,7 @@ try_private: goto failure; } - DNS_RDATASET_FOREACH (&rdataset) { + DNS_RDATASET_FOREACH(&rdataset) { unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE]; dns_rdata_t private = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT; @@ -2339,7 +2339,7 @@ add_nsec3param_records(ns_client_t *client, dns_zone_t *zone, dns_db_t *db, /* * Extract NSEC3PARAM tuples from list. */ - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (tuple->rdata.type != dns_rdatatype_nsec3param || !dns_name_equal(name, &tuple->name)) { @@ -2414,7 +2414,7 @@ add_nsec3param_records(ns_client_t *client, dns_zone_t *zone, dns_db_t *db, * in managing and should not be touched so revert such changes * taking into account any TTL change of the NSEC3PARAM RRset. */ - ISC_LIST_FOREACH (temp_diff.tuples, tuple, link) { + ISC_LIST_FOREACH(temp_diff.tuples, tuple, link) { if ((tuple->rdata.data[1] & ~DNS_NSEC3FLAG_OPTOUT) != 0) { /* * If we haven't had any adds then the tuple->ttl must @@ -2605,7 +2605,7 @@ rollback_private(dns_db_t *db, dns_rdatatype_t privatetype, /* * Extract the changes to be rolled back. */ - ISC_LIST_FOREACH (diff->tuples, tuple, link) { + ISC_LIST_FOREACH(diff->tuples, tuple, link) { if (tuple->rdata.type != privatetype || !dns_name_equal(name, &tuple->name)) { @@ -2629,7 +2629,7 @@ rollback_private(dns_db_t *db, dns_rdatatype_t privatetype, /* * Rollback the changes. */ - ISC_LIST_FOREACH (temp_diff.tuples, tuple, link) { + ISC_LIST_FOREACH(temp_diff.tuples, tuple, link) { op = (tuple->op == DNS_DIFFOP_DEL) ? DNS_DIFFOP_ADD : DNS_DIFFOP_DEL; dns_difftuple_create(mctx, op, name, tuple->ttl, &tuple->rdata, @@ -2711,7 +2711,7 @@ update_action(void *arg) { * Check prerequisites. */ - MSG_SECTION_FOREACH (request, DNS_SECTION_PREREQUISITE, name) { + MSG_SECTION_FOREACH(request, DNS_SECTION_PREREQUISITE, name) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_ttl_t ttl; dns_rdataclass_t update_class; @@ -2823,7 +2823,7 @@ update_action(void *arg) { INSIST(ssutable == NULL || maxbytype != NULL); update = 0; - MSG_SECTION_FOREACH (request, DNS_SECTION_UPDATE, name) { + MSG_SECTION_FOREACH(request, DNS_SECTION_UPDATE, name) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_ttl_t ttl; dns_rdataclass_t update_class; diff --git a/lib/ns/xfrout.c b/lib/ns/xfrout.c index fc574b0544..685ce22a05 100644 --- a/lib/ns/xfrout.c +++ b/lib/ns/xfrout.c @@ -867,7 +867,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) { * Check the authority section. Look for a SOA record with * the same name and class as the question. */ - MSG_SECTION_FOREACH (request, DNS_SECTION_AUTHORITY, soa_name) { + MSG_SECTION_FOREACH(request, DNS_SECTION_AUTHORITY, soa_name) { /* * Ignore data whose owner name is not the zone apex. */ @@ -875,7 +875,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) { continue; } - ISC_LIST_FOREACH (soa_name->list, soa_rdataset, link) { + ISC_LIST_FOREACH(soa_name->list, soa_rdataset, link) { /* * Ignore non-SOA data. */ diff --git a/tests/dns/dbdiff_test.c b/tests/dns/dbdiff_test.c index c18df7d79b..340ec9b59b 100644 --- a/tests/dns/dbdiff_test.c +++ b/tests/dns/dbdiff_test.c @@ -91,7 +91,7 @@ ISC_RUN_TEST_IMPL(diffx_add) { assert_int_equal(result, ISC_R_SUCCESS); assert_false(ISC_LIST_EMPTY(diff.tuples)); - ISC_LIST_FOREACH (diff.tuples, tuple, link) { + ISC_LIST_FOREACH(diff.tuples, tuple, link) { assert_int_equal(tuple->op, DNS_DIFFOP_ADD); count++; } @@ -120,7 +120,7 @@ ISC_RUN_TEST_IMPL(diffx_remove) { assert_int_equal(result, ISC_R_SUCCESS); assert_false(ISC_LIST_EMPTY(diff.tuples)); - ISC_LIST_FOREACH (diff.tuples, tuple, link) { + ISC_LIST_FOREACH(diff.tuples, tuple, link) { assert_int_equal(tuple->op, DNS_DIFFOP_DEL); count++; } diff --git a/tests/dns/dbiterator_test.c b/tests/dns/dbiterator_test.c index 4e7cfc5fb8..a4593bf945 100644 --- a/tests/dns/dbiterator_test.c +++ b/tests/dns/dbiterator_test.c @@ -93,7 +93,7 @@ test_walk(const char *filename, int flags, int nodes) { result = dns_db_createiterator(db, flags, &iter); assert_int_equal(result, ISC_R_SUCCESS); - DNS_DBITERATOR_FOREACH (iter) { + DNS_DBITERATOR_FOREACH(iter) { result = dns_dbiterator_current(iter, &node, name); assert_int_equal(result, ISC_R_SUCCESS); dns_db_detachnode(&node); diff --git a/tests/dns/diff_test.c b/tests/dns/diff_test.c index 56b31ef9c5..38e6681394 100644 --- a/tests/dns/diff_test.c +++ b/tests/dns/diff_test.c @@ -50,7 +50,7 @@ static size_t count_elements(dns_diff_t *diff) { size_t count = 0; - ISC_LIST_FOREACH (diff->tuples, ot, link) { + ISC_LIST_FOREACH(diff->tuples, ot, link) { ++count; } diff --git a/tests/dns/sigs_test.c b/tests/dns/sigs_test.c index 2827a232d8..41faca7d76 100644 --- a/tests/dns/sigs_test.c +++ b/tests/dns/sigs_test.c @@ -234,7 +234,7 @@ updatesigs_test(const updatesigs_test_params_t *test, dns_zone_t *zone, } tuples_found = 0; - ISC_LIST_FOREACH (zone_diff.tuples, found, link) { + ISC_LIST_FOREACH(zone_diff.tuples, found, link) { tuples_found++; } @@ -245,7 +245,7 @@ updatesigs_test(const updatesigs_test_params_t *test, dns_zone_t *zone, */ expected = test->zonediff; index = 1; - ISC_LIST_FOREACH (zone_diff.tuples, found, link) { + ISC_LIST_FOREACH(zone_diff.tuples, found, link) { compare_tuples(expected, found, index); expected++; index++; diff --git a/tests/dns/skr_test.c b/tests/dns/skr_test.c index 334e07b66e..3de994ab79 100644 --- a/tests/dns/skr_test.c +++ b/tests/dns/skr_test.c @@ -130,7 +130,7 @@ print_rdata(FILE *fp, dns_rdata_t *rdata) { isc_buffer_usedregion(&target, &r); fprintf(fp, "%.*s", (int)r.length, (char *)r.base); - ISC_LIST_FOREACH (rdatalist->rdata, rd, link) { + ISC_LIST_FOREACH(rdatalist->rdata, rd, link) { ISC_LIST_UNLINK(rdatalist->rdata, rdata, link); } isc_mem_put(isc_g_mctx, rdatalist, sizeof(*rdatalist)); @@ -240,7 +240,7 @@ create_bundle(FILE *fp, isc_stdtime_t btime, int bnum) { sign_rrset(fp, btime, btime + LIFETIME, dnskeyset, test_bundles[bnum].rrsig1buf, &test_bundles[bnum].dnskey_rrsig); - ISC_LIST_FOREACH (dnskeylist->rdata, rd, link) { + ISC_LIST_FOREACH(dnskeylist->rdata, rd, link) { ISC_LIST_UNLINK(dnskeylist->rdata, rd, link); } isc_mem_put(isc_g_mctx, dnskeylist, sizeof(*dnskeylist)); @@ -265,7 +265,7 @@ create_bundle(FILE *fp, isc_stdtime_t btime, int bnum) { sign_rrset(fp, btime, btime + LIFETIME, cdnskeyset, test_bundles[bnum].rrsig2buf, &test_bundles[bnum].cdnskey_rrsig); - ISC_LIST_FOREACH (cdnskeylist->rdata, rd, link) { + ISC_LIST_FOREACH(cdnskeylist->rdata, rd, link) { ISC_LIST_UNLINK(cdnskeylist->rdata, rd, link); } isc_mem_put(isc_g_mctx, cdnskeylist, sizeof(*cdnskeylist)); @@ -288,7 +288,7 @@ create_bundle(FILE *fp, isc_stdtime_t btime, int bnum) { dns_rdata_init(&test_bundles[bnum].cds_rrsig); sign_rrset(fp, btime, btime + LIFETIME, cdsset, test_bundles[bnum].rrsig3buf, &test_bundles[bnum].cds_rrsig); - ISC_LIST_FOREACH (cdslist->rdata, rd, link) { + ISC_LIST_FOREACH(cdslist->rdata, rd, link) { ISC_LIST_UNLINK(cdslist->rdata, rd, link); } isc_mem_put(isc_g_mctx, cdslist, sizeof(*cdslist)); @@ -461,7 +461,7 @@ ISC_RUN_TEST_IMPL(skr_read) { isc_file_remove(testskr); /* Test bundles */ - ISC_LIST_FOREACH (skr->bundles, bundle, link) { + ISC_LIST_FOREACH(skr->bundles, bundle, link) { count++; } assert_int_equal(count, 42); diff --git a/tests/isccfg/duration_test.c b/tests/isccfg/duration_test.c index 5d33fe4022..8d39ef5939 100644 --- a/tests/isccfg/duration_test.c +++ b/tests/isccfg/duration_test.c @@ -158,7 +158,7 @@ ISC_RUN_TEST_IMPL(duration) { (void)cfg_map_get(c1, "dnssec-policy", &kasps); assert_non_null(kasps); - CFG_LIST_FOREACH (kasps, element) { + CFG_LIST_FOREACH(kasps, element) { const cfg_listelt_t *key_element; const cfg_obj_t *lifetime = NULL; const cfg_obj_t *keys = NULL; diff --git a/tests/libtest/qp.c b/tests/libtest/qp.c index ce29c67b39..d84c464baa 100644 --- a/tests/libtest/qp.c +++ b/tests/libtest/qp.c @@ -168,7 +168,7 @@ qp_test_dumpmulti(dns_qpmulti_t *multi) { qpr.base); printf("qpmulti->reader %p whence %p\n", reader, whence); unsigned int snapshots = 0; - ISC_LIST_FOREACH (multi->snapshots, snap, link) { + ISC_LIST_FOREACH(multi->snapshots, snap, link) { snapshots++; } printf("qpmulti %p snapshots %u\n", multi, snapshots);