From c62a94363d7707f0354a2291de546d7f87ea58d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 11 Oct 2021 12:09:16 +0200 Subject: [PATCH 1/5] Add FALLTHROUGH macro for __attribute__((fallthrough)) Gcc 7+ and Clang 10+ have implemented __attribute__((fallthrough)) which is explicit version of the /* FALLTHROUGH */ comment we are currently using. Add and apply FALLTHROUGH macro that uses the attribute if available, but does nothing on older compilers. In one case (lib/dns/zone.c), using the macro revealed that we were using the /* FALLTHROUGH */ comment in wrong place, remove that comment. (cherry picked from commit fe7ce629f47e7a0449b7527aad3c0b4e596b1f4e) --- bin/check/named-checkconf.c | 2 +- bin/check/named-checkzone.c | 2 +- bin/dig/host.c | 2 +- bin/dnssec/dnssec-dsfromkey.c | 6 ++--- bin/dnssec/dnssec-importkey.c | 2 +- bin/dnssec/dnssec-keyfromlabel.c | 6 ++--- bin/dnssec/dnssec-keygen.c | 6 ++--- bin/dnssec/dnssec-revoke.c | 2 +- bin/dnssec/dnssec-settime.c | 2 +- bin/dnssec/dnssec-signzone.c | 6 ++--- bin/dnssec/dnssec-verify.c | 4 ++-- bin/named/main.c | 6 ++--- bin/named/zoneconf.c | 2 +- bin/rndc/rndc.c | 2 +- .../modules/wildcard/dlz_wildcard_dynamic.c | 2 +- doc/dev/style.md | 2 +- lib/bind9/getaddresses.c | 2 +- lib/dns/dispatch.c | 2 +- lib/dns/dnssec.c | 2 +- lib/dns/dnstap.c | 2 +- lib/dns/masterdump.c | 2 +- lib/dns/name.c | 10 ++++---- lib/dns/rbtdb.c | 2 +- lib/dns/rdata/generic/opt_41.c | 2 +- lib/dns/resolver.c | 2 +- lib/dns/rootns.c | 2 +- lib/dns/rpz.c | 2 +- lib/dns/update.c | 14 +++++------ lib/dns/validator.c | 2 +- lib/dns/xfrin.c | 5 ++-- lib/dns/zone.c | 19 +++++++-------- lib/isc/include/isc/util.h | 24 +++++++++++++++---- lib/isc/lex.c | 4 ++-- lib/isc/log.c | 2 +- lib/isc/netmgr/netmgr.c | 4 ++-- lib/isc/ratelimiter.c | 2 +- lib/isc/siphash.c | 20 ++++++++-------- lib/isc/tm.c | 4 ++-- lib/isc/url.c | 10 ++++---- lib/isccfg/aclconf.c | 4 ++-- lib/ns/query.c | 8 +++---- 41 files changed, 109 insertions(+), 97 deletions(-) diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index bb3fefd2ed..0594ed157e 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -677,7 +677,7 @@ main(int argc, char **argv) { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': usage(); diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index 793169fd42..80cdfb55d3 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -426,7 +426,7 @@ main(int argc, char **argv) { fprintf(stderr, "%s: invalid argument -%c\n", prog_name, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': usage(); diff --git a/bin/dig/host.c b/bin/dig/host.c index bfc54c646a..e9064c8db3 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -776,7 +776,7 @@ parse_args(bool is_batchfile, int argc, char **argv) { break; case 'A': list_almost_all = true; - /* FALL THROUGH */ + FALLTHROUGH; case 'a': if (!lookup->rdtypeset || lookup->rdtype != dns_rdatatype_axfr) { diff --git a/bin/dnssec/dnssec-dsfromkey.c b/bin/dnssec/dnssec-dsfromkey.c index 05a8cd4095..fa3ef72d72 100644 --- a/bin/dnssec/dnssec-dsfromkey.c +++ b/bin/dnssec/dnssec-dsfromkey.c @@ -434,14 +434,14 @@ main(int argc, char **argv) { } break; case 'F': - /* Reserved for FIPS mode */ - /* FALLTHROUGH */ + /* Reserved for FIPS mode */ + FALLTHROUGH; case '?': if (isc_commandline_option != '?') { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-importkey.c b/bin/dnssec/dnssec-importkey.c index 65cee0f56b..6c1d2f22cd 100644 --- a/bin/dnssec/dnssec-importkey.c +++ b/bin/dnssec/dnssec-importkey.c @@ -385,7 +385,7 @@ main(int argc, char **argv) { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-keyfromlabel.c b/bin/dnssec/dnssec-keyfromlabel.c index adecfa63e8..233e12bc11 100644 --- a/bin/dnssec/dnssec-keyfromlabel.c +++ b/bin/dnssec/dnssec-keyfromlabel.c @@ -315,14 +315,14 @@ main(int argc, char **argv) { prepub = strtottl(isc_commandline_argument); break; case 'F': - /* Reserved for FIPS mode */ - /* FALLTHROUGH */ + /* Reserved for FIPS mode */ + FALLTHROUGH; case '?': if (isc_commandline_option != '?') { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-keygen.c b/bin/dnssec/dnssec-keygen.c index c43c0d7dcf..64ad357923 100644 --- a/bin/dnssec/dnssec-keygen.c +++ b/bin/dnssec/dnssec-keygen.c @@ -1108,14 +1108,14 @@ main(int argc, char **argv) { ctx.prepub = strtottl(isc_commandline_argument); break; case 'F': - /* Reserved for FIPS mode */ - /* FALLTHROUGH */ + /* Reserved for FIPS mode */ + FALLTHROUGH; case '?': if (isc_commandline_option != '?') { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-revoke.c b/bin/dnssec/dnssec-revoke.c index b464868c3f..36ee75c718 100644 --- a/bin/dnssec/dnssec-revoke.c +++ b/bin/dnssec/dnssec-revoke.c @@ -119,7 +119,7 @@ main(int argc, char **argv) { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-settime.c b/bin/dnssec/dnssec-settime.c index f7f45ee646..6c78c38966 100644 --- a/bin/dnssec/dnssec-settime.c +++ b/bin/dnssec/dnssec-settime.c @@ -342,7 +342,7 @@ main(int argc, char **argv) { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 0e70c43723..00564306e6 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -3640,14 +3640,14 @@ main(int argc, char *argv[]) { break; case 'F': - /* Reserved for FIPS mode */ - /* FALLTHROUGH */ + /* Reserved for FIPS mode */ + FALLTHROUGH; case '?': if (isc_commandline_option != '?') { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ usage(); diff --git a/bin/dnssec/dnssec-verify.c b/bin/dnssec/dnssec-verify.c index 27b2e9fce7..6dd68edd32 100644 --- a/bin/dnssec/dnssec-verify.c +++ b/bin/dnssec/dnssec-verify.c @@ -132,7 +132,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) { "use -o to specify a different zone origin", origin, file); } - /* FALLTHROUGH */ + FALLTHROUGH; default: fatal("failed loading zone from '%s': %s", file, isc_result_totext(result)); @@ -258,7 +258,7 @@ main(int argc, char *argv[]) { fprintf(stderr, "%s: invalid argument -%c\n", program, isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': /* Does not return. */ diff --git a/bin/named/main.c b/bin/named/main.c index 3a2fe05732..e7ed493612 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -860,8 +860,8 @@ parse_command_line(int argc, char *argv[]) { } break; case 'F': - /* Reserved for FIPS mode */ - /* FALLTHROUGH */ + /* Reserved for FIPS mode */ + FALLTHROUGH; case '?': usage(); if (isc_commandline_option == '?') { @@ -876,7 +876,7 @@ parse_command_line(int argc, char *argv[]) { "an argument", isc_commandline_option); } - /* FALLTHROUGH */ + FALLTHROUGH; default: named_main_earlyfatal("parsing options returned %d", ch); diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 027b7734c8..55f2f35854 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -1874,7 +1874,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, dns_zone_setxfracl(zone, none); dns_acl_detach(&none); } - /* FALLTHROUGH */ + FALLTHROUGH; case dns_zone_secondary: case dns_zone_stub: case dns_zone_redirect: diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 949ab609a3..178120d90d 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -1001,7 +1001,7 @@ main(int argc, char **argv) { program, isc_commandline_option); usage(1); } - /* FALLTHROUGH */ + FALLTHROUGH; case 'h': usage(0); break; diff --git a/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c b/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c index 1090d780f0..9edcffe9ce 100644 --- a/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c +++ b/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c @@ -684,7 +684,7 @@ fnmatch(const char *pattern, const char *string, int flags) { --pattern; } } - /* FALLTHROUGH */ + FALLTHROUGH; default: norm: if (c == *string) { diff --git a/doc/dev/style.md b/doc/dev/style.md index f3165f2a36..3a71b85995 100644 --- a/doc/dev/style.md +++ b/doc/dev/style.md @@ -145,7 +145,7 @@ Good: The following lint and lint-like comments should be used where appropriate: /* ARGSUSED */ - /* FALLTHROUGH */ + FALLTHROUGH; /* NOTREACHED */ /* VARARGS */ diff --git a/lib/bind9/getaddresses.c b/lib/bind9/getaddresses.c index 5395540631..6ce32d7a9b 100644 --- a/lib/bind9/getaddresses.c +++ b/lib/bind9/getaddresses.c @@ -132,7 +132,7 @@ again: goto again; } #endif /* ifdef AI_ADDRCONFIG */ - /* FALLTHROUGH */ + FALLTHROUGH; default: return (ISC_R_FAILURE); } diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 81e2f0658d..0fcac79d3c 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -801,7 +801,7 @@ tcp_recv(isc_nmhandle_t *handle, isc_result_t result, isc_region_t *region, } /* Got an invalid DNS response, terminate the connection */ - /* FALLTHROUGH */ + FALLTHROUGH; default: isc_sockaddr_format(&peer, buf, sizeof(buf)); dispatch_log(disp, ISC_LOG_ERROR, diff --git a/lib/dns/dnssec.c b/lib/dns/dnssec.c index 59339c5587..e35a0e85ee 100644 --- a/lib/dns/dnssec.c +++ b/lib/dns/dnssec.c @@ -441,7 +441,7 @@ dns_dnssec_verify(const dns_name_t *name, dns_rdataset_t *set, dst_key_t *key, inc_stat(dns_dnssecstats_fail); return (DNS_R_SIGINVALID); } - /* FALLTHROUGH */ + FALLTHROUGH; default: if (!dns_name_issubdomain(name, &sig.signer)) { inc_stat(dns_dnssecstats_fail); diff --git a/lib/dns/dnstap.c b/lib/dns/dnstap.c index ccd787d129..44e5f6e160 100644 --- a/lib/dns/dnstap.c +++ b/lib/dns/dnstap.c @@ -816,7 +816,7 @@ dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype, isc_sockaddr_t *qaddr, break; } - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_DTTYPE_AQ: case DNS_DTTYPE_CQ: case DNS_DTTYPE_FQ: diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index 060cc86ec2..ae2e815c86 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -703,7 +703,7 @@ rdataset_totext(dns_rdataset_t *rdataset, const dns_name_t *owner_name, isc_buffer_putstr(target, KEYDATA); break; } - /* FALLTHROUGH */ + FALLTHROUGH; default: if ((ctx->style.flags & DNS_STYLEFLAG_UNKNOWNFORMAT) != 0) { diff --git a/lib/dns/name.c b/lib/dns/name.c index e357228d35..2a8f9a5d77 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -1145,7 +1145,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source, break; } - /* FALLTHROUGH */ + FALLTHROUGH; case ft_start: label = ndata; ndata++; @@ -1160,7 +1160,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source, if (nrem == 0) { return (ISC_R_NOSPACE); } - /* FALLTHROUGH */ + FALLTHROUGH; case ft_ordinary: if (c == '.') { if (count == 0) { @@ -1204,7 +1204,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source, } state = ft_escape; POST(state); - /* FALLTHROUGH */ + FALLTHROUGH; case ft_escape: if (!isdigit((unsigned char)c)) { if (count >= 63) { @@ -1224,7 +1224,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source, digits = 0; value = 0; state = ft_escdecimal; - /* FALLTHROUGH */ + FALLTHROUGH; case ft_escdecimal: if (!isdigit((unsigned char)c)) { return (DNS_R_BADESCAPE); @@ -1427,7 +1427,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options, 0) { goto no_escape; } - /* FALLTHROUGH */ + FALLTHROUGH; case 0x22: /* '"' */ case 0x28: /* '(' */ case 0x29: /* ')' */ diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index e2af9a4ea2..8757fbd5ab 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -791,7 +791,7 @@ update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) { case DNS_R_COVERINGNSEC: isc_stats_increment(rbtdb->cachestats, dns_cachestatscounter_coveringnsec); - /* FALLTHROUGH */ + FALLTHROUGH; case ISC_R_SUCCESS: case DNS_R_CNAME: case DNS_R_DNAME: diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c index 1ac13764b7..9bdfa3c1cc 100644 --- a/lib/dns/rdata/generic/opt_41.c +++ b/lib/dns/rdata/generic/opt_41.c @@ -233,7 +233,7 @@ fromwire_opt(ARGS_FROMWIRE) { isc_region_consume(&sregion, length); break; case DNS_OPT_CLIENT_TAG: - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_OPT_SERVER_TAG: if (length != 2) { return (DNS_R_OPTERR); diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 4c692ddf95..e30ab28fb1 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -7700,7 +7700,7 @@ resquery_response(isc_result_t eresult, isc_region_t *region, void *arg) { if (query->rmessage->counts[DNS_SECTION_QUESTION] == 0) { break; } - /* FALLTHROUGH */ + FALLTHROUGH; case dns_rcode_nxrrset: /* Not expected. */ case dns_rcode_badcookie: case dns_rcode_noerror: diff --git a/lib/dns/rootns.c b/lib/dns/rootns.c index 15aa14326b..856b718c7c 100644 --- a/lib/dns/rootns.c +++ b/lib/dns/rootns.c @@ -130,7 +130,7 @@ check_node(dns_rdataset_t *rootns, dns_name_t *name, if (dns_name_compare(name, dns_rootname) == 0) { break; } - /* FALLTHROUGH */ + FALLTHROUGH; default: result = ISC_R_FAILURE; goto cleanup; diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 3b54ca6ca3..d699c3d497 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -2729,7 +2729,7 @@ dns_rpz_find_name(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type, found_zbits = nm_data->set.ns; } } - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_R_PARTIALMATCH: i = chain.level_matches; diff --git a/lib/dns/update.c b/lib/dns/update.c index f9b80a7da1..610643b807 100644 --- a/lib/dns/update.c +++ b/lib/dns/update.c @@ -1711,7 +1711,7 @@ next_state: update_log(log, zone, ISC_LOG_DEBUG(3), "updated data signatures"); - /* FALLTHROUGH */ + FALLTHROUGH; case remove_orphaned: state->state = remove_orphaned; @@ -1743,7 +1743,7 @@ next_state: update_log(log, zone, ISC_LOG_DEBUG(3), "rebuilding NSEC chain"); - /* FALLTHROUGH */ + FALLTHROUGH; case build_chain: state->state = build_chain; /* @@ -1833,7 +1833,7 @@ next_state: CHECK(uniqify_name_list(&state->affected)); - /* FALLTHROUGH */ + FALLTHROUGH; case process_nsec: state->state = process_nsec; @@ -1949,7 +1949,7 @@ next_state: update_log(log, zone, ISC_LOG_DEBUG(3), "signing rebuilt NSEC chain"); - /* FALLTHROUGH */ + FALLTHROUGH; case sign_nsec: state->state = sign_nsec; /* Update RRSIG NSECs. */ @@ -1981,7 +1981,7 @@ next_state: } ISC_LIST_APPENDLIST(state->nsec_mindiff.tuples, state->work.tuples, link); - /* FALLTHROUGH */ + FALLTHROUGH; case update_nsec3: state->state = update_nsec3; @@ -2073,7 +2073,7 @@ next_state: } } - /* FALLTHROUGH */ + FALLTHROUGH; case process_nsec3: state->state = process_nsec3; while ((t = ISC_LIST_HEAD(state->affected.tuples)) != NULL) { @@ -2124,7 +2124,7 @@ next_state: update_log(log, zone, ISC_LOG_DEBUG(3), "signing rebuilt NSEC3 chain"); - /* FALLTHROUGH */ + FALLTHROUGH; case sign_nsec3: state->state = sign_nsec3; /* Update RRSIG NSEC3s. */ diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 8ee86a1669..5014e500fb 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -529,7 +529,7 @@ fetch_callback_ds(isc_task_t *task, isc_event_t *event) { goto unexpected; } - /* FALLTHROUGH */ + FALLTHROUGH; case ISC_R_SUCCESS: if (trustchain) { /* diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index ccfa1e8b78..2136cb7fc5 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -680,8 +680,7 @@ redo: case XFRST_AXFR_END: case XFRST_IXFR_END: FAIL(DNS_R_EXTRADATA); - /* NOTREACHED */ - /* FALLTHROUGH */ + FALLTHROUGH; default: INSIST(0); ISC_UNREACHABLE(); @@ -1574,7 +1573,7 @@ xfrin_recv_done(isc_nmhandle_t *handle, isc_result_t result, break; case XFRST_AXFR_END: CHECK(axfr_finalize(xfr)); - /* FALLTHROUGH */ + FALLTHROUGH; case XFRST_IXFR_END: /* * Close the journal. diff --git a/lib/dns/zone.c b/lib/dns/zone.c index ca9bbaec4c..245e75e21b 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -11307,7 +11307,7 @@ zone_maintenance(dns_zone_t *zone) { if (zone->primaries == NULL) { break; } - /* FALLTHROUGH */ + FALLTHROUGH; case dns_zone_secondary: case dns_zone_mirror: case dns_zone_stub: @@ -11332,7 +11332,7 @@ zone_maintenance(dns_zone_t *zone) { if (zone->primaries == NULL) { break; } - /* FALLTHROUGH */ + FALLTHROUGH; case dns_zone_secondary: case dns_zone_mirror: case dns_zone_stub: @@ -11704,7 +11704,7 @@ zone_journal_rollforward(dns_zone_t *zone, dns_db_t *db, bool *needdump, switch (result) { case ISC_R_SUCCESS: *needdump = true; - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_R_UPTODATE: if (dns_journal_recovered(journal)) { *fixjournal = true; @@ -13639,7 +13639,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) { primary, source); goto same_primary; } - /* fallthrough */ + FALLTHROUGH; default: dns_zonemgr_unreachableadd(zone->zmgr, &zone->primaryaddr, &zone->sourceaddr, &now); @@ -14049,7 +14049,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { } goto next_primary; } - /* fallthrough */ + FALLTHROUGH; default: dns_zone_log(zone, ISC_LOG_INFO, "refresh: failure trying primary " @@ -15147,8 +15147,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) { if (zone->primaries != NULL) { goto treat_as_secondary; } - /* FALLTHROUGH */ - + FALLTHROUGH; case dns_zone_primary: if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) || DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY)) @@ -15211,8 +15210,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) { { next = zone->notifytime; } - /* FALLTHROUGH */ - + FALLTHROUGH; case dns_zone_stub: if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_REFRESH) && !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOPRIMARIES) && @@ -17573,7 +17571,7 @@ again: switch (xfrresult) { case ISC_R_SUCCESS: DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY); - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_R_UPTODATE: DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_FORCEXFER); /* @@ -17731,7 +17729,6 @@ again: zone->curprimary++; } while (zone->curprimary < zone->primariescnt && zone->primariesok[zone->curprimary]); - /* FALLTHROUGH */ same_primary: if (zone->curprimary >= zone->primariescnt) { zone->curprimary = 0; diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index 71bc3b2214..d0cd0197d3 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -27,6 +27,18 @@ * ISC_ or isc_ to the name. */ +/*** + *** Clang Compatibility Macros + ***/ + +#if !defined(__has_attribute) +#define __has_attribute(x) 0 +#endif /* if !defined(__has_attribute) */ + +#if !defined(__has_feature) +#define __has_feature(x) 0 +#endif /* if !defined(__has_feature) */ + /*** *** General Macros. ***/ @@ -49,6 +61,14 @@ #define ISC_NONSTRING #endif /* __GNUC__ */ +#if __GNUC__ >= 7 || __has_attribute(fallthrough) +#define FALLTHROUGH __attribute__((fallthrough)) +#else +/* clang-format off */ +#define FALLTHROUGH do {} while (0) /* FALLTHROUGH */ +/* clang-format on */ +#endif + #if HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR && HAVE_FUNC_ATTRIBUTE_DESTRUCTOR #define ISC_CONSTRUCTOR __attribute__((constructor)) #define ISC_DESTRUCTOR __attribute__((destructor)) @@ -204,10 +224,6 @@ #define ISC_UNREACHABLE() #endif /* ifdef HAVE_BUILTIN_UNREACHABLE */ -#if !defined(__has_feature) -#define __has_feature(x) 0 -#endif /* if !defined(__has_feature) */ - /* GCC defines __SANITIZE_ADDRESS__, so reuse the macro for clang */ #if __has_feature(address_sanitizer) #define __SANITIZE_ADDRESS__ 1 diff --git a/lib/isc/lex.c b/lib/isc/lex.c index 6373a98393..9f2a9254c5 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -688,7 +688,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { state = lexstate_vpairstart; break; } - /* FALLTHROUGH */ + FALLTHROUGH; case lexstate_vpairstart: if (state == lexstate_vpairstart) { if (c == '"' && @@ -699,7 +699,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { } state = lexstate_vpair; } - /* FALLTHROUGH */ + FALLTHROUGH; case lexstate_vpair: /* * EOF needs to be checked before lex->specials[c] diff --git a/lib/isc/log.c b/lib/isc/log.c index 6fd80c207a..f41c39237d 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -1798,7 +1798,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category, } channel->flags &= ~ISC_LOG_OPENERR; } - /* FALLTHROUGH */ + FALLTHROUGH; case ISC_LOG_TOFILEDESC: fprintf(FILE_STREAM(channel), "%s%s%s%s%s%s%s%s%s%s\n", diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 337d3e9176..18545a8394 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -1627,7 +1627,7 @@ isc___nmhandle_get(isc_nmsocket_t *sock, isc_sockaddr_t *peer, if (!atomic_load(&sock->client)) { break; } - /* fallthrough */ + FALLTHROUGH; case isc_nm_tcpsocket: case isc_nm_tlssocket: INSIST(sock->statichandle == NULL); @@ -2907,7 +2907,7 @@ shutdown_walk_cb(uv_handle_t *handle, void *arg) { isc__nmsocket_reset(sock); return; } - /* FALLTHROUGH */ + FALLTHROUGH; default: isc__nmsocket_shutdown(sock); } diff --git a/lib/isc/ratelimiter.c b/lib/isc/ratelimiter.c index dabbb08ff4..601c133a9e 100644 --- a/lib/isc/ratelimiter.c +++ b/lib/isc/ratelimiter.c @@ -325,7 +325,7 @@ isc_ratelimiter_stall(isc_ratelimiter_t *rl) { result = isc_timer_reset(rl->timer, isc_timertype_inactive, NULL, NULL, false); RUNTIME_CHECK(result == ISC_R_SUCCESS); - /* FALLTHROUGH */ + FALLTHROUGH; case isc_ratelimiter_idle: case isc_ratelimiter_stalled: rl->state = isc_ratelimiter_stalled; diff --git a/lib/isc/siphash.c b/lib/isc/siphash.c index 8cd4691289..0f83ef5f2e 100644 --- a/lib/isc/siphash.c +++ b/lib/isc/siphash.c @@ -120,25 +120,25 @@ isc_siphash24(const uint8_t *k, const uint8_t *in, const size_t inlen, switch (left) { case 7: b |= ((uint64_t)in[6]) << 48; - /* FALLTHROUGH */ + FALLTHROUGH; case 6: b |= ((uint64_t)in[5]) << 40; - /* FALLTHROUGH */ + FALLTHROUGH; case 5: b |= ((uint64_t)in[4]) << 32; - /* FALLTHROUGH */ + FALLTHROUGH; case 4: b |= ((uint64_t)in[3]) << 24; - /* FALLTHROUGH */ + FALLTHROUGH; case 3: b |= ((uint64_t)in[2]) << 16; - /* FALLTHROUGH */ + FALLTHROUGH; case 2: b |= ((uint64_t)in[1]) << 8; - /* FALLTHROUGH */ + FALLTHROUGH; case 1: b |= ((uint64_t)in[0]); - /* FALLTHROUGH */ + FALLTHROUGH; case 0: break; default: @@ -198,13 +198,13 @@ isc_halfsiphash24(const uint8_t *k, const uint8_t *in, const size_t inlen, switch (left) { case 3: b |= ((uint32_t)in[2]) << 16; - /* FALLTHROUGH */ + FALLTHROUGH; case 2: b |= ((uint32_t)in[1]) << 8; - /* FALLTHROUGH */ + FALLTHROUGH; case 1: b |= ((uint32_t)in[0]); - /* FALLTHROUGH */ + FALLTHROUGH; case 0: break; default: diff --git a/lib/isc/tm.c b/lib/isc/tm.c index dbdfc31ee7..19a7bee453 100644 --- a/lib/isc/tm.c +++ b/lib/isc/tm.c @@ -322,7 +322,7 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) { case 'k': /* The hour (24-hour clock representation). */ LEGAL_ALT(0); - /* FALLTHROUGH */ + FALLTHROUGH; case 'H': LEGAL_ALT(ALT_O); if (!(conv_num(&bp, &tm->tm_hour, 0, 23))) { @@ -332,7 +332,7 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) { case 'l': /* The hour (12-hour clock representation). */ LEGAL_ALT(0); - /* FALLTHROUGH */ + FALLTHROUGH; case 'I': LEGAL_ALT(ALT_O); if (!(conv_num(&bp, &tm->tm_hour, 1, 12))) { diff --git a/lib/isc/url.c b/lib/isc/url.c index 100b91c177..8758496e5b 100644 --- a/lib/isc/url.c +++ b/lib/isc/url.c @@ -277,7 +277,7 @@ parse_url_char(state_t s, const char ch) { return (s_dead); } - /* FALLTHROUGH */ + FALLTHROUGH; case s_req_server_start: case s_req_server: if (ch == '/') { @@ -399,7 +399,7 @@ http_parse_host_char(host_state_t s, const char ch) { return (s_http_host); } - /* FALLTHROUGH */ + FALLTHROUGH; case s_http_host_v6_end: if (ch == ':') { return (s_http_host_port_start); @@ -412,7 +412,7 @@ http_parse_host_char(host_state_t s, const char ch) { return (s_http_host_v6_end); } - /* FALLTHROUGH */ + FALLTHROUGH; case s_http_host_v6_start: if (isxdigit((unsigned char)ch) || ch == ':' || ch == '.') { return (s_http_host_v6); @@ -428,7 +428,7 @@ http_parse_host_char(host_state_t s, const char ch) { return (s_http_host_v6_end); } - /* FALLTHROUGH */ + FALLTHROUGH; case s_http_host_v6_zone_start: /* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */ if (isalnum((unsigned char)ch) || ch == '%' || ch == '.' || @@ -578,7 +578,7 @@ isc_url_parse(const char *buf, size_t buflen, bool is_connect, case s_req_server_with_at: found_at = 1; - /* FALLTHROUGH */ + FALLTHROUGH; case s_req_server: uf = ISC_UF_HOST; break; diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index ea030fbd9d..d03dc40fe3 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -426,8 +426,8 @@ geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) { if (ctx->geoip->country != NULL) { return (true); } - /* city db can answer these too, so: */ - /* FALLTHROUGH */ + /* city db can answer these too, so: */ + FALLTHROUGH; case dns_geoip_region: case dns_geoip_regionname: case dns_geoip_city_countrycode: diff --git a/lib/ns/query.c b/lib/ns/query.c index 4ef38965ed..9a661c6d0a 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -2566,7 +2566,7 @@ query_prefetch(ns_client_t *client, dns_name_t *qname, break; case ISC_R_SOFTQUOTA: isc_quota_detach(&client->recursionquota); - /* FALLTHROUGH */ + FALLTHROUGH; default: return; } @@ -2784,7 +2784,7 @@ query_rpzfetch(ns_client_t *client, dns_name_t *qname, dns_rdatatype_t type) { break; case ISC_R_SOFTQUOTA: isc_quota_detach(&client->recursionquota); - /* FALLTHROUGH */ + FALLTHROUGH; default: return; } @@ -7247,7 +7247,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) { break; case DNS_RPZ_POLICY_NODATA: qctx->nxrewrite = true; - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_RPZ_POLICY_DNS64: result = DNS_R_NXRRSET; qctx->rpz = true; @@ -10159,7 +10159,7 @@ query_coveringnsec(query_ctx_t *qctx) { { goto cleanup; } - /* FALLTHROUGH */ + FALLTHROUGH; case DNS_R_CNAME: if (!qctx->resuming && !STALE(&rdataset) && rdataset.ttl == 0 && RECURSIONOK(qctx->client)) From 128c550a955635e4ff78f120eb6c94411a2f163d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 11 Oct 2021 12:50:17 +0200 Subject: [PATCH 2/5] Simplify way we tag unreachable code with only ISC_UNREACHABLE() Previously, the unreachable code paths would have to be tagged with: INSIST(0); ISC_UNREACHABLE(); There was also older parts of the code that used comment annotation: /* NOTREACHED */ Unify the handling of unreachable code paths to just use: UNREACHABLE(); The UNREACHABLE() macro now asserts when reached and also uses __builtin_unreachable(); when such builtin is available in the compiler. (cherry picked from commit 584f0d7a7e89f4681b78dee157f7a2807812023a) --- bin/check/named-checkconf.c | 21 ++--- bin/check/named-checkzone.c | 3 +- bin/confgen/tsig-keygen.c | 3 +- bin/delv/delv.c | 9 +-- bin/dig/dig.c | 6 +- bin/dig/dighost.c | 3 +- bin/dnssec/dnssec-keyfromlabel.c | 2 +- bin/dnssec/dnssec-signzone.c | 2 +- bin/dnssec/dnssectool.c | 4 +- bin/named/config.c | 6 +- bin/named/logconf.c | 3 +- bin/named/main.c | 3 +- bin/named/server.c | 47 ++++-------- bin/named/zoneconf.c | 48 ++++-------- bin/rndc/rndc.c | 3 +- bin/tests/system/rpz/dnsrps.c | 6 +- bin/tests/test_client.c | 3 +- bin/tests/test_server.c | 3 +- bin/tests/wire_test.c | 2 +- bin/tools/mdig.c | 6 +- cocci/unreachable.spatch | 13 +++- .../modules/wildcard/dlz_wildcard_dynamic.c | 2 +- doc/dev/style.md | 6 +- lib/bind9/check.c | 6 +- lib/dns/acl.c | 6 +- lib/dns/diff.c | 3 +- lib/dns/dispatch.c | 9 +-- lib/dns/dnsrps.c | 3 +- lib/dns/dnstap.c | 6 +- lib/dns/ds.c | 3 +- lib/dns/ecs.c | 3 +- lib/dns/hmac_link.c | 9 +-- lib/dns/journal.c | 6 +- lib/dns/keymgr.c | 3 +- lib/dns/master.c | 3 +- lib/dns/masterdump.c | 6 +- lib/dns/message.c | 3 +- lib/dns/name.c | 4 +- lib/dns/opensslecdsa_link.c | 3 +- lib/dns/opensslrsa_link.c | 9 +-- lib/dns/peer.c | 3 +- lib/dns/rbt.c | 3 +- lib/dns/rbtdb.c | 5 +- lib/dns/rdata/generic/amtrelay_260.c | 6 +- lib/dns/rdata/generic/loc_29.c | 6 +- lib/dns/rdata/in_1/svcb_64.c | 6 +- lib/dns/resolver.c | 6 +- lib/dns/rpz.c | 15 ++-- lib/dns/rrl.c | 9 +-- lib/dns/sdb.c | 3 +- lib/dns/sdlz.c | 3 +- lib/dns/ssu.c | 6 +- lib/dns/tests/dnstest.c | 2 +- lib/dns/tests/geoip_test.c | 3 +- lib/dns/transport.c | 3 +- lib/dns/tsec.c | 9 +-- lib/dns/update.c | 15 ++-- lib/dns/validator.c | 3 +- lib/dns/xfrin.c | 6 +- lib/dns/zone.c | 12 +-- lib/isc/app.c | 3 +- lib/isc/assertions.c | 1 - lib/isc/include/isc/assertions.h | 5 ++ lib/isc/include/isc/util.h | 10 +-- lib/isc/interfaceiter.c | 3 +- lib/isc/log.c | 3 +- lib/isc/mem.c | 6 +- lib/isc/net.c | 3 +- lib/isc/netaddr.c | 3 +- lib/isc/netmgr/http.c | 6 +- lib/isc/netmgr/netmgr.c | 76 +++++++------------ lib/isc/netmgr/tcp.c | 9 +-- lib/isc/netmgr/tcpdns.c | 9 +-- lib/isc/netmgr/tlsdns.c | 15 ++-- lib/isc/netmgr/tlsstream.c | 3 +- lib/isc/netmgr/udp.c | 9 +-- lib/isc/rwlock.c | 6 +- lib/isc/siphash.c | 6 +- lib/isc/sockaddr.c | 6 +- lib/isc/tls.c | 3 +- lib/isc/url.c | 3 +- lib/isccc/sexpr.c | 3 +- lib/isccfg/aclconf.c | 3 +- lib/isccfg/namedconf.c | 12 +-- lib/isccfg/parser.c | 12 +-- lib/ns/client.c | 24 ++---- lib/ns/query.c | 21 ++--- lib/ns/tests/nstest.c | 2 +- lib/ns/tests/query_test.c | 3 +- lib/ns/xfrout.c | 3 +- 90 files changed, 245 insertions(+), 439 deletions(-) diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index 0594ed157e..06fd59cb8d 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -306,8 +306,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, zone_options &= ~DNS_ZONEOPT_CHECKDUPRR; zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { zone_options |= DNS_ZONEOPT_CHECKDUPRR; @@ -326,8 +325,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, zone_options &= ~DNS_ZONEOPT_CHECKMX; zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { zone_options |= DNS_ZONEOPT_CHECKMX; @@ -357,8 +355,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, zone_options |= DNS_ZONEOPT_WARNMXCNAME; zone_options |= DNS_ZONEOPT_IGNOREMXCNAME; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { zone_options |= DNS_ZONEOPT_WARNMXCNAME; @@ -377,8 +374,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, zone_options |= DNS_ZONEOPT_WARNSRVCNAME; zone_options |= DNS_ZONEOPT_IGNORESRVCNAME; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { zone_options |= DNS_ZONEOPT_WARNSRVCNAME; @@ -401,8 +397,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { zone_options &= ~DNS_ZONEOPT_CHECKSPF; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { zone_options |= DNS_ZONEOPT_CHECKSPF; @@ -420,8 +415,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, zone_options &= ~DNS_ZONEOPT_CHECKNAMES; zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { zone_options |= DNS_ZONEOPT_CHECKNAMES; @@ -437,8 +431,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, } else if (strcasecmp(masterformatstr, "raw") == 0) { masterformat = dns_masterformat_raw; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index 80cdfb55d3..ffee5bcd77 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -147,8 +147,7 @@ main(int argc, char **argv) { } else if (PROGCMP("named-compilezone")) { progmode = progmode_compile; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* Compilation specific defaults */ diff --git a/bin/confgen/tsig-keygen.c b/bin/confgen/tsig-keygen.c index a0d0764112..b34d099faa 100644 --- a/bin/confgen/tsig-keygen.c +++ b/bin/confgen/tsig-keygen.c @@ -121,8 +121,7 @@ main(int argc, char **argv) { } else if (PROGCMP("ddns-confgen")) { progmode = progmode_confgen; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_commandline_errprint = false; diff --git a/bin/delv/delv.c b/bin/delv/delv.c index e98c551bbd..aad09dc414 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -1325,7 +1325,7 @@ dash_option(char *option, char *next, bool *open_type_class) { case 'h': usage(); exit(0); - /* NOTREACHED */ + UNREACHABLE(); case 'i': no_sigs = true; root_validation = false; @@ -1336,10 +1336,9 @@ dash_option(char *option, char *next, bool *open_type_class) { case 'v': fprintf(stderr, "delv %s\n", PACKAGE_VERSION); exit(0); - /* NOTREACHED */ + UNREACHABLE(); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (strlen(option) > 1U) { option = &option[1]; @@ -1477,7 +1476,7 @@ dash_option(char *option, char *next, bool *open_type_class) { fprintf(stderr, "Invalid option: -%s\n", option); usage(); } - /* NOTREACHED */ + UNREACHABLE(); return (false); } diff --git a/bin/dig/dig.c b/bin/dig/dig.c index b1400d817a..f5d932f355 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -2115,7 +2115,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, have_ipv6 = false; } else { fatal("can't find IPv4 networking"); - /* NOTREACHED */ + UNREACHABLE(); return (false); } break; @@ -2125,7 +2125,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, have_ipv4 = false; } else { fatal("can't find IPv6 networking"); - /* NOTREACHED */ + UNREACHABLE(); return (false); } break; @@ -2377,7 +2377,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, fprintf(stderr, "Invalid option: -%s\n", option); usage(); } - /* NOTREACHED */ + UNREACHABLE(); return (false); } diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index fa813901c7..7b68d252ee 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -2468,8 +2468,7 @@ setup_lookup(dig_lookup_t *lookup) { memmove(addr, &sin6->sin6_addr, addrl); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf)); diff --git a/bin/dnssec/dnssec-keyfromlabel.c b/bin/dnssec/dnssec-keyfromlabel.c index 233e12bc11..eca8f86b81 100644 --- a/bin/dnssec/dnssec-keyfromlabel.c +++ b/bin/dnssec/dnssec-keyfromlabel.c @@ -616,7 +616,7 @@ main(int argc, char **argv) { dns_secalg_format(alg, algstr, sizeof(algstr)); fatal("failed to get key %s/%s: %s", namestr, algstr, isc_result_totext(ret)); - /* NOTREACHED */ + UNREACHABLE(); exit(-1); } diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 00564306e6..08aacb3721 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -463,7 +463,7 @@ expecttofindkey(dns_name_t *name) { dns_name_format(name, namestr, sizeof(namestr)); fatal("failure looking for '%s DNSKEY' in database: %s", namestr, isc_result_totext(result)); - /* NOTREACHED */ + UNREACHABLE(); return (false); /* removes a warning */ } diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 095bb59c90..4a0baa4ddb 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -215,7 +215,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) { default: fatal("time value %s is invalid", str); } - /* NOTREACHED */ + UNREACHABLE(); break; case 'W': case 'w': @@ -233,7 +233,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) { default: fatal("time value %s is invalid", str); } - /* NOTREACHED */ + UNREACHABLE(); return (0); /* silence compiler warning */ } diff --git a/bin/named/config.c b/bin/named/config.c index 1860e239ed..9421c612c0 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -454,8 +454,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) { } else if (strcasecmp(str, "redirect") == 0) { ztype = dns_zone_redirect; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ztype); } @@ -1067,8 +1066,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name, *name = dns_tsig_hmacsha512_name; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } if (typep != NULL) { diff --git a/bin/named/logconf.c b/bin/named/logconf.c index af3b4045d9..5fd0904f43 100644 --- a/bin/named/logconf.c +++ b/bin/named/logconf.c @@ -161,8 +161,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) { maxoffset = 0x7fffffffffffffffULL; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } type = ISC_LOG_TOFILE; diff --git a/bin/named/main.c b/bin/named/main.c index e7ed493612..bb4c08bb1b 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -728,8 +728,7 @@ parse_port(char *arg) { named_g_httpport = port; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/bin/named/server.c b/bin/named/server.c index 2b65b01959..3498b5291e 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -866,8 +866,7 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, const char **namestrp, break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); @@ -1273,8 +1272,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af, INSIST(result == ISC_R_SUCCESS); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } sa = *(cfg_obj_assockaddr(obj)); @@ -1296,8 +1294,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af, result = isc_net_probeipv6(); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (result != ISC_R_SUCCESS) { return (ISC_R_SUCCESS); @@ -1401,8 +1398,7 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) { } else if (!strcasecmp(str, "none")) { mode = DNS_RDATASETATTR_NONE; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* @@ -1558,8 +1554,7 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) { } else if (strcasecmp(str, "one-answer") == 0) { CHECK(dns_peer_settransferformat(peer, dns_one_answer)); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2933,7 +2928,7 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin, break; default: REQUIRE(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } event = (catz_chgzone_event_t *)isc_event_allocate( @@ -4329,8 +4324,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, } else if (strcasecmp(str, "ignore") == 0) { view->checknames = false; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } obj = NULL; @@ -4784,8 +4778,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, } else if (strcasecmp(resp, "fail") == 0) { r = DNS_R_SERVFAIL; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_resolver_setquotaresponse(view->resolver, @@ -5184,8 +5177,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, } else if (strcasecmp(str, "no-auth-recursive") == 0) { view->minimalresponses = dns_minimal_noauthrec; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -5198,8 +5190,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, } else if (strcasecmp(str, "one-answer") == 0) { view->transfer_format = dns_one_answer; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } obj = NULL; @@ -5511,8 +5502,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, } else if (strcasecmp(resp, "fail") == 0) { r = DNS_R_SERVFAIL; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_resolver_setquotaresponse(view->resolver, @@ -5739,8 +5729,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, } else if (strcasecmp(levelstr, "none") == 0) { statlevel = dns_zonestat_none; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -6281,8 +6270,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view, } else if (strcasecmp(forwardstr, "only") == 0) { fwdpolicy = dns_fwdpolicy_only; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } } @@ -9588,8 +9576,7 @@ load_configuration(const char *filename, named_server_t *server, } else if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) { server->sctx->cookiealg = ns_cookiealg_aes; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } obj = NULL; @@ -13677,8 +13664,7 @@ newzone_parse(named_server_t *server, char *command, dns_view_t **viewp, } else if (strncasecmp(command, "mod", 3) == 0) { bn = "modzone"; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* @@ -16373,8 +16359,7 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex, CHECK(mkey_destroy(server, view, text)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (viewtxt != NULL) { diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 55f2f35854..9a363b30c3 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -133,8 +133,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig, aclname = "allow-update-forwarding"; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* First check to see if ACL is defined within the zone */ @@ -246,8 +245,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone, } else if (strcasecmp(str, "deny") == 0) { grant = false; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } str = cfg_obj_asstring(matchtype); @@ -759,8 +757,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps, result = named_checknames_get(maps, primary_synonyms, objp); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL); @@ -1041,8 +1038,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(masterformatstr, "raw") == 0) { masterformat = dns_masterformat_raw; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -1065,8 +1061,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(masterstylestr, "relative") == 0) { masterstyle = &dns_master_style_default; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -1159,8 +1154,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(dialupstr, "passive") == 0) { dialup = dns_dialuptype_passive; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } if (raw != NULL) { @@ -1186,8 +1180,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(levelstr, "none") == 0) { statlevel = dns_zonestat_none; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } dns_zone_setstatlevel(zone, statlevel); @@ -1266,8 +1259,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, { notifytype = dns_notifytype_masteronly; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } notifytype = process_notifytype(notifytype, ztype, zname, @@ -1460,8 +1452,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { fail = check = false; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (raw != NULL) { dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMES, check); @@ -1495,8 +1486,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { check = false; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check); @@ -1696,8 +1686,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(arg, "off") == 0) { /* Default */ } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow); dns_zone_setkeyopt(zone, DNS_ZONEKEY_CREATE, false); @@ -1756,8 +1745,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(dupcheck, "ignore") == 0) { fail = check = false; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check); dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRRFAIL, fail); @@ -1773,8 +1761,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { fail = check = false; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check); dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail); @@ -1796,8 +1783,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { warn = ignore = true; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn); dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNOREMXCNAME, ignore); @@ -1813,8 +1799,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { warn = ignore = true; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn); dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNORESRVCNAME, @@ -1837,8 +1822,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, } else if (strcasecmp(arg, "maintain") == 0) { /* Default */ } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 178120d90d..4c43e39ba0 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -592,8 +592,7 @@ rndc_startconnect(isc_sockaddr_t *addr) { */ fatal("UNIX domain sockets not currently supported"); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } atomic_fetch_add_relaxed(&connects, 1); diff --git a/bin/tests/system/rpz/dnsrps.c b/bin/tests/system/rpz/dnsrps.c index dfbe76147f..4f8890873d 100644 --- a/bin/tests/system/rpz/dnsrps.c +++ b/bin/tests/system/rpz/dnsrps.c @@ -83,8 +83,7 @@ main(int argc, char **argv) { #ifdef USE_DNSRPS printf("%s\n", librpz->dnsrpzd_path); #else /* ifdef USE_DNSRPS */ - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); #endif /* ifdef USE_DNSRPS */ return (0); @@ -134,8 +133,7 @@ main(int argc, char **argv) { librpz->client_detach(&client); printf("%u\n", serial); #else /* ifdef USE_DNSRPS */ - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); #endif /* ifdef USE_DNSRPS */ return (0); diff --git a/bin/tests/test_client.c b/bin/tests/test_client.c index 5ba259087e..bd5e543b6d 100644 --- a/bin/tests/test_client.c +++ b/bin/tests/test_client.c @@ -432,8 +432,7 @@ run(void) { } break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } waitforsignal(); diff --git a/bin/tests/test_server.c b/bin/tests/test_server.c index affa92614e..a5b8833963 100644 --- a/bin/tests/test_server.c +++ b/bin/tests/test_server.c @@ -302,8 +302,7 @@ run(void) { } break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } REQUIRE(result == ISC_R_SUCCESS); diff --git a/bin/tests/wire_test.c b/bin/tests/wire_test.c index 3944e3b00b..9f50981f04 100644 --- a/bin/tests/wire_test.c +++ b/bin/tests/wire_test.c @@ -58,7 +58,7 @@ fromhex(char c) { fprintf(stderr, "bad input format: %02x\n", c); exit(3); - /* NOTREACHED */ + UNREACHABLE(); } static void diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 4da54e15ee..12d7bebb4a 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -1698,7 +1698,7 @@ dash_option(const char *option, char *next, struct query *query, bool global, have_ipv6 = false; } else { fatal("can't find IPv4 networking"); - /* NOTREACHED */ + UNREACHABLE(); return (false); } break; @@ -1709,7 +1709,7 @@ dash_option(const char *option, char *next, struct query *query, bool global, have_ipv4 = false; } else { fatal("can't find IPv6 networking"); - /* NOTREACHED */ + UNREACHABLE(); return (false); } break; @@ -1817,7 +1817,7 @@ dash_option(const char *option, char *next, struct query *query, bool global, fprintf(stderr, "Invalid option: -%s\n", option); usage(); } - /* NOTREACHED */ + UNREACHABLE(); return (false); } diff --git a/cocci/unreachable.spatch b/cocci/unreachable.spatch index 0cc368a516..100f1a0abe 100644 --- a/cocci/unreachable.spatch +++ b/cocci/unreachable.spatch @@ -1,6 +1,13 @@ @@ @@ - INSIST(0); -+ ISC_UNREACHABLE(); - ... when != ISC_UNREACHABLE(); +- INSIST(0); ++ UNREACHABLE(); + ... when != UNREACHABLE(); + +@@ +@@ + +- INSIST(0); +- ISC_UNREACHABLE(); ++ UNREACHABLE(); diff --git a/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c b/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c index 9edcffe9ce..3cb3ee1106 100644 --- a/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c +++ b/contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c @@ -699,7 +699,7 @@ fnmatch(const char *pattern, const char *string, int flags) { break; } } - /* NOTREACHED */ + UNREACHABLE(); } static int diff --git a/doc/dev/style.md b/doc/dev/style.md index 3a71b85995..7551211c02 100644 --- a/doc/dev/style.md +++ b/doc/dev/style.md @@ -142,12 +142,10 @@ Good: static char * c /* Description of 'c'. */ -The following lint and lint-like comments should be used where appropriate: +The following macros should be used where appropriate: - /* ARGSUSED */ FALLTHROUGH; - /* NOTREACHED */ - /* VARARGS */ + UNREACHABLE(); #### Header files diff --git a/lib/bind9/check.c b/lib/bind9/check.c index a88aac6ad3..591a4b972b 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -2656,8 +2656,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } for (element2 = cfg_list_first(typelist); element2 != NULL; @@ -3056,8 +3055,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/dns/acl.c b/lib/dns/acl.c index 1dfbf33675..f38ce3b64b 100644 --- a/lib/dns/acl.c +++ b/lib/dns/acl.c @@ -464,8 +464,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr, const dns_name_t *reqsigner, return (dns_geoip_match(reqaddr, env->geoip, &e->geoip_elem)); #endif /* if defined(HAVE_GEOIP2) */ default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } result = dns_acl_match(reqaddr, reqsigner, inner, env, &indirectmatch, @@ -658,8 +657,7 @@ dns_acl_isinsecure(const dns_acl_t *a) { return (true); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/dns/diff.c b/lib/dns/diff.c index 9c2a2516f7..f5f7cef11c 100644 --- a/lib/dns/diff.c +++ b/lib/dns/diff.c @@ -372,8 +372,7 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) { &ardataset); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (result == ISC_R_SUCCESS) { diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 0fcac79d3c..c7e683b931 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -1543,8 +1543,7 @@ dispatch_getnext(dns_dispatch_t *disp, dns_dispentry_t *resp, int32_t timeout) { break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -1710,8 +1709,7 @@ startrecv(isc_nmhandle_t *handle, dns_dispatch_t *disp, dns_dispentry_t *resp) { break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -1838,8 +1836,7 @@ dns_dispatch_connect(dns_dispentry_t *resp) { break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } break; diff --git a/lib/dns/dnsrps.c b/lib/dns/dnsrps.c index 9ff55b27a4..30b7052b3e 100644 --- a/lib/dns/dnsrps.c +++ b/lib/dns/dnsrps.c @@ -311,8 +311,7 @@ dns_dnsrps_2policy(librpz_policy_t rps_policy) { case LIBRPZ_POLICY_GIVEN: case LIBRPZ_POLICY_DISABLED: default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/dns/dnstap.c b/lib/dns/dnstap.c index 44e5f6e160..e013ec27fa 100644 --- a/lib/dns/dnstap.c +++ b/lib/dns/dnstap.c @@ -635,8 +635,7 @@ dnstap_type(dns_dtmsgtype_t msgtype) { case DNS_DTTYPE_UR: return (DNSTAP__MESSAGE__TYPE__UPDATE_RESPONSE); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -985,8 +984,7 @@ dns_dt_open(const char *filename, dns_dtmode_t mode, isc_mem_t *mctx, result = ISC_R_NOTIMPLEMENTED; goto cleanup; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_mem_attach(mctx, &handle->mctx); diff --git a/lib/dns/ds.c b/lib/dns/ds.c index 7b39d85300..22f158bd71 100644 --- a/lib/dns/ds.c +++ b/lib/dns/ds.c @@ -63,8 +63,7 @@ dns_ds_fromkeyrdata(const dns_name_t *owner, dns_rdata_t *key, break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } name = dns_fixedname_initname(&fname); diff --git a/lib/dns/ecs.c b/lib/dns/ecs.c index ae88c4713e..8dbf720f64 100644 --- a/lib/dns/ecs.c +++ b/lib/dns/ecs.c @@ -66,8 +66,7 @@ dns_ecs_equals(const dns_ecs_t *ecs1, const dns_ecs_t *ecs2) { addr2 = (const unsigned char *)&ecs2->addr.type.in6; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* diff --git a/lib/dns/hmac_link.c b/lib/dns/hmac_link.c index 244e1f1577..5764a0ff07 100644 --- a/lib/dns/hmac_link.c +++ b/lib/dns/hmac_link.c @@ -370,8 +370,7 @@ hmac__get_tag_key(const isc_md_type_t *type) { } else if (type == ISC_MD_SHA512) { return (TAG_HMACSHA512_KEY); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -390,8 +389,7 @@ hmac__get_tag_bits(const isc_md_type_t *type) { } else if (type == ISC_MD_SHA512) { return (TAG_HMACSHA512_BITS); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -443,8 +441,7 @@ hmac__to_dst_alg(const isc_md_type_t *type) { } else if (type == ISC_MD_SHA512) { return (DST_ALG_HMACSHA512); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/dns/journal.c b/lib/dns/journal.c index 89ac28c4f9..d9aee371c6 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -825,8 +825,7 @@ ixfr_order(const void *av, const void *bv) { aop = 0; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } switch (b->op) { @@ -839,8 +838,7 @@ ixfr_order(const void *av, const void *bv) { bop = 0; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } r = bop - aop; diff --git a/lib/dns/keymgr.c b/lib/dns/keymgr.c index 2e0aee466c..204298548a 100644 --- a/lib/dns/keymgr.c +++ b/lib/dns/keymgr.c @@ -1366,8 +1366,7 @@ keymgr_transition_time(dns_dnsseckey_t *key, int type, } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); break; } diff --git a/lib/dns/master.c b/lib/dns/master.c index 020e4a1b8d..a9cfe4d4fa 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -540,8 +540,7 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx, unsigned int options, lctx->load = load_raw; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (lex != NULL) { diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index ae2e815c86..e2743de806 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -1580,8 +1580,7 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version, dctx->dumpsets = dump_rdatasets_raw; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } result = totext_ctx_init(style, NULL, &dctx->tctx); @@ -1701,8 +1700,7 @@ writeheader(dns_dumpctx_t *dctx) { break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_mem_put(dctx->mctx, buffer.base, buffer.length); diff --git a/lib/dns/message.c b/lib/dns/message.c index 04a3345226..31d92a96ca 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -883,8 +883,7 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg, } } - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } static isc_result_t diff --git a/lib/dns/name.c b/lib/dns/name.c index 2a8f9a5d77..d9d55eb4f1 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -1475,7 +1475,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options, } else { FATAL_ERROR(__FILE__, __LINE__, "Unexpected label type %02x", count); - /* NOTREACHED */ + UNREACHABLE(); } /* @@ -1599,7 +1599,7 @@ dns_name_tofilenametext(const dns_name_t *name, bool omit_final_dot, } else { FATAL_ERROR(__FILE__, __LINE__, "Unexpected label type %02x", count); - /* NOTREACHED */ + UNREACHABLE(); } /* diff --git a/lib/dns/opensslecdsa_link.c b/lib/dns/opensslecdsa_link.c index f1cb63eb0e..519e88b7e7 100644 --- a/lib/dns/opensslecdsa_link.c +++ b/lib/dns/opensslecdsa_link.c @@ -1153,8 +1153,7 @@ dst__key_to_eckey(dst_key_t *key, EC_KEY **eckey) { group_nid = NID_secp384r1; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } *eckey = EC_KEY_new_by_curve_name(group_nid); diff --git a/lib/dns/opensslrsa_link.c b/lib/dns/opensslrsa_link.c index 2e39bf69e2..be1998e381 100644 --- a/lib/dns/opensslrsa_link.c +++ b/lib/dns/opensslrsa_link.c @@ -83,8 +83,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } evp_md_ctx = EVP_MD_CTX_create(); @@ -104,8 +103,7 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) { type = EVP_sha512(); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) { @@ -426,8 +424,7 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (exp == 0) { diff --git a/lib/dns/peer.c b/lib/dns/peer.c index 2ada841655..bac2624e09 100644 --- a/lib/dns/peer.c +++ b/lib/dns/peer.c @@ -251,8 +251,7 @@ dns_peer_new(isc_mem_t *mem, const isc_netaddr_t *addr, dns_peer_t **peerptr) { prefixlen = 128; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (dns_peer_newprefix(mem, addr, prefixlen, peerptr)); diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index 9ebe4e50f2..fd6fb1f427 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -1805,8 +1805,7 @@ nexttable: } /* We haven't found any matching node, this should not be possible. */ - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } static inline void diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 8757fbd5ab..79c65ae9ce 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -4440,7 +4440,7 @@ zone_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options, FATAL_ERROR(__FILE__, __LINE__, "zone_findzonecut() called!"); - /* NOTREACHED */ + UNREACHABLE(); return (ISC_R_NOTIMPLEMENTED); } @@ -7606,8 +7606,7 @@ nodecount(dns_db_t *db, dns_dbtree_t tree) { count = dns_rbt_nodecount(rbtdb->nsec3); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read); diff --git a/lib/dns/rdata/generic/amtrelay_260.c b/lib/dns/rdata/generic/amtrelay_260.c index dfe4685a51..aa4beee9da 100644 --- a/lib/dns/rdata/generic/amtrelay_260.c +++ b/lib/dns/rdata/generic/amtrelay_260.c @@ -116,8 +116,7 @@ fromtext_amtrelay(ARGS_FROMTEXT) { return (dns_name_fromtext(&name, &buffer, origin, options, target)); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -178,8 +177,7 @@ totext_amtrelay(ARGS_TOTEXT) { return (dns_name_totext(&name, false, target)); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); } diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index 4c203a4de3..d6632e6149 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -272,8 +272,7 @@ loc_getlatitude(isc_lex_t *lexer, unsigned long *latitude) { *latitude = 0x80000000 - (d1 * 3600 + m1 * 60) * 1000 - s1; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); @@ -294,8 +293,7 @@ loc_getlongitude(isc_lex_t *lexer, unsigned long *longitude) { *longitude = 0x80000000 - (d2 * 3600 + m2 * 60) * 1000 - s2; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); diff --git a/lib/dns/rdata/in_1/svcb_64.c b/lib/dns/rdata/in_1/svcb_64.c index e783f06083..f79445a6ec 100644 --- a/lib/dns/rdata/in_1/svcb_64.c +++ b/lib/dns/rdata/in_1/svcb_64.c @@ -322,8 +322,7 @@ svc_fromtext(isc_textregion_t *region, isc_buffer_t *target) { RETERR(svcsortkeylist(target, used)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } len = isc_buffer_usedlength(target) - @@ -732,8 +731,7 @@ generic_totext_in_svcb(ARGS_TOTEXT) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } return (ISC_R_SUCCESS); diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index e30ab28fb1..7702d5a93c 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -2310,8 +2310,7 @@ addr2buf(void *buf, const size_t bufsize, const isc_sockaddr_t *sockaddr) { memmove(buf, &netaddr.type.in6, 16); return (16); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (0); } @@ -7091,8 +7090,7 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname, RUNTIME_CHECK(result == ISC_R_SUCCESS); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (chainingp != NULL) { diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index d699c3d497..980ae85103 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -280,8 +280,7 @@ dns_rpz_policy2str(dns_rpz_policy_t policy) { str = "DNS64"; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (str); } @@ -345,8 +344,7 @@ make_addr_set(dns_rpz_addr_zbits_t *tgt_set, dns_rpz_zbits_t zbits, tgt_set->nsip = zbits; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -363,8 +361,7 @@ make_nm_set(dns_rpz_nm_zbits_t *tgt_set, dns_rpz_num_t rpz_num, tgt_set->ns = DNS_RPZ_ZBIT(rpz_num); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -619,8 +616,7 @@ adj_trigger_cnt(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num, } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (inc) { @@ -2672,8 +2668,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type, rpz_num = zbit_to_num(found->set.nsip & tgt_set.nsip); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } result = ip2name(&found->ip, found->prefix, dns_rootname, ip_name); RWUNLOCK(&rpzs->search_lock, isc_rwlocktype_read); diff --git a/lib/dns/rrl.c b/lib/dns/rrl.c index 142b47fd1d..9d3c8f6fa3 100644 --- a/lib/dns/rrl.c +++ b/lib/dns/rrl.c @@ -482,8 +482,7 @@ get_rate(dns_rrl_t *rrl, dns_rrl_rtype_t rtype) { case DNS_RRL_RTYPE_ALL: return (&rrl->all_per_second); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -852,8 +851,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e, const char *str1, ADD_LOG_CSTR(&lb, "slip "); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } switch (e->key.s.rtype) { @@ -881,8 +879,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e, const char *str1, ADD_LOG_CSTR(&lb, "all "); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (plural) { diff --git a/lib/dns/sdb.c b/lib/dns/sdb.c index 54e9b48018..2608c294c2 100644 --- a/lib/dns/sdb.c +++ b/lib/dns/sdb.c @@ -1069,8 +1069,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) { UNUSED(db); UNUSED(node); UNUSED(now); - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } static void diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index ba50846794..9b2af6d0ed 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -736,8 +736,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) { UNUSED(db); UNUSED(node); UNUSED(now); - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } static void diff --git a/lib/dns/ssu.c b/lib/dns/ssu.c index a254c610f4..92db924469 100644 --- a/lib/dns/ssu.c +++ b/lib/dns/ssu.c @@ -227,8 +227,7 @@ reverse_from_address(dns_name_t *tcpself, const isc_netaddr_t *tcpaddr) { RUNTIME_CHECK(result < sizeof(buf)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_buffer_init(&b, buf, strlen(buf)); isc_buffer_add(&b, strlen(buf)); @@ -269,8 +268,7 @@ stf_from_address(dns_name_t *stfself, const isc_netaddr_t *tcpaddr) { RUNTIME_CHECK(result < sizeof(buf)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_buffer_init(&b, buf, strlen(buf)); isc_buffer_add(&b, strlen(buf)); diff --git a/lib/dns/tests/dnstest.c b/lib/dns/tests/dnstest.c index 47ff71644d..e3da9d4785 100644 --- a/lib/dns/tests/dnstest.c +++ b/lib/dns/tests/dnstest.c @@ -372,7 +372,7 @@ fromhex(char c) { printf("bad input format: %02x\n", c); exit(3); - /* NOTREACHED */ + UNREACHABLE(); } /* diff --git a/lib/dns/tests/geoip_test.c b/lib/dns/tests/geoip_test.c index 2523c7b8f0..abe64f9e4e 100644 --- a/lib/dns/tests/geoip_test.c +++ b/lib/dns/tests/geoip_test.c @@ -120,8 +120,7 @@ entry_exists(dns_geoip_subtype_t subtype, const char *addr) { } else if (inet_pton(AF_INET, addr, &in4) == 1) { isc_netaddr_fromin(&na, &in4); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } db = geoip2_database(&geoip, fix_subtype(&geoip, subtype)); diff --git a/lib/dns/transport.c b/lib/dns/transport.c index 7937f2d210..e7fbb70ac3 100644 --- a/lib/dns/transport.c +++ b/lib/dns/transport.c @@ -327,8 +327,7 @@ dns_transport_get_prefer_server_ciphers(const dns_transport_t *transport, return (true); } - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); return false; } diff --git a/lib/dns/tsec.c b/lib/dns/tsec.c index 6127cf34e9..fcb761348b 100644 --- a/lib/dns/tsec.c +++ b/lib/dns/tsec.c @@ -91,8 +91,7 @@ dns_tsec_create(isc_mem_t *mctx, dns_tsectype_t type, dst_key_t *key, tsec->ukey.key = key; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } tsec->magic = DNS_TSEC_MAGIC; @@ -118,8 +117,7 @@ dns_tsec_destroy(dns_tsec_t **tsecp) { dst_key_free(&tsec->ukey.key); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } tsec->magic = 0; @@ -146,7 +144,6 @@ dns_tsec_getkey(dns_tsec_t *tsec, void *keyp) { *(dst_key_t **)keyp = tsec->ukey.key; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/dns/update.c b/lib/dns/update.c index 610643b807..9241b1cad6 100644 --- a/lib/dns/update.c +++ b/lib/dns/update.c @@ -1970,8 +1970,7 @@ next_state: state->keyset_kskonly)); sigs++; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link); ISC_LIST_APPEND(state->work.tuples, t, link); @@ -2145,8 +2144,7 @@ next_state: state->keyset_kskonly)); sigs++; } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } ISC_LIST_UNLINK(state->nsec_mindiff.tuples, t, link); ISC_LIST_APPEND(state->work.tuples, t, link); @@ -2173,8 +2171,7 @@ next_state: INSIST(ISC_LIST_EMPTY(state->nsec_mindiff.tuples)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } failure: @@ -2234,8 +2231,7 @@ dns__update_soaserial(uint32_t serial, dns_updatemethod_t method) { } return (serial); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2266,8 +2262,7 @@ dns_update_soaserial(uint32_t serial, dns_updatemethod_t method, } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (used != NULL) { diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 5014e500fb..64f876f807 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -3085,8 +3085,7 @@ validator_start(isc_task_t *task, isc_event_t *event) { result = validate_nx(val, false); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (result != DNS_R_WAIT) { diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 2136cb7fc5..5df10d3ded 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -682,8 +682,7 @@ redo: FAIL(DNS_R_EXTRADATA); FALLTHROUGH; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } result = ISC_R_SUCCESS; failure: @@ -1029,8 +1028,7 @@ xfrin_start(dns_xfrin_ctx_t *xfr) { connect_xfr, 30000, 0, tlsctx); } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 245e75e21b..7ae8a14700 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -10135,8 +10135,7 @@ normalize_key(dns_rdata_t *rr, dns_rdata_t *target, unsigned char *data, &dnskey, &buf); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); } @@ -18172,8 +18171,7 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } UNLOCK_ZONE(zone); INSIST(isc_sockaddr_pf(&primaryaddr) == isc_sockaddr_pf(&sourceaddr)); @@ -19962,8 +19960,7 @@ dns_zone_setdialup(dns_zone_t *zone, dns_dialuptype_t dialup) { DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOREFRESH); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } UNLOCK_ZONE(zone); } @@ -20045,8 +20042,7 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_read); diff --git a/lib/isc/app.c b/lib/isc/app.c index d5bf097e99..d02371c950 100644 --- a/lib/isc/app.c +++ b/lib/isc/app.c @@ -245,8 +245,7 @@ isc_app_ctxrun(isc_appctx_t *ctx) { true); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } } else { diff --git a/lib/isc/assertions.c b/lib/isc/assertions.c index 5470d81715..8b954cf475 100644 --- a/lib/isc/assertions.c +++ b/lib/isc/assertions.c @@ -48,7 +48,6 @@ isc_assertion_failed(const char *file, int line, isc_assertiontype_t type, const char *cond) { isc_assertion_failed_cb(file, line, type, cond); abort(); - /* NOTREACHED */ } /*% Set callback. */ diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h index 7045179cba..d5dbced853 100644 --- a/lib/isc/include/isc/assertions.h +++ b/lib/isc/include/isc/assertions.h @@ -66,4 +66,9 @@ isc_assertion_typetotext(isc_assertiontype_t type); isc_assertiontype_invariant, #cond), \ 0))) +#define ISC_UNREACHABLE() \ + (isc_assertion_failed(__FILE__, __LINE__, isc_assertiontype_insist, \ + "unreachable"), \ + __builtin_unreachable()) + ISC_LANG_ENDDECLS diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index d0cd0197d3..63d3af340c 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -218,12 +218,6 @@ * Performance */ -#ifdef HAVE_BUILTIN_UNREACHABLE -#define ISC_UNREACHABLE() __builtin_unreachable(); -#else /* ifdef HAVE_BUILTIN_UNREACHABLE */ -#define ISC_UNREACHABLE() -#endif /* ifdef HAVE_BUILTIN_UNREACHABLE */ - /* GCC defines __SANITIZE_ADDRESS__, so reuse the macro for clang */ #if __has_feature(address_sanitizer) #define __SANITIZE_ADDRESS__ 1 @@ -278,6 +272,8 @@ mock_assert(const int result, const char *const expression, ((!(expression)) \ ? (mock_assert(0, #expression, __FILE__, __LINE__), abort()) \ : (void)0) +#define UNREACHABLE() \ + (mock_assert(0, "unreachable", __FILE__, __LINE__), abort()) #define _assert_true(c, e, f, l) \ ((c) ? (void)0 : (_assert_true(0, e, f, l), abort())) #define _assert_int_equal(a, b, f, l) \ @@ -300,6 +296,8 @@ mock_assert(const int result, const char *const expression, /*% Invariant Assertion */ #define INVARIANT(e) ISC_INVARIANT(e) +#define UNREACHABLE() ISC_UNREACHABLE() + #endif /* UNIT_TESTING */ /* diff --git a/lib/isc/interfaceiter.c b/lib/isc/interfaceiter.c index 54b13eba65..abb16f4b6d 100644 --- a/lib/isc/interfaceiter.c +++ b/lib/isc/interfaceiter.c @@ -125,8 +125,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src, } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/isc/log.c b/lib/isc/log.c index f41c39237d..95c3e6b05d 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -707,8 +707,7 @@ isc_log_createchannel(isc_logconfig_t *lcfg, const char *name, break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } ISC_LIST_PREPEND(lcfg->channels, channel, link); diff --git a/lib/isc/mem.c b/lib/isc/mem.c index f21954b65a..ea6d4cc95e 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -319,8 +319,7 @@ delete_trace_entry(isc_mem_t *mctx, const void *ptr, size_t size, * If we get here, we didn't find the item on the list. We're * screwed. */ - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); unlock: MCTXUNLOCK(mctx); } @@ -1436,8 +1435,7 @@ isc__mem_checkdestroyed(void) { print_contexts(file); } #endif /* if ISC_MEM_TRACKLINES */ - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } UNLOCK(&contextslock); } diff --git a/lib/isc/net.c b/lib/isc/net.c index 9a72083760..5525762d93 100644 --- a/lib/isc/net.c +++ b/lib/isc/net.c @@ -506,8 +506,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) { break; #endif /* ifdef IPV6_TCLASS */ default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (sendmsg(s, &msg, 0) < 0) { diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c index 9ccf12e74b..940fbf0370 100644 --- a/lib/isc/netaddr.c +++ b/lib/isc/netaddr.c @@ -352,8 +352,7 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) { t->zone = 0; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index 0d06c1b902..d09ad5b8c7 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -2107,8 +2107,7 @@ server_on_request_recv(nghttp2_session *ngsession, INSIST(socket->h2.content_length > 0); isc_buffer_usedregion(&socket->h2.rbuf, &data); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } server_call_cb(socket, session, ISC_R_SUCCESS, &data); @@ -2671,8 +2670,7 @@ isc__nm_http_stoplistening(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closing, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (!isc__nm_in_netthread()) { diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 18545a8394..e8c2c71b6a 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -521,8 +521,7 @@ isc__netmgr_destroy(isc_nm_t **netmgrp) { #ifdef NETMGR_TRACE if (isc_refcount_current(&mgr->references) > 1) { isc__nm_dump_active(mgr); - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } #endif @@ -720,8 +719,7 @@ process_all_queues(isc__networker_t *worker) { reschedule = true; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -799,8 +797,7 @@ isc__nm_async_task(isc__networker_t *worker, isc__netievent_t *ev0) { case ISC_R_SUCCESS: return; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -928,8 +925,7 @@ process_netievent(isc__networker_t *worker, isc__netievent_t *ievent) { NETIEVENT_CASE(resume); NETIEVENT_CASE_NOMORE(pause); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (true); } @@ -1080,8 +1076,7 @@ isc__nm_enqueue_ievent(isc__networker_t *worker, isc__netievent_t *event) { } else { switch (event->type) { case netievent_prio: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); break; case netievent_privilegedtask: type = NETIEVENT_PRIVILEGED; @@ -1468,8 +1463,7 @@ isc___nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr, isc_nmsocket_type type, */ break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } break; case isc_nm_tcpsocket: @@ -1488,8 +1482,7 @@ isc___nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr, isc_nmsocket_type type, sock->statsindex = tcp6statsindex; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } break; default: @@ -1928,8 +1921,7 @@ isc__nm_failed_read_cb(isc_nmsocket_t *sock, isc_result_t result, bool async) { isc__nm_tlsdns_failed_read_cb(sock, result, async); return; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2149,8 +2141,7 @@ isc__nm_alloc_cb(uv_handle_t *handle, size_t size, uv_buf_t *buf) { buf->len = ISC_NETMGR_TCP_RECVBUF_SIZE; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } REQUIRE(buf->len <= ISC_NETMGR_RECVBUF_SIZE); @@ -2189,8 +2180,7 @@ isc__nm_start_reading(isc_nmsocket_t *sock) { UV_RUNTIME_CHECK(uv_read_start, r); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } atomic_store(&sock->reading, true); } @@ -2215,8 +2205,7 @@ isc__nm_stop_reading(isc_nmsocket_t *sock) { UV_RUNTIME_CHECK(uv_read_stop, r); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } atomic_store(&sock->reading, false); } @@ -2241,8 +2230,7 @@ processbuffer(isc_nmsocket_t *sock) { case isc_nm_tlsdnssocket: return (isc__nm_tlsdns_processbuffer(sock)); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2523,8 +2511,7 @@ isc_nm_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb, break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2554,8 +2541,7 @@ isc_nm_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg) { break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2582,8 +2568,7 @@ isc_nm_cancelread(isc_nmhandle_t *handle) { break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2603,8 +2588,7 @@ isc_nm_pauseread(isc_nmhandle_t *handle) { break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2624,8 +2608,7 @@ isc_nm_resumeread(isc_nmhandle_t *handle) { break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2655,8 +2638,7 @@ isc_nm_stoplistening(isc_nmsocket_t *sock) { break; #endif default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -2837,7 +2819,7 @@ isc__nmsocket_reset(isc_nmsocket_t *sock) { break; default: INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); break; } @@ -2879,8 +2861,7 @@ isc__nmsocket_shutdown(isc_nmsocket_t *sock) { case isc_nm_tlsdnslistener: return; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -3357,8 +3338,7 @@ isc__nm_set_network_buffers(isc_nm_t *nm, uv_handle_t *handle) { atomic_load_relaxed(&nm->send_udp_buffer_size); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (recv_buffer_size > 0) { @@ -3455,8 +3435,7 @@ isc_nm_sequential(isc_nmhandle_t *handle) { case isc_nm_httpsocket: return; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* @@ -3499,8 +3478,7 @@ isc_nm_bad_request(isc_nmhandle_t *handle) { case isc_nm_tlssocket: #endif /* HAVE_LIBNGHTTP2 */ default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); break; } } @@ -3523,8 +3501,7 @@ isc_nm_xfr_allowed(isc_nmhandle_t *handle) { return (false); } - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); return (false); } @@ -3568,7 +3545,7 @@ isc_nm_set_maxage(isc_nmhandle_t *handle, const uint32_t ttl) { #endif /* HAVE_LIBNGHTTP2 */ default: INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); break; } } @@ -3637,8 +3614,7 @@ nmsocket_type_totext(isc_nmsocket_type type) { case isc_nm_httpsocket: return ("isc_nm_httpsocket"); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 85edea5df6..9fc80c4d20 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -647,8 +647,7 @@ isc__nm_tcp_stoplistening(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closing, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (!isc__nm_in_netthread()) { @@ -1158,8 +1157,7 @@ tcp_stop_cb(uv_handle_t *handle) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); @@ -1177,8 +1175,7 @@ tcp_close_sock(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); diff --git a/lib/isc/netmgr/tcpdns.c b/lib/isc/netmgr/tcpdns.c index a0d7961ff8..53c2f30ff2 100644 --- a/lib/isc/netmgr/tcpdns.c +++ b/lib/isc/netmgr/tcpdns.c @@ -613,8 +613,7 @@ isc__nm_tcpdns_stoplistening(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closing, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (!isc__nm_in_netthread()) { @@ -1210,8 +1209,7 @@ tcpdns_stop_cb(uv_handle_t *handle) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); @@ -1229,8 +1227,7 @@ tcpdns_close_sock(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); diff --git a/lib/isc/netmgr/tlsdns.c b/lib/isc/netmgr/tlsdns.c index 1347666232..4864fcc477 100644 --- a/lib/isc/netmgr/tlsdns.c +++ b/lib/isc/netmgr/tlsdns.c @@ -685,8 +685,7 @@ isc__nm_tlsdns_stoplistening(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closing, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (!isc__nm_in_netthread()) { @@ -760,8 +759,7 @@ isc__nm_async_tlsdnsshutdown(isc__networker_t *worker, isc__netievent_t *ev0) { tls_shutdown(sock); return; case 0: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); case SSL_ERROR_ZERO_RETURN: tls_error(sock, ISC_R_EOF); break; @@ -1737,8 +1735,7 @@ tlsdns_send_direct(isc_nmsocket_t *sock, isc__nm_uvreq_t *req) { case SSL_ERROR_WANT_READ: break; case 0: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); default: return (ISC_R_TLSERROR); } @@ -1764,8 +1761,7 @@ tlsdns_stop_cb(uv_handle_t *handle) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); @@ -1788,8 +1784,7 @@ tlsdns_close_sock(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); diff --git a/lib/isc/netmgr/tlsstream.c b/lib/isc/netmgr/tlsstream.c index 6df651f204..252b52da9f 100644 --- a/lib/isc/netmgr/tlsstream.c +++ b/lib/isc/netmgr/tlsstream.c @@ -856,8 +856,7 @@ isc__nm_tls_stoplistening(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closing, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } atomic_store(&sock->listening, false); diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index 1067f01533..3a43cd3b84 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -516,8 +516,7 @@ isc__nm_udp_stoplistening(isc_nmsocket_t *sock) { if (!atomic_compare_exchange_strong(&sock->closing, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } if (!isc__nm_in_netthread()) { @@ -1175,8 +1174,7 @@ udp_stop_cb(uv_handle_t *handle) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); @@ -1197,8 +1195,7 @@ udp_close_cb(uv_handle_t *handle) { if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false }, true)) { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc__nm_incstats(sock, STATID_CLOSE); diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 4c11feb518..c76ea74dda 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -62,8 +62,7 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } return (ISC_R_SUCCESS); } @@ -94,8 +93,7 @@ isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { case EAGAIN: return (ISC_R_LOCKBUSY); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/isc/siphash.c b/lib/isc/siphash.c index 0f83ef5f2e..1a863ff8e1 100644 --- a/lib/isc/siphash.c +++ b/lib/isc/siphash.c @@ -142,8 +142,7 @@ isc_siphash24(const uint8_t *k, const uint8_t *in, const size_t inlen, case 0: break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } v3 ^= b; @@ -208,8 +207,7 @@ isc_halfsiphash24(const uint8_t *k, const uint8_t *in, const size_t inlen, case 0: break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } v3 ^= b; diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c index e2f363ef1b..85b3d28439 100644 --- a/lib/isc/sockaddr.c +++ b/lib/isc/sockaddr.c @@ -295,8 +295,7 @@ isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int pf) { isc_sockaddr_any6(sockaddr); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -366,8 +365,7 @@ isc_sockaddr_fromnetaddr(isc_sockaddr_t *sockaddr, const isc_netaddr_t *na, sockaddr->type.sin6.sin6_port = htons(port); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } ISC_LINK_INIT(sockaddr, link); } diff --git a/lib/isc/tls.c b/lib/isc/tls.c index a726d94aeb..b71cdd6aad 100644 --- a/lib/isc/tls.c +++ b/lib/isc/tls.c @@ -511,8 +511,7 @@ get_tls_version_disable_bit(const isc_tls_protocol_version_t tls_ver) { #endif break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); break; }; diff --git a/lib/isc/url.c b/lib/isc/url.c index 8758496e5b..7f61874341 100644 --- a/lib/isc/url.c +++ b/lib/isc/url.c @@ -596,8 +596,7 @@ isc_url_parse(const char *buf, size_t buflen, bool is_connect, break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* Nothing's changed; soldier on */ diff --git a/lib/isccc/sexpr.c b/lib/isccc/sexpr.c index c703710c46..62c80c46ed 100644 --- a/lib/isccc/sexpr.c +++ b/lib/isccc/sexpr.c @@ -211,8 +211,7 @@ isccc_sexpr_print(isccc_sexpr_t *sexpr, FILE *stream) { } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index d03dc40fe3..716ffe6cee 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -399,8 +399,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype, } return (subtype); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index c763182c89..04c555a5ac 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -3171,8 +3171,7 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { } else if ((*flagp & CFG_ADDR_V6OK) != 0) { isc_netaddr_any6(&netaddr); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } for (;;) { @@ -3257,8 +3256,7 @@ doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) { } else if ((*flagp & CFG_ADDR_V6OK) != 0) { cfg_print_cstr(pctx, ""); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } cfg_print_cstr(pctx, " | * ) [ port ( | * ) ] ) | " "( [ [ address ] ( "); @@ -3267,8 +3265,7 @@ doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) { } else if ((*flagp & CFG_ADDR_V6OK) != 0) { cfg_print_cstr(pctx, ""); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } cfg_print_cstr(pctx, " | * ) ] port ( | * ) ) )" " [ dscp ]"); @@ -3892,8 +3889,7 @@ cfg_print_zonegrammar(const unsigned int zonetype, unsigned int flags, /* no zone type is specified for these */ break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } for (clause = clauses; clause->name != NULL; clause++) { diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 1b4e164725..eeea6e7790 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -423,8 +423,7 @@ cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name) { return (tupleobj->value.tuple[i]); } } - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_result_t @@ -2679,8 +2678,7 @@ cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) { } else if (result == ISC_R_NOTFOUND) { /* do nothing */ } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } } @@ -3015,8 +3013,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) { isc_netaddr_any6(na); return (ISC_R_SUCCESS); } else { - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { if ((flags & (CFG_ADDR_V4OK | CFG_ADDR_V4PREFIXOK)) != 0) { @@ -3294,8 +3291,7 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type, addrlen = 128; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } expectprefix = (result == ISC_R_IPV4PREFIX); CHECK(cfg_peektoken(pctx, 0)); diff --git a/lib/ns/client.c b/lib/ns/client.c index fc766f793b..7c291836b2 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -678,8 +678,7 @@ renderend: ISC_MIN((int)respsize / 16, 256)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { #ifdef HAVE_DNSTAP @@ -708,8 +707,7 @@ renderend: ISC_MIN((int)respsize / 16, 256)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -1072,8 +1070,7 @@ no_nsid: memmove(addr, &client->ecs.addr.type, addrl); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_buffer_init(&buf, ecs, sizeof(ecs)); @@ -1193,8 +1190,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce, inputlen = 32; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } isc_siphash24(secret, input, inputlen, digest); @@ -1235,8 +1231,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce, digest); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } for (i = 0; i < 8; i++) { digest[i] ^= digest[i + 8]; @@ -1246,8 +1241,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce, } default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } @@ -1871,8 +1865,7 @@ ns__client_request(isc_nmhandle_t *handle, isc_result_t eresult, ISC_MIN((int)reqsize / 16, 18)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } else { switch (isc_sockaddr_pf(&client->peeraddr)) { @@ -1885,8 +1878,7 @@ ns__client_request(isc_nmhandle_t *handle, isc_result_t eresult, ISC_MIN((int)reqsize / 16, 18)); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/ns/query.c b/lib/ns/query.c index 9a661c6d0a..253baa42d5 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -2731,8 +2731,7 @@ rpz_get_zbits(ns_client_t *client, dns_rdatatype_t ip_type, } break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* @@ -2969,8 +2968,7 @@ rpz_get_p_name(ns_client_t *client, dns_name_t *p_name, dns_rpz_zone_t *rpz, suffix = &rpz->nsip; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* @@ -3404,8 +3402,7 @@ dnsrps_rewrite_ip(ns_client_t *client, const isc_netaddr_t *netaddr, recursed = true; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } do { @@ -3455,8 +3452,7 @@ dnsrps_rewrite_name(ns_client_t *client, dns_name_t *trig_name, bool recursed, trig = LIBRPZ_TRIG_NSDNAME; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } dns_name_toregion(trig_name, &r); @@ -7306,8 +7302,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) { qctx->want_restart = true; return (ISC_R_COMPLETE); default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* @@ -9202,8 +9197,7 @@ query_nodata(query_ctx_t *qctx, isc_result_t res) { dns64_ttl(qctx->db, qctx->version); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } SAVE(qctx->client->query.dns64_aaaa, qctx->rdataset); @@ -11602,8 +11596,7 @@ query_setup_sortlist(query_ctx_t *qctx) { case NS_SORTLISTTYPE_NONE: break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } } diff --git a/lib/ns/tests/nstest.c b/lib/ns/tests/nstest.c index 84a822bdd1..a114dff963 100644 --- a/lib/ns/tests/nstest.c +++ b/lib/ns/tests/nstest.c @@ -920,7 +920,7 @@ fromhex(char c) { printf("bad input format: %02x\n", c); exit(3); - /* NOTREACHED */ + UNREACHABLE(); } isc_result_t diff --git a/lib/ns/tests/query_test.c b/lib/ns/tests/query_test.c index e1b05c61c1..9c8005fa5f 100644 --- a/lib/ns/tests/query_test.c +++ b/lib/ns/tests/query_test.c @@ -433,8 +433,7 @@ run_start_test(const ns__query_start_test_params_t *test) { test->id.description, test->id.lineno); break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } /* diff --git a/lib/ns/xfrout.c b/lib/ns/xfrout.c index c763db873e..04388d522c 100644 --- a/lib/ns/xfrout.c +++ b/lib/ns/xfrout.c @@ -758,8 +758,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) { mnemonic = "IXFR"; break; default: - INSIST(0); - ISC_UNREACHABLE(); + UNREACHABLE(); } ns_client_log(client, DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT, From 07022525ff5de3d21b9074cb3b3ae501309982f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 11 Oct 2021 12:57:27 +0200 Subject: [PATCH 3/5] Replace ISC_NORETURN with C11's noreturn C11 has builtin support for _Noreturn function specifier with convenience noreturn macro defined in header. Replace ISC_NORETURN macro by C11 noreturn with fallback to __attribute__((noreturn)) if the C11 support is not complete. (cherry picked from commit 04d0b70ba2083267150539cd7011e806de80a3f2) --- bin/check/named-checkconf.c | 2 +- bin/check/named-checkzone.c | 2 +- bin/confgen/rndc-confgen.c | 2 +- bin/confgen/tsig-keygen.c | 2 +- bin/confgen/util.h | 2 +- bin/delv/delv.c | 2 +- bin/dig/dig.c | 2 +- bin/dig/dighost.h | 4 ++-- bin/dig/host.c | 2 +- bin/dig/nslookup.c | 2 +- bin/dnssec/dnssec-cds.c | 2 +- bin/dnssec/dnssec-dsfromkey.c | 2 +- bin/dnssec/dnssec-importkey.c | 2 +- bin/dnssec/dnssec-keyfromlabel.c | 2 +- bin/dnssec/dnssec-keygen.c | 2 +- bin/dnssec/dnssec-revoke.c | 2 +- bin/dnssec/dnssec-settime.c | 2 +- bin/dnssec/dnssec-signzone.c | 2 +- bin/dnssec/dnssec-verify.c | 2 +- bin/dnssec/dnssectool.h | 4 ++-- bin/named/include/named/main.h | 2 +- bin/named/main.c | 4 ++-- bin/named/server.c | 2 +- bin/nsupdate/nsupdate.c | 2 +- bin/rndc/rndc.c | 2 +- bin/rndc/util.h | 2 +- bin/tests/system/resolve.c | 2 +- bin/tools/dnstap-read.c | 2 +- bin/tools/mdig.c | 4 ++-- bin/tools/named-rrchecker.c | 4 ++-- bin/tools/nsec3hash.c | 2 +- configure.ac | 2 +- lib/isc/include/isc/assertions.h | 3 +-- lib/isc/include/isc/attributes.h | 8 +++++--- lib/isc/include/isc/error.h | 4 ++-- lib/ns/tests/plugin_test.c | 2 +- 36 files changed, 46 insertions(+), 45 deletions(-) diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index 06fd59cb8d..204bd1fffc 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -58,7 +58,7 @@ isc_log_t *logc = NULL; } while (0) /*% usage */ -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index ffee5bcd77..4814323f0b 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -65,7 +65,7 @@ static enum { progmode_check, progmode_compile } progmode; } \ } while (0) -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/confgen/rndc-confgen.c b/bin/confgen/rndc-confgen.c index 2cea509bef..e0786be782 100644 --- a/bin/confgen/rndc-confgen.c +++ b/bin/confgen/rndc-confgen.c @@ -61,7 +61,7 @@ bool verbose = false; const char *keyfile, *keydef; -ISC_NORETURN static void +noreturn static void usage(int status); static void diff --git a/bin/confgen/tsig-keygen.c b/bin/confgen/tsig-keygen.c index b34d099faa..dd39ad8726 100644 --- a/bin/confgen/tsig-keygen.c +++ b/bin/confgen/tsig-keygen.c @@ -54,7 +54,7 @@ const char *progname; static enum { progmode_keygen, progmode_confgen } progmode; bool verbose = false; /* needed by util.c but not used here */ -ISC_NORETURN static void +noreturn static void usage(int status); static void diff --git a/bin/confgen/util.h b/bin/confgen/util.h index 0567ad33b1..4ac83e5143 100644 --- a/bin/confgen/util.h +++ b/bin/confgen/util.h @@ -36,7 +36,7 @@ ISC_LANG_BEGINDECLS void notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2); -ISC_NORETURN void +noreturn void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ISC_LANG_ENDDECLS diff --git a/bin/delv/delv.c b/bin/delv/delv.c index aad09dc414..182448a0b8 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -208,7 +208,7 @@ usage(void) { exit(1); } -ISC_NORETURN static void +noreturn static void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void diff --git a/bin/dig/dig.c b/bin/dig/dig.c index f5d932f355..4783b98ba2 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -113,7 +113,7 @@ usage(void) { fprintf(stderr, "Press for complete list of options\n"); } #else /* if TARGET_OS_IPHONE */ -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dig/dighost.h b/bin/dig/dighost.h index e38e319f53..afefed40c2 100644 --- a/bin/dig/dighost.h +++ b/bin/dig/dighost.h @@ -276,13 +276,13 @@ getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp); isc_result_t get_reverse(char *reverse, size_t len, char *value, bool strict); -ISC_NORETURN void +noreturn void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void warn(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); -ISC_NORETURN void +noreturn void digexit(void); void diff --git a/bin/dig/host.c b/bin/dig/host.c index e9064c8db3..9befd12e7e 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -101,7 +101,7 @@ rcode_totext(dns_rcode_t rcode) { return (totext.deconsttext); } -ISC_NORETURN static void +noreturn static void show_usage(void); static void diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index d5ce6f7900..67ae315610 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -854,7 +854,7 @@ get_next_command(void) { } } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-cds.c b/bin/dnssec/dnssec-cds.c index ceee2db297..42750d26f0 100644 --- a/bin/dnssec/dnssec-cds.c +++ b/bin/dnssec/dnssec-cds.c @@ -1015,7 +1015,7 @@ nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) { } } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-dsfromkey.c b/bin/dnssec/dnssec-dsfromkey.c index fa3ef72d72..42aa9e5c7b 100644 --- a/bin/dnssec/dnssec-dsfromkey.c +++ b/bin/dnssec/dnssec-dsfromkey.c @@ -324,7 +324,7 @@ emits(bool showall, bool cds, dns_rdata_t *rdata) { } } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-importkey.c b/bin/dnssec/dnssec-importkey.c index 6c1d2f22cd..441f7c3f8b 100644 --- a/bin/dnssec/dnssec-importkey.c +++ b/bin/dnssec/dnssec-importkey.c @@ -263,7 +263,7 @@ emit(const char *dir, dns_rdata_t *rdata) { dst_key_free(&key); } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-keyfromlabel.c b/bin/dnssec/dnssec-keyfromlabel.c index eca8f86b81..4d66f8f22b 100644 --- a/bin/dnssec/dnssec-keyfromlabel.c +++ b/bin/dnssec/dnssec-keyfromlabel.c @@ -44,7 +44,7 @@ const char *program = "dnssec-keyfromlabel"; -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-keygen.c b/bin/dnssec/dnssec-keygen.c index 64ad357923..890b4225ec 100644 --- a/bin/dnssec/dnssec-keygen.c +++ b/bin/dnssec/dnssec-keygen.c @@ -67,7 +67,7 @@ const char *program = "dnssec-keygen"; isc_log_t *lctx = NULL; -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-revoke.c b/bin/dnssec/dnssec-revoke.c index 36ee75c718..adf3de6fff 100644 --- a/bin/dnssec/dnssec-revoke.c +++ b/bin/dnssec/dnssec-revoke.c @@ -39,7 +39,7 @@ const char *program = "dnssec-revoke"; static isc_mem_t *mctx = NULL; -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-settime.c b/bin/dnssec/dnssec-settime.c index 6c78c38966..1a4f20218f 100644 --- a/bin/dnssec/dnssec-settime.c +++ b/bin/dnssec/dnssec-settime.c @@ -43,7 +43,7 @@ const char *program = "dnssec-settime"; static isc_mem_t *mctx = NULL; -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 08aacb3721..4229bf722f 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -3194,7 +3194,7 @@ print_version(FILE *fp) { fprintf(fp, "; dnssec_signzone version %s\n", PACKAGE_VERSION); } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssec-verify.c b/bin/dnssec/dnssec-verify.c index 6dd68edd32..5f2f2d13e4 100644 --- a/bin/dnssec/dnssec-verify.c +++ b/bin/dnssec/dnssec-verify.c @@ -139,7 +139,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) { } } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/dnssec/dnssectool.h b/bin/dnssec/dnssectool.h index 9abc3e3f20..f38bc55a96 100644 --- a/bin/dnssec/dnssectool.h +++ b/bin/dnssec/dnssectool.h @@ -43,7 +43,7 @@ extern uint8_t dtype[8]; typedef void(fatalcallback_t)(void); -ISC_NORETURN void +noreturn void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void @@ -55,7 +55,7 @@ check_result(isc_result_t result, const char *message); void vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3); -ISC_NORETURN void +noreturn void version(const char *program); void diff --git a/bin/named/include/named/main.h b/bin/named/include/named/main.h index 76546a6071..7d01851b9b 100644 --- a/bin/named/include/named/main.h +++ b/bin/named/include/named/main.h @@ -26,7 +26,7 @@ */ #define NAMED_MAIN_ARGS "46A:c:d:D:E:fFgL:M:m:n:N:p:sS:t:T:U:u:vVx:X:" -ISC_NORETURN void +noreturn void named_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); void diff --git a/bin/named/main.c b/bin/named/main.c index bb4c08bb1b..67c16304d9 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -185,7 +185,7 @@ named_main_earlyfatal(const char *format, ...) { exit(1); } -ISC_NORETURN static void +noreturn static void assertion_failed(const char *file, int line, isc_assertiontype_t type, const char *cond); @@ -239,7 +239,7 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type, exit(1); } -ISC_NORETURN static void +noreturn static void library_fatal_error(const char *file, int line, const char *format, va_list args) ISC_FORMAT_PRINTF(3, 0); diff --git a/bin/named/server.c b/bin/named/server.c index 3498b5291e..9c74572bb0 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -397,7 +397,7 @@ const char *empty_zones[] = { NULL }; -ISC_NORETURN static void +noreturn static void fatal(named_server_t *server, const char *msg, isc_result_t result); static void diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index b0af713923..6dcc33926a 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -187,7 +187,7 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg, static void send_update(dns_name_t *zonename, isc_sockaddr_t *primary); -ISC_NORETURN static void +noreturn static void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 4c43e39ba0..619dca140b 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -96,7 +96,7 @@ static isc_nmhandle_t *recvnonce_handle = NULL; static void rndc_startconnect(isc_sockaddr_t *addr); -ISC_NORETURN static void +noreturn static void usage(int status); static void diff --git a/bin/rndc/util.h b/bin/rndc/util.h index 0567ad33b1..4ac83e5143 100644 --- a/bin/rndc/util.h +++ b/bin/rndc/util.h @@ -36,7 +36,7 @@ ISC_LANG_BEGINDECLS void notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2); -ISC_NORETURN void +noreturn void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); ISC_LANG_ENDDECLS diff --git a/bin/tests/system/resolve.c b/bin/tests/system/resolve.c index 25c97423dd..d563d92d8b 100644 --- a/bin/tests/system/resolve.c +++ b/bin/tests/system/resolve.c @@ -127,7 +127,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner) { return (ISC_R_SUCCESS); } -ISC_NORETURN static void +noreturn static void usage(void); static void diff --git a/bin/tools/dnstap-read.c b/bin/tools/dnstap-read.c index 287d0b806b..dc7ae919ff 100644 --- a/bin/tools/dnstap-read.c +++ b/bin/tools/dnstap-read.c @@ -71,7 +71,7 @@ const char *program = "dnstap-read"; } \ } while (0) -ISC_NORETURN static void +noreturn static void fatal(const char *format, ...); static void diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 12d7bebb4a..d65f358003 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -783,7 +783,7 @@ sendqueries(isc_task_t *task, isc_event_t *event) { return; } -ISC_NORETURN static void +noreturn static void usage(void); static void @@ -894,7 +894,7 @@ help(void) { "Server ID)\n"); } -ISC_NORETURN static void +noreturn static void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); static void diff --git a/bin/tools/named-rrchecker.c b/bin/tools/named-rrchecker.c index e680597967..2ea0ef48e4 100644 --- a/bin/tools/named-rrchecker.c +++ b/bin/tools/named-rrchecker.c @@ -35,7 +35,7 @@ static isc_lex_t *lex; static isc_lexspecials_t specials; -ISC_NORETURN static void +noreturn static void usage(void); static void @@ -52,7 +52,7 @@ usage(void) { exit(0); } -ISC_NORETURN static void +noreturn static void fatal(const char *format, ...); static void diff --git a/bin/tools/nsec3hash.c b/bin/tools/nsec3hash.c index c9f90d0041..a6a5ec3a71 100644 --- a/bin/tools/nsec3hash.c +++ b/bin/tools/nsec3hash.c @@ -35,7 +35,7 @@ const char *program = "nsec3hash"; -ISC_NORETURN static void +noreturn static void fatal(const char *format, ...); static void diff --git a/configure.ac b/configure.ac index 5905dc7dec..0fe7147f59 100644 --- a/configure.ac +++ b/configure.ac @@ -1149,7 +1149,7 @@ AC_CHECK_HEADERS( ]) LIBS="$LIBS $ISC_ATOMIC_LIBS" -AC_CHECK_HEADERS([stdalign.h]) +AC_CHECK_HEADERS([stdalign.h stdnoreturn.h]) AC_CHECK_HEADERS([uchar.h]) diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h index d5dbced853..7eafa16011 100644 --- a/lib/isc/include/isc/assertions.h +++ b/lib/isc/include/isc/assertions.h @@ -33,8 +33,7 @@ typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t, const char *); /* coverity[+kill] */ -ISC_NORETURN -void +noreturn void isc_assertion_failed(const char *, int, isc_assertiontype_t, const char *); void isc_assertion_setcallback(isc_assertioncallback_t); diff --git a/lib/isc/include/isc/attributes.h b/lib/isc/include/isc/attributes.h index 7c359d4b71..abe615223e 100644 --- a/lib/isc/include/isc/attributes.h +++ b/lib/isc/include/isc/attributes.h @@ -13,10 +13,12 @@ #pragma once -#if HAVE_FUNC_ATTRIBUTE_NORETURN -#define ISC_NORETURN __attribute__((noreturn)) +#ifdef HAVE_STDNORETURN_H +#include +#elif HAVE_FUNC_ATTRIBUTE_NORETURN +#define noreturn __attribute__((noreturn)) #else -#define ISC_NORETURN +#define noreturn #endif #if HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL diff --git a/lib/isc/include/isc/error.h b/lib/isc/include/isc/error.h index 37fd181896..ecebab60a2 100644 --- a/lib/isc/include/isc/error.h +++ b/lib/isc/include/isc/error.h @@ -37,11 +37,11 @@ isc_error_unexpected(const char *, int, const char *, ...) ISC_FORMAT_PRINTF(3, 4); /*% fatal error */ -ISC_NORETURN void +noreturn void isc_error_fatal(const char *, int, const char *, ...) ISC_FORMAT_PRINTF(3, 4); /*% runtimecheck error */ -ISC_NORETURN void +noreturn void isc_error_runtimecheck(const char *, int, const char *); #define ISC_ERROR_RUNTIMECHECK(cond) \ diff --git a/lib/ns/tests/plugin_test.c b/lib/ns/tests/plugin_test.c index f71bb4e122..0feba053d3 100644 --- a/lib/ns/tests/plugin_test.c +++ b/lib/ns/tests/plugin_test.c @@ -32,7 +32,7 @@ #include #include -ISC_NORETURN void +noreturn void _fail(const char *const file, const int line); #include From 5e19bbb48abe9a1e2a4af6c25a865d06703d8f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 11 Oct 2021 13:43:12 +0200 Subject: [PATCH 4/5] Remove use of the inline keyword used as suggestion to compiler Historically, the inline keyword was a strong suggestion to the compiler that it should inline the function marked inline. As compilers became better at optimising, this functionality has receded, and using inline as a suggestion to inline a function is obsolete. The compiler will happily ignore it and inline something else entirely if it finds that's a better optimisation. Therefore, remove all the occurences of the inline keyword with static functions inside single compilation unit and leave the decision whether to inline a function or not entirely on the compiler NOTE: We keep the usage the inline keyword when the purpose is to change the linkage behaviour. (cherry picked from commit 20f0936cf2aacc0a289afa92a6b3ab5e87514d1f) --- bin/dnssec/dnssec-cds.c | 2 +- bin/dnssec/dnssec-signzone.c | 14 +-- bin/dnssec/dnssectool.c | 2 +- bin/named/control.c | 2 +- bin/named/controlconf.c | 2 +- bin/named/server.c | 10 +- bin/named/statschannel.c | 2 +- bin/named/zoneconf.c | 2 +- bin/nsupdate/nsupdate.c | 2 +- bin/tests/wire_test.c | 2 +- .../dlz/modules/mysqldyn/dlz_mysqldyn_mod.c | 2 +- doc/dev/style.md | 2 +- lib/dns/adb.c | 118 +++++++++--------- lib/dns/byaddr.c | 2 +- lib/dns/cache.c | 2 +- lib/dns/catz.c | 2 +- lib/dns/client.c | 2 +- lib/dns/compress.c | 2 +- lib/dns/db.c | 2 +- lib/dns/dispatch.c | 4 +- lib/dns/dlz.c | 2 +- lib/dns/dnssec.c | 2 +- lib/dns/gssapictx.c | 2 +- lib/dns/hmac_link.c | 34 ++--- lib/dns/journal.c | 4 +- lib/dns/kasp.c | 2 +- lib/dns/lookup.c | 2 +- lib/dns/master.c | 6 +- lib/dns/message.c | 42 +++---- lib/dns/ncache.c | 2 +- lib/dns/order.c | 2 +- lib/dns/rbt.c | 43 ++++--- lib/dns/rbtdb.c | 76 ++++++----- lib/dns/rdata.c | 22 ++-- lib/dns/rdata/any_255/tsig_250.c | 26 ++-- lib/dns/rdata/ch_3/a_1.c | 26 ++-- lib/dns/rdata/generic/afsdb_18.c | 26 ++-- lib/dns/rdata/generic/amtrelay_260.c | 26 ++-- lib/dns/rdata/generic/avc_258.c | 26 ++-- lib/dns/rdata/generic/caa_257.c | 26 ++-- lib/dns/rdata/generic/cdnskey_60.c | 26 ++-- lib/dns/rdata/generic/cds_59.c | 26 ++-- lib/dns/rdata/generic/cert_37.c | 26 ++-- lib/dns/rdata/generic/cname_5.c | 26 ++-- lib/dns/rdata/generic/csync_62.c | 26 ++-- lib/dns/rdata/generic/dlv_32769.c | 26 ++-- lib/dns/rdata/generic/dname_39.c | 26 ++-- lib/dns/rdata/generic/dnskey_48.c | 26 ++-- lib/dns/rdata/generic/doa_259.c | 26 ++-- lib/dns/rdata/generic/ds_43.c | 36 +++--- lib/dns/rdata/generic/eui48_108.c | 26 ++-- lib/dns/rdata/generic/eui64_109.c | 26 ++-- lib/dns/rdata/generic/gpos_27.c | 26 ++-- lib/dns/rdata/generic/hinfo_13.c | 26 ++-- lib/dns/rdata/generic/hip_55.c | 26 ++-- lib/dns/rdata/generic/ipseckey_45.c | 26 ++-- lib/dns/rdata/generic/isdn_20.c | 26 ++-- lib/dns/rdata/generic/key_25.c | 40 +++--- lib/dns/rdata/generic/keydata_65533.c | 26 ++-- lib/dns/rdata/generic/l32_105.c | 26 ++-- lib/dns/rdata/generic/l64_106.c | 26 ++-- lib/dns/rdata/generic/loc_29.c | 40 +++--- lib/dns/rdata/generic/lp_107.c | 26 ++-- lib/dns/rdata/generic/mb_7.c | 26 ++-- lib/dns/rdata/generic/md_3.c | 26 ++-- lib/dns/rdata/generic/mf_4.c | 26 ++-- lib/dns/rdata/generic/mg_8.c | 26 ++-- lib/dns/rdata/generic/minfo_14.c | 26 ++-- lib/dns/rdata/generic/mr_9.c | 26 ++-- lib/dns/rdata/generic/mx_15.c | 26 ++-- lib/dns/rdata/generic/naptr_35.c | 28 ++--- lib/dns/rdata/generic/nid_104.c | 26 ++-- lib/dns/rdata/generic/ninfo_56.c | 26 ++-- lib/dns/rdata/generic/ns_2.c | 26 ++-- lib/dns/rdata/generic/nsec3_50.c | 26 ++-- lib/dns/rdata/generic/nsec3param_51.c | 26 ++-- lib/dns/rdata/generic/nsec_47.c | 26 ++-- lib/dns/rdata/generic/null_10.c | 26 ++-- lib/dns/rdata/generic/nxt_30.c | 26 ++-- lib/dns/rdata/generic/openpgpkey_61.c | 26 ++-- lib/dns/rdata/generic/opt_41.c | 26 ++-- lib/dns/rdata/generic/proforma.c | 26 ++-- lib/dns/rdata/generic/ptr_12.c | 26 ++-- lib/dns/rdata/generic/rkey_57.c | 26 ++-- lib/dns/rdata/generic/rp_17.c | 26 ++-- lib/dns/rdata/generic/rrsig_46.c | 28 ++--- lib/dns/rdata/generic/rt_21.c | 26 ++-- lib/dns/rdata/generic/sig_24.c | 28 ++--- lib/dns/rdata/generic/sink_40.c | 26 ++-- lib/dns/rdata/generic/smimea_53.c | 26 ++-- lib/dns/rdata/generic/soa_6.c | 26 ++-- lib/dns/rdata/generic/spf_99.c | 26 ++-- lib/dns/rdata/generic/sshfp_44.c | 26 ++-- lib/dns/rdata/generic/ta_32768.c | 26 ++-- lib/dns/rdata/generic/talink_58.c | 26 ++-- lib/dns/rdata/generic/tkey_249.c | 26 ++-- lib/dns/rdata/generic/tlsa_52.c | 38 +++--- lib/dns/rdata/generic/txt_16.c | 38 +++--- lib/dns/rdata/generic/uri_256.c | 26 ++-- lib/dns/rdata/generic/x25_19.c | 26 ++-- lib/dns/rdata/generic/zonemd_63.c | 26 ++-- lib/dns/rdata/hs_4/a_1.c | 26 ++-- lib/dns/rdata/in_1/a6_38.c | 26 ++-- lib/dns/rdata/in_1/a_1.c | 26 ++-- lib/dns/rdata/in_1/aaaa_28.c | 26 ++-- lib/dns/rdata/in_1/apl_42.c | 26 ++-- lib/dns/rdata/in_1/atma_34.c | 26 ++-- lib/dns/rdata/in_1/dhcid_49.c | 26 ++-- lib/dns/rdata/in_1/eid_31.c | 26 ++-- lib/dns/rdata/in_1/https_65.c | 26 ++-- lib/dns/rdata/in_1/kx_36.c | 26 ++-- lib/dns/rdata/in_1/nimloc_32.c | 26 ++-- lib/dns/rdata/in_1/nsap-ptr_23.c | 26 ++-- lib/dns/rdata/in_1/nsap_22.c | 26 ++-- lib/dns/rdata/in_1/px_26.c | 26 ++-- lib/dns/rdata/in_1/srv_33.c | 26 ++-- lib/dns/rdata/in_1/svcb_64.c | 44 +++---- lib/dns/rdata/in_1/wks_11.c | 26 ++-- lib/dns/rdataset.c | 2 +- lib/dns/rdataslab.c | 4 +- lib/dns/request.c | 2 +- lib/dns/resolver.c | 64 +++++----- lib/dns/rpz.c | 4 +- lib/dns/rrl.c | 20 +-- lib/dns/sdb.c | 2 +- lib/dns/sdlz.c | 2 +- lib/dns/soa.c | 4 +- lib/dns/ssu.c | 4 +- lib/dns/stats.c | 4 +- lib/dns/validator.c | 14 +-- lib/dns/view.c | 2 +- lib/dns/zone.c | 26 ++-- lib/dns/zoneverify.c | 6 +- lib/isc/base32.c | 6 +- lib/isc/base64.c | 6 +- lib/isc/hex.c | 6 +- lib/isc/httpd.c | 2 +- lib/isc/lex.c | 4 +- lib/isc/mem.c | 18 +-- lib/isc/net.c | 4 +- lib/isc/os.c | 2 +- lib/isc/portset.c | 6 +- lib/isc/random.c | 4 +- lib/isc/symtab.c | 2 +- lib/isc/task.c | 8 +- lib/isc/time.c | 2 +- lib/isccc/symtab.c | 4 +- lib/ns/client.c | 2 +- lib/ns/query.c | 44 +++---- lib/ns/update.c | 2 +- lib/ns/xfrout.c | 2 +- 151 files changed, 1485 insertions(+), 1488 deletions(-) diff --git a/bin/dnssec/dnssec-cds.c b/bin/dnssec/dnssec-cds.c index 42750d26f0..2c5590df82 100644 --- a/bin/dnssec/dnssec-cds.c +++ b/bin/dnssec/dnssec-cds.c @@ -845,7 +845,7 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata, uint32_t ttl, } } -static inline int +static int rdata_cmp(const void *rdata1, const void *rdata2) { return (dns_rdata_compare((const dns_rdata_t *)rdata1, (const dns_rdata_t *)rdata2)); diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 4229bf722f..d303d57de3 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -325,28 +325,28 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key, dns_diff_append(add, &tuple); } -static inline bool +static bool issigningkey(dns_dnsseckey_t *key) { return (key->force_sign || key->hint_sign); } -static inline bool +static bool ispublishedkey(dns_dnsseckey_t *key) { return ((key->force_publish || key->hint_publish) && !key->hint_remove); } -static inline bool +static bool iszonekey(dns_dnsseckey_t *key) { return (dns_name_equal(dst_key_name(key->key), gorigin) && dst_key_iszonekey(key->key)); } -static inline bool +static bool isksk(dns_dnsseckey_t *key) { return (key->ksk); } -static inline bool +static bool iszsk(dns_dnsseckey_t *key) { return (ignore_kskflag || !key->ksk); } @@ -467,7 +467,7 @@ expecttofindkey(dns_name_t *name) { return (false); /* removes a warning */ } -static inline bool +static bool setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key, dns_rdata_t *rrsig) { isc_result_t result; @@ -1246,7 +1246,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) { * See if the node contains any non RRSIG/NSEC records and report to * caller. Clean out extraneous RRSIG records for node. */ -static inline bool +static bool active_node(dns_dbnode_t *node) { dns_rdatasetiter_t *rdsiter = NULL; dns_rdatasetiter_t *rdsiter2 = NULL; diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 4a0baa4ddb..a60af12fef 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -237,7 +237,7 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) { return (0); /* silence compiler warning */ } -static inline bool +static bool isnone(const char *str) { return ((strcasecmp(str, "none") == 0) || (strcasecmp(str, "never") == 0)); diff --git a/bin/named/control.c b/bin/named/control.c index d07896ecd5..454c12846c 100644 --- a/bin/named/control.c +++ b/bin/named/control.c @@ -59,7 +59,7 @@ getcommand(isc_lex_t *lex, char **cmdp) { return (ISC_R_SUCCESS); } -static inline bool +static bool command_compare(const char *str, const char *command) { return (strcasecmp(str, command) == 0); } diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 2d7bcd8f60..9deaf39ee4 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -257,7 +257,7 @@ cleanup_sendhandle: isc_nmhandle_detach(&conn->sendhandle); } -static inline void +static void log_invalid(isccc_ccmsg_t *ccmsg, isc_result_t result) { char socktext[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_t peeraddr = isc_nmhandle_peeraddr(ccmsg->handle); diff --git a/bin/named/server.c b/bin/named/server.c index 9c74572bb0..964e244c6a 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -455,7 +455,7 @@ end_reserved_dispatches(named_server_t *server, bool all); static void newzone_cfgctx_destroy(void **cfgp); -static inline isc_result_t +static isc_result_t putstr(isc_buffer_t **b, const char *str); static isc_result_t @@ -464,7 +464,7 @@ putmem(isc_buffer_t **b, const char *str, size_t len); static isc_result_t putuint8(isc_buffer_t **b, uint8_t val); -static inline isc_result_t +static isc_result_t putnull(isc_buffer_t **b); static int @@ -15060,7 +15060,7 @@ cleanup: return (result); } -static inline bool +static bool argcheck(char *cmd, const char *full) { size_t l; @@ -15398,7 +15398,7 @@ putmem(isc_buffer_t **b, const char *str, size_t len) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t putstr(isc_buffer_t **b, const char *str) { return (putmem(b, str, strlen(str))); } @@ -15416,7 +15416,7 @@ putuint8(isc_buffer_t **b, uint8_t val) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t putnull(isc_buffer_t **b) { return (putuint8(b, 0)); } diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 5760425f40..1687d1f7ae 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -211,7 +211,7 @@ static int tcpoutsizestats_index[dns_sizecounter_out_max]; static int dnstapstats_index[dns_dnstapcounter_max]; static int gluecachestats_index[dns_gluecachestatscounter_max]; -static inline void +static void set_desc(int counter, int maxcounter, const char *fdesc, const char **fdescs, const char *xdesc, const char **xdescs) { REQUIRE(counter < maxcounter); diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 9a363b30c3..2fdd36b8b1 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -682,7 +682,7 @@ cleanup: /*% * Convert a config file zone type into a server zone type. */ -static inline dns_zonetype_t +static dns_zonetype_t zonetype_fromconfig(const cfg_obj_t *map) { const cfg_obj_t *obj = NULL; isc_result_t result; diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 6dcc33926a..202a1637f3 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -304,7 +304,7 @@ ddebug(const char *format, ...) { } } -static inline void +static void check_result(isc_result_t result, const char *msg) { if (result != ISC_R_SUCCESS) { fatal("%s: %s", msg, isc_result_totext(result)); diff --git a/bin/tests/wire_test.c b/bin/tests/wire_test.c index 9f50981f04..88bf3190d6 100644 --- a/bin/tests/wire_test.c +++ b/bin/tests/wire_test.c @@ -37,7 +37,7 @@ process_message(isc_buffer_t *source); static isc_result_t printmessage(dns_message_t *msg); -static inline void +static void CHECKRESULT(isc_result_t result, const char *msg) { if (result != ISC_R_SUCCESS) { printf("%s: %s\n", msg, isc_result_totext(result)); diff --git a/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c b/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c index ec6a494dd8..8f089cfe7b 100644 --- a/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c +++ b/contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c @@ -494,7 +494,7 @@ isrelative(const char *s) { } /* Return a dot if 's' doesn't already end with one */ -static inline const char * +static const char * dot(const char *s) { return (isrelative(s) ? "." : ""); } diff --git a/doc/dev/style.md b/doc/dev/style.md index 7551211c02..64838c1fd1 100644 --- a/doc/dev/style.md +++ b/doc/dev/style.md @@ -269,7 +269,7 @@ specifying the implementation of the function. The opening curly brace should occur on the same line as the argument list, unless the argument list is more than one line long: - static inline void + static void func1(int i) { /* whatever */ } diff --git a/lib/dns/adb.c b/lib/dns/adb.c index c34319306c..a66cc2fe7d 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -273,35 +273,35 @@ struct dns_adbentry { /* * Internal functions (and prototypes). */ -static inline dns_adbname_t * +static dns_adbname_t * new_adbname(dns_adb_t *, const dns_name_t *); -static inline void +static void free_adbname(dns_adb_t *, dns_adbname_t **); -static inline dns_adbnamehook_t * +static dns_adbnamehook_t * new_adbnamehook(dns_adb_t *, dns_adbentry_t *); -static inline void +static void free_adbnamehook(dns_adb_t *, dns_adbnamehook_t **); -static inline dns_adblameinfo_t * +static dns_adblameinfo_t * new_adblameinfo(dns_adb_t *, const dns_name_t *, dns_rdatatype_t); -static inline void +static void free_adblameinfo(dns_adb_t *, dns_adblameinfo_t **); -static inline dns_adbentry_t * +static dns_adbentry_t * new_adbentry(dns_adb_t *); -static inline void +static void free_adbentry(dns_adb_t *, dns_adbentry_t **); -static inline dns_adbfind_t * +static dns_adbfind_t * new_adbfind(dns_adb_t *); -static inline bool +static bool free_adbfind(dns_adb_t *, dns_adbfind_t **); -static inline dns_adbaddrinfo_t * +static dns_adbaddrinfo_t * new_adbaddrinfo(dns_adb_t *, dns_adbentry_t *, in_port_t); -static inline dns_adbfetch_t * +static dns_adbfetch_t * new_adbfetch(dns_adb_t *); -static inline void +static void free_adbfetch(dns_adb_t *, dns_adbfetch_t **); -static inline dns_adbname_t * +static dns_adbname_t * find_name_and_lock(dns_adb_t *, const dns_name_t *, unsigned int, int *); -static inline dns_adbentry_t * +static dns_adbentry_t * find_entry_and_lock(dns_adb_t *, const isc_sockaddr_t *, int *, isc_stdtime_t); static void dump_adb(dns_adb_t *, FILE *, bool debug, isc_stdtime_t); @@ -314,17 +314,17 @@ static void print_find_list(FILE *, dns_adbname_t *); static void print_fetch_list(FILE *, dns_adbname_t *); -static inline bool +static bool dec_adb_irefcnt(dns_adb_t *); -static inline void +static void inc_adb_irefcnt(dns_adb_t *); -static inline void +static void inc_adb_erefcnt(dns_adb_t *); -static inline void +static void inc_entry_refcnt(dns_adb_t *, dns_adbentry_t *, bool); -static inline bool +static bool dec_entry_refcnt(dns_adb_t *, bool, dns_adbentry_t *, bool); -static inline void +static void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *); static bool clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *); @@ -343,7 +343,7 @@ dbfind_name(dns_adbname_t *, isc_stdtime_t, dns_rdatatype_t); static isc_result_t fetch_name(dns_adbname_t *, bool, unsigned int, isc_counter_t *qc, dns_rdatatype_t); -static inline void +static void check_exit(dns_adb_t *); static void destroy(dns_adb_t *); @@ -351,13 +351,13 @@ static bool shutdown_names(dns_adb_t *); static bool shutdown_entries(dns_adb_t *); -static inline void +static void link_name(dns_adb_t *, int, dns_adbname_t *); -static inline bool +static bool unlink_name(dns_adb_t *, dns_adbname_t *); -static inline void +static void link_entry(dns_adb_t *, int, dns_adbentry_t *); -static inline bool +static bool unlink_entry(dns_adb_t *, dns_adbentry_t *); static bool kill_name(dns_adbname_t **, isc_eventtype_t); @@ -502,7 +502,7 @@ DP(int level, const char *format, ...) { /*% * Increment resolver-related statistics counters. */ -static inline void +static void inc_stats(dns_adb_t *adb, isc_statscounter_t counter) { if (adb->view->resstats != NULL) { isc_stats_increment(adb->view->resstats, counter); @@ -512,28 +512,28 @@ inc_stats(dns_adb_t *adb, isc_statscounter_t counter) { /*% * Set adb-related statistics counters. */ -static inline void +static void set_adbstat(dns_adb_t *adb, uint64_t val, isc_statscounter_t counter) { if (adb->view->adbstats != NULL) { isc_stats_set(adb->view->adbstats, val, counter); } } -static inline void +static void dec_adbstats(dns_adb_t *adb, isc_statscounter_t counter) { if (adb->view->adbstats != NULL) { isc_stats_decrement(adb->view->adbstats, counter); } } -static inline void +static void inc_adbstats(dns_adb_t *adb, isc_statscounter_t counter) { if (adb->view->adbstats != NULL) { isc_stats_increment(adb->view->adbstats, counter); } } -static inline dns_ttl_t +static dns_ttl_t ttlclamp(dns_ttl_t ttl) { if (ttl < ADB_CACHE_MINIMUM) { ttl = ADB_CACHE_MINIMUM; @@ -1132,7 +1132,7 @@ check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) { /* * Requires the name's bucket be locked. */ -static inline void +static void link_name(dns_adb_t *adb, int bucket, dns_adbname_t *name) { INSIST(name->lock_bucket == DNS_ADB_INVALIDBUCKET); @@ -1144,7 +1144,7 @@ link_name(dns_adb_t *adb, int bucket, dns_adbname_t *name) { /* * Requires the name's bucket be locked. */ -static inline bool +static bool unlink_name(dns_adb_t *adb, dns_adbname_t *name) { int bucket; bool result = false; @@ -1169,7 +1169,7 @@ unlink_name(dns_adb_t *adb, dns_adbname_t *name) { /* * Requires the entry's bucket be locked. */ -static inline void +static void link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) { int i; dns_adbentry_t *e; @@ -1200,7 +1200,7 @@ link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) { /* * Requires the entry's bucket be locked. */ -static inline bool +static bool unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) { int bucket; bool result = false; @@ -1222,7 +1222,7 @@ unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) { return (result); } -static inline void +static void violate_locking_hierarchy(isc_mutex_t *have, isc_mutex_t *want) { if (isc_mutex_trylock(want) != ISC_R_SUCCESS) { UNLOCK(have); @@ -1563,7 +1563,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype, DP(ENTER_LEVEL, "EXIT clean_finds_at_name, name %p", name); } -static inline void +static void check_exit(dns_adb_t *adb) { isc_event_t *event; /* @@ -1584,7 +1584,7 @@ check_exit(dns_adb_t *adb) { } } -static inline bool +static bool dec_adb_irefcnt(dns_adb_t *adb) { isc_event_t *event; isc_task_t *etask; @@ -1613,21 +1613,21 @@ dec_adb_irefcnt(dns_adb_t *adb) { return (result); } -static inline void +static void inc_adb_irefcnt(dns_adb_t *adb) { LOCK(&adb->reflock); adb->irefcnt++; UNLOCK(&adb->reflock); } -static inline void +static void inc_adb_erefcnt(dns_adb_t *adb) { LOCK(&adb->reflock); adb->erefcnt++; UNLOCK(&adb->reflock); } -static inline void +static void inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, bool lock) { int bucket; @@ -1644,7 +1644,7 @@ inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, bool lock) { } } -static inline bool +static bool dec_entry_refcnt(dns_adb_t *adb, bool overmem, dns_adbentry_t *entry, bool lock) { int bucket; @@ -1687,7 +1687,7 @@ dec_entry_refcnt(dns_adb_t *adb, bool overmem, dns_adbentry_t *entry, return (result); } -static inline dns_adbname_t * +static dns_adbname_t * new_adbname(dns_adb_t *adb, const dns_name_t *dnsname) { dns_adbname_t *name; @@ -1730,7 +1730,7 @@ new_adbname(dns_adb_t *adb, const dns_name_t *dnsname) { return (name); } -static inline void +static void free_adbname(dns_adb_t *adb, dns_adbname_t **name) { dns_adbname_t *n; @@ -1756,7 +1756,7 @@ free_adbname(dns_adb_t *adb, dns_adbname_t **name) { UNLOCK(&adb->namescntlock); } -static inline dns_adbnamehook_t * +static dns_adbnamehook_t * new_adbnamehook(dns_adb_t *adb, dns_adbentry_t *entry) { dns_adbnamehook_t *nh; @@ -1770,7 +1770,7 @@ new_adbnamehook(dns_adb_t *adb, dns_adbentry_t *entry) { return (nh); } -static inline void +static void free_adbnamehook(dns_adb_t *adb, dns_adbnamehook_t **namehook) { dns_adbnamehook_t *nh; @@ -1787,7 +1787,7 @@ free_adbnamehook(dns_adb_t *adb, dns_adbnamehook_t **namehook) { isc_mem_put(adb->mctx, nh, sizeof(*nh)); } -static inline dns_adblameinfo_t * +static dns_adblameinfo_t * new_adblameinfo(dns_adb_t *adb, const dns_name_t *qname, dns_rdatatype_t qtype) { dns_adblameinfo_t *li; @@ -1804,7 +1804,7 @@ new_adblameinfo(dns_adb_t *adb, const dns_name_t *qname, return (li); } -static inline void +static void free_adblameinfo(dns_adb_t *adb, dns_adblameinfo_t **lameinfo) { dns_adblameinfo_t *li; @@ -1821,7 +1821,7 @@ free_adblameinfo(dns_adb_t *adb, dns_adblameinfo_t **lameinfo) { isc_mem_put(adb->mctx, li, sizeof(*li)); } -static inline dns_adbentry_t * +static dns_adbentry_t * new_adbentry(dns_adb_t *adb) { dns_adbentry_t *e; @@ -1866,7 +1866,7 @@ new_adbentry(dns_adb_t *adb) { return (e); } -static inline void +static void free_adbentry(dns_adb_t *adb, dns_adbentry_t **entry) { dns_adbentry_t *e; dns_adblameinfo_t *li; @@ -1899,7 +1899,7 @@ free_adbentry(dns_adb_t *adb, dns_adbentry_t **entry) { UNLOCK(&adb->entriescntlock); } -static inline dns_adbfind_t * +static dns_adbfind_t * new_adbfind(dns_adb_t *adb) { dns_adbfind_t *h; @@ -1935,7 +1935,7 @@ new_adbfind(dns_adb_t *adb) { return (h); } -static inline dns_adbfetch_t * +static dns_adbfetch_t * new_adbfetch(dns_adb_t *adb) { dns_adbfetch_t *f; @@ -1951,7 +1951,7 @@ new_adbfetch(dns_adb_t *adb) { return (f); } -static inline void +static void free_adbfetch(dns_adb_t *adb, dns_adbfetch_t **fetch) { dns_adbfetch_t *f; @@ -1968,7 +1968,7 @@ free_adbfetch(dns_adb_t *adb, dns_adbfetch_t **fetch) { isc_mem_put(adb->mctx, f, sizeof(*f)); } -static inline bool +static bool free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) { dns_adbfind_t *find; @@ -1996,7 +1996,7 @@ free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) { * must be locked, and the reference count must be bumped up by one * if this function returns a valid pointer. */ -static inline dns_adbaddrinfo_t * +static dns_adbaddrinfo_t * new_adbaddrinfo(dns_adb_t *adb, dns_adbentry_t *entry, in_port_t port) { dns_adbaddrinfo_t *ai; @@ -2014,7 +2014,7 @@ new_adbaddrinfo(dns_adb_t *adb, dns_adbentry_t *entry, in_port_t port) { return (ai); } -static inline void +static void free_adbaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **ainfo) { dns_adbaddrinfo_t *ai; @@ -2037,7 +2037,7 @@ free_adbaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **ainfo) { * On the first call to this function, *bucketp must be set to * DNS_ADB_INVALIDBUCKET. */ -static inline dns_adbname_t * +static dns_adbname_t * find_name_and_lock(dns_adb_t *adb, const dns_name_t *name, unsigned int options, int *bucketp) { dns_adbname_t *adbname; @@ -2080,7 +2080,7 @@ find_name_and_lock(dns_adb_t *adb, const dns_name_t *name, unsigned int options, * if this function is called multiple times locking is only done if * the bucket changes. */ -static inline dns_adbentry_t * +static dns_adbentry_t * find_entry_and_lock(dns_adb_t *adb, const isc_sockaddr_t *addr, int *bucketp, isc_stdtime_t now) { dns_adbentry_t *entry, *entry_next; @@ -3624,7 +3624,7 @@ print_namehook_list(FILE *f, const char *legend, dns_adb_t *adb, } } -static inline void +static void print_fetch(FILE *f, dns_adbfetch_t *ft, const char *type) { fprintf(f, "\t\tFetch(%s): %p -> { fetch %p }\n", type, ft, ft->fetch); } diff --git a/lib/dns/byaddr.c b/lib/dns/byaddr.c index 53b0ac7581..b913cd3f14 100644 --- a/lib/dns/byaddr.c +++ b/lib/dns/byaddr.c @@ -108,7 +108,7 @@ struct dns_byaddr { #define MAX_RESTARTS 16 -static inline isc_result_t +static isc_result_t copy_ptr_targets(dns_byaddr_t *byaddr, dns_rdataset_t *rdataset) { isc_result_t result; dns_name_t *name; diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 5db3fef62e..bb4bea3052 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -166,7 +166,7 @@ overmem_cleaning_action(isc_task_t *task, isc_event_t *event); static void water(void *arg, int mark); -static inline isc_result_t +static isc_result_t cache_create_db(dns_cache_t *cache, dns_db_t **db) { isc_result_t result; result = dns_db_create(cache->mctx, cache->db_type, dns_rootname, diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 393d8454a5..7f4416bbee 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -1337,7 +1337,7 @@ catz_process_zones_suboption(dns_catz_zone_t *zone, dns_rdataset_t *value, return (ISC_R_FAILURE); } -static inline void +static void catz_entry_add_or_mod(dns_catz_zone_t *target, isc_ht_t *ht, unsigned char *key, size_t keysize, dns_catz_entry_t *nentry, dns_catz_entry_t *oentry, const char *msg, diff --git a/lib/dns/client.c b/lib/dns/client.c index 73e08c5033..4385aa1db4 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -519,7 +519,7 @@ fetch_done(isc_task_t *task, isc_event_t *event) { client_resfind(rctx, fevent); } -static inline isc_result_t +static isc_result_t start_fetch(resctx_t *rctx) { isc_result_t result; int fopts = 0; diff --git a/lib/dns/compress.c b/lib/dns/compress.c index 131fff4529..583a0eab68 100644 --- a/lib/dns/compress.c +++ b/lib/dns/compress.c @@ -362,7 +362,7 @@ found: return (true); } -static inline unsigned int +static unsigned int name_length(const dns_name_t *name) { isc_region_t r; dns_name_toregion(name, &r); diff --git a/lib/dns/db.c b/lib/dns/db.c index 9ae339816e..9d894ccd7a 100644 --- a/lib/dns/db.c +++ b/lib/dns/db.c @@ -82,7 +82,7 @@ initialize(void) { ISC_LIST_APPEND(implementations, &rbtimp, link); } -static inline dns_dbimplementation_t * +static dns_dbimplementation_t * impfind(const char *name) { dns_dbimplementation_t *imp; diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index c7e683b931..7544a4dba2 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -240,14 +240,14 @@ mgr_log(dns_dispatchmgr_t *mgr, int level, const char *fmt, ...) { msgbuf); } -static inline void +static void inc_stats(dns_dispatchmgr_t *mgr, isc_statscounter_t counter) { if (mgr->stats != NULL) { isc_stats_increment(mgr->stats, counter); } } -static inline void +static void dec_stats(dns_dispatchmgr_t *mgr, isc_statscounter_t counter) { if (mgr->stats != NULL) { isc_stats_decrement(mgr->stats, counter); diff --git a/lib/dns/dlz.c b/lib/dns/dlz.c index b2ff6a6b17..4462a7b001 100644 --- a/lib/dns/dlz.c +++ b/lib/dns/dlz.c @@ -88,7 +88,7 @@ dlz_initialize(void) { /*% * Searches the dlz_implementations list for a driver matching name. */ -static inline dns_dlzimplementation_t * +static dns_dlzimplementation_t * dlz_impfind(const char *name) { dns_dlzimplementation_t *imp; diff --git a/lib/dns/dnssec.c b/lib/dns/dnssec.c index e35a0e85ee..375a6bab6d 100644 --- a/lib/dns/dnssec.c +++ b/lib/dns/dnssec.c @@ -73,7 +73,7 @@ digest_callback(void *arg, isc_region_t *data) { return (dst_context_adddata(ctx, data)); } -static inline void +static void inc_stat(isc_statscounter_t counter) { if (dns_dnssec_stats != NULL) { isc_stats_increment(dns_dnssec_stats, counter); diff --git a/lib/dns/gssapictx.c b/lib/dns/gssapictx.c index 7b91cb501f..6eed7565ab 100644 --- a/lib/dns/gssapictx.c +++ b/lib/dns/gssapictx.c @@ -100,7 +100,7 @@ static gss_OID_desc __gss_spnego_mechanism_oid_desc = { goto out; \ } while (0) -static inline void +static void name_to_gbuffer(const dns_name_t *name, isc_buffer_t *buffer, gss_buffer_desc *gbuffer) { dns_name_t tname; diff --git a/lib/dns/hmac_link.c b/lib/dns/hmac_link.c index 5764a0ff07..6111d21e3c 100644 --- a/lib/dns/hmac_link.c +++ b/lib/dns/hmac_link.c @@ -142,7 +142,7 @@ struct dst_hmac_key { uint8_t key[ISC_MAX_BLOCK_SIZE]; }; -static inline isc_result_t +static isc_result_t getkeybits(dst_key_t *key, struct dst_private_element *element) { uint16_t *bits = (uint16_t *)element->data; @@ -155,7 +155,7 @@ getkeybits(dst_key_t *key, struct dst_private_element *element) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t hmac_createctx(const isc_md_type_t *type, const dst_key_t *key, dst_context_t *dctx) { isc_result_t result; @@ -172,7 +172,7 @@ hmac_createctx(const isc_md_type_t *type, const dst_key_t *key, return (ISC_R_SUCCESS); } -static inline void +static void hmac_destroyctx(dst_context_t *dctx) { isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx; REQUIRE(ctx != NULL); @@ -181,7 +181,7 @@ hmac_destroyctx(dst_context_t *dctx) { dctx->ctxdata.hmac_ctx = NULL; } -static inline isc_result_t +static isc_result_t hmac_adddata(const dst_context_t *dctx, const isc_region_t *data) { isc_result_t result; isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx; @@ -196,7 +196,7 @@ hmac_adddata(const dst_context_t *dctx, const isc_region_t *data) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t hmac_sign(const dst_context_t *dctx, isc_buffer_t *sig) { isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx; REQUIRE(ctx != NULL); @@ -220,7 +220,7 @@ hmac_sign(const dst_context_t *dctx, isc_buffer_t *sig) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t hmac_verify(const dst_context_t *dctx, const isc_region_t *sig) { isc_hmac_t *ctx = dctx->ctxdata.hmac_ctx; unsigned char digest[ISC_MAX_MD_SIZE]; @@ -245,7 +245,7 @@ hmac_verify(const dst_context_t *dctx, const isc_region_t *sig) { : DST_R_VERIFYFAILURE); } -static inline bool +static bool hmac_compare(const isc_md_type_t *type, const dst_key_t *key1, const dst_key_t *key2) { dst_hmac_key_t *hkey1, *hkey2; @@ -263,7 +263,7 @@ hmac_compare(const isc_md_type_t *type, const dst_key_t *key1, isc_md_type_get_block_size(type))); } -static inline isc_result_t +static isc_result_t hmac_generate(const isc_md_type_t *type, dst_key_t *key) { isc_buffer_t b; isc_result_t ret; @@ -291,13 +291,13 @@ hmac_generate(const isc_md_type_t *type, dst_key_t *key) { return (ret); } -static inline bool +static bool hmac_isprivate(const dst_key_t *key) { UNUSED(key); return (true); } -static inline void +static void hmac_destroy(dst_key_t *key) { dst_hmac_key_t *hkey = key->keydata.hmac_key; isc_safe_memwipe(hkey, sizeof(*hkey)); @@ -305,7 +305,7 @@ hmac_destroy(dst_key_t *key) { key->keydata.hmac_key = NULL; } -static inline isc_result_t +static isc_result_t hmac_todns(const dst_key_t *key, isc_buffer_t *data) { REQUIRE(key != NULL && key->keydata.hmac_key != NULL); dst_hmac_key_t *hkey = key->keydata.hmac_key; @@ -320,7 +320,7 @@ hmac_todns(const dst_key_t *key, isc_buffer_t *data) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t hmac_fromdns(const isc_md_type_t *type, dst_key_t *key, isc_buffer_t *data) { dst_hmac_key_t *hkey; unsigned int keylen; @@ -355,7 +355,7 @@ hmac_fromdns(const isc_md_type_t *type, dst_key_t *key, isc_buffer_t *data) { return (ISC_R_SUCCESS); } -static inline int +static int hmac__get_tag_key(const isc_md_type_t *type) { if (type == ISC_MD_MD5) { return (TAG_HMACMD5_KEY); @@ -374,7 +374,7 @@ hmac__get_tag_key(const isc_md_type_t *type) { } } -static inline int +static int hmac__get_tag_bits(const isc_md_type_t *type) { if (type == ISC_MD_MD5) { return (TAG_HMACMD5_BITS); @@ -393,7 +393,7 @@ hmac__get_tag_bits(const isc_md_type_t *type) { } } -static inline isc_result_t +static isc_result_t hmac_tofile(const isc_md_type_t *type, const dst_key_t *key, const char *directory) { dst_hmac_key_t *hkey; @@ -426,7 +426,7 @@ hmac_tofile(const isc_md_type_t *type, const dst_key_t *key, return (dst__privstruct_writefile(key, &priv, directory)); } -static inline int +static int hmac__to_dst_alg(const isc_md_type_t *type) { if (type == ISC_MD_MD5) { return (DST_ALG_HMACMD5); @@ -445,7 +445,7 @@ hmac__to_dst_alg(const isc_md_type_t *type) { } } -static inline isc_result_t +static isc_result_t hmac_parse(const isc_md_type_t *type, dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) { dst_private_t priv; diff --git a/lib/dns/journal.c b/lib/dns/journal.c index d9aee371c6..23534115ed 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -110,13 +110,13 @@ static isc_result_t index_to_disk(dns_journal_t *); -static inline uint32_t +static uint32_t decode_uint32(unsigned char *p) { return (((uint32_t)p[0] << 24) + ((uint32_t)p[1] << 16) + ((uint32_t)p[2] << 8) + ((uint32_t)p[3] << 0)); } -static inline void +static void encode_uint32(uint32_t val, unsigned char *p) { p[0] = (uint8_t)(val >> 24); p[1] = (uint8_t)(val >> 16); diff --git a/lib/dns/kasp.c b/lib/dns/kasp.c index fc92819a9e..09c6810958 100644 --- a/lib/dns/kasp.c +++ b/lib/dns/kasp.c @@ -80,7 +80,7 @@ dns_kasp_attach(dns_kasp_t *source, dns_kasp_t **targetp) { *targetp = source; } -static inline void +static void destroy(dns_kasp_t *kasp) { dns_kasp_key_t *key; dns_kasp_key_t *key_next; diff --git a/lib/dns/lookup.c b/lib/dns/lookup.c index 4af1c2bb41..d370c19d2f 100644 --- a/lib/dns/lookup.c +++ b/lib/dns/lookup.c @@ -73,7 +73,7 @@ fetch_done(isc_task_t *task, isc_event_t *event) { lookup_find(lookup, fevent); } -static inline isc_result_t +static isc_result_t start_fetch(dns_lookup_t *lookup) { isc_result_t result; diff --git a/lib/dns/master.c b/lib/dns/master.c index a9cfe4d4fa..4f0dce775f 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -335,14 +335,14 @@ static unsigned char ip6_arpa_offsets[] = { 0, 4, 9 }; static dns_name_t const ip6_arpa = DNS_NAME_INITABSOLUTE(ip6_arpa_data, ip6_arpa_offsets); -static inline bool +static bool dns_master_isprimary(dns_loadctx_t *lctx) { return ((lctx->options & DNS_MASTER_ZONE) != 0 && (lctx->options & DNS_MASTER_SECONDARY) == 0 && (lctx->options & DNS_MASTER_KEY) == 0); } -static inline isc_result_t +static isc_result_t gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token, bool eol, dns_rdatacallbacks_t *callbacks) { isc_result_t result; @@ -2204,7 +2204,7 @@ cleanup: * Fill/check exists buffer with 'len' bytes. Track remaining bytes to be * read when incrementally filling the buffer. */ -static inline isc_result_t +static isc_result_t read_and_check(bool do_read, isc_buffer_t *buffer, size_t len, FILE *f, uint32_t *totallen) { isc_result_t result; diff --git a/lib/dns/message.c b/lib/dns/message.c index 31d92a96ca..84f750e93d 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -170,19 +170,19 @@ struct dns_msgblock { ISC_LINK(dns_msgblock_t) link; }; /* dynamically sized */ -static inline dns_msgblock_t * +static dns_msgblock_t * msgblock_allocate(isc_mem_t *, unsigned int, unsigned int); #define msgblock_get(block, type) \ ((type *)msgblock_internalget(block, sizeof(type))) -static inline void * +static void * msgblock_internalget(dns_msgblock_t *, unsigned int); -static inline void +static void msgblock_reset(dns_msgblock_t *); -static inline void +static void msgblock_free(isc_mem_t *, dns_msgblock_t *, unsigned int); static void @@ -195,7 +195,7 @@ logfmtpacket(dns_message_t *message, const char *description, * Allocate a new dns_msgblock_t, and return a pointer to it. If no memory * is free, return NULL. */ -static inline dns_msgblock_t * +static dns_msgblock_t * msgblock_allocate(isc_mem_t *mctx, unsigned int sizeof_type, unsigned int count) { dns_msgblock_t *block; @@ -217,7 +217,7 @@ msgblock_allocate(isc_mem_t *mctx, unsigned int sizeof_type, * Return an element from the msgblock. If no more are available, return * NULL. */ -static inline void * +static void * msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) { void *ptr; @@ -233,7 +233,7 @@ msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) { return (ptr); } -static inline void +static void msgblock_reset(dns_msgblock_t *block) { block->remaining = block->count; } @@ -241,7 +241,7 @@ msgblock_reset(dns_msgblock_t *block) { /* * Release memory associated with a message block. */ -static inline void +static void msgblock_free(isc_mem_t *mctx, dns_msgblock_t *block, unsigned int sizeof_type) { unsigned int length; @@ -256,7 +256,7 @@ msgblock_free(isc_mem_t *mctx, dns_msgblock_t *block, * "current" buffer. (which is always the last on the list, for our * uses) */ -static inline isc_result_t +static isc_result_t newbuffer(dns_message_t *msg, unsigned int size) { isc_buffer_t *dynbuf; @@ -267,7 +267,7 @@ newbuffer(dns_message_t *msg, unsigned int size) { return (ISC_R_SUCCESS); } -static inline isc_buffer_t * +static isc_buffer_t * currentbuffer(dns_message_t *msg) { isc_buffer_t *dynbuf; @@ -277,12 +277,12 @@ currentbuffer(dns_message_t *msg) { return (dynbuf); } -static inline void +static void releaserdata(dns_message_t *msg, dns_rdata_t *rdata) { ISC_LIST_PREPEND(msg->freerdata, rdata, link); } -static inline dns_rdata_t * +static dns_rdata_t * newrdata(dns_message_t *msg) { dns_msgblock_t *msgblock; dns_rdata_t *rdata; @@ -307,12 +307,12 @@ newrdata(dns_message_t *msg) { return (rdata); } -static inline void +static void releaserdatalist(dns_message_t *msg, dns_rdatalist_t *rdatalist) { ISC_LIST_PREPEND(msg->freerdatalist, rdatalist, link); } -static inline dns_rdatalist_t * +static dns_rdatalist_t * newrdatalist(dns_message_t *msg) { dns_msgblock_t *msgblock; dns_rdatalist_t *rdatalist; @@ -337,7 +337,7 @@ out: return (rdatalist); } -static inline dns_offsets_t * +static dns_offsets_t * newoffsets(dns_message_t *msg) { dns_msgblock_t *msgblock; dns_offsets_t *offsets; @@ -355,7 +355,7 @@ newoffsets(dns_message_t *msg) { return (offsets); } -static inline void +static void msginitheader(dns_message_t *m) { m->id = 0; m->flags = 0; @@ -364,7 +364,7 @@ msginitheader(dns_message_t *m) { m->rdclass = 0; } -static inline void +static void msginitprivate(dns_message_t *m) { unsigned int i; @@ -386,7 +386,7 @@ msginitprivate(dns_message_t *m) { m->buffer = NULL; } -static inline void +static void msginittsig(dns_message_t *m) { m->tsigstatus = dns_rcode_noerror; m->querytsigstatus = dns_rcode_noerror; @@ -402,7 +402,7 @@ msginittsig(dns_message_t *m) { * Init elements to default state. Used both when allocating a new element * and when resetting one. */ -static inline void +static void msginit(dns_message_t *m) { msginitheader(m); msginitprivate(m); @@ -431,7 +431,7 @@ msginit(dns_message_t *m) { m->indent.count = 0; } -static inline void +static void msgresetnames(dns_message_t *msg, unsigned int first_section) { unsigned int i; dns_name_t *name, *next_name; @@ -1848,7 +1848,7 @@ dns_message_renderreserve(dns_message_t *msg, unsigned int space) { return (ISC_R_SUCCESS); } -static inline bool +static bool wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) { int pass_needed; diff --git a/lib/dns/ncache.c b/lib/dns/ncache.c index 0b9c59def1..2316eb04a7 100644 --- a/lib/dns/ncache.c +++ b/lib/dns/ncache.c @@ -48,7 +48,7 @@ addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, dns_ttl_t maxttl, bool optout, bool secure, dns_rdataset_t *addedrdataset); -static inline isc_result_t +static isc_result_t copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) { isc_result_t result; unsigned int count; diff --git a/lib/dns/order.c b/lib/dns/order.c index 2ddf807c57..b3112d32dd 100644 --- a/lib/dns/order.c +++ b/lib/dns/order.c @@ -90,7 +90,7 @@ dns_order_add(dns_order_t *order, const dns_name_t *name, return (ISC_R_SUCCESS); } -static inline bool +static bool match(const dns_name_t *name1, const dns_name_t *name2) { if (dns_name_iswildcard(name2)) { return (dns_name_matcheswildcard(name1, name2)); diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index fd6fb1f427..0bdaaf8a8a 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -71,7 +71,7 @@ #define HASHSIZE(bits) (UINT64_C(1) << (bits)) -static inline uint32_t +static uint32_t hash_32(uint32_t val, unsigned int bits) { REQUIRE(bits <= RBT_HASH_MAX_BITS); /* High bits are more random. */ @@ -172,7 +172,7 @@ struct dns_rbt { * path of the tree traversal code. */ -static inline void +static void NODENAME(dns_rbtnode_t *node, dns_name_t *name) { name->length = NAMELEN(node); name->labels = OFFSETLEN(node); @@ -183,7 +183,6 @@ NODENAME(dns_rbtnode_t *node, dns_name_t *name) { } #ifdef DEBUG -#define inline /* * A little something to help out in GDB. */ @@ -206,7 +205,7 @@ Name(dns_rbtnode_t *node) { * Upper node is the parent of the root of the passed node's * subtree. The passed node must not be NULL. */ -static inline dns_rbtnode_t * +static dns_rbtnode_t * get_upper_node(dns_rbtnode_t *node) { return (UPPERNODE(node)); } @@ -232,15 +231,15 @@ dns__rbtnode_getdistance(dns_rbtnode_t *node) { static isc_result_t create_node(isc_mem_t *mctx, const dns_name_t *name, dns_rbtnode_t **nodep); -static inline void +static void hashtable_new(dns_rbt_t *rbt, uint8_t index, uint8_t bits); -static inline void +static void hashtable_free(dns_rbt_t *rbt, uint8_t index); -static inline void +static void hash_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name); -static inline void +static void unhash_node(dns_rbt_t *rbt, dns_rbtnode_t *node); static uint32_t @@ -251,15 +250,15 @@ static void hashtable_rehash_one(dns_rbt_t *rbt); static void maybe_rehash(dns_rbt_t *rbt, size_t size); -static inline bool +static bool rehashing_in_progress(dns_rbt_t *rbt); #define TRY_NEXTTABLE(hindex, rbt) \ (hindex == rbt->hindex && rehashing_in_progress(rbt)) -static inline void +static void rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp); -static inline void +static void rotate_right(dns_rbtnode_t *node, dns_rbtnode_t **rootp); static void @@ -388,7 +387,7 @@ dns_rbt_hashsize(dns_rbt_t *rbt) { return (1 << hashbits); } -static inline isc_result_t +static isc_result_t chain_name(dns_rbtnodechain_t *chain, dns_name_t *name, bool include_chain_end) { dns_name_t nodename; @@ -415,7 +414,7 @@ chain_name(dns_rbtnodechain_t *chain, dns_name_t *name, return (result); } -static inline isc_result_t +static isc_result_t move_chain_to_last(dns_rbtnodechain_t *chain, dns_rbtnode_t *node) { do { /* @@ -1609,7 +1608,7 @@ create_node(isc_mem_t *mctx, const dns_name_t *name, dns_rbtnode_t **nodep) { /* * Add a node to the hash table */ -static inline void +static void hash_add_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) { uint32_t hash; @@ -1626,7 +1625,7 @@ hash_add_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) { /* * Initialize hash table */ -static inline void +static void hashtable_new(dns_rbt_t *rbt, uint8_t index, uint8_t bits) { size_t size; @@ -1642,7 +1641,7 @@ hashtable_new(dns_rbt_t *rbt, uint8_t index, uint8_t bits) { memset(rbt->hashtable[index], 0, size); } -static inline void +static void hashtable_free(dns_rbt_t *rbt, uint8_t index) { size_t size = HASHSIZE(rbt->hashbits[index]) * sizeof(dns_rbtnode_t *); isc_mem_put(rbt->mctx, rbt->hashtable[index], size); @@ -1734,12 +1733,12 @@ maybe_rehash(dns_rbt_t *rbt, size_t newcount) { } } -static inline bool +static bool rehashing_in_progress(dns_rbt_t *rbt) { return (rbt->hashtable[RBT_HASH_NEXTTABLE(rbt->hindex)] != NULL); } -static inline bool +static bool hashtable_is_overcommited(dns_rbt_t *rbt) { return (rbt->nodecount >= (HASHSIZE(rbt->hashbits[rbt->hindex]) * RBT_HASH_OVERCOMMIT)); @@ -1749,7 +1748,7 @@ hashtable_is_overcommited(dns_rbt_t *rbt) { * Add a node to the hash table. Rehash the hashtable if the node count * rises above a critical level. */ -static inline void +static void hash_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) { REQUIRE(DNS_RBTNODE_VALID(node)); @@ -1767,7 +1766,7 @@ hash_node(dns_rbt_t *rbt, dns_rbtnode_t *node, const dns_name_t *name) { /* * Remove a node from the hash table */ -static inline void +static void unhash_node(dns_rbt_t *rbt, dns_rbtnode_t *dnode) { uint32_t hash; uint8_t hindex = rbt->hindex; @@ -1808,7 +1807,7 @@ nexttable: UNREACHABLE(); } -static inline void +static void rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp) { dns_rbtnode_t *child; @@ -1841,7 +1840,7 @@ rotate_left(dns_rbtnode_t *node, dns_rbtnode_t **rootp) { PARENT(node) = child; } -static inline void +static void rotate_right(dns_rbtnode_t *node, dns_rbtnode_t **rootp) { dns_rbtnode_t *child; diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 79c65ae9ce..29dce2ed02 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -13,8 +13,6 @@ /*! \file */ -/* #define inline */ - #include #include #include @@ -319,7 +317,7 @@ typedef ISC_LIST(dns_rbtnode_t) rbtnodelist_t; #define GOLDEN_RATIO_32 0x61C88647 #define HASHSIZE(bits) (UINT64_C(1) << (bits)) -static inline uint32_t +static uint32_t hash_32(uint32_t val, unsigned int bits) { REQUIRE(bits <= RBTDB_GLUE_TABLE_MAX_BITS); /* High bits are more random. */ @@ -548,7 +546,7 @@ rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name, static isc_result_t rdataset_getclosest(dns_rdataset_t *rdataset, dns_name_t *name, dns_rdataset_t *neg, dns_rdataset_t *negsig); -static inline bool +static bool need_headerupdate(rdatasetheader_t *header, isc_stdtime_t now); static void update_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header, isc_stdtime_t now); @@ -1155,7 +1153,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb, bool log, isc_event_t *event) { isc_mem_putanddetach(&rbtdb->common.mctx, rbtdb, sizeof(*rbtdb)); } -static inline void +static void maybe_free_rbtdb(dns_rbtdb_t *rbtdb) { bool want_free = false; unsigned int i; @@ -1242,7 +1240,7 @@ currentversion(dns_db_t *db, dns_dbversion_t **versionp) { *versionp = (dns_dbversion_t *)version; } -static inline rbtdb_version_t * +static rbtdb_version_t * allocate_version(isc_mem_t *mctx, rbtdb_serial_t serial, unsigned int references, bool writer) { rbtdb_version_t *version; @@ -1359,7 +1357,7 @@ add_changed(dns_rbtdb_t *rbtdb, rbtdb_version_t *version, dns_rbtnode_t *node) { return (changed); } -static inline void +static void free_noqname(isc_mem_t *mctx, struct noqname **noqname) { if (dns_name_dynamic(&(*noqname)->name)) { dns_name_free(&(*noqname)->name, mctx); @@ -1376,7 +1374,7 @@ free_noqname(isc_mem_t *mctx, struct noqname **noqname) { *noqname = NULL; } -static inline void +static void init_rdataset(dns_rbtdb_t *rbtdb, rdatasetheader_t *h) { ISC_LINK_INIT(h, link); h->heap_index = 0; @@ -1407,7 +1405,7 @@ update_newheader(rdatasetheader_t *newh, rdatasetheader_t *old) { } } -static inline rdatasetheader_t * +static rdatasetheader_t * new_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx) { rdatasetheader_t *h; @@ -1424,7 +1422,7 @@ new_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx) { return (h); } -static inline void +static void free_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *rdataset) { unsigned int size; int idx; @@ -1460,7 +1458,7 @@ free_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *rdataset) { isc_mem_put(mctx, rdataset, size); } -static inline void +static void rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) { rdatasetheader_t *header, *dcurrent; bool make_dirty = false; @@ -1493,7 +1491,7 @@ rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) { } } -static inline void +static void mark_header_ancient(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) { uint_least16_t attributes = atomic_load_acquire(&header->attributes); uint_least16_t newattributes = 0; @@ -1522,7 +1520,7 @@ mark_header_ancient(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) { update_rrsetstats(rbtdb, header->type, newattributes, true); } -static inline void +static void mark_header_stale(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) { uint_least16_t attributes = atomic_load_acquire(&header->attributes); uint_least16_t newattributes = 0; @@ -1551,7 +1549,7 @@ mark_header_stale(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) { update_rrsetstats(rbtdb, header->type, newattributes, true); } -static inline void +static void clean_stale_headers(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *top) { rdatasetheader_t *d, *down_next; @@ -1563,7 +1561,7 @@ clean_stale_headers(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, top->down = NULL; } -static inline void +static void clean_cache_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) { rdatasetheader_t *current, *top_prev, *top_next; isc_mem_t *mctx = rbtdb->common.mctx; @@ -1596,7 +1594,7 @@ clean_cache_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) { node->dirty = 0; } -static inline void +static void clean_zone_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rbtdb_serial_t least_serial) { rdatasetheader_t *current, *dcurrent, *down_next, *dparent; @@ -1807,7 +1805,7 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) { /* * Caller must be holding the node lock. */ -static inline void +static void new_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, isc_rwlocktype_t locktype) { if (locktype == isc_rwlocktype_write && ISC_LINK_LINKED(node, deadlink)) @@ -1825,13 +1823,13 @@ new_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, /*% * The tree lock must be held for the result to be valid. */ -static inline bool +static bool is_leaf(dns_rbtnode_t *node) { return (node->parent != NULL && node->parent->down == node && node->left == NULL && node->right == NULL); } -static inline void +static void send_to_prune_tree(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, isc_rwlocktype_t locktype) { isc_event_t *ev; @@ -1906,7 +1904,7 @@ cleanup_dead_nodes(dns_rbtdb_t *rbtdb, int bucketnum) { * few cases where the node can be in the deadnode list (only empty nodes can * have been added to the list). */ -static inline void +static void reactivate_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, isc_rwlocktype_t treelocktype) { isc_rwlocktype_t locktype = isc_rwlocktype_read; @@ -2178,7 +2176,7 @@ prune_tree(isc_task_t *task, isc_event_t *event) { detach((dns_db_t **)&rbtdb); } -static inline void +static void make_least_version(dns_rbtdb_t *rbtdb, rbtdb_version_t *version, rbtdb_changedlist_t *cleanup_list) { /* @@ -2190,7 +2188,7 @@ make_least_version(dns_rbtdb_t *rbtdb, rbtdb_version_t *version, ISC_LIST_INIT(version->changed_list); } -static inline void +static void cleanup_nondirty(rbtdb_version_t *version, rbtdb_changedlist_t *cleanup_list) { rbtdb_changed_t *changed, *next_changed; @@ -2972,7 +2970,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) { return (result); } -static inline void +static void bind_rdataset(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rdatasetheader_t *header, isc_stdtime_t now, isc_rwlocktype_t locktype, dns_rdataset_t *rdataset) { @@ -3093,7 +3091,7 @@ bind_rdataset(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rdatasetheader_t *header, } } -static inline isc_result_t +static isc_result_t setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep, dns_name_t *foundname, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) { @@ -3153,7 +3151,7 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep, return (DNS_R_DELEGATION); } -static inline bool +static bool valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type, dns_rbtnode_t *node) { unsigned char *raw; /* RDATASLAB */ @@ -3209,7 +3207,7 @@ valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type, return (valid); } -static inline bool +static bool activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain, const dns_name_t *name) { dns_fixedname_t fnext; @@ -3262,7 +3260,7 @@ activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain, return (answer); } -static inline bool +static bool activeemptynode(rbtdb_search_t *search, const dns_name_t *qname, dns_name_t *wname) { dns_fixedname_t fnext; @@ -3382,7 +3380,7 @@ activeemptynode(rbtdb_search_t *search, const dns_name_t *qname, return (answer); } -static inline isc_result_t +static isc_result_t find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep, const dns_name_t *qname) { unsigned int i, j; @@ -3582,7 +3580,7 @@ matchparams(rdatasetheader_t *header, rbtdb_search_t *search) { /* * Find node of the NSEC/NSEC3 record that is 'name'. */ -static inline isc_result_t +static isc_result_t previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search, dns_name_t *name, dns_name_t *origin, dns_rbtnode_t **nodep, dns_rbtnodechain_t *nsecchain, @@ -3698,7 +3696,7 @@ previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search, * search chain. For NSEC3 records only NSEC3 records that match the * current NSEC3PARAM record are considered. */ -static inline isc_result_t +static isc_result_t find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep, dns_name_t *foundname, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, dns_rbt_t *tree, @@ -4623,7 +4621,7 @@ cache_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) { return (result); } -static inline isc_result_t +static isc_result_t find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node, dns_dbnode_t **nodep, dns_name_t *foundname, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) { @@ -6063,7 +6061,7 @@ resign_delete(dns_rbtdb_t *rbtdb, rbtdb_version_t *version, } } -static inline uint64_t +static uint64_t recordsize(rdatasetheader_t *header, unsigned int namelen) { return (dns_rdataslab_rdatasize((unsigned char *)header, sizeof(*header)) + @@ -6616,7 +6614,7 @@ find_header: return (ISC_R_SUCCESS); } -static inline bool +static bool delegating_type(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, rbtdb_rdatatype_t type) { if (IS_CACHE(rbtdb)) { @@ -6634,7 +6632,7 @@ delegating_type(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, return (false); } -static inline isc_result_t +static isc_result_t addnoqname(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader, dns_rdataset_t *rdataset) { struct noqname *noqname; @@ -6679,7 +6677,7 @@ cleanup: return (result); } -static inline isc_result_t +static isc_result_t addclosest(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader, dns_rdataset_t *rdataset) { struct noqname *closest; @@ -8837,7 +8835,7 @@ rdatasetiter_current(dns_rdatasetiter_t *iterator, dns_rdataset_t *rdataset) { * Database Iterator Methods */ -static inline void +static void reference_iter_node(rbtdb_dbiterator_t *rbtdbiter) { dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db; dns_rbtnode_t *node = rbtdbiter->node; @@ -8850,7 +8848,7 @@ reference_iter_node(rbtdb_dbiterator_t *rbtdbiter) { reactivate_node(rbtdb, node, rbtdbiter->tree_locked); } -static inline void +static void dereference_iter_node(rbtdb_dbiterator_t *rbtdbiter) { dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db; dns_rbtnode_t *node = rbtdbiter->node; @@ -8919,7 +8917,7 @@ flush_deletions(rbtdb_dbiterator_t *rbtdbiter) { } } -static inline void +static void resume_iteration(rbtdb_dbiterator_t *rbtdbiter) { dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db; @@ -9969,7 +9967,7 @@ no_glue: * * Caller must hold the node (read or write) lock. */ -static inline bool +static bool need_headerupdate(rdatasetheader_t *header, isc_stdtime_t now) { if (RDATASET_ATTR_GET(header, (RDATASET_ATTR_NONEXISTENT | RDATASET_ATTR_ANCIENT | diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index e1adee9dd8..a0108548f9 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -259,17 +259,17 @@ static isc_result_t unknown_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, isc_buffer_t *target); -static inline isc_result_t generic_fromtext_key(ARGS_FROMTEXT); +static isc_result_t generic_fromtext_key(ARGS_FROMTEXT); -static inline isc_result_t generic_totext_key(ARGS_TOTEXT); +static isc_result_t generic_totext_key(ARGS_TOTEXT); -static inline isc_result_t generic_fromwire_key(ARGS_FROMWIRE); +static isc_result_t generic_fromwire_key(ARGS_FROMWIRE); -static inline isc_result_t generic_fromstruct_key(ARGS_FROMSTRUCT); +static isc_result_t generic_fromstruct_key(ARGS_FROMSTRUCT); -static inline isc_result_t generic_tostruct_key(ARGS_TOSTRUCT); +static isc_result_t generic_tostruct_key(ARGS_TOSTRUCT); -static inline void generic_freestruct_key(ARGS_FREESTRUCT); +static void generic_freestruct_key(ARGS_FREESTRUCT); static isc_result_t generic_fromtext_txt(ARGS_FROMTEXT); @@ -351,7 +351,7 @@ static dns_name_t const gc_msdcs = DNS_NAME_INITNONABSOLUTE(gc_msdcs_data, * \note * (1) does not touch `dst' unless it's returning 1. */ -static inline int +static int locator_pton(const char *src, unsigned char *dst) { static const char xdigits_l[] = "0123456789abcdef", xdigits_u[] = "0123456789ABCDEF"; @@ -409,7 +409,7 @@ locator_pton(const char *src, unsigned char *dst) { return (1); } -static inline void +static void name_duporclone(const dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) { if (mctx != NULL) { dns_name_dup(source, mctx, target); @@ -418,7 +418,7 @@ name_duporclone(const dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) { } } -static inline void * +static void * mem_maybedup(isc_mem_t *mctx, void *source, size_t length) { void *copy; @@ -431,7 +431,7 @@ mem_maybedup(isc_mem_t *mctx, void *source, size_t length) { return (copy); } -static inline isc_result_t +static isc_result_t typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target, bool allow_empty) { isc_token_t token; unsigned char bm[8 * 1024]; /* 64k bits */ @@ -499,7 +499,7 @@ typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target, bool allow_empty) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t typemap_totext(isc_region_t *sr, dns_rdata_textctx_t *tctx, isc_buffer_t *target) { unsigned int i, j, k; diff --git a/lib/dns/rdata/any_255/tsig_250.c b/lib/dns/rdata/any_255/tsig_250.c index f84d8b7926..a2f903a064 100644 --- a/lib/dns/rdata/any_255/tsig_250.c +++ b/lib/dns/rdata/any_255/tsig_250.c @@ -17,7 +17,7 @@ #define RRTYPE_TSIG_ATTRIBUTES \ (DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_NOTQUESTION) -static inline isc_result_t +static isc_result_t fromtext_any_tsig(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -130,7 +130,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, (int)token.value.as_ulong)); } -static inline isc_result_t +static isc_result_t totext_any_tsig(ARGS_TOTEXT) { isc_region_t sr; isc_region_t sigr; @@ -251,7 +251,7 @@ totext_any_tsig(ARGS_TOTEXT) { } } -static inline isc_result_t +static isc_result_t fromwire_any_tsig(ARGS_FROMWIRE) { isc_region_t sr; dns_name_t name; @@ -320,7 +320,7 @@ fromwire_any_tsig(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, n + 2)); } -static inline isc_result_t +static isc_result_t towire_any_tsig(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -339,7 +339,7 @@ towire_any_tsig(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_any_tsig(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -369,7 +369,7 @@ compare_any_tsig(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_any_tsig(ARGS_FROMSTRUCT) { dns_rdata_any_tsig_t *tsig = source; isc_region_t tr; @@ -441,7 +441,7 @@ fromstruct_any_tsig(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, tsig->other, tsig->otherlen)); } -static inline isc_result_t +static isc_result_t tostruct_any_tsig(ARGS_TOSTRUCT) { dns_rdata_any_tsig_t *tsig; dns_name_t alg; @@ -541,7 +541,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_any_tsig(ARGS_FREESTRUCT) { dns_rdata_any_tsig_t *tsig = (dns_rdata_any_tsig_t *)source; @@ -563,7 +563,7 @@ freestruct_any_tsig(ARGS_FREESTRUCT) { tsig->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_any_tsig(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_tsig); REQUIRE(rdata->rdclass == dns_rdataclass_any); @@ -576,7 +576,7 @@ additionaldata_any_tsig(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_any_tsig(ARGS_DIGEST) { REQUIRE(rdata->type == dns_rdatatype_tsig); REQUIRE(rdata->rdclass == dns_rdataclass_any); @@ -588,7 +588,7 @@ digest_any_tsig(ARGS_DIGEST) { return (ISC_R_NOTIMPLEMENTED); } -static inline bool +static bool checkowner_any_tsig(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_tsig); REQUIRE(rdclass == dns_rdataclass_any); @@ -601,7 +601,7 @@ checkowner_any_tsig(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_any_tsig(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_tsig); REQUIRE(rdata->rdclass == dns_rdataclass_any); @@ -613,7 +613,7 @@ checknames_any_tsig(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_any_tsig(ARGS_COMPARE) { return (compare_any_tsig(rdata1, rdata2)); } diff --git a/lib/dns/rdata/ch_3/a_1.c b/lib/dns/rdata/ch_3/a_1.c index cfe16b69a4..a3303a88e4 100644 --- a/lib/dns/rdata/ch_3/a_1.c +++ b/lib/dns/rdata/ch_3/a_1.c @@ -21,7 +21,7 @@ #define RRTYPE_A_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_ch_a(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -64,7 +64,7 @@ fromtext_ch_a(ARGS_FROMTEXT) { return (uint16_tobuffer(token.value.as_ulong, target)); } -static inline isc_result_t +static isc_result_t totext_ch_a(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -93,7 +93,7 @@ totext_ch_a(ARGS_TOTEXT) { return (str_totext(buf, target)); } -static inline isc_result_t +static isc_result_t fromwire_ch_a(ARGS_FROMWIRE) { isc_region_t sregion; isc_region_t tregion; @@ -127,7 +127,7 @@ fromwire_ch_a(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_ch_a(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -158,7 +158,7 @@ towire_ch_a(ARGS_TOWIRE) { return (ISC_R_SUCCESS); } -static inline int +static int compare_ch_a(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -196,7 +196,7 @@ compare_ch_a(ARGS_COMPARE) { return (order); } -static inline isc_result_t +static isc_result_t fromstruct_ch_a(ARGS_FROMSTRUCT) { dns_rdata_ch_a_t *a = source; isc_region_t region; @@ -215,7 +215,7 @@ fromstruct_ch_a(ARGS_FROMSTRUCT) { return (uint16_tobuffer(ntohs(a->ch_addr), target)); } -static inline isc_result_t +static isc_result_t tostruct_ch_a(ARGS_TOSTRUCT) { dns_rdata_ch_a_t *a = target; isc_region_t region; @@ -242,7 +242,7 @@ tostruct_ch_a(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_ch_a(ARGS_FREESTRUCT) { dns_rdata_ch_a_t *a = source; @@ -257,7 +257,7 @@ freestruct_ch_a(ARGS_FREESTRUCT) { a->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_ch_a(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_a); REQUIRE(rdata->rdclass == dns_rdataclass_ch); @@ -270,7 +270,7 @@ additionaldata_ch_a(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_ch_a(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -286,7 +286,7 @@ digest_ch_a(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_ch_a(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_a); REQUIRE(rdclass == dns_rdataclass_ch); @@ -296,7 +296,7 @@ checkowner_ch_a(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline bool +static bool checknames_ch_a(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -319,7 +319,7 @@ checknames_ch_a(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ch_a(ARGS_COMPARE) { return (compare_ch_a(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/afsdb_18.c b/lib/dns/rdata/generic/afsdb_18.c index 3b2bfea4bf..077e0acc55 100644 --- a/lib/dns/rdata/generic/afsdb_18.c +++ b/lib/dns/rdata/generic/afsdb_18.c @@ -18,7 +18,7 @@ #define RRTYPE_AFSDB_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_afsdb(ARGS_FROMTEXT) { isc_token_t token; isc_buffer_t buffer; @@ -65,7 +65,7 @@ fromtext_afsdb(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_afsdb(ARGS_TOTEXT) { dns_name_t name; dns_name_t prefix; @@ -90,7 +90,7 @@ totext_afsdb(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_afsdb(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sr; @@ -119,7 +119,7 @@ fromwire_afsdb(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_afsdb(ARGS_TOWIRE) { isc_region_t tr; isc_region_t sr; @@ -145,7 +145,7 @@ towire_afsdb(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_afsdb(ARGS_COMPARE) { int result; dns_name_t name1; @@ -179,7 +179,7 @@ compare_afsdb(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_afsdb(ARGS_FROMSTRUCT) { dns_rdata_afsdb_t *afsdb = source; isc_region_t region; @@ -197,7 +197,7 @@ fromstruct_afsdb(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_afsdb(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_afsdb_t *afsdb = target; @@ -226,7 +226,7 @@ tostruct_afsdb(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_afsdb(ARGS_FREESTRUCT) { dns_rdata_afsdb_t *afsdb = source; @@ -241,7 +241,7 @@ freestruct_afsdb(ARGS_FREESTRUCT) { afsdb->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_afsdb(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -259,7 +259,7 @@ additionaldata_afsdb(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_afsdb(ARGS_DIGEST) { isc_region_t r1, r2; dns_name_t name; @@ -277,7 +277,7 @@ digest_afsdb(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_afsdb(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_afsdb); @@ -289,7 +289,7 @@ checkowner_afsdb(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_afsdb(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -311,7 +311,7 @@ checknames_afsdb(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_afsdb(ARGS_COMPARE) { return (compare_afsdb(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/amtrelay_260.c b/lib/dns/rdata/generic/amtrelay_260.c index aa4beee9da..0cfb537e1c 100644 --- a/lib/dns/rdata/generic/amtrelay_260.c +++ b/lib/dns/rdata/generic/amtrelay_260.c @@ -20,7 +20,7 @@ #define RRTYPE_AMTRELAY_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_amtrelay(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -120,7 +120,7 @@ fromtext_amtrelay(ARGS_FROMTEXT) { } } -static inline isc_result_t +static isc_result_t totext_amtrelay(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -182,7 +182,7 @@ totext_amtrelay(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_amtrelay(ARGS_FROMWIRE) { dns_name_t name; isc_region_t region; @@ -234,7 +234,7 @@ fromwire_amtrelay(ARGS_FROMWIRE) { } } -static inline isc_result_t +static isc_result_t towire_amtrelay(ARGS_TOWIRE) { isc_region_t region; @@ -247,7 +247,7 @@ towire_amtrelay(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline int +static int compare_amtrelay(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -264,7 +264,7 @@ compare_amtrelay(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_amtrelay(ARGS_FROMSTRUCT) { dns_rdata_amtrelay_t *amtrelay = source; isc_region_t region; @@ -304,7 +304,7 @@ fromstruct_amtrelay(ARGS_FROMSTRUCT) { } } -static inline isc_result_t +static isc_result_t tostruct_amtrelay(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_amtrelay_t *amtrelay = target; @@ -368,7 +368,7 @@ tostruct_amtrelay(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_amtrelay(ARGS_FREESTRUCT) { dns_rdata_amtrelay_t *amtrelay = source; @@ -390,7 +390,7 @@ freestruct_amtrelay(ARGS_FREESTRUCT) { amtrelay->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_amtrelay(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_amtrelay); @@ -402,7 +402,7 @@ additionaldata_amtrelay(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_amtrelay(ARGS_DIGEST) { isc_region_t region; @@ -412,7 +412,7 @@ digest_amtrelay(ARGS_DIGEST) { return ((digest)(arg, ®ion)); } -static inline bool +static bool checkowner_amtrelay(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_amtrelay); @@ -424,7 +424,7 @@ checkowner_amtrelay(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_amtrelay(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_amtrelay); @@ -435,7 +435,7 @@ checknames_amtrelay(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_amtrelay(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; diff --git a/lib/dns/rdata/generic/avc_258.c b/lib/dns/rdata/generic/avc_258.c index eb43102b9d..8c7c8d0789 100644 --- a/lib/dns/rdata/generic/avc_258.c +++ b/lib/dns/rdata/generic/avc_258.c @@ -16,14 +16,14 @@ #define RRTYPE_AVC_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_avc(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_avc); return (generic_fromtext_txt(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_avc(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_avc); @@ -31,14 +31,14 @@ totext_avc(ARGS_TOTEXT) { return (generic_totext_txt(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_avc(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_avc); return (generic_fromwire_txt(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_avc(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_avc); @@ -47,7 +47,7 @@ towire_avc(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_avc(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -61,14 +61,14 @@ compare_avc(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_avc(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_avc); return (generic_fromstruct_txt(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_avc(ARGS_TOSTRUCT) { dns_rdata_avc_t *avc = target; @@ -82,7 +82,7 @@ tostruct_avc(ARGS_TOSTRUCT) { return (generic_tostruct_txt(CALL_TOSTRUCT)); } -static inline void +static void freestruct_avc(ARGS_FREESTRUCT) { dns_rdata_avc_t *avc = source; @@ -92,7 +92,7 @@ freestruct_avc(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t +static isc_result_t additionaldata_avc(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_avc); @@ -104,7 +104,7 @@ additionaldata_avc(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_avc(ARGS_DIGEST) { isc_region_t r; @@ -115,7 +115,7 @@ digest_avc(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_avc(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_avc); @@ -127,7 +127,7 @@ checkowner_avc(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_avc(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_avc); @@ -138,7 +138,7 @@ checknames_avc(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_avc(ARGS_COMPARE) { return (compare_avc(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/caa_257.c b/lib/dns/rdata/generic/caa_257.c index 62adef4a79..3d00653336 100644 --- a/lib/dns/rdata/generic/caa_257.c +++ b/lib/dns/rdata/generic/caa_257.c @@ -275,7 +275,7 @@ static unsigned char const alphanumeric[256] = { 0, }; -static inline isc_result_t +static isc_result_t fromtext_caa(ARGS_FROMTEXT) { isc_token_t token; isc_textregion_t tr; @@ -326,7 +326,7 @@ fromtext_caa(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_caa(ARGS_TOTEXT) { isc_region_t region; uint8_t flags; @@ -360,7 +360,7 @@ totext_caa(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_caa(ARGS_FROMWIRE) { isc_region_t sr; unsigned int len, i; @@ -411,7 +411,7 @@ fromwire_caa(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_caa(ARGS_TOWIRE) { isc_region_t region; @@ -425,7 +425,7 @@ towire_caa(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline int +static int compare_caa(ARGS_COMPARE) { isc_region_t r1, r2; @@ -442,7 +442,7 @@ compare_caa(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_caa(ARGS_FROMSTRUCT) { dns_rdata_caa_t *caa = source; isc_region_t region; @@ -488,7 +488,7 @@ fromstruct_caa(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_caa(ARGS_TOSTRUCT) { dns_rdata_caa_t *caa = target; isc_region_t sr; @@ -547,7 +547,7 @@ tostruct_caa(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_caa(ARGS_FREESTRUCT) { dns_rdata_caa_t *caa = (dns_rdata_caa_t *)source; @@ -567,7 +567,7 @@ freestruct_caa(ARGS_FREESTRUCT) { caa->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_caa(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_caa); REQUIRE(rdata->data != NULL); @@ -581,7 +581,7 @@ additionaldata_caa(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_caa(ARGS_DIGEST) { isc_region_t r; @@ -594,7 +594,7 @@ digest_caa(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_caa(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_caa); @@ -606,7 +606,7 @@ checkowner_caa(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_caa(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_caa); REQUIRE(rdata->data != NULL); @@ -619,7 +619,7 @@ checknames_caa(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_caa(ARGS_COMPARE) { return (compare_caa(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/cdnskey_60.c b/lib/dns/rdata/generic/cdnskey_60.c index cc296ca1db..3da66d69d2 100644 --- a/lib/dns/rdata/generic/cdnskey_60.c +++ b/lib/dns/rdata/generic/cdnskey_60.c @@ -20,14 +20,14 @@ #define RRTYPE_CDNSKEY_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_cdnskey(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_cdnskey); return (generic_fromtext_key(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_cdnskey(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_cdnskey); @@ -35,14 +35,14 @@ totext_cdnskey(ARGS_TOTEXT) { return (generic_totext_key(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_cdnskey(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_cdnskey); return (generic_fromwire_key(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_cdnskey(ARGS_TOWIRE) { isc_region_t sr; @@ -55,7 +55,7 @@ towire_cdnskey(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_cdnskey(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -73,14 +73,14 @@ compare_cdnskey(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_cdnskey(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_cdnskey); return (generic_fromstruct_key(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_cdnskey(ARGS_TOSTRUCT) { dns_rdata_cdnskey_t *dnskey = target; @@ -95,7 +95,7 @@ tostruct_cdnskey(ARGS_TOSTRUCT) { return (generic_tostruct_key(CALL_TOSTRUCT)); } -static inline void +static void freestruct_cdnskey(ARGS_FREESTRUCT) { dns_rdata_cdnskey_t *dnskey = (dns_rdata_cdnskey_t *)source; @@ -105,7 +105,7 @@ freestruct_cdnskey(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t +static isc_result_t additionaldata_cdnskey(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_cdnskey); @@ -117,7 +117,7 @@ additionaldata_cdnskey(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_cdnskey(ARGS_DIGEST) { isc_region_t r; @@ -129,7 +129,7 @@ digest_cdnskey(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_cdnskey(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_cdnskey); @@ -141,7 +141,7 @@ checkowner_cdnskey(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_cdnskey(ARGS_CHECKNAMES) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_cdnskey); @@ -153,7 +153,7 @@ checknames_cdnskey(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_cdnskey(ARGS_COMPARE) { /* * Treat ALG 253 (private DNS) subtype name case sensitively. diff --git a/lib/dns/rdata/generic/cds_59.c b/lib/dns/rdata/generic/cds_59.c index a6023041f2..7c64158bf0 100644 --- a/lib/dns/rdata/generic/cds_59.c +++ b/lib/dns/rdata/generic/cds_59.c @@ -20,14 +20,14 @@ #include -static inline isc_result_t +static isc_result_t fromtext_cds(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_cds); return (generic_fromtext_ds(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_cds(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_cds); @@ -35,14 +35,14 @@ totext_cds(ARGS_TOTEXT) { return (generic_totext_ds(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_cds(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_cds); return (generic_fromwire_ds(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_cds(ARGS_TOWIRE) { isc_region_t sr; @@ -55,7 +55,7 @@ towire_cds(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_cds(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -71,14 +71,14 @@ compare_cds(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_cds(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_cds); return (generic_fromstruct_ds(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_cds(ARGS_TOSTRUCT) { dns_rdata_cds_t *cds = target; @@ -96,7 +96,7 @@ tostruct_cds(ARGS_TOSTRUCT) { return (generic_tostruct_ds(CALL_TOSTRUCT)); } -static inline void +static void freestruct_cds(ARGS_FREESTRUCT) { dns_rdata_cds_t *cds = source; @@ -113,7 +113,7 @@ freestruct_cds(ARGS_FREESTRUCT) { cds->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_cds(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_cds); @@ -125,7 +125,7 @@ additionaldata_cds(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_cds(ARGS_DIGEST) { isc_region_t r; @@ -136,7 +136,7 @@ digest_cds(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_cds(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_cds); @@ -148,7 +148,7 @@ checkowner_cds(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_cds(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_cds); @@ -159,7 +159,7 @@ checknames_cds(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_cds(ARGS_COMPARE) { return (compare_cds(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/cert_37.c b/lib/dns/rdata/generic/cert_37.c index 372060e21b..eb307a7ae0 100644 --- a/lib/dns/rdata/generic/cert_37.c +++ b/lib/dns/rdata/generic/cert_37.c @@ -18,7 +18,7 @@ #define RRTYPE_CERT_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_cert(ARGS_FROMTEXT) { isc_token_t token; dns_secalg_t secalg; @@ -61,7 +61,7 @@ fromtext_cert(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_cert(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("64000 ")]; @@ -115,7 +115,7 @@ totext_cert(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_cert(ARGS_FROMWIRE) { isc_region_t sr; @@ -135,7 +135,7 @@ fromwire_cert(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_cert(ARGS_TOWIRE) { isc_region_t sr; @@ -148,7 +148,7 @@ towire_cert(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_cert(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -164,7 +164,7 @@ compare_cert(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_cert(ARGS_FROMSTRUCT) { dns_rdata_cert_t *cert = source; @@ -183,7 +183,7 @@ fromstruct_cert(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, cert->certificate, cert->length)); } -static inline isc_result_t +static isc_result_t tostruct_cert(ARGS_TOSTRUCT) { dns_rdata_cert_t *cert = target; isc_region_t region; @@ -215,7 +215,7 @@ tostruct_cert(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_cert(ARGS_FREESTRUCT) { dns_rdata_cert_t *cert = source; @@ -232,7 +232,7 @@ freestruct_cert(ARGS_FREESTRUCT) { cert->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_cert(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_cert); @@ -244,7 +244,7 @@ additionaldata_cert(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_cert(ARGS_DIGEST) { isc_region_t r; @@ -255,7 +255,7 @@ digest_cert(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_cert(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_cert); @@ -267,7 +267,7 @@ checkowner_cert(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_cert(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_cert); @@ -278,7 +278,7 @@ checknames_cert(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_cert(ARGS_COMPARE) { return (compare_cert(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/cname_5.c b/lib/dns/rdata/generic/cname_5.c index efe6559d0c..f3f9378b29 100644 --- a/lib/dns/rdata/generic/cname_5.c +++ b/lib/dns/rdata/generic/cname_5.c @@ -17,7 +17,7 @@ #define RRTYPE_CNAME_ATTRIBUTES \ (DNS_RDATATYPEATTR_EXCLUSIVE | DNS_RDATATYPEATTR_SINGLETON) -static inline isc_result_t +static isc_result_t fromtext_cname(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -41,7 +41,7 @@ fromtext_cname(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_cname(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -62,7 +62,7 @@ totext_cname(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_cname(ARGS_FROMWIRE) { dns_name_t name; @@ -77,7 +77,7 @@ fromwire_cname(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_cname(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -95,7 +95,7 @@ towire_cname(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_cname(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -120,7 +120,7 @@ compare_cname(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_cname(ARGS_FROMSTRUCT) { dns_rdata_cname_t *cname = source; isc_region_t region; @@ -137,7 +137,7 @@ fromstruct_cname(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_cname(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_cname_t *cname = target; @@ -160,7 +160,7 @@ tostruct_cname(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_cname(ARGS_FREESTRUCT) { dns_rdata_cname_t *cname = source; @@ -174,7 +174,7 @@ freestruct_cname(ARGS_FREESTRUCT) { cname->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_cname(ARGS_ADDLDATA) { UNUSED(rdata); UNUSED(owner); @@ -186,7 +186,7 @@ additionaldata_cname(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_cname(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -200,7 +200,7 @@ digest_cname(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_cname(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_cname); @@ -212,7 +212,7 @@ checkowner_cname(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_cname(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_cname); @@ -223,7 +223,7 @@ checknames_cname(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_cname(ARGS_COMPARE) { return (compare_cname(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/csync_62.c b/lib/dns/rdata/generic/csync_62.c index 32ea3142fc..285f22b5e4 100644 --- a/lib/dns/rdata/generic/csync_62.c +++ b/lib/dns/rdata/generic/csync_62.c @@ -18,7 +18,7 @@ #define RRTYPE_CSYNC_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_csync(ARGS_FROMTEXT) { isc_token_t token; @@ -47,7 +47,7 @@ fromtext_csync(ARGS_FROMTEXT) { return (typemap_fromtext(lexer, target, true)); } -static inline isc_result_t +static isc_result_t totext_csync(ARGS_TOTEXT) { unsigned long num; char buf[sizeof("0123456789")]; /* Also TYPE65535 */ @@ -81,7 +81,7 @@ totext_csync(ARGS_TOTEXT) { return (typemap_totext(&sr, NULL, target)); } -static /* inline */ isc_result_t +static isc_result_t fromwire_csync(ARGS_FROMWIRE) { isc_region_t sr; @@ -111,7 +111,7 @@ fromwire_csync(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_csync(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_csync); REQUIRE(rdata->length >= 6); @@ -121,7 +121,7 @@ towire_csync(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_csync(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -137,7 +137,7 @@ compare_csync(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_csync(ARGS_FROMSTRUCT) { dns_rdata_csync_t *csync = source; isc_region_t region; @@ -160,7 +160,7 @@ fromstruct_csync(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, csync->typebits, csync->len)); } -static inline isc_result_t +static isc_result_t tostruct_csync(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_csync_t *csync = target; @@ -194,7 +194,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_csync(ARGS_FREESTRUCT) { dns_rdata_csync_t *csync = source; @@ -211,7 +211,7 @@ freestruct_csync(ARGS_FREESTRUCT) { csync->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_csync(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_csync); @@ -223,7 +223,7 @@ additionaldata_csync(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_csync(ARGS_DIGEST) { isc_region_t r; @@ -233,7 +233,7 @@ digest_csync(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_csync(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_csync); @@ -245,7 +245,7 @@ checkowner_csync(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_csync(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_csync); @@ -256,7 +256,7 @@ checknames_csync(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_csync(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; diff --git a/lib/dns/rdata/generic/dlv_32769.c b/lib/dns/rdata/generic/dlv_32769.c index e08753851a..faf95000a9 100644 --- a/lib/dns/rdata/generic/dlv_32769.c +++ b/lib/dns/rdata/generic/dlv_32769.c @@ -20,14 +20,14 @@ #include -static inline isc_result_t +static isc_result_t fromtext_dlv(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_dlv); return (generic_fromtext_ds(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_dlv(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_dlv); @@ -35,14 +35,14 @@ totext_dlv(ARGS_TOTEXT) { return (generic_totext_ds(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_dlv(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_dlv); return (generic_fromwire_ds(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_dlv(ARGS_TOWIRE) { isc_region_t sr; @@ -55,7 +55,7 @@ towire_dlv(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_dlv(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -71,14 +71,14 @@ compare_dlv(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_dlv(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_dlv); return (generic_fromstruct_ds(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_dlv(ARGS_TOSTRUCT) { dns_rdata_dlv_t *dlv = target; @@ -92,7 +92,7 @@ tostruct_dlv(ARGS_TOSTRUCT) { return (generic_tostruct_ds(CALL_TOSTRUCT)); } -static inline void +static void freestruct_dlv(ARGS_FREESTRUCT) { dns_rdata_dlv_t *dlv = source; @@ -109,7 +109,7 @@ freestruct_dlv(ARGS_FREESTRUCT) { dlv->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_dlv(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_dlv); @@ -121,7 +121,7 @@ additionaldata_dlv(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_dlv(ARGS_DIGEST) { isc_region_t r; @@ -132,7 +132,7 @@ digest_dlv(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_dlv(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_dlv); @@ -144,7 +144,7 @@ checkowner_dlv(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_dlv(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_dlv); @@ -155,7 +155,7 @@ checknames_dlv(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_dlv(ARGS_COMPARE) { return (compare_dlv(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/dname_39.c b/lib/dns/rdata/generic/dname_39.c index 6d2bb4cdd3..2eb1dc840a 100644 --- a/lib/dns/rdata/generic/dname_39.c +++ b/lib/dns/rdata/generic/dname_39.c @@ -18,7 +18,7 @@ #define RRTYPE_DNAME_ATTRIBUTES (DNS_RDATATYPEATTR_SINGLETON) -static inline isc_result_t +static isc_result_t fromtext_dname(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -42,7 +42,7 @@ fromtext_dname(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_dname(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -63,7 +63,7 @@ totext_dname(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_dname(ARGS_FROMWIRE) { dns_name_t name; @@ -78,7 +78,7 @@ fromwire_dname(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_dname(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -95,7 +95,7 @@ towire_dname(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_dname(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -120,7 +120,7 @@ compare_dname(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_dname(ARGS_FROMSTRUCT) { dns_rdata_dname_t *dname = source; isc_region_t region; @@ -137,7 +137,7 @@ fromstruct_dname(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_dname(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_dname_t *dname = target; @@ -160,7 +160,7 @@ tostruct_dname(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_dname(ARGS_FREESTRUCT) { dns_rdata_dname_t *dname = source; @@ -175,7 +175,7 @@ freestruct_dname(ARGS_FREESTRUCT) { dname->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_dname(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_dname); @@ -187,7 +187,7 @@ additionaldata_dname(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_dname(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -201,7 +201,7 @@ digest_dname(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_dname(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_dname); @@ -213,7 +213,7 @@ checkowner_dname(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_dname(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_dname); @@ -224,7 +224,7 @@ checknames_dname(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_dname(ARGS_COMPARE) { return (compare_dname(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/dnskey_48.c b/lib/dns/rdata/generic/dnskey_48.c index 61d0419279..2df1e77e0f 100644 --- a/lib/dns/rdata/generic/dnskey_48.c +++ b/lib/dns/rdata/generic/dnskey_48.c @@ -20,14 +20,14 @@ #define RRTYPE_DNSKEY_ATTRIBUTES (DNS_RDATATYPEATTR_DNSSEC) -static inline isc_result_t +static isc_result_t fromtext_dnskey(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_dnskey); return (generic_fromtext_key(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_dnskey(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_dnskey); @@ -35,14 +35,14 @@ totext_dnskey(ARGS_TOTEXT) { return (generic_totext_key(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_dnskey(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_dnskey); return (generic_fromwire_key(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_dnskey(ARGS_TOWIRE) { isc_region_t sr; @@ -56,7 +56,7 @@ towire_dnskey(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_dnskey(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -74,14 +74,14 @@ compare_dnskey(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_dnskey(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_dnskey); return (generic_fromstruct_key(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_dnskey(ARGS_TOSTRUCT) { dns_rdata_dnskey_t *dnskey = target; @@ -96,7 +96,7 @@ tostruct_dnskey(ARGS_TOSTRUCT) { return (generic_tostruct_key(CALL_TOSTRUCT)); } -static inline void +static void freestruct_dnskey(ARGS_FREESTRUCT) { dns_rdata_dnskey_t *dnskey = (dns_rdata_dnskey_t *)source; @@ -106,7 +106,7 @@ freestruct_dnskey(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t +static isc_result_t additionaldata_dnskey(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_dnskey); @@ -118,7 +118,7 @@ additionaldata_dnskey(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_dnskey(ARGS_DIGEST) { isc_region_t r; @@ -130,7 +130,7 @@ digest_dnskey(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_dnskey(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_dnskey); @@ -142,7 +142,7 @@ checkowner_dnskey(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_dnskey(ARGS_CHECKNAMES) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_dnskey); @@ -154,7 +154,7 @@ checknames_dnskey(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_dnskey(ARGS_COMPARE) { /* * Treat ALG 253 (private DNS) subtype name case sensitively. diff --git a/lib/dns/rdata/generic/doa_259.c b/lib/dns/rdata/generic/doa_259.c index 2a070221b5..45f2439041 100644 --- a/lib/dns/rdata/generic/doa_259.c +++ b/lib/dns/rdata/generic/doa_259.c @@ -16,7 +16,7 @@ #define RRTYPE_DOA_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_doa(ARGS_FROMTEXT) { isc_token_t token; @@ -71,7 +71,7 @@ fromtext_doa(ARGS_FROMTEXT) { } } -static inline isc_result_t +static isc_result_t totext_doa(ARGS_TOTEXT) { char buf[sizeof("4294967295 ")]; isc_region_t region; @@ -125,7 +125,7 @@ totext_doa(ARGS_TOTEXT) { } } -static inline isc_result_t +static isc_result_t fromwire_doa(ARGS_FROMWIRE) { isc_region_t region; @@ -156,7 +156,7 @@ fromwire_doa(ARGS_FROMWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline isc_result_t +static isc_result_t towire_doa(ARGS_TOWIRE) { isc_region_t region; @@ -170,7 +170,7 @@ towire_doa(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline int +static int compare_doa(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -188,7 +188,7 @@ compare_doa(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_doa(ARGS_FROMSTRUCT) { dns_rdata_doa_t *doa = source; @@ -205,7 +205,7 @@ fromstruct_doa(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, doa->data, doa->data_len)); } -static inline isc_result_t +static isc_result_t tostruct_doa(ARGS_TOSTRUCT) { dns_rdata_doa_t *doa = target; isc_region_t region; @@ -287,7 +287,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_doa(ARGS_FREESTRUCT) { dns_rdata_doa_t *doa = source; @@ -308,7 +308,7 @@ freestruct_doa(ARGS_FREESTRUCT) { doa->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_doa(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_doa); @@ -320,7 +320,7 @@ additionaldata_doa(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_doa(ARGS_DIGEST) { isc_region_t r; @@ -331,7 +331,7 @@ digest_doa(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_doa(ARGS_CHECKOWNER) { UNUSED(name); UNUSED(type); @@ -343,7 +343,7 @@ checkowner_doa(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_doa(ARGS_CHECKNAMES) { UNUSED(rdata); UNUSED(owner); @@ -354,7 +354,7 @@ checknames_doa(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_doa(ARGS_COMPARE) { return (compare_doa(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/ds_43.c b/lib/dns/rdata/generic/ds_43.c index 4db39bcee8..482f32bd40 100644 --- a/lib/dns/rdata/generic/ds_43.c +++ b/lib/dns/rdata/generic/ds_43.c @@ -24,7 +24,7 @@ #include -static inline isc_result_t +static isc_result_t generic_fromtext_ds(ARGS_FROMTEXT) { isc_token_t token; unsigned char c; @@ -82,14 +82,14 @@ generic_fromtext_ds(ARGS_FROMTEXT) { return (isc_hex_tobuffer(lexer, target, length)); } -static inline isc_result_t +static isc_result_t fromtext_ds(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_ds); return (generic_fromtext_ds(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t generic_totext_ds(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("64000 ")]; @@ -148,7 +148,7 @@ generic_totext_ds(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_ds(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_ds); @@ -156,7 +156,7 @@ totext_ds(ARGS_TOTEXT) { return (generic_totext_ds(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t generic_fromwire_ds(ARGS_FROMWIRE) { isc_region_t sr; @@ -198,14 +198,14 @@ generic_fromwire_ds(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t fromwire_ds(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_ds); return (generic_fromwire_ds(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_ds(ARGS_TOWIRE) { isc_region_t sr; @@ -218,7 +218,7 @@ towire_ds(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_ds(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -234,7 +234,7 @@ compare_ds(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t generic_fromstruct_ds(ARGS_FROMSTRUCT) { dns_rdata_ds_t *ds = source; @@ -264,14 +264,14 @@ generic_fromstruct_ds(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, ds->digest, ds->length)); } -static inline isc_result_t +static isc_result_t fromstruct_ds(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_ds); return (generic_fromstruct_ds(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t generic_tostruct_ds(ARGS_TOSTRUCT) { dns_rdata_ds_t *ds = target; isc_region_t region; @@ -301,7 +301,7 @@ generic_tostruct_ds(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t tostruct_ds(ARGS_TOSTRUCT) { dns_rdata_ds_t *ds = target; @@ -315,7 +315,7 @@ tostruct_ds(ARGS_TOSTRUCT) { return (generic_tostruct_ds(CALL_TOSTRUCT)); } -static inline void +static void freestruct_ds(ARGS_FREESTRUCT) { dns_rdata_ds_t *ds = source; @@ -332,7 +332,7 @@ freestruct_ds(ARGS_FREESTRUCT) { ds->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_ds(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_ds); @@ -344,7 +344,7 @@ additionaldata_ds(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_ds(ARGS_DIGEST) { isc_region_t r; @@ -355,7 +355,7 @@ digest_ds(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_ds(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_ds); @@ -367,7 +367,7 @@ checkowner_ds(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_ds(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_ds); @@ -378,7 +378,7 @@ checknames_ds(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ds(ARGS_COMPARE) { return (compare_ds(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/eui48_108.c b/lib/dns/rdata/generic/eui48_108.c index 4855b06c20..25603b29e2 100644 --- a/lib/dns/rdata/generic/eui48_108.c +++ b/lib/dns/rdata/generic/eui48_108.c @@ -18,7 +18,7 @@ #define RRTYPE_EUI48_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_eui48(ARGS_FROMTEXT) { isc_token_t token; unsigned char eui48[6]; @@ -52,7 +52,7 @@ fromtext_eui48(ARGS_FROMTEXT) { return (mem_tobuffer(target, eui48, sizeof(eui48))); } -static inline isc_result_t +static isc_result_t totext_eui48(ARGS_TOTEXT) { char buf[sizeof("xx-xx-xx-xx-xx-xx")]; @@ -67,7 +67,7 @@ totext_eui48(ARGS_TOTEXT) { return (str_totext(buf, target)); } -static inline isc_result_t +static isc_result_t fromwire_eui48(ARGS_FROMWIRE) { isc_region_t sregion; @@ -86,7 +86,7 @@ fromwire_eui48(ARGS_FROMWIRE) { return (mem_tobuffer(target, sregion.base, sregion.length)); } -static inline isc_result_t +static isc_result_t towire_eui48(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_eui48); REQUIRE(rdata->length == 6); @@ -96,7 +96,7 @@ towire_eui48(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_eui48(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -112,7 +112,7 @@ compare_eui48(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_eui48(ARGS_FROMSTRUCT) { dns_rdata_eui48_t *eui48 = source; @@ -127,7 +127,7 @@ fromstruct_eui48(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, eui48->eui48, sizeof(eui48->eui48))); } -static inline isc_result_t +static isc_result_t tostruct_eui48(ARGS_TOSTRUCT) { dns_rdata_eui48_t *eui48 = target; @@ -145,7 +145,7 @@ tostruct_eui48(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_eui48(ARGS_FREESTRUCT) { dns_rdata_eui48_t *eui48 = source; @@ -155,7 +155,7 @@ freestruct_eui48(ARGS_FREESTRUCT) { return; } -static inline isc_result_t +static isc_result_t additionaldata_eui48(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_eui48); REQUIRE(rdata->length == 6); @@ -168,7 +168,7 @@ additionaldata_eui48(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_eui48(ARGS_DIGEST) { isc_region_t r; @@ -180,7 +180,7 @@ digest_eui48(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_eui48(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_eui48); @@ -192,7 +192,7 @@ checkowner_eui48(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_eui48(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_eui48); REQUIRE(rdata->length == 6); @@ -204,7 +204,7 @@ checknames_eui48(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_eui48(ARGS_COMPARE) { return (compare_eui48(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/eui64_109.c b/lib/dns/rdata/generic/eui64_109.c index 93003e8480..93978d2ed9 100644 --- a/lib/dns/rdata/generic/eui64_109.c +++ b/lib/dns/rdata/generic/eui64_109.c @@ -18,7 +18,7 @@ #define RRTYPE_EUI64_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_eui64(ARGS_FROMTEXT) { isc_token_t token; unsigned char eui64[8]; @@ -54,7 +54,7 @@ fromtext_eui64(ARGS_FROMTEXT) { return (mem_tobuffer(target, eui64, sizeof(eui64))); } -static inline isc_result_t +static isc_result_t totext_eui64(ARGS_TOTEXT) { char buf[sizeof("xx-xx-xx-xx-xx-xx-xx-xx")]; @@ -70,7 +70,7 @@ totext_eui64(ARGS_TOTEXT) { return (str_totext(buf, target)); } -static inline isc_result_t +static isc_result_t fromwire_eui64(ARGS_FROMWIRE) { isc_region_t sregion; @@ -89,7 +89,7 @@ fromwire_eui64(ARGS_FROMWIRE) { return (mem_tobuffer(target, sregion.base, sregion.length)); } -static inline isc_result_t +static isc_result_t towire_eui64(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_eui64); REQUIRE(rdata->length == 8); @@ -99,7 +99,7 @@ towire_eui64(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_eui64(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -115,7 +115,7 @@ compare_eui64(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_eui64(ARGS_FROMSTRUCT) { dns_rdata_eui64_t *eui64 = source; @@ -130,7 +130,7 @@ fromstruct_eui64(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, eui64->eui64, sizeof(eui64->eui64))); } -static inline isc_result_t +static isc_result_t tostruct_eui64(ARGS_TOSTRUCT) { dns_rdata_eui64_t *eui64 = target; @@ -148,7 +148,7 @@ tostruct_eui64(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_eui64(ARGS_FREESTRUCT) { dns_rdata_eui64_t *eui64 = source; @@ -158,7 +158,7 @@ freestruct_eui64(ARGS_FREESTRUCT) { return; } -static inline isc_result_t +static isc_result_t additionaldata_eui64(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_eui64); REQUIRE(rdata->length == 8); @@ -171,7 +171,7 @@ additionaldata_eui64(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_eui64(ARGS_DIGEST) { isc_region_t r; @@ -183,7 +183,7 @@ digest_eui64(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_eui64(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_eui64); @@ -195,7 +195,7 @@ checkowner_eui64(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_eui64(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_eui64); REQUIRE(rdata->length == 8); @@ -207,7 +207,7 @@ checknames_eui64(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_eui64(ARGS_COMPARE) { return (compare_eui64(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/gpos_27.c b/lib/dns/rdata/generic/gpos_27.c index b571145118..4f2f3fd660 100644 --- a/lib/dns/rdata/generic/gpos_27.c +++ b/lib/dns/rdata/generic/gpos_27.c @@ -18,7 +18,7 @@ #define RRTYPE_GPOS_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_gpos(ARGS_FROMTEXT) { isc_token_t token; int i; @@ -39,7 +39,7 @@ fromtext_gpos(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_gpos(ARGS_TOTEXT) { isc_region_t region; int i; @@ -61,7 +61,7 @@ totext_gpos(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_gpos(ARGS_FROMWIRE) { int i; @@ -78,7 +78,7 @@ fromwire_gpos(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_gpos(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_gpos); REQUIRE(rdata->length != 0); @@ -88,7 +88,7 @@ towire_gpos(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_gpos(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -104,7 +104,7 @@ compare_gpos(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_gpos(ARGS_FROMSTRUCT) { dns_rdata_gpos_t *gpos = source; @@ -124,7 +124,7 @@ fromstruct_gpos(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, gpos->altitude, gpos->alt_len)); } -static inline isc_result_t +static isc_result_t tostruct_gpos(ARGS_TOSTRUCT) { dns_rdata_gpos_t *gpos = target; isc_region_t region; @@ -180,7 +180,7 @@ cleanup_longitude: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_gpos(ARGS_FREESTRUCT) { dns_rdata_gpos_t *gpos = source; @@ -203,7 +203,7 @@ freestruct_gpos(ARGS_FREESTRUCT) { gpos->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_gpos(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_gpos); @@ -215,7 +215,7 @@ additionaldata_gpos(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_gpos(ARGS_DIGEST) { isc_region_t r; @@ -226,7 +226,7 @@ digest_gpos(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_gpos(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_gpos); @@ -238,7 +238,7 @@ checkowner_gpos(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_gpos(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_gpos); @@ -249,7 +249,7 @@ checknames_gpos(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_gpos(ARGS_COMPARE) { return (compare_gpos(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/hinfo_13.c b/lib/dns/rdata/generic/hinfo_13.c index 2616ee27dc..d3978ed6bd 100644 --- a/lib/dns/rdata/generic/hinfo_13.c +++ b/lib/dns/rdata/generic/hinfo_13.c @@ -15,7 +15,7 @@ #define RRTYPE_HINFO_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_hinfo(ARGS_FROMTEXT) { isc_token_t token; int i; @@ -36,7 +36,7 @@ fromtext_hinfo(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_hinfo(ARGS_TOTEXT) { isc_region_t region; @@ -51,7 +51,7 @@ totext_hinfo(ARGS_TOTEXT) { return (txt_totext(®ion, true, target)); } -static inline isc_result_t +static isc_result_t fromwire_hinfo(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_hinfo); @@ -64,7 +64,7 @@ fromwire_hinfo(ARGS_FROMWIRE) { return (txt_fromwire(source, target)); } -static inline isc_result_t +static isc_result_t towire_hinfo(ARGS_TOWIRE) { UNUSED(cctx); @@ -74,7 +74,7 @@ towire_hinfo(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_hinfo(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -90,7 +90,7 @@ compare_hinfo(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_hinfo(ARGS_FROMSTRUCT) { dns_rdata_hinfo_t *hinfo = source; @@ -108,7 +108,7 @@ fromstruct_hinfo(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, hinfo->os, hinfo->os_len)); } -static inline isc_result_t +static isc_result_t tostruct_hinfo(ARGS_TOSTRUCT) { dns_rdata_hinfo_t *hinfo = target; isc_region_t region; @@ -147,7 +147,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_hinfo(ARGS_FREESTRUCT) { dns_rdata_hinfo_t *hinfo = source; @@ -166,7 +166,7 @@ freestruct_hinfo(ARGS_FREESTRUCT) { hinfo->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_hinfo(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_hinfo); @@ -178,7 +178,7 @@ additionaldata_hinfo(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_hinfo(ARGS_DIGEST) { isc_region_t r; @@ -189,7 +189,7 @@ digest_hinfo(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_hinfo(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_hinfo); @@ -201,7 +201,7 @@ checkowner_hinfo(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_hinfo(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_hinfo); @@ -212,7 +212,7 @@ checknames_hinfo(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_hinfo(ARGS_COMPARE) { return (compare_hinfo(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/hip_55.c b/lib/dns/rdata/generic/hip_55.c index e4f55150b1..e67df0ea44 100644 --- a/lib/dns/rdata/generic/hip_55.c +++ b/lib/dns/rdata/generic/hip_55.c @@ -17,7 +17,7 @@ #define RRTYPE_HIP_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_hip(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -116,7 +116,7 @@ fromtext_hip(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_hip(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -189,7 +189,7 @@ totext_hip(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_hip(ARGS_FROMWIRE) { isc_region_t region, rr; dns_name_t name; @@ -234,7 +234,7 @@ fromwire_hip(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_hip(ARGS_TOWIRE) { isc_region_t region; @@ -247,7 +247,7 @@ towire_hip(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline int +static int compare_hip(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -263,7 +263,7 @@ compare_hip(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_hip(ARGS_FROMSTRUCT) { dns_rdata_hip_t *hip = source; dns_rdata_hip_t myhip; @@ -297,7 +297,7 @@ fromstruct_hip(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, hip->servers, hip->servers_len)); } -static inline isc_result_t +static isc_result_t tostruct_hip(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_hip_t *hip = target; @@ -362,7 +362,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_hip(ARGS_FREESTRUCT) { dns_rdata_hip_t *hip = source; @@ -380,7 +380,7 @@ freestruct_hip(ARGS_FREESTRUCT) { hip->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_hip(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_hip); @@ -392,7 +392,7 @@ additionaldata_hip(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_hip(ARGS_DIGEST) { isc_region_t r; @@ -402,7 +402,7 @@ digest_hip(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_hip(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_hip); @@ -414,7 +414,7 @@ checkowner_hip(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_hip(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_hip); @@ -465,7 +465,7 @@ dns_rdata_hip_current(dns_rdata_hip_t *hip, dns_name_t *name) { INSIST(name->length + hip->offset <= hip->servers_len); } -static inline int +static int casecompare_hip(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; diff --git a/lib/dns/rdata/generic/ipseckey_45.c b/lib/dns/rdata/generic/ipseckey_45.c index 272a38a4f1..a4232db49e 100644 --- a/lib/dns/rdata/generic/ipseckey_45.c +++ b/lib/dns/rdata/generic/ipseckey_45.c @@ -20,7 +20,7 @@ #define RRTYPE_IPSECKEY_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_ipseckey(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -121,7 +121,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_ipseckey(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -211,7 +211,7 @@ totext_ipseckey(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_ipseckey(ARGS_FROMWIRE) { dns_name_t name; isc_region_t region; @@ -268,7 +268,7 @@ fromwire_ipseckey(ARGS_FROMWIRE) { } } -static inline isc_result_t +static isc_result_t towire_ipseckey(ARGS_TOWIRE) { isc_region_t region; @@ -281,7 +281,7 @@ towire_ipseckey(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline int +static int compare_ipseckey(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -298,7 +298,7 @@ compare_ipseckey(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_ipseckey(ARGS_FROMSTRUCT) { dns_rdata_ipseckey_t *ipseckey = source; isc_region_t region; @@ -342,7 +342,7 @@ fromstruct_ipseckey(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, ipseckey->key, ipseckey->keylength)); } -static inline isc_result_t +static isc_result_t tostruct_ipseckey(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_ipseckey_t *ipseckey = target; @@ -415,7 +415,7 @@ tostruct_ipseckey(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_ipseckey(ARGS_FREESTRUCT) { dns_rdata_ipseckey_t *ipseckey = source; @@ -437,7 +437,7 @@ freestruct_ipseckey(ARGS_FREESTRUCT) { ipseckey->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_ipseckey(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_ipseckey); @@ -449,7 +449,7 @@ additionaldata_ipseckey(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_ipseckey(ARGS_DIGEST) { isc_region_t region; @@ -459,7 +459,7 @@ digest_ipseckey(ARGS_DIGEST) { return ((digest)(arg, ®ion)); } -static inline bool +static bool checkowner_ipseckey(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_ipseckey); @@ -471,7 +471,7 @@ checkowner_ipseckey(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_ipseckey(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_ipseckey); @@ -482,7 +482,7 @@ checknames_ipseckey(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ipseckey(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; diff --git a/lib/dns/rdata/generic/isdn_20.c b/lib/dns/rdata/generic/isdn_20.c index 6ab97ac3a1..7161ee62f6 100644 --- a/lib/dns/rdata/generic/isdn_20.c +++ b/lib/dns/rdata/generic/isdn_20.c @@ -18,7 +18,7 @@ #define RRTYPE_ISDN_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_isdn(ARGS_FROMTEXT) { isc_token_t token; @@ -47,7 +47,7 @@ fromtext_isdn(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_isdn(ARGS_TOTEXT) { isc_region_t region; @@ -65,7 +65,7 @@ totext_isdn(ARGS_TOTEXT) { return (txt_totext(®ion, true, target)); } -static inline isc_result_t +static isc_result_t fromwire_isdn(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_isdn); @@ -81,7 +81,7 @@ fromwire_isdn(ARGS_FROMWIRE) { return (txt_fromwire(source, target)); } -static inline isc_result_t +static isc_result_t towire_isdn(ARGS_TOWIRE) { UNUSED(cctx); @@ -91,7 +91,7 @@ towire_isdn(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_isdn(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -107,7 +107,7 @@ compare_isdn(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_isdn(ARGS_FROMSTRUCT) { dns_rdata_isdn_t *isdn = source; @@ -128,7 +128,7 @@ fromstruct_isdn(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, isdn->subaddress, isdn->subaddress_len)); } -static inline isc_result_t +static isc_result_t tostruct_isdn(ARGS_TOSTRUCT) { dns_rdata_isdn_t *isdn = target; isc_region_t r; @@ -174,7 +174,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_isdn(ARGS_FREESTRUCT) { dns_rdata_isdn_t *isdn = source; @@ -193,7 +193,7 @@ freestruct_isdn(ARGS_FREESTRUCT) { isdn->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_isdn(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_isdn); @@ -205,7 +205,7 @@ additionaldata_isdn(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_isdn(ARGS_DIGEST) { isc_region_t r; @@ -216,7 +216,7 @@ digest_isdn(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_isdn(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_isdn); @@ -228,7 +228,7 @@ checkowner_isdn(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_isdn(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_isdn); @@ -239,7 +239,7 @@ checknames_isdn(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_isdn(ARGS_COMPARE) { return (compare_isdn(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/key_25.c b/lib/dns/rdata/generic/key_25.c index c6e3eefce6..9e2bc4db45 100644 --- a/lib/dns/rdata/generic/key_25.c +++ b/lib/dns/rdata/generic/key_25.c @@ -31,7 +31,7 @@ * DNSKEY - RFC 4034 * RKEY - draft-reid-dnsext-rkey-00 */ -static inline bool +static bool generic_key_nokey(dns_rdatatype_t type, unsigned int flags) { switch (type) { case dns_rdatatype_cdnskey: @@ -44,7 +44,7 @@ generic_key_nokey(dns_rdatatype_t type, unsigned int flags) { } } -static inline isc_result_t +static isc_result_t generic_fromtext_key(ARGS_FROMTEXT) { isc_token_t token; dns_secalg_t alg; @@ -85,7 +85,7 @@ generic_fromtext_key(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t generic_totext_key(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("[key id = 64000]")]; @@ -190,7 +190,7 @@ generic_totext_key(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t generic_fromwire_key(ARGS_FROMWIRE) { unsigned char algorithm; uint16_t flags; @@ -234,14 +234,14 @@ generic_fromwire_key(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t fromtext_key(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_key); return (generic_fromtext_key(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_key(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_key); @@ -249,14 +249,14 @@ totext_key(ARGS_TOTEXT) { return (generic_totext_key(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_key(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_key); return (generic_fromwire_key(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_key(ARGS_TOWIRE) { isc_region_t sr; @@ -270,7 +270,7 @@ towire_key(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_key(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -288,7 +288,7 @@ compare_key(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t generic_fromstruct_key(ARGS_FROMSTRUCT) { dns_rdata_key_t *key = source; @@ -316,7 +316,7 @@ generic_fromstruct_key(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, key->data, key->datalen)); } -static inline isc_result_t +static isc_result_t generic_tostruct_key(ARGS_TOSTRUCT) { dns_rdata_key_t *key = target; isc_region_t sr; @@ -363,7 +363,7 @@ generic_tostruct_key(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void generic_freestruct_key(ARGS_FREESTRUCT) { dns_rdata_key_t *key = (dns_rdata_key_t *)source; @@ -379,14 +379,14 @@ generic_freestruct_key(ARGS_FREESTRUCT) { key->mctx = NULL; } -static inline isc_result_t +static isc_result_t fromstruct_key(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_key); return (generic_fromstruct_key(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_key(ARGS_TOSTRUCT) { dns_rdata_key_t *key = target; @@ -401,7 +401,7 @@ tostruct_key(ARGS_TOSTRUCT) { return (generic_tostruct_key(CALL_TOSTRUCT)); } -static inline void +static void freestruct_key(ARGS_FREESTRUCT) { dns_rdata_key_t *key = (dns_rdata_key_t *)source; @@ -411,7 +411,7 @@ freestruct_key(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t +static isc_result_t additionaldata_key(ARGS_ADDLDATA) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_key); @@ -424,7 +424,7 @@ additionaldata_key(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_key(ARGS_DIGEST) { isc_region_t r; @@ -436,7 +436,7 @@ digest_key(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_key(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_key); @@ -448,7 +448,7 @@ checkowner_key(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_key(ARGS_CHECKNAMES) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_key); @@ -460,7 +460,7 @@ checknames_key(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_key(ARGS_COMPARE) { return (compare_key(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/keydata_65533.c b/lib/dns/rdata/generic/keydata_65533.c index 4bab60e4b7..175afadc2d 100644 --- a/lib/dns/rdata/generic/keydata_65533.c +++ b/lib/dns/rdata/generic/keydata_65533.c @@ -21,7 +21,7 @@ #define RRTYPE_KEYDATA_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_keydata(ARGS_FROMTEXT) { isc_token_t token; dns_secalg_t alg; @@ -86,7 +86,7 @@ fromtext_keydata(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_keydata(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("64000")]; @@ -249,7 +249,7 @@ totext_keydata(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_keydata(ARGS_FROMWIRE) { isc_region_t sr; @@ -265,7 +265,7 @@ fromwire_keydata(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_keydata(ARGS_TOWIRE) { isc_region_t sr; @@ -277,7 +277,7 @@ towire_keydata(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_keydata(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -291,7 +291,7 @@ compare_keydata(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_keydata(ARGS_FROMSTRUCT) { dns_rdata_keydata_t *keydata = source; @@ -325,7 +325,7 @@ fromstruct_keydata(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, keydata->data, keydata->datalen)); } -static inline isc_result_t +static isc_result_t tostruct_keydata(ARGS_TOSTRUCT) { dns_rdata_keydata_t *keydata = target; isc_region_t sr; @@ -392,7 +392,7 @@ tostruct_keydata(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_keydata(ARGS_FREESTRUCT) { dns_rdata_keydata_t *keydata = (dns_rdata_keydata_t *)source; @@ -409,7 +409,7 @@ freestruct_keydata(ARGS_FREESTRUCT) { keydata->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_keydata(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_keydata); @@ -421,7 +421,7 @@ additionaldata_keydata(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_keydata(ARGS_DIGEST) { isc_region_t r; @@ -432,7 +432,7 @@ digest_keydata(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_keydata(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_keydata); @@ -444,7 +444,7 @@ checkowner_keydata(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_keydata(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_keydata); @@ -455,7 +455,7 @@ checknames_keydata(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_keydata(ARGS_COMPARE) { return (compare_keydata(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/l32_105.c b/lib/dns/rdata/generic/l32_105.c index ee6ced1611..7ab65180d0 100644 --- a/lib/dns/rdata/generic/l32_105.c +++ b/lib/dns/rdata/generic/l32_105.c @@ -20,7 +20,7 @@ #define RRTYPE_L32_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_l32(ARGS_FROMTEXT) { isc_token_t token; struct in_addr addr; @@ -56,7 +56,7 @@ fromtext_l32(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_l32(ARGS_TOTEXT) { isc_region_t region; char buf[sizeof("65000")]; @@ -78,7 +78,7 @@ totext_l32(ARGS_TOTEXT) { return (inet_totext(AF_INET, tctx->flags, ®ion, target)); } -static inline isc_result_t +static isc_result_t fromwire_l32(ARGS_FROMWIRE) { isc_region_t sregion; @@ -97,7 +97,7 @@ fromwire_l32(ARGS_FROMWIRE) { return (mem_tobuffer(target, sregion.base, sregion.length)); } -static inline isc_result_t +static isc_result_t towire_l32(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_l32); REQUIRE(rdata->length == 6); @@ -107,7 +107,7 @@ towire_l32(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_l32(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -123,7 +123,7 @@ compare_l32(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_l32(ARGS_FROMSTRUCT) { dns_rdata_l32_t *l32 = source; uint32_t n; @@ -141,7 +141,7 @@ fromstruct_l32(ARGS_FROMSTRUCT) { return (uint32_tobuffer(n, target)); } -static inline isc_result_t +static isc_result_t tostruct_l32(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_l32_t *l32 = target; @@ -164,7 +164,7 @@ tostruct_l32(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_l32(ARGS_FREESTRUCT) { dns_rdata_l32_t *l32 = source; @@ -174,7 +174,7 @@ freestruct_l32(ARGS_FREESTRUCT) { return; } -static inline isc_result_t +static isc_result_t additionaldata_l32(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_l32); REQUIRE(rdata->length == 6); @@ -187,7 +187,7 @@ additionaldata_l32(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_l32(ARGS_DIGEST) { isc_region_t r; @@ -199,7 +199,7 @@ digest_l32(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_l32(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_l32); @@ -211,7 +211,7 @@ checkowner_l32(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_l32(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_l32); REQUIRE(rdata->length == 6); @@ -223,7 +223,7 @@ checknames_l32(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_l32(ARGS_COMPARE) { return (compare_l32(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/l64_106.c b/lib/dns/rdata/generic/l64_106.c index 9f0fe923d7..ee28f2e235 100644 --- a/lib/dns/rdata/generic/l64_106.c +++ b/lib/dns/rdata/generic/l64_106.c @@ -20,7 +20,7 @@ #define RRTYPE_L64_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_l64(ARGS_FROMTEXT) { isc_token_t token; unsigned char locator[NS_LOCATORSZ]; @@ -49,7 +49,7 @@ fromtext_l64(ARGS_FROMTEXT) { return (mem_tobuffer(target, locator, NS_LOCATORSZ)); } -static inline isc_result_t +static isc_result_t totext_l64(ARGS_TOTEXT) { isc_region_t region; char buf[sizeof("xxxx:xxxx:xxxx:xxxx")]; @@ -76,7 +76,7 @@ totext_l64(ARGS_TOTEXT) { return (str_totext(buf, target)); } -static inline isc_result_t +static isc_result_t fromwire_l64(ARGS_FROMWIRE) { isc_region_t sregion; @@ -95,7 +95,7 @@ fromwire_l64(ARGS_FROMWIRE) { return (mem_tobuffer(target, sregion.base, sregion.length)); } -static inline isc_result_t +static isc_result_t towire_l64(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_l64); REQUIRE(rdata->length == 10); @@ -105,7 +105,7 @@ towire_l64(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_l64(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -121,7 +121,7 @@ compare_l64(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_l64(ARGS_FROMSTRUCT) { dns_rdata_l64_t *l64 = source; @@ -137,7 +137,7 @@ fromstruct_l64(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, l64->l64, sizeof(l64->l64))); } -static inline isc_result_t +static isc_result_t tostruct_l64(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_l64_t *l64 = target; @@ -158,7 +158,7 @@ tostruct_l64(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_l64(ARGS_FREESTRUCT) { dns_rdata_l64_t *l64 = source; @@ -168,7 +168,7 @@ freestruct_l64(ARGS_FREESTRUCT) { return; } -static inline isc_result_t +static isc_result_t additionaldata_l64(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_l64); REQUIRE(rdata->length == 10); @@ -181,7 +181,7 @@ additionaldata_l64(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_l64(ARGS_DIGEST) { isc_region_t r; @@ -193,7 +193,7 @@ digest_l64(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_l64(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_l64); @@ -205,7 +205,7 @@ checkowner_l64(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_l64(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_l64); REQUIRE(rdata->length == 10); @@ -217,7 +217,7 @@ checknames_l64(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_l64(ARGS_COMPARE) { return (compare_l64(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index d6632e6149..4b1e9f182e 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -257,7 +257,7 @@ done: return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t loc_getlatitude(isc_lex_t *lexer, unsigned long *latitude) { unsigned long d1 = 0, m1 = 0, s1 = 0; int direction = 0; @@ -278,7 +278,7 @@ loc_getlatitude(isc_lex_t *lexer, unsigned long *latitude) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t loc_getlongitude(isc_lex_t *lexer, unsigned long *longitude) { unsigned long d2 = 0, m2 = 0, s2 = 0; int direction = 0; @@ -299,7 +299,7 @@ loc_getlongitude(isc_lex_t *lexer, unsigned long *longitude) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t loc_getaltitude(isc_lex_t *lexer, unsigned long *altitude) { isc_token_t token; unsigned long cm; @@ -325,7 +325,7 @@ loc_getaltitude(isc_lex_t *lexer, unsigned long *altitude) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t loc_getoptionalprecision(isc_lex_t *lexer, unsigned char *valuep) { isc_token_t token; @@ -341,17 +341,17 @@ loc_getoptionalprecision(isc_lex_t *lexer, unsigned char *valuep) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t loc_getsize(isc_lex_t *lexer, unsigned char *sizep) { return (loc_getoptionalprecision(lexer, sizep)); } -static inline isc_result_t +static isc_result_t loc_gethorizontalprecision(isc_lex_t *lexer, unsigned char *hpp) { return (loc_getoptionalprecision(lexer, hpp)); } -static inline isc_result_t +static isc_result_t loc_getverticalprecision(isc_lex_t *lexer, unsigned char *vpp) { return (loc_getoptionalprecision(lexer, vpp)); } @@ -380,7 +380,7 @@ loc_getverticalprecision(isc_lex_t *lexer, unsigned char *vpp) { * ZIP/postal code area sizes, since it is often easy to find * approximate geographical location by ZIP/postal code. */ -static inline isc_result_t +static isc_result_t fromtext_loc(ARGS_FROMTEXT) { isc_result_t result = ISC_R_SUCCESS; unsigned long latitude = 0; @@ -433,7 +433,7 @@ encode: return (result); } -static inline isc_result_t +static isc_result_t totext_loc(ARGS_TOTEXT) { int d1, m1, s1, fs1; int d2, m2, s2, fs2; @@ -552,7 +552,7 @@ totext_loc(ARGS_TOTEXT) { return (str_totext(buf, target)); } -static inline isc_result_t +static isc_result_t fromwire_loc(ARGS_FROMWIRE) { isc_region_t sr; unsigned char c; @@ -652,7 +652,7 @@ fromwire_loc(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, 16)); } -static inline isc_result_t +static isc_result_t towire_loc(ARGS_TOWIRE) { UNUSED(cctx); @@ -662,7 +662,7 @@ towire_loc(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_loc(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -678,7 +678,7 @@ compare_loc(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_loc(ARGS_FROMSTRUCT) { dns_rdata_loc_t *loc = source; uint8_t c; @@ -730,7 +730,7 @@ fromstruct_loc(ARGS_FROMSTRUCT) { return (uint32_tobuffer(loc->v.v0.altitude, target)); } -static inline isc_result_t +static isc_result_t tostruct_loc(ARGS_TOSTRUCT) { dns_rdata_loc_t *loc = target; isc_region_t r; @@ -769,7 +769,7 @@ tostruct_loc(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_loc(ARGS_FREESTRUCT) { dns_rdata_loc_t *loc = source; @@ -780,7 +780,7 @@ freestruct_loc(ARGS_FREESTRUCT) { UNUSED(loc); } -static inline isc_result_t +static isc_result_t additionaldata_loc(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_loc); @@ -792,7 +792,7 @@ additionaldata_loc(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_loc(ARGS_DIGEST) { isc_region_t r; @@ -803,7 +803,7 @@ digest_loc(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_loc(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_loc); @@ -815,7 +815,7 @@ checkowner_loc(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_loc(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_loc); @@ -826,7 +826,7 @@ checknames_loc(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_loc(ARGS_COMPARE) { return (compare_loc(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/lp_107.c b/lib/dns/rdata/generic/lp_107.c index 1d0f603b32..c4342c06c1 100644 --- a/lib/dns/rdata/generic/lp_107.c +++ b/lib/dns/rdata/generic/lp_107.c @@ -20,7 +20,7 @@ #define RRTYPE_LP_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_lp(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -50,7 +50,7 @@ fromtext_lp(ARGS_FROMTEXT) { return (dns_name_fromtext(&name, &buffer, origin, options, target)); } -static inline isc_result_t +static isc_result_t totext_lp(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -78,7 +78,7 @@ totext_lp(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_lp(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sregion; @@ -101,7 +101,7 @@ fromwire_lp(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_lp(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_lp); REQUIRE(rdata->length != 0); @@ -111,7 +111,7 @@ towire_lp(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_lp(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -128,7 +128,7 @@ compare_lp(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_lp(ARGS_FROMSTRUCT) { dns_rdata_lp_t *lp = source; isc_region_t region; @@ -146,7 +146,7 @@ fromstruct_lp(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_lp(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_lp_t *lp = target; @@ -171,7 +171,7 @@ tostruct_lp(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_lp(ARGS_FREESTRUCT) { dns_rdata_lp_t *lp = source; @@ -186,7 +186,7 @@ freestruct_lp(ARGS_FREESTRUCT) { lp->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_lp(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -209,7 +209,7 @@ additionaldata_lp(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_l64, NULL)); } -static inline isc_result_t +static isc_result_t digest_lp(ARGS_DIGEST) { isc_region_t region; @@ -219,7 +219,7 @@ digest_lp(ARGS_DIGEST) { return ((digest)(arg, ®ion)); } -static inline bool +static bool checkowner_lp(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_lp); @@ -231,7 +231,7 @@ checkowner_lp(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_lp(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_lp); @@ -241,7 +241,7 @@ checknames_lp(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_lp(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; diff --git a/lib/dns/rdata/generic/mb_7.c b/lib/dns/rdata/generic/mb_7.c index 22758fa93e..23e9e09eab 100644 --- a/lib/dns/rdata/generic/mb_7.c +++ b/lib/dns/rdata/generic/mb_7.c @@ -16,7 +16,7 @@ #define RRTYPE_MB_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_mb(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -40,7 +40,7 @@ fromtext_mb(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_mb(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -61,7 +61,7 @@ totext_mb(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_mb(ARGS_FROMWIRE) { dns_name_t name; @@ -76,7 +76,7 @@ fromwire_mb(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_mb(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -94,7 +94,7 @@ towire_mb(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_mb(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -119,7 +119,7 @@ compare_mb(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_mb(ARGS_FROMSTRUCT) { dns_rdata_mb_t *mb = source; isc_region_t region; @@ -136,7 +136,7 @@ fromstruct_mb(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_mb(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_mb_t *mb = target; @@ -159,7 +159,7 @@ tostruct_mb(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_mb(ARGS_FREESTRUCT) { dns_rdata_mb_t *mb = source; @@ -173,7 +173,7 @@ freestruct_mb(ARGS_FREESTRUCT) { mb->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_mb(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -190,7 +190,7 @@ additionaldata_mb(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_mb(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -204,7 +204,7 @@ digest_mb(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_mb(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_mb); @@ -215,7 +215,7 @@ checkowner_mb(ARGS_CHECKOWNER) { return (dns_name_ismailbox(name)); } -static inline bool +static bool checknames_mb(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_mb); @@ -226,7 +226,7 @@ checknames_mb(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_mb(ARGS_COMPARE) { return (compare_mb(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/md_3.c b/lib/dns/rdata/generic/md_3.c index 69709672d2..38d48d32ad 100644 --- a/lib/dns/rdata/generic/md_3.c +++ b/lib/dns/rdata/generic/md_3.c @@ -16,7 +16,7 @@ #define RRTYPE_MD_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_md(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -40,7 +40,7 @@ fromtext_md(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_md(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -61,7 +61,7 @@ totext_md(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_md(ARGS_FROMWIRE) { dns_name_t name; @@ -76,7 +76,7 @@ fromwire_md(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_md(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -94,7 +94,7 @@ towire_md(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_md(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -119,7 +119,7 @@ compare_md(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_md(ARGS_FROMSTRUCT) { dns_rdata_md_t *md = source; isc_region_t region; @@ -136,7 +136,7 @@ fromstruct_md(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_md(ARGS_TOSTRUCT) { dns_rdata_md_t *md = target; isc_region_t r; @@ -159,7 +159,7 @@ tostruct_md(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_md(ARGS_FREESTRUCT) { dns_rdata_md_t *md = source; @@ -174,7 +174,7 @@ freestruct_md(ARGS_FREESTRUCT) { md->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_md(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -191,7 +191,7 @@ additionaldata_md(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_md(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -205,7 +205,7 @@ digest_md(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_md(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_md); @@ -217,7 +217,7 @@ checkowner_md(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_md(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_md); @@ -228,7 +228,7 @@ checknames_md(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_md(ARGS_COMPARE) { return (compare_md(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/mf_4.c b/lib/dns/rdata/generic/mf_4.c index 478cc69420..3590767dea 100644 --- a/lib/dns/rdata/generic/mf_4.c +++ b/lib/dns/rdata/generic/mf_4.c @@ -16,7 +16,7 @@ #define RRTYPE_MF_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_mf(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -40,7 +40,7 @@ fromtext_mf(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_mf(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -61,7 +61,7 @@ totext_mf(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_mf(ARGS_FROMWIRE) { dns_name_t name; @@ -76,7 +76,7 @@ fromwire_mf(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_mf(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -94,7 +94,7 @@ towire_mf(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_mf(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -119,7 +119,7 @@ compare_mf(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_mf(ARGS_FROMSTRUCT) { dns_rdata_mf_t *mf = source; isc_region_t region; @@ -136,7 +136,7 @@ fromstruct_mf(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_mf(ARGS_TOSTRUCT) { dns_rdata_mf_t *mf = target; isc_region_t r; @@ -159,7 +159,7 @@ tostruct_mf(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_mf(ARGS_FREESTRUCT) { dns_rdata_mf_t *mf = source; @@ -173,7 +173,7 @@ freestruct_mf(ARGS_FREESTRUCT) { mf->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_mf(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -190,7 +190,7 @@ additionaldata_mf(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_mf(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -204,7 +204,7 @@ digest_mf(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_mf(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_mf); @@ -216,7 +216,7 @@ checkowner_mf(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_mf(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_mf); @@ -227,7 +227,7 @@ checknames_mf(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_mf(ARGS_COMPARE) { return (compare_mf(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/mg_8.c b/lib/dns/rdata/generic/mg_8.c index 3bc3f37f23..201a295c60 100644 --- a/lib/dns/rdata/generic/mg_8.c +++ b/lib/dns/rdata/generic/mg_8.c @@ -16,7 +16,7 @@ #define RRTYPE_MG_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_mg(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -40,7 +40,7 @@ fromtext_mg(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_mg(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -61,7 +61,7 @@ totext_mg(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_mg(ARGS_FROMWIRE) { dns_name_t name; @@ -76,7 +76,7 @@ fromwire_mg(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_mg(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -94,7 +94,7 @@ towire_mg(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_mg(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -119,7 +119,7 @@ compare_mg(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_mg(ARGS_FROMSTRUCT) { dns_rdata_mg_t *mg = source; isc_region_t region; @@ -136,7 +136,7 @@ fromstruct_mg(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_mg(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_mg_t *mg = target; @@ -159,7 +159,7 @@ tostruct_mg(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_mg(ARGS_FREESTRUCT) { dns_rdata_mg_t *mg = source; @@ -173,7 +173,7 @@ freestruct_mg(ARGS_FREESTRUCT) { mg->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_mg(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_mg); @@ -185,7 +185,7 @@ additionaldata_mg(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_mg(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -199,7 +199,7 @@ digest_mg(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_mg(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_mg); @@ -210,7 +210,7 @@ checkowner_mg(ARGS_CHECKOWNER) { return (dns_name_ismailbox(name)); } -static inline bool +static bool checknames_mg(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_mg); @@ -221,7 +221,7 @@ checknames_mg(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_mg(ARGS_COMPARE) { return (compare_mg(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/minfo_14.c b/lib/dns/rdata/generic/minfo_14.c index e3e84c4cdd..38ff8bdef4 100644 --- a/lib/dns/rdata/generic/minfo_14.c +++ b/lib/dns/rdata/generic/minfo_14.c @@ -16,7 +16,7 @@ #define RRTYPE_MINFO_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_minfo(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -55,7 +55,7 @@ fromtext_minfo(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_minfo(ARGS_TOTEXT) { isc_region_t region; dns_name_t rmail; @@ -88,7 +88,7 @@ totext_minfo(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_minfo(ARGS_FROMWIRE) { dns_name_t rmail; dns_name_t email; @@ -107,7 +107,7 @@ fromwire_minfo(ARGS_FROMWIRE) { return (dns_name_fromwire(&email, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_minfo(ARGS_TOWIRE) { isc_region_t region; dns_name_t rmail; @@ -136,7 +136,7 @@ towire_minfo(ARGS_TOWIRE) { return (dns_name_towire(&rmail, cctx, target)); } -static inline int +static int compare_minfo(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -177,7 +177,7 @@ compare_minfo(ARGS_COMPARE) { return (order); } -static inline isc_result_t +static isc_result_t fromstruct_minfo(ARGS_FROMSTRUCT) { dns_rdata_minfo_t *minfo = source; isc_region_t region; @@ -196,7 +196,7 @@ fromstruct_minfo(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_minfo(ARGS_TOSTRUCT) { dns_rdata_minfo_t *minfo = target; isc_region_t region; @@ -224,7 +224,7 @@ tostruct_minfo(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_minfo(ARGS_FREESTRUCT) { dns_rdata_minfo_t *minfo = source; @@ -240,7 +240,7 @@ freestruct_minfo(ARGS_FREESTRUCT) { minfo->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_minfo(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_minfo); @@ -252,7 +252,7 @@ additionaldata_minfo(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_minfo(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -274,7 +274,7 @@ digest_minfo(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_minfo(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_minfo); @@ -286,7 +286,7 @@ checkowner_minfo(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_minfo(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -315,7 +315,7 @@ checknames_minfo(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_minfo(ARGS_COMPARE) { return (compare_minfo(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/mr_9.c b/lib/dns/rdata/generic/mr_9.c index dcf24c676b..4ea279b2a0 100644 --- a/lib/dns/rdata/generic/mr_9.c +++ b/lib/dns/rdata/generic/mr_9.c @@ -16,7 +16,7 @@ #define RRTYPE_MR_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_mr(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -40,7 +40,7 @@ fromtext_mr(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_mr(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -61,7 +61,7 @@ totext_mr(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_mr(ARGS_FROMWIRE) { dns_name_t name; @@ -76,7 +76,7 @@ fromwire_mr(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_mr(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -94,7 +94,7 @@ towire_mr(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_mr(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -119,7 +119,7 @@ compare_mr(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_mr(ARGS_FROMSTRUCT) { dns_rdata_mr_t *mr = source; isc_region_t region; @@ -136,7 +136,7 @@ fromstruct_mr(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_mr(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_mr_t *mr = target; @@ -159,7 +159,7 @@ tostruct_mr(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_mr(ARGS_FREESTRUCT) { dns_rdata_mr_t *mr = source; @@ -173,7 +173,7 @@ freestruct_mr(ARGS_FREESTRUCT) { mr->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_mr(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_mr); @@ -185,7 +185,7 @@ additionaldata_mr(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_mr(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -199,7 +199,7 @@ digest_mr(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_mr(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_mr); @@ -211,7 +211,7 @@ checkowner_mr(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_mr(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_mr); @@ -222,7 +222,7 @@ checknames_mr(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_mr(ARGS_COMPARE) { return (compare_mr(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/mx_15.c b/lib/dns/rdata/generic/mx_15.c index eac33ae740..9356f0d3c6 100644 --- a/lib/dns/rdata/generic/mx_15.c +++ b/lib/dns/rdata/generic/mx_15.c @@ -44,7 +44,7 @@ check_mx(isc_token_t *token) { return (true); } -static inline isc_result_t +static isc_result_t fromtext_mx(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -96,7 +96,7 @@ fromtext_mx(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_mx(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -124,7 +124,7 @@ totext_mx(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_mx(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sregion; @@ -147,7 +147,7 @@ fromwire_mx(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_mx(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -168,7 +168,7 @@ towire_mx(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_mx(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -202,7 +202,7 @@ compare_mx(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_mx(ARGS_FROMSTRUCT) { dns_rdata_mx_t *mx = source; isc_region_t region; @@ -220,7 +220,7 @@ fromstruct_mx(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_mx(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_mx_t *mx = target; @@ -245,7 +245,7 @@ tostruct_mx(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_mx(ARGS_FREESTRUCT) { dns_rdata_mx_t *mx = source; @@ -265,7 +265,7 @@ static unsigned char port25_ndata[] = "\003_25\004_tcp"; static dns_name_t port25 = DNS_NAME_INITNONABSOLUTE(port25_ndata, port25_offset); -static inline isc_result_t +static isc_result_t additionaldata_mx(ARGS_ADDLDATA) { isc_result_t result; dns_fixedname_t fixed; @@ -302,7 +302,7 @@ additionaldata_mx(ARGS_ADDLDATA) { NULL)); } -static inline isc_result_t +static isc_result_t digest_mx(ARGS_DIGEST) { isc_region_t r1, r2; dns_name_t name; @@ -319,7 +319,7 @@ digest_mx(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_mx(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_mx); @@ -329,7 +329,7 @@ checkowner_mx(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline bool +static bool checknames_mx(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -351,7 +351,7 @@ checknames_mx(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_mx(ARGS_COMPARE) { return (compare_mx(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/naptr_35.c b/lib/dns/rdata/generic/naptr_35.c index e6ed027f17..3db485aa2b 100644 --- a/lib/dns/rdata/generic/naptr_35.c +++ b/lib/dns/rdata/generic/naptr_35.c @@ -24,7 +24,7 @@ * Check the wire format of the Regexp field. * Don't allow embedded NUL's. */ -static inline isc_result_t +static isc_result_t txt_valid_regex(const unsigned char *txt) { unsigned int nsub = 0; char regex[256]; @@ -169,7 +169,7 @@ txt_valid_regex(const unsigned char *txt) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromtext_naptr(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -239,7 +239,7 @@ fromtext_naptr(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_naptr(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -300,7 +300,7 @@ totext_naptr(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_naptr(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sr; @@ -348,7 +348,7 @@ fromwire_naptr(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_naptr(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -391,7 +391,7 @@ towire_naptr(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_naptr(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -463,7 +463,7 @@ compare_naptr(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_naptr(ARGS_FROMSTRUCT) { dns_rdata_naptr_t *naptr = source; isc_region_t region; @@ -491,7 +491,7 @@ fromstruct_naptr(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_naptr(ARGS_TOSTRUCT) { dns_rdata_naptr_t *naptr = target; isc_region_t r; @@ -564,7 +564,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_naptr(ARGS_FREESTRUCT) { dns_rdata_naptr_t *naptr = source; @@ -588,7 +588,7 @@ freestruct_naptr(ARGS_FREESTRUCT) { naptr->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_naptr(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -648,7 +648,7 @@ additionaldata_naptr(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_naptr(ARGS_DIGEST) { isc_region_t r1, r2; unsigned int length, n; @@ -707,7 +707,7 @@ digest_naptr(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_naptr(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_naptr); @@ -719,7 +719,7 @@ checkowner_naptr(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_naptr(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_naptr); @@ -730,7 +730,7 @@ checknames_naptr(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_naptr(ARGS_COMPARE) { return (compare_naptr(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/nid_104.c b/lib/dns/rdata/generic/nid_104.c index 668343cee1..8a958130c2 100644 --- a/lib/dns/rdata/generic/nid_104.c +++ b/lib/dns/rdata/generic/nid_104.c @@ -20,7 +20,7 @@ #define RRTYPE_NID_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_nid(ARGS_FROMTEXT) { isc_token_t token; unsigned char locator[NS_LOCATORSZ]; @@ -49,7 +49,7 @@ fromtext_nid(ARGS_FROMTEXT) { return (mem_tobuffer(target, locator, NS_LOCATORSZ)); } -static inline isc_result_t +static isc_result_t totext_nid(ARGS_TOTEXT) { isc_region_t region; char buf[sizeof("xxxx:xxxx:xxxx:xxxx")]; @@ -76,7 +76,7 @@ totext_nid(ARGS_TOTEXT) { return (str_totext(buf, target)); } -static inline isc_result_t +static isc_result_t fromwire_nid(ARGS_FROMWIRE) { isc_region_t sregion; @@ -95,7 +95,7 @@ fromwire_nid(ARGS_FROMWIRE) { return (mem_tobuffer(target, sregion.base, sregion.length)); } -static inline isc_result_t +static isc_result_t towire_nid(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_nid); REQUIRE(rdata->length == 10); @@ -105,7 +105,7 @@ towire_nid(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_nid(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -121,7 +121,7 @@ compare_nid(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_nid(ARGS_FROMSTRUCT) { dns_rdata_nid_t *nid = source; @@ -137,7 +137,7 @@ fromstruct_nid(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, nid->nid, sizeof(nid->nid))); } -static inline isc_result_t +static isc_result_t tostruct_nid(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_nid_t *nid = target; @@ -158,7 +158,7 @@ tostruct_nid(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_nid(ARGS_FREESTRUCT) { dns_rdata_nid_t *nid = source; @@ -168,7 +168,7 @@ freestruct_nid(ARGS_FREESTRUCT) { return; } -static inline isc_result_t +static isc_result_t additionaldata_nid(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nid); REQUIRE(rdata->length == 10); @@ -181,7 +181,7 @@ additionaldata_nid(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_nid(ARGS_DIGEST) { isc_region_t r; @@ -193,7 +193,7 @@ digest_nid(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_nid(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nid); @@ -205,7 +205,7 @@ checkowner_nid(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_nid(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nid); REQUIRE(rdata->length == 10); @@ -217,7 +217,7 @@ checknames_nid(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_nid(ARGS_COMPARE) { return (compare_nid(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/ninfo_56.c b/lib/dns/rdata/generic/ninfo_56.c index e4edc1bf8e..8e0fae1400 100644 --- a/lib/dns/rdata/generic/ninfo_56.c +++ b/lib/dns/rdata/generic/ninfo_56.c @@ -16,14 +16,14 @@ #define RRTYPE_NINFO_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_ninfo(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_ninfo); return (generic_fromtext_txt(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_ninfo(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_ninfo); @@ -31,14 +31,14 @@ totext_ninfo(ARGS_TOTEXT) { return (generic_totext_txt(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_ninfo(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_ninfo); return (generic_fromwire_txt(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_ninfo(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_ninfo); @@ -47,7 +47,7 @@ towire_ninfo(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_ninfo(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -61,14 +61,14 @@ compare_ninfo(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_ninfo(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_ninfo); return (generic_fromstruct_txt(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_ninfo(ARGS_TOSTRUCT) { dns_rdata_ninfo_t *ninfo = target; @@ -82,7 +82,7 @@ tostruct_ninfo(ARGS_TOSTRUCT) { return (generic_tostruct_txt(CALL_TOSTRUCT)); } -static inline void +static void freestruct_ninfo(ARGS_FREESTRUCT) { dns_rdata_ninfo_t *ninfo = source; @@ -92,7 +92,7 @@ freestruct_ninfo(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t +static isc_result_t additionaldata_ninfo(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_ninfo); @@ -104,7 +104,7 @@ additionaldata_ninfo(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_ninfo(ARGS_DIGEST) { isc_region_t r; @@ -115,7 +115,7 @@ digest_ninfo(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_ninfo(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_ninfo); @@ -127,7 +127,7 @@ checkowner_ninfo(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_ninfo(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_ninfo); @@ -138,7 +138,7 @@ checknames_ninfo(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ninfo(ARGS_COMPARE) { return (compare_ninfo(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/ns_2.c b/lib/dns/rdata/generic/ns_2.c index e75c4da110..9fa8dba0a3 100644 --- a/lib/dns/rdata/generic/ns_2.c +++ b/lib/dns/rdata/generic/ns_2.c @@ -16,7 +16,7 @@ #define RRTYPE_NS_ATTRIBUTES (DNS_RDATATYPEATTR_ZONECUTAUTH) -static inline isc_result_t +static isc_result_t fromtext_ns(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -51,7 +51,7 @@ fromtext_ns(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_ns(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -72,7 +72,7 @@ totext_ns(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_ns(ARGS_FROMWIRE) { dns_name_t name; @@ -87,7 +87,7 @@ fromwire_ns(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_ns(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -105,7 +105,7 @@ towire_ns(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_ns(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -130,7 +130,7 @@ compare_ns(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_ns(ARGS_FROMSTRUCT) { dns_rdata_ns_t *ns = source; isc_region_t region; @@ -147,7 +147,7 @@ fromstruct_ns(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_ns(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_ns_t *ns = target; @@ -170,7 +170,7 @@ tostruct_ns(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_ns(ARGS_FREESTRUCT) { dns_rdata_ns_t *ns = source; @@ -184,7 +184,7 @@ freestruct_ns(ARGS_FREESTRUCT) { ns->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_ns(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -201,7 +201,7 @@ additionaldata_ns(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_ns(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -215,7 +215,7 @@ digest_ns(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_ns(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_ns); @@ -227,7 +227,7 @@ checkowner_ns(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_ns(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -248,7 +248,7 @@ checknames_ns(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ns(ARGS_COMPARE) { return (compare_ns(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/nsec3_50.c b/lib/dns/rdata/generic/nsec3_50.c index 8bc44f13c6..556616bd27 100644 --- a/lib/dns/rdata/generic/nsec3_50.c +++ b/lib/dns/rdata/generic/nsec3_50.c @@ -37,7 +37,7 @@ #define RRTYPE_NSEC3_ATTRIBUTES DNS_RDATATYPEATTR_DNSSEC -static inline isc_result_t +static isc_result_t fromtext_nsec3(ARGS_FROMTEXT) { isc_token_t token; unsigned int flags; @@ -105,7 +105,7 @@ fromtext_nsec3(ARGS_FROMTEXT) { return (typemap_fromtext(lexer, target, true)); } -static inline isc_result_t +static isc_result_t totext_nsec3(ARGS_TOTEXT) { isc_region_t sr; unsigned int i, j; @@ -181,7 +181,7 @@ totext_nsec3(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_nsec3(ARGS_FROMWIRE) { isc_region_t sr, rr; unsigned int saltlen, hashlen; @@ -226,7 +226,7 @@ fromwire_nsec3(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_nsec3(ARGS_TOWIRE) { isc_region_t sr; @@ -239,7 +239,7 @@ towire_nsec3(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_nsec3(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -255,7 +255,7 @@ compare_nsec3(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_nsec3(ARGS_FROMSTRUCT) { dns_rdata_nsec3_t *nsec3 = source; isc_region_t region; @@ -284,7 +284,7 @@ fromstruct_nsec3(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, nsec3->typebits, nsec3->len)); } -static inline isc_result_t +static isc_result_t tostruct_nsec3(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_nsec3_t *nsec3 = target; @@ -336,7 +336,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_nsec3(ARGS_FREESTRUCT) { dns_rdata_nsec3_t *nsec3 = source; @@ -359,7 +359,7 @@ freestruct_nsec3(ARGS_FREESTRUCT) { nsec3->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_nsec3(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nsec3); @@ -371,7 +371,7 @@ additionaldata_nsec3(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_nsec3(ARGS_DIGEST) { isc_region_t r; @@ -381,7 +381,7 @@ digest_nsec3(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_nsec3(ARGS_CHECKOWNER) { unsigned char owner[NSEC3_MAX_HASH_LENGTH]; isc_buffer_t buffer; @@ -406,7 +406,7 @@ checkowner_nsec3(ARGS_CHECKOWNER) { return (false); } -static inline bool +static bool checknames_nsec3(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nsec3); @@ -417,7 +417,7 @@ checknames_nsec3(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_nsec3(ARGS_COMPARE) { return (compare_nsec3(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/nsec3param_51.c b/lib/dns/rdata/generic/nsec3param_51.c index bac40b45f5..169059862c 100644 --- a/lib/dns/rdata/generic/nsec3param_51.c +++ b/lib/dns/rdata/generic/nsec3param_51.c @@ -37,7 +37,7 @@ #define RRTYPE_NSEC3PARAM_ATTRIBUTES (DNS_RDATATYPEATTR_DNSSEC) -static inline isc_result_t +static isc_result_t fromtext_nsec3param(ARGS_FROMTEXT) { isc_token_t token; unsigned int flags = 0; @@ -90,7 +90,7 @@ fromtext_nsec3param(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_nsec3param(ARGS_TOTEXT) { isc_region_t sr; unsigned int i, j; @@ -140,7 +140,7 @@ totext_nsec3param(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_nsec3param(ARGS_FROMWIRE) { isc_region_t sr, rr; unsigned int saltlen; @@ -171,7 +171,7 @@ fromwire_nsec3param(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_nsec3param(ARGS_TOWIRE) { isc_region_t sr; @@ -184,7 +184,7 @@ towire_nsec3param(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_nsec3param(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -200,7 +200,7 @@ compare_nsec3param(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_nsec3param(ARGS_FROMSTRUCT) { dns_rdata_nsec3param_t *nsec3param = source; @@ -220,7 +220,7 @@ fromstruct_nsec3param(ARGS_FROMSTRUCT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t tostruct_nsec3param(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_nsec3param_t *nsec3param = target; @@ -252,7 +252,7 @@ tostruct_nsec3param(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_nsec3param(ARGS_FREESTRUCT) { dns_rdata_nsec3param_t *nsec3param = source; @@ -269,7 +269,7 @@ freestruct_nsec3param(ARGS_FREESTRUCT) { nsec3param->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_nsec3param(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nsec3param); @@ -281,7 +281,7 @@ additionaldata_nsec3param(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_nsec3param(ARGS_DIGEST) { isc_region_t r; @@ -291,7 +291,7 @@ digest_nsec3param(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_nsec3param(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nsec3param); @@ -303,7 +303,7 @@ checkowner_nsec3param(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_nsec3param(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nsec3param); @@ -314,7 +314,7 @@ checknames_nsec3param(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_nsec3param(ARGS_COMPARE) { return (compare_nsec3param(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/nsec_47.c b/lib/dns/rdata/generic/nsec_47.c index 96db05fea7..77700be667 100644 --- a/lib/dns/rdata/generic/nsec_47.c +++ b/lib/dns/rdata/generic/nsec_47.c @@ -24,7 +24,7 @@ (DNS_RDATATYPEATTR_DNSSEC | DNS_RDATATYPEATTR_ZONECUTAUTH | \ DNS_RDATATYPEATTR_ATCNAME) -static inline isc_result_t +static isc_result_t fromtext_nsec(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -51,7 +51,7 @@ fromtext_nsec(ARGS_FROMTEXT) { return (typemap_fromtext(lexer, target, false)); } -static inline isc_result_t +static isc_result_t totext_nsec(ARGS_TOTEXT) { isc_region_t sr; dns_name_t name; @@ -75,7 +75,7 @@ totext_nsec(ARGS_TOTEXT) { return (typemap_totext(&sr, NULL, target)); } -static /* inline */ isc_result_t +static isc_result_t fromwire_nsec(ARGS_FROMWIRE) { isc_region_t sr; dns_name_t name; @@ -97,7 +97,7 @@ fromwire_nsec(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_nsec(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -116,7 +116,7 @@ towire_nsec(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_nsec(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -132,7 +132,7 @@ compare_nsec(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_nsec(ARGS_FROMSTRUCT) { dns_rdata_nsec_t *nsec = source; isc_region_t region; @@ -155,7 +155,7 @@ fromstruct_nsec(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, nsec->typebits, nsec->len)); } -static inline isc_result_t +static isc_result_t tostruct_nsec(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_nsec_t *nsec = target; @@ -192,7 +192,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_nsec(ARGS_FREESTRUCT) { dns_rdata_nsec_t *nsec = source; @@ -210,7 +210,7 @@ freestruct_nsec(ARGS_FREESTRUCT) { nsec->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_nsec(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nsec); @@ -222,7 +222,7 @@ additionaldata_nsec(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_nsec(ARGS_DIGEST) { isc_region_t r; @@ -232,7 +232,7 @@ digest_nsec(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_nsec(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nsec); @@ -244,7 +244,7 @@ checkowner_nsec(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_nsec(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nsec); @@ -255,7 +255,7 @@ checknames_nsec(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_nsec(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; diff --git a/lib/dns/rdata/generic/null_10.c b/lib/dns/rdata/generic/null_10.c index 126e361861..4a019ddcfe 100644 --- a/lib/dns/rdata/generic/null_10.c +++ b/lib/dns/rdata/generic/null_10.c @@ -16,7 +16,7 @@ #define RRTYPE_NULL_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_null(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_null); @@ -31,14 +31,14 @@ fromtext_null(ARGS_FROMTEXT) { return (DNS_R_SYNTAX); } -static inline isc_result_t +static isc_result_t totext_null(ARGS_TOTEXT) { REQUIRE(rdata->type == dns_rdatatype_null); return (unknown_totext(rdata, tctx, target)); } -static inline isc_result_t +static isc_result_t fromwire_null(ARGS_FROMWIRE) { isc_region_t sr; @@ -54,7 +54,7 @@ fromwire_null(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_null(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_null); @@ -63,7 +63,7 @@ towire_null(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_null(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -77,7 +77,7 @@ compare_null(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_null(ARGS_FROMSTRUCT) { dns_rdata_null_t *null = source; @@ -93,7 +93,7 @@ fromstruct_null(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, null->data, null->length)); } -static inline isc_result_t +static isc_result_t tostruct_null(ARGS_TOSTRUCT) { dns_rdata_null_t *null = target; isc_region_t r; @@ -116,7 +116,7 @@ tostruct_null(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_null(ARGS_FREESTRUCT) { dns_rdata_null_t *null = source; @@ -133,7 +133,7 @@ freestruct_null(ARGS_FREESTRUCT) { null->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_null(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_null); @@ -145,7 +145,7 @@ additionaldata_null(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_null(ARGS_DIGEST) { isc_region_t r; @@ -156,7 +156,7 @@ digest_null(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_null(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_null); @@ -168,7 +168,7 @@ checkowner_null(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_null(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_null); @@ -179,7 +179,7 @@ checknames_null(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_null(ARGS_COMPARE) { return (compare_null(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/nxt_30.c b/lib/dns/rdata/generic/nxt_30.c index fa03bdf512..93d2384def 100644 --- a/lib/dns/rdata/generic/nxt_30.c +++ b/lib/dns/rdata/generic/nxt_30.c @@ -22,7 +22,7 @@ */ #define RRTYPE_NXT_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_nxt(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -88,7 +88,7 @@ fromtext_nxt(ARGS_FROMTEXT) { return (mem_tobuffer(target, bm, n)); } -static inline isc_result_t +static isc_result_t totext_nxt(ARGS_TOTEXT) { isc_region_t sr; unsigned int i, j; @@ -134,7 +134,7 @@ totext_nxt(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_nxt(ARGS_FROMWIRE) { isc_region_t sr; dns_name_t name; @@ -160,7 +160,7 @@ fromwire_nxt(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_nxt(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -179,7 +179,7 @@ towire_nxt(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_nxt(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -210,7 +210,7 @@ compare_nxt(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_nxt(ARGS_FROMSTRUCT) { dns_rdata_nxt_t *nxt = source; isc_region_t region; @@ -234,7 +234,7 @@ fromstruct_nxt(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, nxt->typebits, nxt->len)); } -static inline isc_result_t +static isc_result_t tostruct_nxt(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_nxt_t *nxt = target; @@ -271,7 +271,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_nxt(ARGS_FREESTRUCT) { dns_rdata_nxt_t *nxt = source; @@ -289,7 +289,7 @@ freestruct_nxt(ARGS_FREESTRUCT) { nxt->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_nxt(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nxt); @@ -301,7 +301,7 @@ additionaldata_nxt(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_nxt(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -321,7 +321,7 @@ digest_nxt(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_nxt(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nxt); @@ -333,7 +333,7 @@ checkowner_nxt(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_nxt(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nxt); @@ -344,7 +344,7 @@ checknames_nxt(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_nxt(ARGS_COMPARE) { return (compare_nxt(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/openpgpkey_61.c b/lib/dns/rdata/generic/openpgpkey_61.c index b6db9d758b..d4f9fa58c0 100644 --- a/lib/dns/rdata/generic/openpgpkey_61.c +++ b/lib/dns/rdata/generic/openpgpkey_61.c @@ -16,7 +16,7 @@ #define RRTYPE_OPENPGPKEY_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_openpgpkey(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_openpgpkey); @@ -32,7 +32,7 @@ fromtext_openpgpkey(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_openpgpkey(ARGS_TOTEXT) { isc_region_t sr; @@ -66,7 +66,7 @@ totext_openpgpkey(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_openpgpkey(ARGS_FROMWIRE) { isc_region_t sr; @@ -88,7 +88,7 @@ fromwire_openpgpkey(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_openpgpkey(ARGS_TOWIRE) { isc_region_t sr; @@ -101,7 +101,7 @@ towire_openpgpkey(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_openpgpkey(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -117,7 +117,7 @@ compare_openpgpkey(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_openpgpkey(ARGS_FROMSTRUCT) { dns_rdata_openpgpkey_t *sig = source; @@ -136,7 +136,7 @@ fromstruct_openpgpkey(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, sig->keyring, sig->length)); } -static inline isc_result_t +static isc_result_t tostruct_openpgpkey(ARGS_TOSTRUCT) { isc_region_t sr; dns_rdata_openpgpkey_t *sig = target; @@ -167,7 +167,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_openpgpkey(ARGS_FREESTRUCT) { dns_rdata_openpgpkey_t *sig = (dns_rdata_openpgpkey_t *)source; @@ -184,7 +184,7 @@ freestruct_openpgpkey(ARGS_FREESTRUCT) { sig->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_openpgpkey(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_openpgpkey); @@ -196,7 +196,7 @@ additionaldata_openpgpkey(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_openpgpkey(ARGS_DIGEST) { isc_region_t r; @@ -207,7 +207,7 @@ digest_openpgpkey(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_openpgpkey(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_openpgpkey); @@ -219,7 +219,7 @@ checkowner_openpgpkey(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_openpgpkey(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_openpgpkey); @@ -230,7 +230,7 @@ checknames_openpgpkey(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_openpgpkey(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; diff --git a/lib/dns/rdata/generic/opt_41.c b/lib/dns/rdata/generic/opt_41.c index 9bdfa3c1cc..e5e7168628 100644 --- a/lib/dns/rdata/generic/opt_41.c +++ b/lib/dns/rdata/generic/opt_41.c @@ -22,7 +22,7 @@ #include -static inline isc_result_t +static isc_result_t fromtext_opt(ARGS_FROMTEXT) { /* * OPT records do not have a text format. @@ -41,7 +41,7 @@ fromtext_opt(ARGS_FROMTEXT) { return (ISC_R_NOTIMPLEMENTED); } -static inline isc_result_t +static isc_result_t totext_opt(ARGS_TOTEXT) { isc_region_t r; isc_region_t or ; @@ -91,7 +91,7 @@ totext_opt(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_opt(ARGS_FROMWIRE) { isc_region_t sregion; isc_region_t tregion; @@ -259,7 +259,7 @@ fromwire_opt(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_opt(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_opt); @@ -268,7 +268,7 @@ towire_opt(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_opt(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -282,7 +282,7 @@ compare_opt(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_opt(ARGS_FROMSTRUCT) { dns_rdata_opt_t *opt = source; isc_region_t region; @@ -315,7 +315,7 @@ fromstruct_opt(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, opt->options, opt->length)); } -static inline isc_result_t +static isc_result_t tostruct_opt(ARGS_TOSTRUCT) { dns_rdata_opt_t *opt = target; isc_region_t r; @@ -339,7 +339,7 @@ tostruct_opt(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_opt(ARGS_FREESTRUCT) { dns_rdata_opt_t *opt = source; @@ -356,7 +356,7 @@ freestruct_opt(ARGS_FREESTRUCT) { opt->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_opt(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_opt); @@ -368,7 +368,7 @@ additionaldata_opt(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_opt(ARGS_DIGEST) { /* * OPT records are not digested. @@ -383,7 +383,7 @@ digest_opt(ARGS_DIGEST) { return (ISC_R_NOTIMPLEMENTED); } -static inline bool +static bool checkowner_opt(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_opt); @@ -394,7 +394,7 @@ checkowner_opt(ARGS_CHECKOWNER) { return (dns_name_equal(name, dns_rootname)); } -static inline bool +static bool checknames_opt(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_opt); @@ -405,7 +405,7 @@ checknames_opt(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_opt(ARGS_COMPARE) { return (compare_opt(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/proforma.c b/lib/dns/rdata/generic/proforma.c index 96ace12ae6..6315a6f147 100644 --- a/lib/dns/rdata/generic/proforma.c +++ b/lib/dns/rdata/generic/proforma.c @@ -16,7 +16,7 @@ #define RRTYPE_ #_ATTRIBUTES(0) -static inline isc_result_t fromtext_ #(ARGS_FROMTEXT) { +static isc_result_t fromtext_ #(ARGS_FROMTEXT) { isc_token_t token; REQUIRE(type == dns_rdatatype_proforma.c #); @@ -28,7 +28,7 @@ static inline isc_result_t fromtext_ #(ARGS_FROMTEXT) { return (ISC_R_NOTIMPLEMENTED); } -static inline isc_result_t totext_ #(ARGS_TOTEXT) { +static isc_result_t totext_ #(ARGS_TOTEXT) { REQUIRE(rdata->type == dns_rdatatype_proforma.c #); REQUIRE(rdata->rdclass == #); REQUIRE(rdata->length != 0); /* XXX */ @@ -36,7 +36,7 @@ static inline isc_result_t totext_ #(ARGS_TOTEXT) { return (ISC_R_NOTIMPLEMENTED); } -static inline isc_result_t fromwire_ #(ARGS_FROMWIRE) { +static isc_result_t fromwire_ #(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_proforma.c #); REQUIRE(rdclass == #); @@ -46,7 +46,7 @@ static inline isc_result_t fromwire_ #(ARGS_FROMWIRE) { return (ISC_R_NOTIMPLEMENTED); } -static inline isc_result_t towire_ #(ARGS_TOWIRE) { +static isc_result_t towire_ #(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_proforma.c #); REQUIRE(rdata->rdclass == #); REQUIRE(rdata->length != 0); /* XXX */ @@ -57,7 +57,7 @@ static inline isc_result_t towire_ #(ARGS_TOWIRE) { return (ISC_R_NOTIMPLEMENTED); } -static inline int compare_ #(ARGS_COMPARE) { +static int compare_ #(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -73,7 +73,7 @@ static inline int compare_ #(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t fromstruct_ #(ARGS_FROMSTRUCT) { +static isc_result_t fromstruct_ #(ARGS_FROMSTRUCT) { dns_rdata_ #_t *# = source; REQUIRE(type == dns_rdatatype_proforma.c #); @@ -85,7 +85,7 @@ static inline isc_result_t fromstruct_ #(ARGS_FROMSTRUCT) { return (ISC_R_NOTIMPLEMENTED); } -static inline isc_result_t tostruct_ #(ARGS_TOSTRUCT) { +static isc_result_t tostruct_ #(ARGS_TOSTRUCT) { REQUIRE(rdata->type == dns_rdatatype_proforma.c #); REQUIRE(rdata->rdclass == #); REQUIRE(rdata->length != 0); /* XXX */ @@ -93,7 +93,7 @@ static inline isc_result_t tostruct_ #(ARGS_TOSTRUCT) { return (ISC_R_NOTIMPLEMENTED); } -static inline void freestruct_ #(ARGS_FREESTRUCT) { +static void freestruct_ #(ARGS_FREESTRUCT) { dns_rdata_ #_t *# = source; REQUIRE(# != NULL); @@ -101,7 +101,7 @@ static inline void freestruct_ #(ARGS_FREESTRUCT) { REQUIRE(#->common.rdclass == #); } -static inline isc_result_t additionaldata_ #(ARGS_ADDLDATA) { +static isc_result_t additionaldata_ #(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_proforma.c #); REQUIRE(rdata->rdclass == #); @@ -112,7 +112,7 @@ static inline isc_result_t additionaldata_ #(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t digest_ #(ARGS_DIGEST) { +static isc_result_t digest_ #(ARGS_DIGEST) { isc_region_t r; REQUIRE(rdata->type == dns_rdatatype_proforma.c #); @@ -123,7 +123,7 @@ static inline isc_result_t digest_ #(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool checkowner_ #(ARGS_CHECKOWNER) { +static bool checkowner_ #(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_proforma.c #); REQUIRE(rdclass == #); @@ -135,7 +135,7 @@ static inline bool checkowner_ #(ARGS_CHECKOWNER) { return (true); } -static inline bool checknames_ #(ARGS_CHECKNAMES) { +static bool checknames_ #(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_proforma.c #); REQUIRE(rdata->rdclass == #); @@ -146,7 +146,7 @@ static inline bool checknames_ #(ARGS_CHECKNAMES) { return (true); } -static inline int casecompare_ #(ARGS_COMPARE) { +static int casecompare_ #(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; diff --git a/lib/dns/rdata/generic/ptr_12.c b/lib/dns/rdata/generic/ptr_12.c index 88a877b3dd..41e2e8e64b 100644 --- a/lib/dns/rdata/generic/ptr_12.c +++ b/lib/dns/rdata/generic/ptr_12.c @@ -16,7 +16,7 @@ #define RRTYPE_PTR_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_ptr(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -53,7 +53,7 @@ fromtext_ptr(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_ptr(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -74,7 +74,7 @@ totext_ptr(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_ptr(ARGS_FROMWIRE) { dns_name_t name; @@ -89,7 +89,7 @@ fromwire_ptr(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_ptr(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -107,7 +107,7 @@ towire_ptr(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_ptr(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -132,7 +132,7 @@ compare_ptr(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_ptr(ARGS_FROMSTRUCT) { dns_rdata_ptr_t *ptr = source; isc_region_t region; @@ -149,7 +149,7 @@ fromstruct_ptr(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_ptr(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_ptr_t *ptr = target; @@ -172,7 +172,7 @@ tostruct_ptr(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_ptr(ARGS_FREESTRUCT) { dns_rdata_ptr_t *ptr = source; @@ -187,7 +187,7 @@ freestruct_ptr(ARGS_FREESTRUCT) { ptr->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_ptr(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_ptr); @@ -199,7 +199,7 @@ additionaldata_ptr(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_ptr(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -213,7 +213,7 @@ digest_ptr(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_ptr(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_ptr); @@ -240,7 +240,7 @@ static unsigned char in_addr_arpa_offsets[] = { 0, 8, 13 }; static const dns_name_t in_addr_arpa = DNS_NAME_INITABSOLUTE(in_addr_arpa_data, in_addr_arpa_offsets); -static inline bool +static bool checknames_ptr(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -272,7 +272,7 @@ checknames_ptr(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ptr(ARGS_COMPARE) { return (compare_ptr(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/rkey_57.c b/lib/dns/rdata/generic/rkey_57.c index f3cc84c39c..20cd0f0141 100644 --- a/lib/dns/rdata/generic/rkey_57.c +++ b/lib/dns/rdata/generic/rkey_57.c @@ -16,14 +16,14 @@ #define RRTYPE_RKEY_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_rkey(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_rkey); return (generic_fromtext_key(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_rkey(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_rkey); @@ -31,14 +31,14 @@ totext_rkey(ARGS_TOTEXT) { return (generic_totext_key(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_rkey(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_rkey); return (generic_fromwire_key(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_rkey(ARGS_TOWIRE) { isc_region_t sr; @@ -52,7 +52,7 @@ towire_rkey(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_rkey(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -70,14 +70,14 @@ compare_rkey(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_rkey(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_rkey); return (generic_fromstruct_key(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_rkey(ARGS_TOSTRUCT) { dns_rdata_rkey_t *rkey = target; @@ -92,7 +92,7 @@ tostruct_rkey(ARGS_TOSTRUCT) { return (generic_tostruct_key(CALL_TOSTRUCT)); } -static inline void +static void freestruct_rkey(ARGS_FREESTRUCT) { dns_rdata_rkey_t *rkey = (dns_rdata_rkey_t *)source; @@ -102,7 +102,7 @@ freestruct_rkey(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t +static isc_result_t additionaldata_rkey(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_rkey); @@ -114,7 +114,7 @@ additionaldata_rkey(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_rkey(ARGS_DIGEST) { isc_region_t r; @@ -126,7 +126,7 @@ digest_rkey(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_rkey(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_rkey); @@ -138,7 +138,7 @@ checkowner_rkey(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_rkey(ARGS_CHECKNAMES) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_rkey); @@ -150,7 +150,7 @@ checknames_rkey(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_rkey(ARGS_COMPARE) { /* * Treat ALG 253 (private DNS) subtype name case sensitively. diff --git a/lib/dns/rdata/generic/rp_17.c b/lib/dns/rdata/generic/rp_17.c index db2d2d3093..62080c666f 100644 --- a/lib/dns/rdata/generic/rp_17.c +++ b/lib/dns/rdata/generic/rp_17.c @@ -18,7 +18,7 @@ #define RRTYPE_RP_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_rp(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -57,7 +57,7 @@ fromtext_rp(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_rp(ARGS_TOTEXT) { isc_region_t region; dns_name_t rmail; @@ -89,7 +89,7 @@ totext_rp(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_rp(ARGS_FROMWIRE) { dns_name_t rmail; dns_name_t email; @@ -108,7 +108,7 @@ fromwire_rp(ARGS_FROMWIRE) { return (dns_name_fromwire(&email, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_rp(ARGS_TOWIRE) { isc_region_t region; dns_name_t rmail; @@ -136,7 +136,7 @@ towire_rp(ARGS_TOWIRE) { return (dns_name_towire(&rmail, cctx, target)); } -static inline int +static int compare_rp(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -176,7 +176,7 @@ compare_rp(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_rp(ARGS_FROMSTRUCT) { dns_rdata_rp_t *rp = source; isc_region_t region; @@ -195,7 +195,7 @@ fromstruct_rp(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_rp(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_rp_t *rp = target; @@ -222,7 +222,7 @@ tostruct_rp(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_rp(ARGS_FREESTRUCT) { dns_rdata_rp_t *rp = source; @@ -238,7 +238,7 @@ freestruct_rp(ARGS_FREESTRUCT) { rp->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_rp(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_rp); @@ -250,7 +250,7 @@ additionaldata_rp(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_rp(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -270,7 +270,7 @@ digest_rp(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_rp(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_rp); @@ -282,7 +282,7 @@ checkowner_rp(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_rp(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -303,7 +303,7 @@ checknames_rp(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_rp(ARGS_COMPARE) { return (compare_rp(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/rrsig_46.c b/lib/dns/rdata/generic/rrsig_46.c index 1239d93cf1..553c9cf6ff 100644 --- a/lib/dns/rdata/generic/rrsig_46.c +++ b/lib/dns/rdata/generic/rrsig_46.c @@ -20,7 +20,7 @@ (DNS_RDATATYPEATTR_DNSSEC | DNS_RDATATYPEATTR_ZONECUTAUTH | \ DNS_RDATATYPEATTR_ATCNAME) -static inline isc_result_t +static isc_result_t fromtext_rrsig(ARGS_FROMTEXT) { isc_token_t token; unsigned char c; @@ -157,7 +157,7 @@ fromtext_rrsig(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_rrsig(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("4294967295")]; /* Also TYPE65000. */ @@ -274,7 +274,7 @@ totext_rrsig(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_rrsig(ARGS_FROMWIRE) { isc_region_t sr; dns_name_t name; @@ -320,7 +320,7 @@ fromwire_rrsig(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_rrsig(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -357,7 +357,7 @@ towire_rrsig(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_rrsig(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -373,7 +373,7 @@ compare_rrsig(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_rrsig(ARGS_FROMSTRUCT) { dns_rdata_rrsig_t *sig = source; @@ -432,7 +432,7 @@ fromstruct_rrsig(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, sig->signature, sig->siglen)); } -static inline isc_result_t +static isc_result_t tostruct_rrsig(ARGS_TOSTRUCT) { isc_region_t sr; dns_rdata_rrsig_t *sig = target; @@ -515,7 +515,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_rrsig(ARGS_FREESTRUCT) { dns_rdata_rrsig_t *sig = (dns_rdata_rrsig_t *)source; @@ -533,7 +533,7 @@ freestruct_rrsig(ARGS_FREESTRUCT) { sig->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_rrsig(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_rrsig); @@ -545,7 +545,7 @@ additionaldata_rrsig(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_rrsig(ARGS_DIGEST) { REQUIRE(rdata->type == dns_rdatatype_rrsig); @@ -556,7 +556,7 @@ digest_rrsig(ARGS_DIGEST) { return (ISC_R_NOTIMPLEMENTED); } -static inline dns_rdatatype_t +static dns_rdatatype_t covers_rrsig(dns_rdata_t *rdata) { dns_rdatatype_t type; isc_region_t r; @@ -569,7 +569,7 @@ covers_rrsig(dns_rdata_t *rdata) { return (type); } -static inline bool +static bool checkowner_rrsig(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_rrsig); @@ -581,7 +581,7 @@ checkowner_rrsig(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_rrsig(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_rrsig); @@ -592,7 +592,7 @@ checknames_rrsig(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_rrsig(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; diff --git a/lib/dns/rdata/generic/rt_21.c b/lib/dns/rdata/generic/rt_21.c index cda074d6bf..10a003f5c0 100644 --- a/lib/dns/rdata/generic/rt_21.c +++ b/lib/dns/rdata/generic/rt_21.c @@ -18,7 +18,7 @@ #define RRTYPE_RT_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_rt(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -60,7 +60,7 @@ fromtext_rt(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_rt(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -86,7 +86,7 @@ totext_rt(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_rt(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sregion; @@ -115,7 +115,7 @@ fromwire_rt(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_rt(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -141,7 +141,7 @@ towire_rt(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_rt(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -175,7 +175,7 @@ compare_rt(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_rt(ARGS_FROMSTRUCT) { dns_rdata_rt_t *rt = source; isc_region_t region; @@ -193,7 +193,7 @@ fromstruct_rt(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_rt(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_rt_t *rt = target; @@ -219,7 +219,7 @@ tostruct_rt(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_rt(ARGS_FREESTRUCT) { dns_rdata_rt_t *rt = source; @@ -234,7 +234,7 @@ freestruct_rt(ARGS_FREESTRUCT) { rt->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_rt(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -261,7 +261,7 @@ additionaldata_rt(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_rt(ARGS_DIGEST) { isc_region_t r1, r2; isc_result_t result; @@ -282,7 +282,7 @@ digest_rt(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_rt(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_rt); @@ -294,7 +294,7 @@ checkowner_rt(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_rt(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -316,7 +316,7 @@ checknames_rt(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_rt(ARGS_COMPARE) { return (compare_rt(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/sig_24.c b/lib/dns/rdata/generic/sig_24.c index 369369608d..85075c3295 100644 --- a/lib/dns/rdata/generic/sig_24.c +++ b/lib/dns/rdata/generic/sig_24.c @@ -18,7 +18,7 @@ #define RRTYPE_SIG_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_sig(ARGS_FROMTEXT) { isc_token_t token; unsigned char c; @@ -121,7 +121,7 @@ fromtext_sig(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_sig(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("4294967295")]; @@ -237,7 +237,7 @@ totext_sig(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_sig(ARGS_FROMWIRE) { isc_region_t sr; dns_name_t name; @@ -283,7 +283,7 @@ fromwire_sig(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_sig(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -320,7 +320,7 @@ towire_sig(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_sig(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -365,7 +365,7 @@ compare_sig(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_sig(ARGS_FROMSTRUCT) { dns_rdata_sig_t *sig = source; @@ -424,7 +424,7 @@ fromstruct_sig(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, sig->signature, sig->siglen)); } -static inline isc_result_t +static isc_result_t tostruct_sig(ARGS_TOSTRUCT) { isc_region_t sr; dns_rdata_sig_t *sig = target; @@ -507,7 +507,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_sig(ARGS_FREESTRUCT) { dns_rdata_sig_t *sig = (dns_rdata_sig_t *)source; @@ -525,7 +525,7 @@ freestruct_sig(ARGS_FREESTRUCT) { sig->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_sig(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_sig); @@ -537,7 +537,7 @@ additionaldata_sig(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_sig(ARGS_DIGEST) { REQUIRE(rdata->type == dns_rdatatype_sig); @@ -548,7 +548,7 @@ digest_sig(ARGS_DIGEST) { return (ISC_R_NOTIMPLEMENTED); } -static inline dns_rdatatype_t +static dns_rdatatype_t covers_sig(dns_rdata_t *rdata) { dns_rdatatype_t type; isc_region_t r; @@ -561,7 +561,7 @@ covers_sig(dns_rdata_t *rdata) { return (type); } -static inline bool +static bool checkowner_sig(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_sig); @@ -573,7 +573,7 @@ checkowner_sig(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_sig(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_sig); @@ -584,7 +584,7 @@ checknames_sig(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_sig(ARGS_COMPARE) { return (compare_sig(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/sink_40.c b/lib/dns/rdata/generic/sink_40.c index 2120a4a6a4..8d7621213f 100644 --- a/lib/dns/rdata/generic/sink_40.c +++ b/lib/dns/rdata/generic/sink_40.c @@ -18,7 +18,7 @@ #define RRTYPE_SINK_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_sink(ARGS_FROMTEXT) { isc_token_t token; @@ -57,7 +57,7 @@ fromtext_sink(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -1)); } -static inline isc_result_t +static isc_result_t totext_sink(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("255 255 255")]; @@ -103,7 +103,7 @@ totext_sink(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_sink(ARGS_FROMWIRE) { isc_region_t sr; @@ -124,7 +124,7 @@ fromwire_sink(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_sink(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_sink); REQUIRE(rdata->length >= 3); @@ -134,7 +134,7 @@ towire_sink(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_sink(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -150,7 +150,7 @@ compare_sink(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_sink(ARGS_FROMSTRUCT) { dns_rdata_sink_t *sink = source; @@ -175,7 +175,7 @@ fromstruct_sink(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, sink->data, sink->datalen)); } -static inline isc_result_t +static isc_result_t tostruct_sink(ARGS_TOSTRUCT) { dns_rdata_sink_t *sink = target; isc_region_t sr; @@ -222,7 +222,7 @@ tostruct_sink(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_sink(ARGS_FREESTRUCT) { dns_rdata_sink_t *sink = (dns_rdata_sink_t *)source; @@ -239,7 +239,7 @@ freestruct_sink(ARGS_FREESTRUCT) { sink->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_sink(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_sink); @@ -251,7 +251,7 @@ additionaldata_sink(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_sink(ARGS_DIGEST) { isc_region_t r; @@ -262,7 +262,7 @@ digest_sink(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_sink(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_sink); @@ -274,7 +274,7 @@ checkowner_sink(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_sink(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_sink); @@ -285,7 +285,7 @@ checknames_sink(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_sink(ARGS_COMPARE) { return (compare_sink(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/smimea_53.c b/lib/dns/rdata/generic/smimea_53.c index 342b350149..ce154a0914 100644 --- a/lib/dns/rdata/generic/smimea_53.c +++ b/lib/dns/rdata/generic/smimea_53.c @@ -16,14 +16,14 @@ #define RRTYPE_SMIMEA_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_smimea(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_smimea); return (generic_fromtext_tlsa(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_smimea(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_smimea); @@ -31,14 +31,14 @@ totext_smimea(ARGS_TOTEXT) { return (generic_totext_tlsa(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_smimea(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_smimea); return (generic_fromwire_tlsa(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_smimea(ARGS_TOWIRE) { isc_region_t sr; @@ -51,7 +51,7 @@ towire_smimea(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_smimea(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -67,14 +67,14 @@ compare_smimea(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_smimea(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_smimea); return (generic_fromstruct_tlsa(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_smimea(ARGS_TOSTRUCT) { dns_rdata_smimea_t *smimea = target; @@ -89,7 +89,7 @@ tostruct_smimea(ARGS_TOSTRUCT) { return (generic_tostruct_tlsa(CALL_TOSTRUCT)); } -static inline void +static void freestruct_smimea(ARGS_FREESTRUCT) { dns_rdata_smimea_t *smimea = source; @@ -99,7 +99,7 @@ freestruct_smimea(ARGS_FREESTRUCT) { generic_freestruct_tlsa(source); } -static inline isc_result_t +static isc_result_t additionaldata_smimea(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_smimea); @@ -111,7 +111,7 @@ additionaldata_smimea(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_smimea(ARGS_DIGEST) { isc_region_t r; @@ -122,7 +122,7 @@ digest_smimea(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_smimea(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_smimea); @@ -134,7 +134,7 @@ checkowner_smimea(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_smimea(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_smimea); @@ -145,7 +145,7 @@ checknames_smimea(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_smimea(ARGS_COMPARE) { return (compare_smimea(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/soa_6.c b/lib/dns/rdata/generic/soa_6.c index e59eeb3afb..24b52784a3 100644 --- a/lib/dns/rdata/generic/soa_6.c +++ b/lib/dns/rdata/generic/soa_6.c @@ -16,7 +16,7 @@ #define RRTYPE_SOA_ATTRIBUTES (DNS_RDATATYPEATTR_SINGLETON) -static inline isc_result_t +static isc_result_t fromtext_soa(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -79,7 +79,7 @@ fromtext_soa(ARGS_FROMTEXT) { static const char *soa_fieldnames[5] = { "serial", "refresh", "retry", "expire", "minimum" }; -static inline isc_result_t +static isc_result_t totext_soa(ARGS_TOTEXT) { isc_region_t dregion; dns_name_t mname; @@ -153,7 +153,7 @@ totext_soa(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_soa(ARGS_FROMWIRE) { dns_name_t mname; dns_name_t rname; @@ -190,7 +190,7 @@ fromwire_soa(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_soa(ARGS_TOWIRE) { isc_region_t sregion; isc_region_t tregion; @@ -227,7 +227,7 @@ towire_soa(ARGS_TOWIRE) { return (ISC_R_SUCCESS); } -static inline int +static int compare_soa(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -275,7 +275,7 @@ compare_soa(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_soa(ARGS_FROMSTRUCT) { dns_rdata_soa_t *soa = source; isc_region_t region; @@ -299,7 +299,7 @@ fromstruct_soa(ARGS_FROMSTRUCT) { return (uint32_tobuffer(soa->minimum, target)); } -static inline isc_result_t +static isc_result_t tostruct_soa(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_soa_t *soa = target; @@ -344,7 +344,7 @@ tostruct_soa(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_soa(ARGS_FREESTRUCT) { dns_rdata_soa_t *soa = source; @@ -360,7 +360,7 @@ freestruct_soa(ARGS_FREESTRUCT) { soa->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_soa(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_soa); @@ -372,7 +372,7 @@ additionaldata_soa(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_soa(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -394,7 +394,7 @@ digest_soa(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_soa(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_soa); @@ -406,7 +406,7 @@ checkowner_soa(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_soa(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -435,7 +435,7 @@ checknames_soa(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_soa(ARGS_COMPARE) { return (compare_soa(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/spf_99.c b/lib/dns/rdata/generic/spf_99.c index 4857664f88..20f939bddb 100644 --- a/lib/dns/rdata/generic/spf_99.c +++ b/lib/dns/rdata/generic/spf_99.c @@ -16,14 +16,14 @@ #define RRTYPE_SPF_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_spf(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_spf); return (generic_fromtext_txt(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_spf(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_spf); @@ -31,14 +31,14 @@ totext_spf(ARGS_TOTEXT) { return (generic_totext_txt(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_spf(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_spf); return (generic_fromwire_txt(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_spf(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_spf); @@ -47,7 +47,7 @@ towire_spf(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_spf(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -61,14 +61,14 @@ compare_spf(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_spf(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_spf); return (generic_fromstruct_txt(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_spf(ARGS_TOSTRUCT) { dns_rdata_spf_t *spf = target; @@ -83,7 +83,7 @@ tostruct_spf(ARGS_TOSTRUCT) { return (generic_tostruct_txt(CALL_TOSTRUCT)); } -static inline void +static void freestruct_spf(ARGS_FREESTRUCT) { dns_rdata_spf_t *spf = source; @@ -93,7 +93,7 @@ freestruct_spf(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t +static isc_result_t additionaldata_spf(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_spf); @@ -105,7 +105,7 @@ additionaldata_spf(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_spf(ARGS_DIGEST) { isc_region_t r; @@ -116,7 +116,7 @@ digest_spf(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_spf(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_spf); @@ -128,7 +128,7 @@ checkowner_spf(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_spf(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_spf); @@ -139,7 +139,7 @@ checknames_spf(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_spf(ARGS_COMPARE) { return (compare_spf(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/sshfp_44.c b/lib/dns/rdata/generic/sshfp_44.c index d71a3963eb..7f1060a173 100644 --- a/lib/dns/rdata/generic/sshfp_44.c +++ b/lib/dns/rdata/generic/sshfp_44.c @@ -18,7 +18,7 @@ #define RRTYPE_SSHFP_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_sshfp(ARGS_FROMTEXT) { isc_token_t token; int len = -1; @@ -71,7 +71,7 @@ fromtext_sshfp(ARGS_FROMTEXT) { return (isc_hex_tobuffer(lexer, target, len)); } -static inline isc_result_t +static isc_result_t totext_sshfp(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("64000 ")]; @@ -123,7 +123,7 @@ totext_sshfp(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_sshfp(ARGS_FROMWIRE) { isc_region_t sr; @@ -149,7 +149,7 @@ fromwire_sshfp(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_sshfp(ARGS_TOWIRE) { isc_region_t sr; @@ -162,7 +162,7 @@ towire_sshfp(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_sshfp(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -178,7 +178,7 @@ compare_sshfp(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_sshfp(ARGS_FROMSTRUCT) { dns_rdata_sshfp_t *sshfp = source; @@ -196,7 +196,7 @@ fromstruct_sshfp(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, sshfp->digest, sshfp->length)); } -static inline isc_result_t +static isc_result_t tostruct_sshfp(ARGS_TOSTRUCT) { dns_rdata_sshfp_t *sshfp = target; isc_region_t region; @@ -226,7 +226,7 @@ tostruct_sshfp(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_sshfp(ARGS_FREESTRUCT) { dns_rdata_sshfp_t *sshfp = source; @@ -243,7 +243,7 @@ freestruct_sshfp(ARGS_FREESTRUCT) { sshfp->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_sshfp(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_sshfp); @@ -255,7 +255,7 @@ additionaldata_sshfp(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_sshfp(ARGS_DIGEST) { isc_region_t r; @@ -266,7 +266,7 @@ digest_sshfp(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_sshfp(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_sshfp); @@ -278,7 +278,7 @@ checkowner_sshfp(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_sshfp(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_sshfp); @@ -289,7 +289,7 @@ checknames_sshfp(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_sshfp(ARGS_COMPARE) { return (compare_sshfp(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/ta_32768.c b/lib/dns/rdata/generic/ta_32768.c index da30d3a292..4a0688ccbc 100644 --- a/lib/dns/rdata/generic/ta_32768.c +++ b/lib/dns/rdata/generic/ta_32768.c @@ -18,28 +18,28 @@ #define RRTYPE_TA_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_ta(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_ta); return (generic_fromtext_ds(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_ta(ARGS_TOTEXT) { REQUIRE(rdata->type == dns_rdatatype_ta); return (generic_totext_ds(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_ta(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_ta); return (generic_fromwire_ds(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_ta(ARGS_TOWIRE) { isc_region_t sr; @@ -52,7 +52,7 @@ towire_ta(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_ta(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -68,14 +68,14 @@ compare_ta(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_ta(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_ta); return (generic_fromstruct_ds(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_ta(ARGS_TOSTRUCT) { dns_rdata_ds_t *ds = target; @@ -92,7 +92,7 @@ tostruct_ta(ARGS_TOSTRUCT) { return (generic_tostruct_ds(CALL_TOSTRUCT)); } -static inline void +static void freestruct_ta(ARGS_FREESTRUCT) { dns_rdata_ta_t *ds = source; @@ -109,7 +109,7 @@ freestruct_ta(ARGS_FREESTRUCT) { ds->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_ta(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_ta); @@ -121,7 +121,7 @@ additionaldata_ta(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_ta(ARGS_DIGEST) { isc_region_t r; @@ -132,7 +132,7 @@ digest_ta(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_ta(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_ta); @@ -144,7 +144,7 @@ checkowner_ta(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_ta(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_ta); @@ -155,7 +155,7 @@ checknames_ta(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_ta(ARGS_COMPARE) { return (compare_ta(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/talink_58.c b/lib/dns/rdata/generic/talink_58.c index e172149725..49ad8df49b 100644 --- a/lib/dns/rdata/generic/talink_58.c +++ b/lib/dns/rdata/generic/talink_58.c @@ -16,7 +16,7 @@ #define RRTYPE_TALINK_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_talink(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -46,7 +46,7 @@ fromtext_talink(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_talink(ARGS_TOTEXT) { isc_region_t dregion; dns_name_t prev; @@ -78,7 +78,7 @@ totext_talink(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_talink(ARGS_FROMWIRE) { dns_name_t prev; dns_name_t next; @@ -97,7 +97,7 @@ fromwire_talink(ARGS_FROMWIRE) { return (dns_name_fromwire(&next, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_talink(ARGS_TOWIRE) { isc_region_t sregion; dns_name_t prev; @@ -124,7 +124,7 @@ towire_talink(ARGS_TOWIRE) { return (dns_name_towire(&next, cctx, target)); } -static inline int +static int compare_talink(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -140,7 +140,7 @@ compare_talink(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_talink(ARGS_FROMSTRUCT) { dns_rdata_talink_t *talink = source; isc_region_t region; @@ -159,7 +159,7 @@ fromstruct_talink(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_talink(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_talink_t *talink = target; @@ -190,7 +190,7 @@ tostruct_talink(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_talink(ARGS_FREESTRUCT) { dns_rdata_talink_t *talink = source; @@ -206,7 +206,7 @@ freestruct_talink(ARGS_FREESTRUCT) { talink->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_talink(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_talink); @@ -218,7 +218,7 @@ additionaldata_talink(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_talink(ARGS_DIGEST) { isc_region_t r; @@ -228,7 +228,7 @@ digest_talink(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_talink(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_talink); @@ -240,7 +240,7 @@ checkowner_talink(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_talink(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_talink); @@ -250,7 +250,7 @@ checknames_talink(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_talink(ARGS_COMPARE) { return (compare_talink(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/tkey_249.c b/lib/dns/rdata/generic/tkey_249.c index 66ad6c4445..5f54cb90c9 100644 --- a/lib/dns/rdata/generic/tkey_249.c +++ b/lib/dns/rdata/generic/tkey_249.c @@ -18,7 +18,7 @@ #define RRTYPE_TKEY_ATTRIBUTES (DNS_RDATATYPEATTR_META) -static inline isc_result_t +static isc_result_t fromtext_tkey(ARGS_FROMTEXT) { isc_token_t token; dns_rcode_t rcode; @@ -118,7 +118,7 @@ fromtext_tkey(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, (int)token.value.as_ulong)); } -static inline isc_result_t +static isc_result_t totext_tkey(ARGS_TOTEXT) { isc_region_t sr, dr; char buf[sizeof("4294967295 ")]; @@ -242,7 +242,7 @@ totext_tkey(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_tkey(ARGS_FROMWIRE) { isc_region_t sr; unsigned long n; @@ -303,7 +303,7 @@ fromwire_tkey(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, n + 2)); } -static inline isc_result_t +static isc_result_t towire_tkey(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -325,7 +325,7 @@ towire_tkey(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_tkey(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -356,7 +356,7 @@ compare_tkey(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_tkey(ARGS_FROMSTRUCT) { dns_rdata_tkey_t *tkey = source; @@ -414,7 +414,7 @@ fromstruct_tkey(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, tkey->other, tkey->otherlen)); } -static inline isc_result_t +static isc_result_t tostruct_tkey(ARGS_TOSTRUCT) { dns_rdata_tkey_t *tkey = target; dns_name_t alg; @@ -507,7 +507,7 @@ cleanup: return (ISC_R_NOMEMORY); } -static inline void +static void freestruct_tkey(ARGS_FREESTRUCT) { dns_rdata_tkey_t *tkey = (dns_rdata_tkey_t *)source; @@ -527,7 +527,7 @@ freestruct_tkey(ARGS_FREESTRUCT) { tkey->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_tkey(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_tkey); @@ -539,7 +539,7 @@ additionaldata_tkey(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_tkey(ARGS_DIGEST) { UNUSED(rdata); UNUSED(digest); @@ -550,7 +550,7 @@ digest_tkey(ARGS_DIGEST) { return (ISC_R_NOTIMPLEMENTED); } -static inline bool +static bool checkowner_tkey(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_tkey); @@ -562,7 +562,7 @@ checkowner_tkey(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_tkey(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_tkey); @@ -573,7 +573,7 @@ checknames_tkey(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_tkey(ARGS_COMPARE) { return (compare_tkey(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/tlsa_52.c b/lib/dns/rdata/generic/tlsa_52.c index 65a4f7fe13..8489dd99d1 100644 --- a/lib/dns/rdata/generic/tlsa_52.c +++ b/lib/dns/rdata/generic/tlsa_52.c @@ -18,7 +18,7 @@ #define RRTYPE_TLSA_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t generic_fromtext_tlsa(ARGS_FROMTEXT) { isc_token_t token; @@ -64,7 +64,7 @@ generic_fromtext_tlsa(ARGS_FROMTEXT) { return (isc_hex_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t generic_totext_tlsa(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("64000 ")]; @@ -119,7 +119,7 @@ generic_totext_tlsa(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t generic_fromwire_tlsa(ARGS_FROMWIRE) { isc_region_t sr; @@ -139,28 +139,28 @@ generic_fromwire_tlsa(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t fromtext_tlsa(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_tlsa); return (generic_fromtext_tlsa(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_tlsa(ARGS_TOTEXT) { REQUIRE(rdata->type == dns_rdatatype_tlsa); return (generic_totext_tlsa(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_tlsa(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_tlsa); return (generic_fromwire_tlsa(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_tlsa(ARGS_TOWIRE) { isc_region_t sr; @@ -173,7 +173,7 @@ towire_tlsa(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_tlsa(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -189,7 +189,7 @@ compare_tlsa(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t generic_fromstruct_tlsa(ARGS_FROMSTRUCT) { dns_rdata_tlsa_t *tlsa = source; @@ -207,7 +207,7 @@ generic_fromstruct_tlsa(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, tlsa->data, tlsa->length)); } -static inline isc_result_t +static isc_result_t generic_tostruct_tlsa(ARGS_TOSTRUCT) { dns_rdata_tlsa_t *tlsa = target; isc_region_t region; @@ -239,7 +239,7 @@ generic_tostruct_tlsa(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void generic_freestruct_tlsa(ARGS_FREESTRUCT) { dns_rdata_tlsa_t *tlsa = source; @@ -255,14 +255,14 @@ generic_freestruct_tlsa(ARGS_FREESTRUCT) { tlsa->mctx = NULL; } -static inline isc_result_t +static isc_result_t fromstruct_tlsa(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_tlsa); return (generic_fromstruct_tlsa(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_tlsa(ARGS_TOSTRUCT) { dns_rdata_tlsa_t *tlsa = target; @@ -276,7 +276,7 @@ tostruct_tlsa(ARGS_TOSTRUCT) { return (generic_tostruct_tlsa(CALL_TOSTRUCT)); } -static inline void +static void freestruct_tlsa(ARGS_FREESTRUCT) { dns_rdata_tlsa_t *tlsa = source; @@ -286,7 +286,7 @@ freestruct_tlsa(ARGS_FREESTRUCT) { generic_freestruct_tlsa(source); } -static inline isc_result_t +static isc_result_t additionaldata_tlsa(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_tlsa); @@ -298,7 +298,7 @@ additionaldata_tlsa(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_tlsa(ARGS_DIGEST) { isc_region_t r; @@ -309,7 +309,7 @@ digest_tlsa(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_tlsa(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_tlsa); @@ -321,7 +321,7 @@ checkowner_tlsa(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_tlsa(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_tlsa); @@ -332,7 +332,7 @@ checknames_tlsa(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_tlsa(ARGS_COMPARE) { return (compare_tlsa(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/txt_16.c b/lib/dns/rdata/generic/txt_16.c index 73b3f0c899..7d0af81665 100644 --- a/lib/dns/rdata/generic/txt_16.c +++ b/lib/dns/rdata/generic/txt_16.c @@ -16,7 +16,7 @@ #define RRTYPE_TXT_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t generic_fromtext_txt(ARGS_FROMTEXT) { isc_token_t token; int strings; @@ -50,7 +50,7 @@ generic_fromtext_txt(ARGS_FROMTEXT) { return (strings == 0 ? ISC_R_UNEXPECTEDEND : ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t generic_totext_txt(ARGS_TOTEXT) { isc_region_t region; @@ -68,7 +68,7 @@ generic_totext_txt(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t generic_fromwire_txt(ARGS_FROMWIRE) { isc_result_t result; @@ -86,14 +86,14 @@ generic_fromwire_txt(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromtext_txt(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_txt); return (generic_fromtext_txt(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_txt(ARGS_TOTEXT) { REQUIRE(rdata != NULL); REQUIRE(rdata->type == dns_rdatatype_txt); @@ -101,14 +101,14 @@ totext_txt(ARGS_TOTEXT) { return (generic_totext_txt(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_txt(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_txt); return (generic_fromwire_txt(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_txt(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_txt); @@ -117,7 +117,7 @@ towire_txt(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_txt(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -131,7 +131,7 @@ compare_txt(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t generic_fromstruct_txt(ARGS_FROMSTRUCT) { dns_rdata_txt_t *txt = source; isc_region_t region; @@ -159,7 +159,7 @@ generic_fromstruct_txt(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, txt->txt, txt->txt_len)); } -static inline isc_result_t +static isc_result_t generic_tostruct_txt(ARGS_TOSTRUCT) { dns_rdata_txt_t *txt = target; isc_region_t r; @@ -181,7 +181,7 @@ generic_tostruct_txt(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void generic_freestruct_txt(ARGS_FREESTRUCT) { dns_rdata_txt_t *txt = source; @@ -197,14 +197,14 @@ generic_freestruct_txt(ARGS_FREESTRUCT) { txt->mctx = NULL; } -static inline isc_result_t +static isc_result_t fromstruct_txt(ARGS_FROMSTRUCT) { REQUIRE(type == dns_rdatatype_txt); return (generic_fromstruct_txt(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_txt(ARGS_TOSTRUCT) { dns_rdata_txt_t *txt = target; @@ -218,7 +218,7 @@ tostruct_txt(ARGS_TOSTRUCT) { return (generic_tostruct_txt(CALL_TOSTRUCT)); } -static inline void +static void freestruct_txt(ARGS_FREESTRUCT) { dns_rdata_txt_t *txt = source; @@ -228,7 +228,7 @@ freestruct_txt(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t +static isc_result_t additionaldata_txt(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_txt); @@ -240,7 +240,7 @@ additionaldata_txt(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_txt(ARGS_DIGEST) { isc_region_t r; @@ -251,7 +251,7 @@ digest_txt(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_txt(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_txt); @@ -263,7 +263,7 @@ checkowner_txt(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_txt(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_txt); @@ -274,7 +274,7 @@ checknames_txt(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_txt(ARGS_COMPARE) { return (compare_txt(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/uri_256.c b/lib/dns/rdata/generic/uri_256.c index 626a34e2a0..46188232a3 100644 --- a/lib/dns/rdata/generic/uri_256.c +++ b/lib/dns/rdata/generic/uri_256.c @@ -16,7 +16,7 @@ #define RRTYPE_URI_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_uri(ARGS_FROMTEXT) { isc_token_t token; @@ -60,7 +60,7 @@ fromtext_uri(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_uri(ARGS_TOTEXT) { isc_region_t region; unsigned short priority, weight; @@ -96,7 +96,7 @@ totext_uri(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_uri(ARGS_FROMWIRE) { isc_region_t region; @@ -122,7 +122,7 @@ fromwire_uri(ARGS_FROMWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline isc_result_t +static isc_result_t towire_uri(ARGS_TOWIRE) { isc_region_t region; @@ -135,7 +135,7 @@ towire_uri(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline int +static int compare_uri(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -173,7 +173,7 @@ compare_uri(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_uri(ARGS_FROMSTRUCT) { dns_rdata_uri_t *uri = source; @@ -202,7 +202,7 @@ fromstruct_uri(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, uri->target, uri->tgt_len)); } -static inline isc_result_t +static isc_result_t tostruct_uri(ARGS_TOSTRUCT) { dns_rdata_uri_t *uri = target; isc_region_t sr; @@ -248,7 +248,7 @@ tostruct_uri(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_uri(ARGS_FREESTRUCT) { dns_rdata_uri_t *uri = (dns_rdata_uri_t *)source; @@ -265,7 +265,7 @@ freestruct_uri(ARGS_FREESTRUCT) { uri->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_uri(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_uri); @@ -277,7 +277,7 @@ additionaldata_uri(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_uri(ARGS_DIGEST) { isc_region_t r; @@ -288,7 +288,7 @@ digest_uri(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_uri(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_uri); @@ -300,7 +300,7 @@ checkowner_uri(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_uri(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_uri); @@ -311,7 +311,7 @@ checknames_uri(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_uri(ARGS_COMPARE) { return (compare_uri(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/x25_19.c b/lib/dns/rdata/generic/x25_19.c index 63f6be827f..a0fe705ec8 100644 --- a/lib/dns/rdata/generic/x25_19.c +++ b/lib/dns/rdata/generic/x25_19.c @@ -18,7 +18,7 @@ #define RRTYPE_X25_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_x25(ARGS_FROMTEXT) { isc_token_t token; unsigned int i; @@ -46,7 +46,7 @@ fromtext_x25(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_x25(ARGS_TOTEXT) { isc_region_t region; @@ -59,7 +59,7 @@ totext_x25(ARGS_TOTEXT) { return (txt_totext(®ion, true, target)); } -static inline isc_result_t +static isc_result_t fromwire_x25(ARGS_FROMWIRE) { isc_region_t sr; unsigned int i; @@ -83,7 +83,7 @@ fromwire_x25(ARGS_FROMWIRE) { return (txt_fromwire(source, target)); } -static inline isc_result_t +static isc_result_t towire_x25(ARGS_TOWIRE) { UNUSED(cctx); @@ -93,7 +93,7 @@ towire_x25(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_x25(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -109,7 +109,7 @@ compare_x25(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_x25(ARGS_FROMSTRUCT) { dns_rdata_x25_t *x25 = source; uint8_t i; @@ -137,7 +137,7 @@ fromstruct_x25(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, x25->x25, x25->x25_len)); } -static inline isc_result_t +static isc_result_t tostruct_x25(ARGS_TOSTRUCT) { dns_rdata_x25_t *x25 = target; isc_region_t r; @@ -162,7 +162,7 @@ tostruct_x25(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_x25(ARGS_FREESTRUCT) { dns_rdata_x25_t *x25 = source; @@ -179,7 +179,7 @@ freestruct_x25(ARGS_FREESTRUCT) { x25->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_x25(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_x25); @@ -191,7 +191,7 @@ additionaldata_x25(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_x25(ARGS_DIGEST) { isc_region_t r; @@ -202,7 +202,7 @@ digest_x25(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_x25(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_x25); @@ -214,7 +214,7 @@ checkowner_x25(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_x25(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_x25); @@ -225,7 +225,7 @@ checknames_x25(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_x25(ARGS_COMPARE) { return (compare_x25(rdata1, rdata2)); } diff --git a/lib/dns/rdata/generic/zonemd_63.c b/lib/dns/rdata/generic/zonemd_63.c index f09ee5229c..1bf9573e07 100644 --- a/lib/dns/rdata/generic/zonemd_63.c +++ b/lib/dns/rdata/generic/zonemd_63.c @@ -18,7 +18,7 @@ #define RRTYPE_ZONEMD_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_zonemd(ARGS_FROMTEXT) { isc_token_t token; int digest_type, length; @@ -77,7 +77,7 @@ fromtext_zonemd(ARGS_FROMTEXT) { return (result); } -static inline isc_result_t +static isc_result_t totext_zonemd(ARGS_TOTEXT) { isc_region_t sr; char buf[sizeof("0123456789")]; @@ -140,7 +140,7 @@ totext_zonemd(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_zonemd(ARGS_FROMWIRE) { isc_region_t sr; size_t digestlen = 0; @@ -192,7 +192,7 @@ fromwire_zonemd(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_zonemd(ARGS_TOWIRE) { isc_region_t sr; @@ -205,7 +205,7 @@ towire_zonemd(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_zonemd(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -221,7 +221,7 @@ compare_zonemd(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_zonemd(ARGS_FROMSTRUCT) { dns_rdata_zonemd_t *zonemd = source; @@ -248,7 +248,7 @@ fromstruct_zonemd(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, zonemd->digest, zonemd->length)); } -static inline isc_result_t +static isc_result_t tostruct_zonemd(ARGS_TOSTRUCT) { dns_rdata_zonemd_t *zonemd = target; isc_region_t region; @@ -280,7 +280,7 @@ tostruct_zonemd(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_zonemd(ARGS_FREESTRUCT) { dns_rdata_zonemd_t *zonemd = source; @@ -297,7 +297,7 @@ freestruct_zonemd(ARGS_FREESTRUCT) { zonemd->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_zonemd(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_zonemd); @@ -309,7 +309,7 @@ additionaldata_zonemd(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_zonemd(ARGS_DIGEST) { isc_region_t r; @@ -320,7 +320,7 @@ digest_zonemd(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_zonemd(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_zonemd); @@ -332,7 +332,7 @@ checkowner_zonemd(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_zonemd(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_zonemd); @@ -343,7 +343,7 @@ checknames_zonemd(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_zonemd(ARGS_COMPARE) { return (compare_zonemd(rdata1, rdata2)); } diff --git a/lib/dns/rdata/hs_4/a_1.c b/lib/dns/rdata/hs_4/a_1.c index 7b7f9be5e9..26246b78b4 100644 --- a/lib/dns/rdata/hs_4/a_1.c +++ b/lib/dns/rdata/hs_4/a_1.c @@ -17,7 +17,7 @@ #define RRTYPE_A_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_hs_a(ARGS_FROMTEXT) { isc_token_t token; struct in_addr addr; @@ -47,7 +47,7 @@ fromtext_hs_a(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_hs_a(ARGS_TOTEXT) { isc_region_t region; @@ -61,7 +61,7 @@ totext_hs_a(ARGS_TOTEXT) { return (inet_totext(AF_INET, tctx->flags, ®ion, target)); } -static inline isc_result_t +static isc_result_t fromwire_hs_a(ARGS_FROMWIRE) { isc_region_t sregion; isc_region_t tregion; @@ -89,7 +89,7 @@ fromwire_hs_a(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_hs_a(ARGS_TOWIRE) { isc_region_t region; @@ -108,7 +108,7 @@ towire_hs_a(ARGS_TOWIRE) { return (ISC_R_SUCCESS); } -static inline int +static int compare_hs_a(ARGS_COMPARE) { int order; @@ -127,7 +127,7 @@ compare_hs_a(ARGS_COMPARE) { return (order); } -static inline isc_result_t +static isc_result_t fromstruct_hs_a(ARGS_FROMSTRUCT) { dns_rdata_hs_a_t *a = source; uint32_t n; @@ -146,7 +146,7 @@ fromstruct_hs_a(ARGS_FROMSTRUCT) { return (uint32_tobuffer(n, target)); } -static inline isc_result_t +static isc_result_t tostruct_hs_a(ARGS_TOSTRUCT) { dns_rdata_hs_a_t *a = target; uint32_t n; @@ -170,14 +170,14 @@ tostruct_hs_a(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_hs_a(ARGS_FREESTRUCT) { UNUSED(source); REQUIRE(source != NULL); } -static inline isc_result_t +static isc_result_t additionaldata_hs_a(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_a); REQUIRE(rdata->rdclass == dns_rdataclass_hs); @@ -190,7 +190,7 @@ additionaldata_hs_a(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_hs_a(ARGS_DIGEST) { isc_region_t r; @@ -202,7 +202,7 @@ digest_hs_a(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_hs_a(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_a); REQUIRE(rdclass == dns_rdataclass_hs); @@ -215,7 +215,7 @@ checkowner_hs_a(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_hs_a(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_a); REQUIRE(rdata->rdclass == dns_rdataclass_hs); @@ -227,7 +227,7 @@ checknames_hs_a(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_hs_a(ARGS_COMPARE) { return (compare_hs_a(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/a6_38.c b/lib/dns/rdata/in_1/a6_38.c index 541db5f791..80941d650b 100644 --- a/lib/dns/rdata/in_1/a6_38.c +++ b/lib/dns/rdata/in_1/a6_38.c @@ -20,7 +20,7 @@ #define RRTYPE_A6_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_a6(ARGS_FROMTEXT) { isc_token_t token; unsigned char addr[16]; @@ -96,7 +96,7 @@ fromtext_in_a6(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_a6(ARGS_TOTEXT) { isc_region_t sr, ar; unsigned char addr[16]; @@ -144,7 +144,7 @@ totext_in_a6(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_a6(ARGS_FROMWIRE) { isc_region_t sr; unsigned char prefixlen; @@ -199,7 +199,7 @@ fromwire_in_a6(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_in_a6(ARGS_TOWIRE) { isc_region_t sr; dns_name_t name; @@ -229,7 +229,7 @@ towire_in_a6(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_in_a6(ARGS_COMPARE) { int order; unsigned char prefixlen1, prefixlen2; @@ -286,7 +286,7 @@ compare_in_a6(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_a6(ARGS_FROMSTRUCT) { dns_rdata_in_a6_t *a6 = source; isc_region_t region; @@ -334,7 +334,7 @@ fromstruct_in_a6(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_in_a6(ARGS_TOSTRUCT) { dns_rdata_in_a6_t *a6 = target; unsigned char octets; @@ -379,7 +379,7 @@ tostruct_in_a6(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_a6(ARGS_FREESTRUCT) { dns_rdata_in_a6_t *a6 = source; @@ -397,7 +397,7 @@ freestruct_in_a6(ARGS_FREESTRUCT) { a6->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_a6(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_a6); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -410,7 +410,7 @@ additionaldata_in_a6(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_a6(ARGS_DIGEST) { isc_region_t r1, r2; unsigned char prefixlen, octets; @@ -440,7 +440,7 @@ digest_in_a6(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_in_a6(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_a6); REQUIRE(rdclass == dns_rdataclass_in); @@ -451,7 +451,7 @@ checkowner_in_a6(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline bool +static bool checknames_in_a6(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -479,7 +479,7 @@ checknames_in_a6(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_a6(ARGS_COMPARE) { return (compare_in_a6(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/a_1.c b/lib/dns/rdata/in_1/a_1.c index b6648eb271..6d708b0c12 100644 --- a/lib/dns/rdata/in_1/a_1.c +++ b/lib/dns/rdata/in_1/a_1.c @@ -20,7 +20,7 @@ #define RRTYPE_A_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_a(ARGS_FROMTEXT) { isc_token_t token; struct in_addr addr; @@ -50,7 +50,7 @@ fromtext_in_a(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_a(ARGS_TOTEXT) { isc_region_t region; @@ -64,7 +64,7 @@ totext_in_a(ARGS_TOTEXT) { return (inet_totext(AF_INET, tctx->flags, ®ion, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_a(ARGS_FROMWIRE) { isc_region_t sregion; isc_region_t tregion; @@ -92,7 +92,7 @@ fromwire_in_a(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_a(ARGS_TOWIRE) { isc_region_t region; @@ -111,7 +111,7 @@ towire_in_a(ARGS_TOWIRE) { return (ISC_R_SUCCESS); } -static inline int +static int compare_in_a(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -128,7 +128,7 @@ compare_in_a(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_a(ARGS_FROMSTRUCT) { dns_rdata_in_a_t *a = source; uint32_t n; @@ -147,7 +147,7 @@ fromstruct_in_a(ARGS_FROMSTRUCT) { return (uint32_tobuffer(n, target)); } -static inline isc_result_t +static isc_result_t tostruct_in_a(ARGS_TOSTRUCT) { dns_rdata_in_a_t *a = target; uint32_t n; @@ -171,7 +171,7 @@ tostruct_in_a(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_a(ARGS_FREESTRUCT) { dns_rdata_in_a_t *a = source; @@ -182,7 +182,7 @@ freestruct_in_a(ARGS_FREESTRUCT) { UNUSED(a); } -static inline isc_result_t +static isc_result_t additionaldata_in_a(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_a); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -195,7 +195,7 @@ additionaldata_in_a(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_a(ARGS_DIGEST) { isc_region_t r; @@ -207,7 +207,7 @@ digest_in_a(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_a(ARGS_CHECKOWNER) { dns_name_t prefix, suffix; unsigned int labels, i; @@ -258,7 +258,7 @@ checkowner_in_a(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline bool +static bool checknames_in_a(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_a); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -270,7 +270,7 @@ checknames_in_a(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_a(ARGS_COMPARE) { return (compare_in_a(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/aaaa_28.c b/lib/dns/rdata/in_1/aaaa_28.c index 0f6039d358..00a73d394a 100644 --- a/lib/dns/rdata/in_1/aaaa_28.c +++ b/lib/dns/rdata/in_1/aaaa_28.c @@ -20,7 +20,7 @@ #define RRTYPE_AAAA_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_aaaa(ARGS_FROMTEXT) { isc_token_t token; unsigned char addr[16]; @@ -50,7 +50,7 @@ fromtext_in_aaaa(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_aaaa(ARGS_TOTEXT) { isc_region_t region; @@ -80,7 +80,7 @@ totext_in_aaaa(ARGS_TOTEXT) { return (inet_totext(AF_INET6, tctx->flags, ®ion, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_aaaa(ARGS_FROMWIRE) { isc_region_t sregion; isc_region_t tregion; @@ -108,7 +108,7 @@ fromwire_in_aaaa(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_aaaa(ARGS_TOWIRE) { isc_region_t region; @@ -127,7 +127,7 @@ towire_in_aaaa(ARGS_TOWIRE) { return (ISC_R_SUCCESS); } -static inline int +static int compare_in_aaaa(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -144,7 +144,7 @@ compare_in_aaaa(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_aaaa(ARGS_FROMSTRUCT) { dns_rdata_in_aaaa_t *aaaa = source; @@ -160,7 +160,7 @@ fromstruct_in_aaaa(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, aaaa->in6_addr.s6_addr, 16)); } -static inline isc_result_t +static isc_result_t tostruct_in_aaaa(ARGS_TOSTRUCT) { dns_rdata_in_aaaa_t *aaaa = target; isc_region_t r; @@ -183,7 +183,7 @@ tostruct_in_aaaa(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_aaaa(ARGS_FREESTRUCT) { dns_rdata_in_aaaa_t *aaaa = source; @@ -194,7 +194,7 @@ freestruct_in_aaaa(ARGS_FREESTRUCT) { UNUSED(aaaa); } -static inline isc_result_t +static isc_result_t additionaldata_in_aaaa(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_aaaa); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -207,7 +207,7 @@ additionaldata_in_aaaa(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_aaaa(ARGS_DIGEST) { isc_region_t r; @@ -219,7 +219,7 @@ digest_in_aaaa(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_aaaa(ARGS_CHECKOWNER) { dns_name_t prefix, suffix; @@ -246,7 +246,7 @@ checkowner_in_aaaa(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline bool +static bool checknames_in_aaaa(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_aaaa); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -258,7 +258,7 @@ checknames_in_aaaa(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_aaaa(ARGS_COMPARE) { return (compare_in_aaaa(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/apl_42.c b/lib/dns/rdata/in_1/apl_42.c index 7885af233b..03593abe69 100644 --- a/lib/dns/rdata/in_1/apl_42.c +++ b/lib/dns/rdata/in_1/apl_42.c @@ -18,7 +18,7 @@ #define RRTYPE_APL_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_apl(ARGS_FROMTEXT) { isc_token_t token; unsigned char addr[16]; @@ -114,7 +114,7 @@ fromtext_in_apl(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_apl(ARGS_TOTEXT) { isc_region_t sr; isc_region_t ir; @@ -179,7 +179,7 @@ totext_in_apl(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_apl(ARGS_FROMWIRE) { isc_region_t sr, sr2; isc_region_t tr; @@ -236,7 +236,7 @@ fromwire_in_apl(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr2.base, sr2.length)); } -static inline isc_result_t +static isc_result_t towire_in_apl(ARGS_TOWIRE) { UNUSED(cctx); @@ -246,7 +246,7 @@ towire_in_apl(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_in_apl(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -261,7 +261,7 @@ compare_in_apl(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_apl(ARGS_FROMSTRUCT) { dns_rdata_in_apl_t *apl = source; isc_buffer_t b; @@ -279,7 +279,7 @@ fromstruct_in_apl(ARGS_FROMSTRUCT) { return (fromwire_in_apl(rdclass, type, &b, NULL, false, target)); } -static inline isc_result_t +static isc_result_t tostruct_in_apl(ARGS_TOSTRUCT) { dns_rdata_in_apl_t *apl = target; isc_region_t r; @@ -304,7 +304,7 @@ tostruct_in_apl(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_apl(ARGS_FREESTRUCT) { dns_rdata_in_apl_t *apl = source; @@ -425,7 +425,7 @@ dns_rdata_apl_count(const dns_rdata_in_apl_t *apl) { return (apl->apl_len); } -static inline isc_result_t +static isc_result_t additionaldata_in_apl(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_apl); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -438,7 +438,7 @@ additionaldata_in_apl(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_apl(ARGS_DIGEST) { isc_region_t r; @@ -450,7 +450,7 @@ digest_in_apl(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_apl(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_apl); REQUIRE(rdclass == dns_rdataclass_in); @@ -463,7 +463,7 @@ checkowner_in_apl(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_apl(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_apl); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -475,7 +475,7 @@ checknames_in_apl(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_apl(ARGS_COMPARE) { return (compare_in_apl(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/atma_34.c b/lib/dns/rdata/in_1/atma_34.c index 30580d3056..b1a207a46a 100644 --- a/lib/dns/rdata/in_1/atma_34.c +++ b/lib/dns/rdata/in_1/atma_34.c @@ -18,7 +18,7 @@ #define RRTYPE_ATMA_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_atma(ARGS_FROMTEXT) { isc_token_t token; isc_textregion_t *sr; @@ -107,7 +107,7 @@ fromtext_in_atma(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_atma(ARGS_TOTEXT) { isc_region_t region; char buf[sizeof("xx")]; @@ -140,7 +140,7 @@ totext_in_atma(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_atma(ARGS_FROMWIRE) { isc_region_t region; @@ -169,7 +169,7 @@ fromwire_in_atma(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_atma(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_atma); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -180,7 +180,7 @@ towire_in_atma(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_in_atma(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -197,7 +197,7 @@ compare_in_atma(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_atma(ARGS_FROMSTRUCT) { dns_rdata_in_atma_t *atma = source; @@ -215,7 +215,7 @@ fromstruct_in_atma(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, atma->atma, atma->atma_len)); } -static inline isc_result_t +static isc_result_t tostruct_in_atma(ARGS_TOSTRUCT) { dns_rdata_in_atma_t *atma = target; isc_region_t r; @@ -242,7 +242,7 @@ tostruct_in_atma(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_atma(ARGS_FREESTRUCT) { dns_rdata_in_atma_t *atma = source; @@ -260,7 +260,7 @@ freestruct_in_atma(ARGS_FREESTRUCT) { atma->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_atma(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_atma); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -273,7 +273,7 @@ additionaldata_in_atma(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_atma(ARGS_DIGEST) { isc_region_t r; @@ -285,7 +285,7 @@ digest_in_atma(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_atma(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_atma); REQUIRE(rdclass == dns_rdataclass_in); @@ -298,7 +298,7 @@ checkowner_in_atma(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_atma(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_atma); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -310,7 +310,7 @@ checknames_in_atma(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_atma(ARGS_COMPARE) { return (compare_in_atma(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/dhcid_49.c b/lib/dns/rdata/in_1/dhcid_49.c index ca3c393739..b3f664bafb 100644 --- a/lib/dns/rdata/in_1/dhcid_49.c +++ b/lib/dns/rdata/in_1/dhcid_49.c @@ -18,7 +18,7 @@ #define RRTYPE_DHCID_ATTRIBUTES 0 -static inline isc_result_t +static isc_result_t fromtext_in_dhcid(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_dhcid); REQUIRE(rdclass == dns_rdataclass_in); @@ -32,7 +32,7 @@ fromtext_in_dhcid(ARGS_FROMTEXT) { return (isc_base64_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_in_dhcid(ARGS_TOTEXT) { isc_region_t sr, sr2; /* " ; 64000 255 64000" */ @@ -66,7 +66,7 @@ totext_in_dhcid(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_dhcid(ARGS_FROMWIRE) { isc_region_t sr; @@ -87,7 +87,7 @@ fromwire_in_dhcid(ARGS_FROMWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline isc_result_t +static isc_result_t towire_in_dhcid(ARGS_TOWIRE) { isc_region_t sr; @@ -101,7 +101,7 @@ towire_in_dhcid(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_in_dhcid(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -118,7 +118,7 @@ compare_in_dhcid(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_dhcid(ARGS_FROMSTRUCT) { dns_rdata_in_dhcid_t *dhcid = source; @@ -135,7 +135,7 @@ fromstruct_in_dhcid(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, dhcid->dhcid, dhcid->length)); } -static inline isc_result_t +static isc_result_t tostruct_in_dhcid(ARGS_TOSTRUCT) { dns_rdata_in_dhcid_t *dhcid = target; isc_region_t region; @@ -160,7 +160,7 @@ tostruct_in_dhcid(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_dhcid(ARGS_FREESTRUCT) { dns_rdata_in_dhcid_t *dhcid = source; @@ -178,7 +178,7 @@ freestruct_in_dhcid(ARGS_FREESTRUCT) { dhcid->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_dhcid(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_dhcid); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -191,7 +191,7 @@ additionaldata_in_dhcid(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_dhcid(ARGS_DIGEST) { isc_region_t r; @@ -203,7 +203,7 @@ digest_in_dhcid(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_dhcid(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_dhcid); REQUIRE(rdclass == dns_rdataclass_in); @@ -216,7 +216,7 @@ checkowner_in_dhcid(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_dhcid(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_dhcid); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -228,7 +228,7 @@ checknames_in_dhcid(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_dhcid(ARGS_COMPARE) { return (compare_in_dhcid(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/eid_31.c b/lib/dns/rdata/in_1/eid_31.c index 38a3887f3f..e5046cab81 100644 --- a/lib/dns/rdata/in_1/eid_31.c +++ b/lib/dns/rdata/in_1/eid_31.c @@ -18,7 +18,7 @@ #define RRTYPE_EID_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_eid(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_eid); REQUIRE(rdclass == dns_rdataclass_in); @@ -32,7 +32,7 @@ fromtext_in_eid(ARGS_FROMTEXT) { return (isc_hex_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_in_eid(ARGS_TOTEXT) { isc_region_t region; @@ -57,7 +57,7 @@ totext_in_eid(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_eid(ARGS_FROMWIRE) { isc_region_t region; @@ -79,7 +79,7 @@ fromwire_in_eid(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_eid(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_eid); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -90,7 +90,7 @@ towire_in_eid(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_in_eid(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -107,7 +107,7 @@ compare_in_eid(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_eid(ARGS_FROMSTRUCT) { dns_rdata_in_eid_t *eid = source; @@ -124,7 +124,7 @@ fromstruct_in_eid(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, eid->eid, eid->eid_len)); } -static inline isc_result_t +static isc_result_t tostruct_in_eid(ARGS_TOSTRUCT) { dns_rdata_in_eid_t *eid = target; isc_region_t r; @@ -149,7 +149,7 @@ tostruct_in_eid(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_eid(ARGS_FREESTRUCT) { dns_rdata_in_eid_t *eid = source; @@ -167,7 +167,7 @@ freestruct_in_eid(ARGS_FREESTRUCT) { eid->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_eid(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_eid); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -180,7 +180,7 @@ additionaldata_in_eid(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_eid(ARGS_DIGEST) { isc_region_t r; @@ -192,7 +192,7 @@ digest_in_eid(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_eid(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_eid); REQUIRE(rdclass == dns_rdataclass_in); @@ -205,7 +205,7 @@ checkowner_in_eid(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_eid(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_eid); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -217,7 +217,7 @@ checknames_in_eid(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_eid(ARGS_COMPARE) { return (compare_in_eid(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/https_65.c b/lib/dns/rdata/in_1/https_65.c index e054b8a266..af1ad7ff84 100644 --- a/lib/dns/rdata/in_1/https_65.c +++ b/lib/dns/rdata/in_1/https_65.c @@ -22,7 +22,7 @@ * since wire and presentation formats are identical. */ -static inline isc_result_t +static isc_result_t fromtext_in_https(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_https); REQUIRE(rdclass == dns_rdataclass_in); @@ -30,7 +30,7 @@ fromtext_in_https(ARGS_FROMTEXT) { return (generic_fromtext_in_svcb(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t totext_in_https(ARGS_TOTEXT) { REQUIRE(rdata->type == dns_rdatatype_https); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -39,7 +39,7 @@ totext_in_https(ARGS_TOTEXT) { return (generic_totext_in_svcb(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t fromwire_in_https(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_https); REQUIRE(rdclass == dns_rdataclass_in); @@ -47,7 +47,7 @@ fromwire_in_https(ARGS_FROMWIRE) { return (generic_fromwire_in_svcb(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t towire_in_https(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_https); REQUIRE(rdata->length != 0); @@ -55,7 +55,7 @@ towire_in_https(ARGS_TOWIRE) { return (generic_towire_in_svcb(CALL_TOWIRE)); } -static inline int +static int compare_in_https(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -73,7 +73,7 @@ compare_in_https(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_https(ARGS_FROMSTRUCT) { dns_rdata_in_https_t *https = source; @@ -86,7 +86,7 @@ fromstruct_in_https(ARGS_FROMSTRUCT) { return (generic_fromstruct_in_svcb(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t tostruct_in_https(ARGS_TOSTRUCT) { dns_rdata_in_https_t *https = target; @@ -98,7 +98,7 @@ tostruct_in_https(ARGS_TOSTRUCT) { return (generic_tostruct_in_svcb(CALL_TOSTRUCT)); } -static inline void +static void freestruct_in_https(ARGS_FREESTRUCT) { dns_rdata_in_https_t *https = source; @@ -109,7 +109,7 @@ freestruct_in_https(ARGS_FREESTRUCT) { generic_freestruct_in_svcb(CALL_FREESTRUCT); } -static inline isc_result_t +static isc_result_t additionaldata_in_https(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_https); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -117,7 +117,7 @@ additionaldata_in_https(ARGS_ADDLDATA) { return (generic_additionaldata_in_svcb(CALL_ADDLDATA)); } -static inline isc_result_t +static isc_result_t digest_in_https(ARGS_DIGEST) { isc_region_t region1; @@ -128,7 +128,7 @@ digest_in_https(ARGS_DIGEST) { return ((digest)(arg, ®ion1)); } -static inline bool +static bool checkowner_in_https(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_https); REQUIRE(rdclass == dns_rdataclass_in); @@ -141,7 +141,7 @@ checkowner_in_https(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_https(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_https); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -149,7 +149,7 @@ checknames_in_https(ARGS_CHECKNAMES) { return (generic_checknames_in_svcb(CALL_CHECKNAMES)); } -static inline int +static int casecompare_in_https(ARGS_COMPARE) { return (compare_in_https(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/kx_36.c b/lib/dns/rdata/in_1/kx_36.c index 965d16fb47..ce48db1238 100644 --- a/lib/dns/rdata/in_1/kx_36.c +++ b/lib/dns/rdata/in_1/kx_36.c @@ -18,7 +18,7 @@ #define RRTYPE_KX_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_kx(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -49,7 +49,7 @@ fromtext_in_kx(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_kx(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -78,7 +78,7 @@ totext_in_kx(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_kx(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sregion; @@ -102,7 +102,7 @@ fromwire_in_kx(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_in_kx(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -123,7 +123,7 @@ towire_in_kx(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_in_kx(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -158,7 +158,7 @@ compare_in_kx(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_kx(ARGS_FROMSTRUCT) { dns_rdata_in_kx_t *kx = source; isc_region_t region; @@ -177,7 +177,7 @@ fromstruct_in_kx(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_in_kx(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_in_kx_t *kx = target; @@ -205,7 +205,7 @@ tostruct_in_kx(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_kx(ARGS_FREESTRUCT) { dns_rdata_in_kx_t *kx = source; @@ -221,7 +221,7 @@ freestruct_in_kx(ARGS_FREESTRUCT) { kx->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_kx(ARGS_ADDLDATA) { dns_name_t name; dns_offsets_t offsets; @@ -240,7 +240,7 @@ additionaldata_in_kx(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t digest_in_kx(ARGS_DIGEST) { isc_region_t r1, r2; dns_name_t name; @@ -258,7 +258,7 @@ digest_in_kx(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_in_kx(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_kx); REQUIRE(rdclass == dns_rdataclass_in); @@ -271,7 +271,7 @@ checkowner_in_kx(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_kx(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_kx); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -283,7 +283,7 @@ checknames_in_kx(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_kx(ARGS_COMPARE) { return (compare_in_kx(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/nimloc_32.c b/lib/dns/rdata/in_1/nimloc_32.c index d96967f6bd..6a9cdb4e16 100644 --- a/lib/dns/rdata/in_1/nimloc_32.c +++ b/lib/dns/rdata/in_1/nimloc_32.c @@ -18,7 +18,7 @@ #define RRTYPE_NIMLOC_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_nimloc(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_nimloc); REQUIRE(rdclass == dns_rdataclass_in); @@ -32,7 +32,7 @@ fromtext_in_nimloc(ARGS_FROMTEXT) { return (isc_hex_tobuffer(lexer, target, -2)); } -static inline isc_result_t +static isc_result_t totext_in_nimloc(ARGS_TOTEXT) { isc_region_t region; @@ -57,7 +57,7 @@ totext_in_nimloc(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_nimloc(ARGS_FROMWIRE) { isc_region_t region; @@ -79,7 +79,7 @@ fromwire_in_nimloc(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_nimloc(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_nimloc); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -90,7 +90,7 @@ towire_in_nimloc(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_in_nimloc(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -107,7 +107,7 @@ compare_in_nimloc(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_nimloc(ARGS_FROMSTRUCT) { dns_rdata_in_nimloc_t *nimloc = source; @@ -124,7 +124,7 @@ fromstruct_in_nimloc(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, nimloc->nimloc, nimloc->nimloc_len)); } -static inline isc_result_t +static isc_result_t tostruct_in_nimloc(ARGS_TOSTRUCT) { dns_rdata_in_nimloc_t *nimloc = target; isc_region_t r; @@ -149,7 +149,7 @@ tostruct_in_nimloc(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_nimloc(ARGS_FREESTRUCT) { dns_rdata_in_nimloc_t *nimloc = source; @@ -167,7 +167,7 @@ freestruct_in_nimloc(ARGS_FREESTRUCT) { nimloc->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_nimloc(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nimloc); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -180,7 +180,7 @@ additionaldata_in_nimloc(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_nimloc(ARGS_DIGEST) { isc_region_t r; @@ -192,7 +192,7 @@ digest_in_nimloc(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_nimloc(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nimloc); REQUIRE(rdclass == dns_rdataclass_in); @@ -205,7 +205,7 @@ checkowner_in_nimloc(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_nimloc(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nimloc); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -217,7 +217,7 @@ checknames_in_nimloc(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_nimloc(ARGS_COMPARE) { return (compare_in_nimloc(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/nsap-ptr_23.c b/lib/dns/rdata/in_1/nsap-ptr_23.c index b6e70d9f69..9620fed71c 100644 --- a/lib/dns/rdata/in_1/nsap-ptr_23.c +++ b/lib/dns/rdata/in_1/nsap-ptr_23.c @@ -18,7 +18,7 @@ #define RRTYPE_NSAP_PTR_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_nsap_ptr(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -43,7 +43,7 @@ fromtext_in_nsap_ptr(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_nsap_ptr(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -65,7 +65,7 @@ totext_in_nsap_ptr(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_nsap_ptr(ARGS_FROMWIRE) { dns_name_t name; @@ -81,7 +81,7 @@ fromwire_in_nsap_ptr(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_in_nsap_ptr(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -99,7 +99,7 @@ towire_in_nsap_ptr(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_in_nsap_ptr(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -125,7 +125,7 @@ compare_in_nsap_ptr(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_nsap_ptr(ARGS_FROMSTRUCT) { dns_rdata_in_nsap_ptr_t *nsap_ptr = source; isc_region_t region; @@ -143,7 +143,7 @@ fromstruct_in_nsap_ptr(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_in_nsap_ptr(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_in_nsap_ptr_t *nsap_ptr = target; @@ -167,7 +167,7 @@ tostruct_in_nsap_ptr(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_nsap_ptr(ARGS_FREESTRUCT) { dns_rdata_in_nsap_ptr_t *nsap_ptr = source; @@ -183,7 +183,7 @@ freestruct_in_nsap_ptr(ARGS_FREESTRUCT) { nsap_ptr->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_nsap_ptr(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nsap_ptr); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -196,7 +196,7 @@ additionaldata_in_nsap_ptr(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_nsap_ptr(ARGS_DIGEST) { isc_region_t r; dns_name_t name; @@ -211,7 +211,7 @@ digest_in_nsap_ptr(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_in_nsap_ptr(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nsap_ptr); REQUIRE(rdclass == dns_rdataclass_in); @@ -224,7 +224,7 @@ checkowner_in_nsap_ptr(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_nsap_ptr(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nsap_ptr); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -236,7 +236,7 @@ checknames_in_nsap_ptr(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_nsap_ptr(ARGS_COMPARE) { return (compare_in_nsap_ptr(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/nsap_22.c b/lib/dns/rdata/in_1/nsap_22.c index 379842346f..fc92014c02 100644 --- a/lib/dns/rdata/in_1/nsap_22.c +++ b/lib/dns/rdata/in_1/nsap_22.c @@ -18,7 +18,7 @@ #define RRTYPE_NSAP_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_nsap(ARGS_FROMTEXT) { isc_token_t token; isc_textregion_t *sr; @@ -71,7 +71,7 @@ fromtext_in_nsap(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_nsap(ARGS_TOTEXT) { isc_region_t region; char buf[sizeof("xx")]; @@ -92,7 +92,7 @@ totext_in_nsap(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_nsap(ARGS_FROMWIRE) { isc_region_t region; @@ -114,7 +114,7 @@ fromwire_in_nsap(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_nsap(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_nsap); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -125,7 +125,7 @@ towire_in_nsap(ARGS_TOWIRE) { return (mem_tobuffer(target, rdata->data, rdata->length)); } -static inline int +static int compare_in_nsap(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -142,7 +142,7 @@ compare_in_nsap(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_nsap(ARGS_FROMSTRUCT) { dns_rdata_in_nsap_t *nsap = source; @@ -159,7 +159,7 @@ fromstruct_in_nsap(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, nsap->nsap, nsap->nsap_len)); } -static inline isc_result_t +static isc_result_t tostruct_in_nsap(ARGS_TOSTRUCT) { dns_rdata_in_nsap_t *nsap = target; isc_region_t r; @@ -184,7 +184,7 @@ tostruct_in_nsap(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_nsap(ARGS_FREESTRUCT) { dns_rdata_in_nsap_t *nsap = source; @@ -202,7 +202,7 @@ freestruct_in_nsap(ARGS_FREESTRUCT) { nsap->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_nsap(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_nsap); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -215,7 +215,7 @@ additionaldata_in_nsap(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_nsap(ARGS_DIGEST) { isc_region_t r; @@ -227,7 +227,7 @@ digest_in_nsap(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_nsap(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_nsap); REQUIRE(rdclass == dns_rdataclass_in); @@ -240,7 +240,7 @@ checkowner_in_nsap(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_nsap(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_nsap); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -252,7 +252,7 @@ checknames_in_nsap(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_nsap(ARGS_COMPARE) { return (compare_in_nsap(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/px_26.c b/lib/dns/rdata/in_1/px_26.c index 3dfe15bb07..441c3c413c 100644 --- a/lib/dns/rdata/in_1/px_26.c +++ b/lib/dns/rdata/in_1/px_26.c @@ -18,7 +18,7 @@ #define RRTYPE_PX_ATTRIBUTES (0) -static inline isc_result_t +static isc_result_t fromtext_in_px(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -65,7 +65,7 @@ fromtext_in_px(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_px(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -108,7 +108,7 @@ totext_in_px(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_px(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sregion; @@ -144,7 +144,7 @@ fromwire_in_px(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_in_px(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -178,7 +178,7 @@ towire_in_px(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_in_px(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -224,7 +224,7 @@ compare_in_px(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_px(ARGS_FROMSTRUCT) { dns_rdata_in_px_t *px = source; isc_region_t region; @@ -245,7 +245,7 @@ fromstruct_in_px(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_in_px(ARGS_TOSTRUCT) { dns_rdata_in_px_t *px = target; dns_name_t name; @@ -279,7 +279,7 @@ tostruct_in_px(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_px(ARGS_FREESTRUCT) { dns_rdata_in_px_t *px = source; @@ -296,7 +296,7 @@ freestruct_in_px(ARGS_FREESTRUCT) { px->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_px(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_px); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -309,7 +309,7 @@ additionaldata_in_px(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_px(ARGS_DIGEST) { isc_region_t r1, r2; dns_name_t name; @@ -339,7 +339,7 @@ digest_in_px(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_in_px(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_px); REQUIRE(rdclass == dns_rdataclass_in); @@ -352,7 +352,7 @@ checkowner_in_px(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_px(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_px); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -364,7 +364,7 @@ checknames_in_px(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_px(ARGS_COMPARE) { return (compare_in_px(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/srv_33.c b/lib/dns/rdata/in_1/srv_33.c index 387b9a0553..6818b0395c 100644 --- a/lib/dns/rdata/in_1/srv_33.c +++ b/lib/dns/rdata/in_1/srv_33.c @@ -18,7 +18,7 @@ #define RRTYPE_SRV_ATTRIBUTES (DNS_RDATATYPEATTR_FOLLOWADDITIONAL) -static inline isc_result_t +static isc_result_t fromtext_in_srv(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -86,7 +86,7 @@ fromtext_in_srv(ARGS_FROMTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_srv(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -138,7 +138,7 @@ totext_in_srv(ARGS_TOTEXT) { return (dns_name_totext(&prefix, sub, target)); } -static inline isc_result_t +static isc_result_t fromwire_in_srv(ARGS_FROMWIRE) { dns_name_t name; isc_region_t sr; @@ -169,7 +169,7 @@ fromwire_in_srv(ARGS_FROMWIRE) { return (dns_name_fromwire(&name, source, dctx, options, target)); } -static inline isc_result_t +static isc_result_t towire_in_srv(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -194,7 +194,7 @@ towire_in_srv(ARGS_TOWIRE) { return (dns_name_towire(&name, cctx, target)); } -static inline int +static int compare_in_srv(ARGS_COMPARE) { dns_name_t name1; dns_name_t name2; @@ -235,7 +235,7 @@ compare_in_srv(ARGS_COMPARE) { return (dns_name_rdatacompare(&name1, &name2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_srv(ARGS_FROMSTRUCT) { dns_rdata_in_srv_t *srv = source; isc_region_t region; @@ -256,7 +256,7 @@ fromstruct_in_srv(ARGS_FROMSTRUCT) { return (isc_buffer_copyregion(target, ®ion)); } -static inline isc_result_t +static isc_result_t tostruct_in_srv(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_in_srv_t *srv = target; @@ -286,7 +286,7 @@ tostruct_in_srv(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_srv(ARGS_FREESTRUCT) { dns_rdata_in_srv_t *srv = source; @@ -302,7 +302,7 @@ freestruct_in_srv(ARGS_FREESTRUCT) { srv->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_srv(ARGS_ADDLDATA) { char buf[sizeof("_65000._tcp")]; dns_fixedname_t fixed; @@ -351,7 +351,7 @@ additionaldata_in_srv(ARGS_ADDLDATA) { NULL)); } -static inline isc_result_t +static isc_result_t digest_in_srv(ARGS_DIGEST) { isc_region_t r1, r2; dns_name_t name; @@ -369,7 +369,7 @@ digest_in_srv(ARGS_DIGEST) { return (dns_name_digest(&name, digest, arg)); } -static inline bool +static bool checkowner_in_srv(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_srv); REQUIRE(rdclass == dns_rdataclass_in); @@ -382,7 +382,7 @@ checkowner_in_srv(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool checknames_in_srv(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -405,7 +405,7 @@ checknames_in_srv(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_srv(ARGS_COMPARE) { return (compare_in_srv(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/svcb_64.c b/lib/dns/rdata/in_1/svcb_64.c index f79445a6ec..115d805bf2 100644 --- a/lib/dns/rdata/in_1/svcb_64.c +++ b/lib/dns/rdata/in_1/svcb_64.c @@ -523,7 +523,7 @@ svcsortkeys(isc_buffer_t *target, unsigned int used) { } } -static inline isc_result_t +static isc_result_t generic_fromtext_in_svcb(ARGS_FROMTEXT) { isc_token_t token; dns_name_t name; @@ -596,7 +596,7 @@ generic_fromtext_in_svcb(ARGS_FROMTEXT) { } } -static inline isc_result_t +static isc_result_t fromtext_in_svcb(ARGS_FROMTEXT) { REQUIRE(type == dns_rdatatype_svcb); REQUIRE(rdclass == dns_rdataclass_in); @@ -607,7 +607,7 @@ fromtext_in_svcb(ARGS_FROMTEXT) { return (generic_fromtext_in_svcb(CALL_FROMTEXT)); } -static inline isc_result_t +static isc_result_t generic_totext_in_svcb(ARGS_TOTEXT) { isc_region_t region; dns_name_t name; @@ -737,7 +737,7 @@ generic_totext_in_svcb(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t totext_in_svcb(ARGS_TOTEXT) { REQUIRE(rdata->type == dns_rdatatype_svcb); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -746,7 +746,7 @@ totext_in_svcb(ARGS_TOTEXT) { return (generic_totext_in_svcb(CALL_TOTEXT)); } -static inline isc_result_t +static isc_result_t generic_fromwire_in_svcb(ARGS_FROMWIRE) { dns_name_t name; isc_region_t region, man = { .base = NULL, .length = 0 }; @@ -888,7 +888,7 @@ generic_fromwire_in_svcb(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_svcb(ARGS_FROMWIRE) { REQUIRE(type == dns_rdatatype_svcb); REQUIRE(rdclass == dns_rdataclass_in); @@ -896,7 +896,7 @@ fromwire_in_svcb(ARGS_FROMWIRE) { return (generic_fromwire_in_svcb(CALL_FROMWIRE)); } -static inline isc_result_t +static isc_result_t generic_towire_in_svcb(ARGS_TOWIRE) { dns_name_t name; dns_offsets_t offsets; @@ -927,7 +927,7 @@ generic_towire_in_svcb(ARGS_TOWIRE) { return (mem_tobuffer(target, region.base, region.length)); } -static inline isc_result_t +static isc_result_t towire_in_svcb(ARGS_TOWIRE) { REQUIRE(rdata->type == dns_rdatatype_svcb); REQUIRE(rdata->length != 0); @@ -935,7 +935,7 @@ towire_in_svcb(ARGS_TOWIRE) { return (generic_towire_in_svcb(CALL_TOWIRE)); } -static inline int +static int compare_in_svcb(ARGS_COMPARE) { isc_region_t region1; isc_region_t region2; @@ -953,7 +953,7 @@ compare_in_svcb(ARGS_COMPARE) { return (isc_region_compare(®ion1, ®ion2)); } -static inline isc_result_t +static isc_result_t generic_fromstruct_in_svcb(ARGS_FROMSTRUCT) { dns_rdata_in_svcb_t *svcb = source; isc_region_t region; @@ -972,7 +972,7 @@ generic_fromstruct_in_svcb(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, svcb->svc, svcb->svclen)); } -static inline isc_result_t +static isc_result_t fromstruct_in_svcb(ARGS_FROMSTRUCT) { dns_rdata_in_svcb_t *svcb = source; @@ -985,7 +985,7 @@ fromstruct_in_svcb(ARGS_FROMSTRUCT) { return (generic_fromstruct_in_svcb(CALL_FROMSTRUCT)); } -static inline isc_result_t +static isc_result_t generic_tostruct_in_svcb(ARGS_TOSTRUCT) { isc_region_t region; dns_rdata_in_svcb_t *svcb = target; @@ -1025,7 +1025,7 @@ generic_tostruct_in_svcb(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t tostruct_in_svcb(ARGS_TOSTRUCT) { dns_rdata_in_svcb_t *svcb = target; @@ -1037,7 +1037,7 @@ tostruct_in_svcb(ARGS_TOSTRUCT) { return (generic_tostruct_in_svcb(CALL_TOSTRUCT)); } -static inline void +static void generic_freestruct_in_svcb(ARGS_FREESTRUCT) { dns_rdata_in_svcb_t *svcb = source; @@ -1052,7 +1052,7 @@ generic_freestruct_in_svcb(ARGS_FREESTRUCT) { svcb->mctx = NULL; } -static inline void +static void freestruct_in_svcb(ARGS_FREESTRUCT) { dns_rdata_in_svcb_t *svcb = source; @@ -1063,7 +1063,7 @@ freestruct_in_svcb(ARGS_FREESTRUCT) { generic_freestruct_in_svcb(CALL_FREESTRUCT); } -static inline isc_result_t +static isc_result_t generic_additionaldata_in_svcb(ARGS_ADDLDATA) { bool alias, done = false; dns_fixedname_t fixed; @@ -1146,7 +1146,7 @@ generic_additionaldata_in_svcb(ARGS_ADDLDATA) { return ((add)(arg, &name, dns_rdatatype_a, NULL)); } -static inline isc_result_t +static isc_result_t additionaldata_in_svcb(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_svcb); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -1154,7 +1154,7 @@ additionaldata_in_svcb(ARGS_ADDLDATA) { return (generic_additionaldata_in_svcb(CALL_ADDLDATA)); } -static inline isc_result_t +static isc_result_t digest_in_svcb(ARGS_DIGEST) { isc_region_t region1; @@ -1165,7 +1165,7 @@ digest_in_svcb(ARGS_DIGEST) { return ((digest)(arg, ®ion1)); } -static inline bool +static bool checkowner_in_svcb(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_svcb); REQUIRE(rdclass == dns_rdataclass_in); @@ -1178,7 +1178,7 @@ checkowner_in_svcb(ARGS_CHECKOWNER) { return (true); } -static inline bool +static bool generic_checknames_in_svcb(ARGS_CHECKNAMES) { isc_region_t region; dns_name_t name; @@ -1201,7 +1201,7 @@ generic_checknames_in_svcb(ARGS_CHECKNAMES) { return (true); } -static inline bool +static bool checknames_in_svcb(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_svcb); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -1209,7 +1209,7 @@ checknames_in_svcb(ARGS_CHECKNAMES) { return (generic_checknames_in_svcb(CALL_CHECKNAMES)); } -static inline int +static int casecompare_in_svcb(ARGS_COMPARE) { return (compare_in_svcb(rdata1, rdata2)); } diff --git a/lib/dns/rdata/in_1/wks_11.c b/lib/dns/rdata/in_1/wks_11.c index 66883beeb2..7252065f36 100644 --- a/lib/dns/rdata/in_1/wks_11.c +++ b/lib/dns/rdata/in_1/wks_11.c @@ -56,7 +56,7 @@ mygetservbyname(const char *name, const char *proto, long *port) { return (se != NULL); } -static inline isc_result_t +static isc_result_t fromtext_in_wks(ARGS_FROMTEXT) { static isc_once_t once = ISC_ONCE_INIT; isc_token_t token; @@ -169,7 +169,7 @@ cleanup: return (result); } -static inline isc_result_t +static isc_result_t totext_in_wks(ARGS_TOTEXT) { isc_region_t sr; unsigned short proto; @@ -211,7 +211,7 @@ totext_in_wks(ARGS_TOTEXT) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t fromwire_in_wks(ARGS_FROMWIRE) { isc_region_t sr; isc_region_t tr; @@ -247,7 +247,7 @@ fromwire_in_wks(ARGS_FROMWIRE) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t towire_in_wks(ARGS_TOWIRE) { isc_region_t sr; @@ -261,7 +261,7 @@ towire_in_wks(ARGS_TOWIRE) { return (mem_tobuffer(target, sr.base, sr.length)); } -static inline int +static int compare_in_wks(ARGS_COMPARE) { isc_region_t r1; isc_region_t r2; @@ -278,7 +278,7 @@ compare_in_wks(ARGS_COMPARE) { return (isc_region_compare(&r1, &r2)); } -static inline isc_result_t +static isc_result_t fromstruct_in_wks(ARGS_FROMSTRUCT) { dns_rdata_in_wks_t *wks = source; uint32_t a; @@ -300,7 +300,7 @@ fromstruct_in_wks(ARGS_FROMSTRUCT) { return (mem_tobuffer(target, wks->map, wks->map_len)); } -static inline isc_result_t +static isc_result_t tostruct_in_wks(ARGS_TOSTRUCT) { dns_rdata_in_wks_t *wks = target; uint32_t n; @@ -330,7 +330,7 @@ tostruct_in_wks(ARGS_TOSTRUCT) { return (ISC_R_SUCCESS); } -static inline void +static void freestruct_in_wks(ARGS_FREESTRUCT) { dns_rdata_in_wks_t *wks = source; @@ -348,7 +348,7 @@ freestruct_in_wks(ARGS_FREESTRUCT) { wks->mctx = NULL; } -static inline isc_result_t +static isc_result_t additionaldata_in_wks(ARGS_ADDLDATA) { REQUIRE(rdata->type == dns_rdatatype_wks); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -361,7 +361,7 @@ additionaldata_in_wks(ARGS_ADDLDATA) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t digest_in_wks(ARGS_DIGEST) { isc_region_t r; @@ -373,7 +373,7 @@ digest_in_wks(ARGS_DIGEST) { return ((digest)(arg, &r)); } -static inline bool +static bool checkowner_in_wks(ARGS_CHECKOWNER) { REQUIRE(type == dns_rdatatype_wks); REQUIRE(rdclass == dns_rdataclass_in); @@ -384,7 +384,7 @@ checkowner_in_wks(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline bool +static bool checknames_in_wks(ARGS_CHECKNAMES) { REQUIRE(rdata->type == dns_rdatatype_wks); REQUIRE(rdata->rdclass == dns_rdataclass_in); @@ -396,7 +396,7 @@ checknames_in_wks(ARGS_CHECKNAMES) { return (true); } -static inline int +static int casecompare_in_wks(ARGS_COMPARE) { return (compare_in_wks(rdata1, rdata2)); } diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c index 3b9ce583ad..5271d3c36c 100644 --- a/lib/dns/rdataset.c +++ b/lib/dns/rdataset.c @@ -297,7 +297,7 @@ towire_compare(const void *av, const void *bv) { return (a->key - b->key); } -static inline void +static void swap_rdata(dns_rdata_t *in, unsigned int a, unsigned int b) { dns_rdata_t rdata = in[a]; in[a] = in[b]; diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index 0d991459ae..a7e817dbe5 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.c @@ -410,7 +410,7 @@ dns_rdataslab_count(unsigned char *slab, unsigned int reservelen) { * 'type' and class 'rdclass', and advance '*current' to * point to the next item in the slab. */ -static inline void +static void rdata_from_slab(unsigned char **current, dns_rdataclass_t rdclass, dns_rdatatype_t type, dns_rdata_t *rdata) { unsigned char *tcurrent = *current; @@ -446,7 +446,7 @@ rdata_from_slab(unsigned char **current, dns_rdataclass_t rdclass, * contains an rdata identical to 'rdata'. This does case insensitive * comparisons per DNSSEC. */ -static inline bool +static bool rdata_in_slab(unsigned char *slab, unsigned int reservelen, dns_rdataclass_t rdclass, dns_rdatatype_t type, dns_rdata_t *rdata) { diff --git a/lib/dns/request.c b/lib/dns/request.c index f0047b145b..c170e6ee24 100644 --- a/lib/dns/request.c +++ b/lib/dns/request.c @@ -339,7 +339,7 @@ mgr_gethash(dns_requestmgr_t *requestmgr) { return (requestmgr->hash % DNS_REQUEST_NLOCKS); } -static inline void +static void req_send(dns_request_t *request) { isc_region_t r; diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 7702d5a93c..dad4ea7f07 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -220,7 +220,7 @@ #define RES_DOMAIN_NEXTTABLE(hindex) ((hindex == 0) ? 1 : 0) -static inline uint32_t +static uint32_t hash_32(uint32_t val, unsigned int bits) { REQUIRE(bits <= RES_DOMAIN_MAX_BITS); /* High bits are more random. */ @@ -664,7 +664,7 @@ maybe_destroy(fetchctx_t *fctx, bool locked); static void add_bad(fetchctx_t *fctx, dns_message_t *rmessage, dns_adbaddrinfo_t *addrinfo, isc_result_t reason, badnstype_t badtype); -static inline isc_result_t +static isc_result_t findnoqname(fetchctx_t *fctx, dns_message_t *message, dns_name_t *name, dns_rdatatype_t type, dns_name_t **noqname); @@ -910,14 +910,14 @@ rctx_ncache(respctx_t *rctx); /*% * Increment resolver-related statistics counters. */ -static inline void +static void inc_stats(dns_resolver_t *res, isc_statscounter_t counter) { if (res->view->resstats != NULL) { isc_stats_increment(res->view->resstats, counter); } } -static inline void +static void dec_stats(dns_resolver_t *res, isc_statscounter_t counter) { if (res->view->resstats != NULL) { isc_stats_decrement(res->view->resstats, counter); @@ -1165,7 +1165,7 @@ munge: return (true); } -static inline void +static void resquery_destroy(resquery_t *query) { fetchctx_t *fctx = query->fctx; dns_resolver_t *res = fctx->res; @@ -1256,13 +1256,13 @@ update_edns_stats(resquery_t *query) { * trigger if, for example, some ADB or validator dependency * loop occurs and causes a fetch to hang. */ -static inline isc_result_t +static isc_result_t fctx_starttimer(fetchctx_t *fctx) { return (isc_timer_reset(fctx->timer, isc_timertype_once, &fctx->final, NULL, true)); } -static inline void +static void fctx_stoptimer(fetchctx_t *fctx) { isc_result_t result; @@ -1645,7 +1645,7 @@ fcount_decr(fetchctx_t *fctx) { UNLOCK(&dbucket->lock); } -static inline void +static void fctx_sendevents(fetchctx_t *fctx, isc_result_t result, int line) { dns_fetchevent_t *event, *next_event; isc_task_t *task; @@ -1852,7 +1852,7 @@ detach: resquery_detach(&query); } -static inline isc_result_t +static isc_result_t fctx_addopt(dns_message_t *message, unsigned int version, uint16_t udpsize, dns_ednsopt_t *ednsopts, size_t count) { dns_rdataset_t *rdataset = NULL; @@ -1866,7 +1866,7 @@ fctx_addopt(dns_message_t *message, unsigned int version, uint16_t udpsize, return (dns_message_setopt(message, rdataset)); } -static inline void +static void fctx_setretryinterval(fetchctx_t *fctx, unsigned int rtt) { unsigned int seconds, us; uint64_t limit; @@ -2296,7 +2296,7 @@ add_triededns(fetchctx_t *fctx, isc_sockaddr_t *address) { ISC_LIST_INITANDAPPEND(fctx->edns, tried, link); } -static inline size_t +static size_t addr2buf(void *buf, const size_t bufsize, const isc_sockaddr_t *sockaddr) { isc_netaddr_t netaddr; isc_netaddr_fromsockaddr(&netaddr, sockaddr); @@ -2315,7 +2315,7 @@ addr2buf(void *buf, const size_t bufsize, const isc_sockaddr_t *sockaddr) { return (0); } -static inline size_t +static size_t add_serveraddr(uint8_t *buf, const size_t bufsize, const resquery_t *query) { return (addr2buf(buf, bufsize, &query->addrinfo->sockaddr)); } @@ -2991,7 +2991,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) { fctx_detach(&fctx); } -static inline bool +static bool bad_server(fetchctx_t *fctx, isc_sockaddr_t *address) { isc_sockaddr_t *sa; @@ -3005,7 +3005,7 @@ bad_server(fetchctx_t *fctx, isc_sockaddr_t *address) { return (false); } -static inline bool +static bool mark_bad(fetchctx_t *fctx) { dns_adbfind_t *curr; dns_adbaddrinfo_t *addrinfo; @@ -3271,7 +3271,7 @@ sort_finds(dns_adbfindlist_t *findlist, unsigned int bias) { * occurrance anyway, we regard this theoretical SERVFAIL as the lesser * evil. */ -static inline bool +static bool waiting_for(dns_adbfind_t *find, dns_rdatatype_t type) { switch (type) { case dns_rdatatype_a: @@ -3766,7 +3766,7 @@ out: return (result); } -static inline void +static void possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr) { isc_netaddr_t na; char buf[ISC_NETADDR_FORMATSIZE]; @@ -3833,7 +3833,7 @@ possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr) { } } -static inline dns_adbaddrinfo_t * +static dns_adbaddrinfo_t * fctx_nextaddress(fetchctx_t *fctx) { dns_adbfind_t *find, *start; dns_adbaddrinfo_t *addrinfo; @@ -4548,7 +4548,7 @@ fctx_start(isc_task_t *task, isc_event_t *event) { * Fetch Creation, Joining, and Cancellation. */ -static inline void +static void fctx_add_event(fetchctx_t *fctx, isc_task_t *task, const isc_sockaddr_t *client, dns_messageid_t id, isc_taskaction_t action, void *arg, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, @@ -4587,7 +4587,7 @@ fctx_add_event(fetchctx_t *fctx, isc_task_t *task, const isc_sockaddr_t *client, } } -static inline isc_result_t +static isc_result_t fctx_join(fetchctx_t *fctx, isc_task_t *task, const isc_sockaddr_t *client, dns_messageid_t id, isc_taskaction_t action, void *arg, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, @@ -4603,7 +4603,7 @@ fctx_join(fetchctx_t *fctx, isc_task_t *task, const isc_sockaddr_t *client, return (ISC_R_SUCCESS); } -static inline void +static void log_ns_ttl(fetchctx_t *fctx, const char *where) { char namebuf[DNS_NAME_FORMATSIZE]; char domainbuf[DNS_NAME_FORMATSIZE]; @@ -4968,7 +4968,7 @@ cleanup_fetch: /* * Handle Responses */ -static inline bool +static bool is_lame(fetchctx_t *fctx, dns_message_t *message) { dns_name_t *name; dns_rdataset_t *rdataset; @@ -5020,7 +5020,7 @@ is_lame(fetchctx_t *fctx, dns_message_t *message) { return (false); } -static inline void +static void log_lame(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo) { char namebuf[DNS_NAME_FORMATSIZE]; char domainbuf[DNS_NAME_FORMATSIZE]; @@ -5035,7 +5035,7 @@ log_lame(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo) { domainbuf, addrbuf); } -static inline void +static void log_formerr(fetchctx_t *fctx, const char *format, ...) { char nsbuf[ISC_SOCKADDR_FORMATSIZE]; char msgbuf[2048]; @@ -5870,7 +5870,7 @@ fctx_log(void *arg, int level, const char *fmt, ...) { fctx->info, msgbuf); } -static inline isc_result_t +static isc_result_t findnoqname(fetchctx_t *fctx, dns_message_t *message, dns_name_t *name, dns_rdatatype_t type, dns_name_t **noqnamep) { dns_rdataset_t *nrdataset, *next, *sigrdataset; @@ -6002,7 +6002,7 @@ findnoqname(fetchctx_t *fctx, dns_message_t *message, dns_name_t *name, return (result); } -static inline isc_result_t +static isc_result_t cache_name(fetchctx_t *fctx, dns_name_t *name, dns_message_t *message, dns_adbaddrinfo_t *addrinfo, isc_stdtime_t now) { dns_rdataset_t *rdataset = NULL, *sigrdataset = NULL; @@ -6479,7 +6479,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_message_t *message, return (result); } -static inline isc_result_t +static isc_result_t cache_message(fetchctx_t *fctx, dns_message_t *message, dns_adbaddrinfo_t *addrinfo, isc_stdtime_t now) { isc_result_t result; @@ -6580,7 +6580,7 @@ ncache_adderesult(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, return (result); } -static inline isc_result_t +static isc_result_t ncache_message(fetchctx_t *fctx, dns_message_t *message, dns_adbaddrinfo_t *addrinfo, dns_rdatatype_t covers, isc_stdtime_t now) { @@ -6736,7 +6736,7 @@ unlock: return (result); } -static inline void +static void mark_related(dns_name_t *name, dns_rdataset_t *rdataset, bool external, bool gluing) { name->attributes |= DNS_NAMEATTR_CACHE; @@ -7422,7 +7422,7 @@ cleanup: fctx_detach(&fctx); } -static inline void +static void checknamessection(dns_message_t *message, dns_section_t section) { isc_result_t result; dns_name_t *name; @@ -7508,7 +7508,7 @@ log_nsid(isc_buffer_t *opt, size_t nsid_len, resquery_t *query, int level, isc_mem_put(mctx, buf, buflen); } -static inline bool +static bool iscname(dns_message_t *message, dns_name_t *name) { isc_result_t result; @@ -10579,7 +10579,7 @@ dns_resolver_detach(dns_resolver_t **resp) { } } -static inline bool +static bool fctx_match(fetchctx_t *fctx, const dns_name_t *name, dns_rdatatype_t type, unsigned int options) { /* @@ -10597,7 +10597,7 @@ fctx_match(fetchctx_t *fctx, const dns_name_t *name, dns_rdatatype_t type, return (dns_name_equal(fctx->name, name)); } -static inline void +static void log_fetch(const dns_name_t *name, dns_rdatatype_t type) { char namebuf[DNS_NAME_FORMATSIZE]; char typebuf[DNS_RDATATYPE_FORMATSIZE]; diff --git a/lib/dns/rpz.c b/lib/dns/rpz.c index 980ae85103..7f9f7eb924 100644 --- a/lib/dns/rpz.c +++ b/lib/dns/rpz.c @@ -1033,7 +1033,7 @@ name2data(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num, dns_rpz_type_t rpz_type, * \brief Count Leading Zeros: Find the location of the left-most set * bit. */ -static inline unsigned int +static unsigned int clz(dns_rpz_cidr_word_t w) { unsigned int bit; @@ -1101,7 +1101,7 @@ diff_keys(const dns_rpz_cidr_key_t *key1, dns_rpz_prefix_t prefix1, * Given a hit while searching the radix trees, * clear all bits for higher numbered zones. */ -static inline dns_rpz_zbits_t +static dns_rpz_zbits_t trim_zbits(dns_rpz_zbits_t zbits, dns_rpz_zbits_t found) { dns_rpz_zbits_t x; diff --git a/lib/dns/rrl.c b/lib/dns/rrl.c index 9d3c8f6fa3..599e76b004 100644 --- a/lib/dns/rrl.c +++ b/lib/dns/rrl.c @@ -135,7 +135,7 @@ hash_divisor(unsigned int initial) { /* * Convert a timestamp to a number of seconds in the past. */ -static inline int +static int delta_rrl_time(isc_stdtime_t ts, isc_stdtime_t now) { int delta; @@ -157,7 +157,7 @@ delta_rrl_time(isc_stdtime_t ts, isc_stdtime_t now) { return (0); } -static inline int +static int get_age(const dns_rrl_t *rrl, const dns_rrl_entry_t *e, isc_stdtime_t now) { if (!e->ts_valid) { return (DNS_RRL_FOREVER); @@ -165,7 +165,7 @@ get_age(const dns_rrl_t *rrl, const dns_rrl_entry_t *e, isc_stdtime_t now) { return (delta_rrl_time(e->ts + rrl->ts_bases[e->ts_gen], now)); } -static inline void +static void set_age(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_stdtime_t now) { dns_rrl_entry_t *e_old; unsigned int ts_gen; @@ -273,7 +273,7 @@ expand_entries(dns_rrl_t *rrl, int newsize) { return (ISC_R_SUCCESS); } -static inline dns_rrl_bin_t * +static dns_rrl_bin_t * get_bin(dns_rrl_hash_t *hash, unsigned int hval) { INSIST(hash != NULL); return (&hash->bins[hval % hash->length]); @@ -382,7 +382,7 @@ ref_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, int probes, isc_stdtime_t now) { } } -static inline bool +static bool key_cmp(const dns_rrl_key_t *a, const dns_rrl_key_t *b) { if (memcmp(a, b, sizeof(dns_rrl_key_t)) == 0) { return (true); @@ -390,7 +390,7 @@ key_cmp(const dns_rrl_key_t *a, const dns_rrl_key_t *b) { return (false); } -static inline uint32_t +static uint32_t hash_key(const dns_rrl_key_t *key) { uint32_t hval; int i; @@ -466,7 +466,7 @@ make_key(const dns_rrl_t *rrl, dns_rrl_key_t *key, } } -static inline dns_rrl_rate_t * +static dns_rrl_rate_t * get_rate(dns_rrl_t *rrl, dns_rrl_rtype_t rtype) { switch (rtype) { case DNS_RRL_RTYPE_QUERY: @@ -628,7 +628,7 @@ debit_log(const dns_rrl_entry_t *e, int age, const char *action) { hash_key(&e->key), age_str, e->responses, action); } -static inline dns_rrl_result_t +static dns_rrl_result_t debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale, const isc_sockaddr_t *client_addr, isc_stdtime_t now, char *log_buf, unsigned int log_buf_len) { @@ -771,7 +771,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale, return (DNS_RRL_RESULT_DROP); } -static inline dns_rrl_qname_buf_t * +static dns_rrl_qname_buf_t * get_qname(dns_rrl_t *rrl, const dns_rrl_entry_t *e) { dns_rrl_qname_buf_t *qbuf; @@ -782,7 +782,7 @@ get_qname(dns_rrl_t *rrl, const dns_rrl_entry_t *e) { return (qbuf); } -static inline void +static void free_qname(dns_rrl_t *rrl, dns_rrl_entry_t *e) { dns_rrl_qname_buf_t *qbuf; diff --git a/lib/dns/sdb.c b/lib/dns/sdb.c index 2608c294c2..2409092029 100644 --- a/lib/dns/sdb.c +++ b/lib/dns/sdb.c @@ -256,7 +256,7 @@ dns_sdb_unregister(dns_sdbimplementation_t **sdbimp) { isc_mem_putanddetach(&imp->mctx, imp, sizeof(dns_sdbimplementation_t)); } -static inline unsigned int +static unsigned int initial_size(unsigned int len) { unsigned int size; diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index 9b2af6d0ed..a90eb7c6ff 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -251,7 +251,7 @@ dns_sdlz_tolower(char *str) { } } -static inline unsigned int +static unsigned int initial_size(const char *data) { unsigned int len = (strlen(data) / 64) + 1; return (len * 64 + 64); diff --git a/lib/dns/soa.c b/lib/dns/soa.c index 82edfd437e..ca5ca8858c 100644 --- a/lib/dns/soa.c +++ b/lib/dns/soa.c @@ -23,13 +23,13 @@ #include #include -static inline uint32_t +static uint32_t decode_uint32(unsigned char *p) { return (((uint32_t)p[0] << 24) + ((uint32_t)p[1] << 16) + ((uint32_t)p[2] << 8) + ((uint32_t)p[3] << 0)); } -static inline void +static void encode_uint32(uint32_t val, unsigned char *p) { p[0] = (uint8_t)(val >> 24); p[1] = (uint8_t)(val >> 16); diff --git a/lib/dns/ssu.c b/lib/dns/ssu.c index 92db924469..bc240ce669 100644 --- a/lib/dns/ssu.c +++ b/lib/dns/ssu.c @@ -75,7 +75,7 @@ dns_ssutable_create(isc_mem_t *mctx, dns_ssutable_t **tablep) { *tablep = table; } -static inline void +static void destroy(dns_ssutable_t *table) { isc_mem_t *mctx; @@ -180,7 +180,7 @@ dns_ssutable_addrule(dns_ssutable_t *table, bool grant, ISC_LIST_INITANDAPPEND(table->rules, rule, link); } -static inline bool +static bool isusertype(dns_rdatatype_t type) { return (type != dns_rdatatype_ns && type != dns_rdatatype_soa && type != dns_rdatatype_rrsig); diff --git a/lib/dns/stats.c b/lib/dns/stats.c index aec21fe81d..4f58ef0d77 100644 --- a/lib/dns/stats.c +++ b/lib/dns/stats.c @@ -261,7 +261,7 @@ dns_generalstats_increment(dns_stats_t *stats, isc_statscounter_t counter) { isc_stats_increment(stats->counters, counter); } -inline static isc_statscounter_t +static isc_statscounter_t rdatatype2counter(dns_rdatatype_t type) { if (type > (dns_rdatatype_t)RDTYPECOUNTER_MAXTYPE) { return (0); @@ -279,7 +279,7 @@ dns_rdatatypestats_increment(dns_stats_t *stats, dns_rdatatype_t type) { isc_stats_increment(stats->counters, counter); } -static inline void +static void update_rdatasetstats(dns_stats_t *stats, dns_rdatastatstype_t rrsettype, bool increment) { isc_statscounter_t counter; diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 64f876f807..ddb08c481a 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -172,7 +172,7 @@ disassociate_rdatasets(dns_validator_t *val) { * If we are validating a name that is marked as "must be secure", log a * warning and return DNS_R_MUSTBESECURE instead. */ -static inline isc_result_t +static isc_result_t markanswer(dns_validator_t *val, const char *where, const char *mbstext) { if (val->mustbesecure && mbstext != NULL) { validator_log(val, ISC_LOG_WARNING, @@ -195,7 +195,7 @@ markanswer(dns_validator_t *val, const char *where, const char *mbstext) { /*% * Mark the RRsets in val->event with trust level secure. */ -static inline void +static void marksecure(dns_validatorevent_t *event) { dns_rdataset_settrust(event->rdataset, dns_trust_secure); if (event->sigrdataset != NULL) { @@ -232,7 +232,7 @@ validator_done(dns_validator_t *val, isc_result_t result) { /* * Called when deciding whether to destroy validator 'val'. */ -static inline bool +static bool exit_check(dns_validator_t *val) { /* * Caller must be holding the lock. @@ -950,7 +950,7 @@ validator_callback_nsec(isc_task_t *task, isc_event_t *event) { * \li DNS_R_NXDOMAIN * \li DNS_R_BROKENCHAIN */ -static inline isc_result_t +static isc_result_t view_find(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type) { dns_fixedname_t fixedname; dns_name_t *foundname; @@ -1000,7 +1000,7 @@ notfound: * Checks to make sure we are not going to loop. As we use a SHARED fetch * the validation process will stall if looping was to occur. */ -static inline bool +static bool check_deadlock(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) { dns_validator_t *parent; @@ -1031,7 +1031,7 @@ check_deadlock(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type, /*% * Start a fetch for the requested name and type. */ -static inline isc_result_t +static isc_result_t create_fetch(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type, isc_taskaction_t callback, const char *caller) { unsigned int fopts = 0; @@ -1062,7 +1062,7 @@ create_fetch(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type, /*% * Start a subvalidation process. */ -static inline isc_result_t +static isc_result_t create_validator(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, isc_taskaction_t action, const char *caller) { diff --git a/lib/dns/view.c b/lib/dns/view.c index 921cb547f0..d6d29a0a36 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -349,7 +349,7 @@ cleanup_name: return (result); } -static inline void +static void destroy(dns_view_t *view) { dns_dns64_t *dns64; dns_dlzdb_t *dlzdb; diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 7ae8a14700..cc0d50746d 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -879,9 +879,9 @@ static void zone_idetach(dns_zone_t **zonep); static isc_result_t zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump); -static inline void +static void zone_attachdb(dns_zone_t *zone, dns_db_t *db); -static inline void +static void zone_detachdb(dns_zone_t *zone); static void zone_catz_enable(dns_zone_t *zone, dns_catz_zones_t *catzs); @@ -1081,7 +1081,7 @@ struct stub_glue_request { /*% * Increment resolver-related statistics counters. Zone must be locked. */ -static inline void +static void inc_stats(dns_zone_t *zone, isc_statscounter_t counter) { if (zone->stats != NULL) { isc_stats_increment(zone->stats, counter); @@ -1406,7 +1406,7 @@ zone_free(dns_zone_t *zone) { * Returns true iff this the signed side of an inline-signing zone. * Caller should hold zone lock. */ -static inline bool +static bool inline_secure(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); if (zone->raw != NULL) { @@ -1419,7 +1419,7 @@ inline_secure(dns_zone_t *zone) { * Returns true iff this the unsigned side of an inline-signing zone * Caller should hold zone lock. */ -static inline bool +static bool inline_raw(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); if (zone->secure != NULL) { @@ -6591,7 +6591,7 @@ dns_zone_maintenance(dns_zone_t *zone) { UNLOCK_ZONE(zone); } -static inline bool +static bool was_dumping(dns_zone_t *zone) { REQUIRE(LOCKED_ZONE(zone)); @@ -10194,7 +10194,7 @@ matchkey(dns_rdataset_t *rdset, dns_rdata_t *rr) { * 1/10 * OrigTTL, * 1/10 * RRSigExpirationInterval)) */ -static inline isc_stdtime_t +static isc_stdtime_t refresh_time(dns_keyfetch_t *kfetch, bool retry) { isc_result_t result; uint32_t t; @@ -13034,7 +13034,7 @@ cleanup1: /*** *** Private ***/ -static inline isc_result_t +static isc_result_t create_query(dns_zone_t *zone, dns_rdatatype_t rdtype, dns_name_t *name, dns_message_t **messagep) { dns_message_t *message = NULL; @@ -13437,7 +13437,7 @@ fail: return (result); } -static inline isc_result_t +static isc_result_t save_nsrrset(dns_message_t *message, dns_name_t *name, struct stub_cb_args *cb_args, dns_db_t *db, dns_dbversion_t *version) { @@ -17512,7 +17512,7 @@ fail: } /* The caller must hold the dblock as a writer. */ -static inline void +static void zone_attachdb(dns_zone_t *zone, dns_db_t *db) { REQUIRE(zone->db == NULL && db != NULL); @@ -17520,7 +17520,7 @@ zone_attachdb(dns_zone_t *zone, dns_db_t *db) { } /* The caller must hold the dblock as a writer. */ -static inline void +static void zone_detachdb(dns_zone_t *zone) { REQUIRE(zone->db != NULL); @@ -18511,7 +18511,7 @@ dns_zone_first(dns_zonemgr_t *zmgr, dns_zone_t **first) { #define GOLDEN_RATIO_32 0x61C88647 #define HASHSIZE(bits) (UINT64_C(1) << (bits)) -static inline uint32_t +static uint32_t hash_index(uint32_t val, uint32_t bits) { return (val * GOLDEN_RATIO_32 >> (32 - bits)); } @@ -23673,7 +23673,7 @@ done: return (result); } -static inline dns_ttl_t +static dns_ttl_t zone_nsecttl(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index b1d82dac2b..96f2845172 100644 --- a/lib/dns/zoneverify.c +++ b/lib/dns/zoneverify.c @@ -100,7 +100,7 @@ struct nsec3_chain_fixed { * Helper function used to calculate length of variable-length * data section in object pointed to by 'chain'. */ -static inline size_t +static size_t chain_length(struct nsec3_chain_fixed *chain) { return (chain->salt_length + 2 * chain->next_length); } @@ -1104,7 +1104,7 @@ _checknext(const vctx_t *vctx, const struct nsec3_chain_fixed *first, return (false); } -static inline bool +static bool checknext(isc_mem_t *mctx, const vctx_t *vctx, const struct nsec3_chain_fixed *first, struct nsec3_chain_fixed *prev, const struct nsec3_chain_fixed *cur) { @@ -1117,7 +1117,7 @@ checknext(isc_mem_t *mctx, const vctx_t *vctx, return (result); } -static inline bool +static bool checklast(isc_mem_t *mctx, const vctx_t *vctx, struct nsec3_chain_fixed *first, struct nsec3_chain_fixed *prev) { bool result = _checknext(vctx, prev, first); diff --git a/lib/isc/base32.c b/lib/isc/base32.c index 5b2c2d7537..90c37c75f6 100644 --- a/lib/isc/base32.c +++ b/lib/isc/base32.c @@ -149,7 +149,7 @@ typedef struct { bool pad; /*%< Expect padding */ } base32_decode_ctx_t; -static inline void +static void base32_decode_init(base32_decode_ctx_t *ctx, int length, const char base[], bool pad, isc_buffer_t *target) { ctx->digits = 0; @@ -161,7 +161,7 @@ base32_decode_init(base32_decode_ctx_t *ctx, int length, const char base[], ctx->pad = pad; } -static inline isc_result_t +static isc_result_t base32_decode_char(base32_decode_ctx_t *ctx, int c) { const char *s; unsigned int last; @@ -269,7 +269,7 @@ base32_decode_char(base32_decode_ctx_t *ctx, int c) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t base32_decode_finish(base32_decode_ctx_t *ctx) { if (ctx->length > 0) { return (ISC_R_UNEXPECTEDEND); diff --git a/lib/isc/base64.c b/lib/isc/base64.c index 0549621cb8..958ef4ff28 100644 --- a/lib/isc/base64.c +++ b/lib/isc/base64.c @@ -100,7 +100,7 @@ typedef struct { int val[4]; } base64_decode_ctx_t; -static inline void +static void base64_decode_init(base64_decode_ctx_t *ctx, int length, isc_buffer_t *target) { ctx->digits = 0; ctx->seen_end = false; @@ -108,7 +108,7 @@ base64_decode_init(base64_decode_ctx_t *ctx, int length, isc_buffer_t *target) { ctx->target = target; } -static inline isc_result_t +static isc_result_t base64_decode_char(base64_decode_ctx_t *ctx, int c) { const char *s; @@ -167,7 +167,7 @@ base64_decode_char(base64_decode_ctx_t *ctx, int c) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t base64_decode_finish(base64_decode_ctx_t *ctx) { if (ctx->length > 0) { return (ISC_R_UNEXPECTEDEND); diff --git a/lib/isc/hex.c b/lib/isc/hex.c index a5813c9a40..be67f035bb 100644 --- a/lib/isc/hex.c +++ b/lib/isc/hex.c @@ -77,14 +77,14 @@ typedef struct { int val[2]; } hex_decode_ctx_t; -static inline void +static void hex_decode_init(hex_decode_ctx_t *ctx, int length, isc_buffer_t *target) { ctx->digits = 0; ctx->length = length; ctx->target = target; } -static inline isc_result_t +static isc_result_t hex_decode_char(hex_decode_ctx_t *ctx, int c) { const char *s; @@ -109,7 +109,7 @@ hex_decode_char(hex_decode_ctx_t *ctx, int c) { return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t hex_decode_finish(hex_decode_ctx_t *ctx) { if (ctx->length > 0) { return (ISC_R_UNEXPECTEDEND); diff --git a/lib/isc/httpd.c b/lib/isc/httpd.c index 1b36029518..7a1512b6f7 100644 --- a/lib/isc/httpd.c +++ b/lib/isc/httpd.c @@ -194,7 +194,7 @@ httpdmgr_attach(isc_httpdmgr_t *, isc_httpdmgr_t **); static void httpdmgr_detach(isc_httpdmgr_t **); -static inline void +static void free_buffer(isc_mem_t *mctx, isc_buffer_t *buffer) { isc_region_t r; diff --git a/lib/isc/lex.c b/lib/isc/lex.c index 9f2a9254c5..50218b78b3 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -65,7 +65,7 @@ struct isc_lex { LIST(struct inputsource) sources; }; -static inline isc_result_t +static isc_result_t grow_data(isc_lex_t *lex, size_t *remainingp, char **currp, char **prevp) { char *tmp; @@ -182,7 +182,7 @@ isc_lex_setspecials(isc_lex_t *lex, isc_lexspecials_t specials) { memmove(lex->specials, specials, 256); } -static inline isc_result_t +static isc_result_t new_source(isc_lex_t *lex, bool is_file, bool need_close, void *input, const char *name) { inputsource *source; diff --git a/lib/isc/mem.c b/lib/isc/mem.c index ea6d4cc95e..5250a28e23 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -207,7 +207,7 @@ static void print_active(isc_mem_t *ctx, FILE *out); #endif /* ISC_MEM_TRACKLINES */ -static inline size_t +static size_t increment_malloced(isc_mem_t *ctx, size_t size) { size_t malloced = atomic_fetch_add_relaxed(&ctx->malloced, size) + size; size_t maxmalloced = atomic_load_relaxed(&ctx->maxmalloced); @@ -220,7 +220,7 @@ increment_malloced(isc_mem_t *ctx, size_t size) { return (malloced); } -static inline size_t +static size_t decrement_malloced(isc_mem_t *ctx, size_t size) { size_t malloced = atomic_fetch_sub_relaxed(&ctx->malloced, size) - size; @@ -335,7 +335,7 @@ unlock: /*! * Perform a malloc, doing memory filling and overrun detection as necessary. */ -static inline void * +static void * mem_get(isc_mem_t *ctx, size_t size, int flags) { char *ret = NULL; @@ -355,7 +355,7 @@ mem_get(isc_mem_t *ctx, size_t size, int flags) { * Perform a free, doing memory filling and overrun detection as necessary. */ /* coverity[+free : arg-1] */ -static inline void +static void mem_put(isc_mem_t *ctx, void *mem, size_t size, int flags) { ADJUST_ZERO_ALLOCATION_SIZE(size); @@ -365,7 +365,7 @@ mem_put(isc_mem_t *ctx, void *mem, size_t size, int flags) { sdallocx(mem, size, flags); } -static inline void * +static void * mem_realloc(isc_mem_t *ctx, void *old_ptr, size_t old_size, size_t new_size, int flags) { void *new_ptr = NULL; @@ -395,7 +395,7 @@ mem_realloc(isc_mem_t *ctx, void *old_ptr, size_t old_size, size_t new_size, /*! * Update internal counters after a memory get. */ -static inline void +static void mem_getstats(isc_mem_t *ctx, size_t size) { struct stats *stats = stats_bucket(ctx, size); @@ -411,7 +411,7 @@ mem_getstats(isc_mem_t *ctx, size_t size) { /*! * Update internal counters after a memory put. */ -static inline void +static void mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) { struct stats *stats = stats_bucket(ctx, size); @@ -690,7 +690,7 @@ isc__mem_destroy(isc_mem_t **ctxp FLARG) { } \ } -static inline bool +static bool hi_water(isc_mem_t *ctx) { size_t inuse; size_t maxinuse; @@ -726,7 +726,7 @@ hi_water(isc_mem_t *ctx) { return (true); } -static inline bool +static bool lo_water(isc_mem_t *ctx) { size_t inuse; size_t lowater = atomic_load_relaxed(&ctx->lo_water); diff --git a/lib/isc/net.c b/lib/isc/net.c index 5525762d93..efb9ff1ccf 100644 --- a/lib/isc/net.c +++ b/lib/isc/net.c @@ -359,7 +359,7 @@ isc_net_probe_ipv6pktinfo(void) { #if ISC_CMSG_IP_TOS || defined(IPV6_TCLASS) -static inline socklen_t +static socklen_t cmsg_len(socklen_t len) { #ifdef CMSG_LEN return (CMSG_LEN(len)); @@ -375,7 +375,7 @@ cmsg_len(socklen_t len) { #endif /* ifdef CMSG_LEN */ } -static inline socklen_t +static socklen_t cmsg_space(socklen_t len) { #ifdef CMSG_SPACE return (CMSG_SPACE(len)); diff --git a/lib/isc/os.c b/lib/isc/os.c index f4731ab292..a82e92bc89 100644 --- a/lib/isc/os.c +++ b/lib/isc/os.c @@ -26,7 +26,7 @@ static unsigned long isc__os_cacheline = ISC_OS_CACHELINE_SIZE; #include -static inline long +static long sysconf_ncpus(void) { #if defined(_SC_NPROCESSORS_ONLN) return (sysconf((_SC_NPROCESSORS_ONLN))); diff --git a/lib/isc/portset.c b/lib/isc/portset.c index 6968bbc94f..52b96f5191 100644 --- a/lib/isc/portset.c +++ b/lib/isc/portset.c @@ -34,12 +34,12 @@ struct isc_portset { uint32_t buf[ISC_PORTSET_BUFSIZE]; }; -static inline bool +static bool portset_isset(isc_portset_t *portset, in_port_t port) { return ((portset->buf[port >> 5] & ((uint32_t)1 << (port & 31))) != 0); } -static inline void +static void portset_add(isc_portset_t *portset, in_port_t port) { if (!portset_isset(portset, port)) { portset->nports++; @@ -47,7 +47,7 @@ portset_add(isc_portset_t *portset, in_port_t port) { } } -static inline void +static void portset_remove(isc_portset_t *portset, in_port_t port) { if (portset_isset(portset, port)) { portset->nports--; diff --git a/lib/isc/random.c b/lib/isc/random.c index fbaf2cbccb..7eead6608b 100644 --- a/lib/isc/random.c +++ b/lib/isc/random.c @@ -83,12 +83,12 @@ */ static thread_local uint32_t seed[4] = { 0 }; -static inline uint32_t +static uint32_t rotl(const uint32_t x, int k) { return ((x << k) | (x >> (32 - k))); } -static inline uint32_t +static uint32_t next(void) { uint32_t result_starstar, t; diff --git a/lib/isc/symtab.c b/lib/isc/symtab.c index c7ed35b890..ff022a2b16 100644 --- a/lib/isc/symtab.c +++ b/lib/isc/symtab.c @@ -107,7 +107,7 @@ isc_symtab_destroy(isc_symtab_t **symtabp) { isc_mem_putanddetach(&symtab->mctx, symtab, sizeof(*symtab)); } -static inline unsigned int +static unsigned int hash(const char *key, bool case_sensitive) { const char *s; unsigned int h = 0; diff --git a/lib/isc/task.c b/lib/isc/task.c index 6dbd018c50..cd846048da 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -287,7 +287,7 @@ isc_task_attach(isc_task_t *source, isc_task_t **targetp) { *targetp = source; } -static inline bool +static bool task_shutdown(isc_task_t *task) { bool was_idle = false; isc_event_t *event, *prev; @@ -329,7 +329,7 @@ task_shutdown(isc_task_t *task) { * * Caller must NOT hold queue lock. */ -static inline void +static void task_ready(isc_task_t *task) { isc_taskmgr_t *manager = task->manager; REQUIRE(VALID_MANAGER(manager)); @@ -347,7 +347,7 @@ isc_task_ready(isc_task_t *task) { task_ready(task); } -static inline bool +static bool task_detach(isc_task_t *task) { /* * Caller must be holding the task lock. @@ -400,7 +400,7 @@ isc_task_detach(isc_task_t **taskp) { *taskp = NULL; } -static inline bool +static bool task_send(isc_task_t *task, isc_event_t **eventp, int c) { bool was_idle = false; isc_event_t *event; diff --git a/lib/isc/time.c b/lib/isc/time.c index 3e3cfd70b8..4f6c4a03c3 100644 --- a/lib/isc/time.c +++ b/lib/isc/time.c @@ -128,7 +128,7 @@ isc_time_isepoch(const isc_time_t *t) { return (false); } -static inline isc_result_t +static isc_result_t time_now(isc_time_t *t, clockid_t clock) { struct timespec ts; char strbuf[ISC_STRERRORSIZE]; diff --git a/lib/isccc/symtab.c b/lib/isccc/symtab.c index 3b461d76e1..9bd51187c1 100644 --- a/lib/isccc/symtab.c +++ b/lib/isccc/symtab.c @@ -96,7 +96,7 @@ isccc_symtab_create(unsigned int size, return (ISC_R_SUCCESS); } -static inline void +static void free_elt(isccc_symtab_t *symtab, unsigned int bucket, elt_t *elt) { ISC_LIST_UNLINK(symtab->table[bucket], elt, link); if (symtab->undefine_action != NULL) { @@ -129,7 +129,7 @@ isccc_symtab_destroy(isccc_symtab_t **symtabp) { free(symtab); } -static inline unsigned int +static unsigned int hash(const char *key, bool case_sensitive) { const char *s; unsigned int h = 0; diff --git a/lib/ns/client.c b/lib/ns/client.c index 7c291836b2..d21e6be59c 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -2983,7 +2983,7 @@ ns_client_newdbversion(ns_client_t *client, unsigned int n) { return (ISC_R_SUCCESS); } -static inline ns_dbversion_t * +static ns_dbversion_t * client_getdbversion(ns_client_t *client) { ns_dbversion_t *dbversion = NULL; diff --git a/lib/ns/query.c b/lib/ns/query.c index 253baa42d5..739f1b6688 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -160,7 +160,7 @@ #define STALE_WINDOW(r) (((r)->attributes & DNS_RDATASETATTR_STALE_WINDOW) != 0) #ifdef WANT_QUERYTRACE -static inline void +static void client_trace(ns_client_t *client, int level, const char *message) { if (client != NULL && client->query.qname != NULL) { if (isc_log_wouldlog(ns_lctx, level)) { @@ -231,7 +231,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, dns_name_t *fname, bool exact, dns_name_t *found); -static inline void +static void log_queryerror(ns_client_t *client, isc_result_t result, int line, int level); static void @@ -255,7 +255,7 @@ query_prepare_delegation_response(query_ctx_t *qctx); * Return the hooktable in use with 'qctx', or if there isn't one * set, return the default hooktable. */ -static inline ns_hooktable_t * +static ns_hooktable_t * get_hooktab(query_ctx_t *qctx) { if (qctx == NULL || qctx->view == NULL || qctx->view->hooktable == NULL) { @@ -272,7 +272,7 @@ get_hooktab(query_ctx_t *qctx) { * * (Note that a hook function may set the 'result' to ISC_R_SUCCESS but * still terminate processing within the calling function. That's why this - * is a macro instead of an inline function; it needs to be able to use + * is a macro instead of a static function; it needs to be able to use * 'goto cleanup' regardless of the return value.) */ #define CALL_HOOK(_id, _qctx) \ @@ -304,7 +304,7 @@ get_hooktab(query_ctx_t *qctx) { * codes are ignored. This is intended for use with initialization and * destruction calls which *must* run in every configured module. * - * (This could be implemented as an inline void function, but is left as a + * (This could be implemented as a static void function, but is left as a * macro for symmetry with CALL_HOOK above.) */ #define CALL_HOOK_NORETURN(_id, _qctx) \ @@ -512,7 +512,7 @@ query_clear_stale(ns_client_t *client); /* * Increment query statistics counters. */ -static inline void +static void inc_stats(ns_client_t *client, isc_statscounter_t counter) { dns_zone_t *zone = client->query.authzone; dns_rdatatype_t qtype; @@ -633,7 +633,7 @@ query_next(ns_client_t *client, isc_result_t result) { } } -static inline void +static void query_freefreeversions(ns_client_t *client, bool everything) { ns_dbversion_t *dbversion, *dbversion_next; unsigned int i; @@ -672,7 +672,7 @@ ns_query_cancel(ns_client_t *client) { UNLOCK(&client->query.fetchlock); } -static inline void +static void query_reset(ns_client_t *client, bool everything) { isc_buffer_t *dbuf, *dbuf_next; ns_dbversion_t *dbversion, *dbversion_next; @@ -924,7 +924,7 @@ query_checkcacheaccess(ns_client_t *client, const dns_name_t *name, : DNS_R_REFUSED); } -static inline isc_result_t +static isc_result_t query_validatezonedb(ns_client_t *client, const dns_name_t *name, dns_rdatatype_t qtype, unsigned int options, dns_zone_t *zone, dns_db_t *db, @@ -1093,7 +1093,7 @@ approved: return (ISC_R_SUCCESS); } -static inline isc_result_t +static isc_result_t query_getzonedb(ns_client_t *client, const dns_name_t *name, dns_rdatatype_t qtype, unsigned int options, dns_zone_t **zonep, dns_db_t **dbp, dns_dbversion_t **versionp) { @@ -1325,7 +1325,7 @@ rpz_getdb(ns_client_t *client, dns_name_t *p_name, dns_rpz_type_t rpz_type, * Find a cache database to answer the query. This may fail with DNS_R_REFUSED * if the client is not allowed to use the cache. */ -static inline isc_result_t +static isc_result_t query_getcachedb(ns_client_t *client, const dns_name_t *name, dns_rdatatype_t qtype, dns_db_t **dbp, unsigned int options) { isc_result_t result; @@ -1353,7 +1353,7 @@ query_getcachedb(ns_client_t *client, const dns_name_t *name, return (result); } -static inline isc_result_t +static isc_result_t query_getdb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype, unsigned int options, dns_zone_t **zonep, dns_db_t **dbp, dns_dbversion_t **versionp, bool *is_zonep) { @@ -1454,7 +1454,7 @@ query_getdb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype, return (result); } -static inline bool +static bool query_isduplicate(ns_client_t *client, dns_name_t *name, dns_rdatatype_t type, dns_name_t **mnamep) { dns_section_t section; @@ -2101,7 +2101,7 @@ cleanup: /* * Add 'rdataset' to 'name'. */ -static inline void +static void query_addtoname(dns_name_t *name, dns_rdataset_t *rdataset) { ISC_LIST_APPEND(name->list, rdataset, link); } @@ -2599,7 +2599,7 @@ query_prefetch(ns_client_t *client, dns_name_t *qname, ns_stats_increment(client->sctx->nsstats, ns_statscounter_prefetch); } -static inline void +static void rpz_clean(dns_zone_t **zonep, dns_db_t **dbp, dns_dbnode_t **nodep, dns_rdataset_t **rdatasetp) { if (nodep != NULL && *nodep != NULL) { @@ -2619,13 +2619,13 @@ rpz_clean(dns_zone_t **zonep, dns_db_t **dbp, dns_dbnode_t **nodep, } } -static inline void +static void rpz_match_clear(dns_rpz_st_t *st) { rpz_clean(&st->m.zone, &st->m.db, &st->m.node, &st->m.rdataset); st->m.version = NULL; } -static inline isc_result_t +static isc_result_t rpz_ready(ns_client_t *client, dns_rdataset_t **rdatasetp) { REQUIRE(rdatasetp != NULL); @@ -6085,7 +6085,7 @@ query_clear_stale(ns_client_t *client) { * answered, in order to avoid answering the query twice, when the original * fetch finishes. */ -static inline void +static void query_lookup_stale(ns_client_t *client) { query_ctx_t qctx; @@ -11604,7 +11604,7 @@ query_setup_sortlist(query_ctx_t *qctx) { * When sending a referral, if the answer to the question is * in the glue, sort it to the start of the additional section. */ -static inline void +static void query_glueanswer(query_ctx_t *qctx) { const dns_namelist_t *secs = qctx->client->message->sections; const dns_section_t section = DNS_SECTION_ADDITIONAL; @@ -11770,7 +11770,7 @@ cleanup: return (result); } -static inline void +static void log_tat(ns_client_t *client) { char namebuf[DNS_NAME_FORMATSIZE]; char clientbuf[ISC_NETADDR_FORMATSIZE]; @@ -11830,7 +11830,7 @@ log_tat(ns_client_t *client) { } } -static inline void +static void log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) { char namebuf[DNS_NAME_FORMATSIZE]; char typebuf[DNS_RDATATYPE_FORMATSIZE]; @@ -11876,7 +11876,7 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) { onbuf, ecsbuf); } -static inline void +static void log_queryerror(ns_client_t *client, isc_result_t result, int line, int level) { char namebuf[DNS_NAME_FORMATSIZE]; char typebuf[DNS_RDATATYPE_FORMATSIZE]; diff --git a/lib/ns/update.c b/lib/ns/update.c index 47f9fcafeb..2490ff88ec 100644 --- a/lib/ns/update.c +++ b/lib/ns/update.c @@ -321,7 +321,7 @@ update_log_cb(void *arg, dns_zone_t *zone, int level, const char *message) { /*% * Increment updated-related statistics counters. */ -static inline void +static void inc_stats(ns_client_t *client, dns_zone_t *zone, isc_statscounter_t counter) { ns_stats_increment(client->sctx->nsstats, counter); diff --git a/lib/ns/xfrout.c b/lib/ns/xfrout.c index 04388d522c..e2d11fa269 100644 --- a/lib/ns/xfrout.c +++ b/lib/ns/xfrout.c @@ -108,7 +108,7 @@ /**************************************************************************/ -static inline void +static void inc_stats(ns_client_t *client, dns_zone_t *zone, isc_statscounter_t counter) { ns_stats_increment(client->sctx->nsstats, counter); if (zone != NULL) { From cd13d24ba200ead6948633f9b978b254487cf2cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Sat, 5 Mar 2022 13:46:52 +0100 Subject: [PATCH 5/5] Remove workaround for ancient clang versions (<< 3.2 and << 4.0.1) Some ancient versions of clang reported uninitialized memory use false positive (see https://bugs.llvm.org/show_bug.cgi?id=14461). Since clang 4.0.1 has been long obsoleted, just remove the workarounds. (cherry picked from commit ae508c17bcf9a5c67a5c889f79624449f1e998d6) --- lib/dns/name.c | 18 ------------------ lib/dns/tsig.c | 12 ------------ 2 files changed, 30 deletions(-) diff --git a/lib/dns/name.c b/lib/dns/name.c index d9d55eb4f1..f1939d27d1 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -853,12 +853,6 @@ dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname) { REQUIRE(labels > 0); REQUIRE(dns_name_iswildcard(wname)); -#if defined(__clang__) && \ - (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 2)) - memset(&tname, 0, sizeof(tname)); -#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \ - * 3 \ - * && __clang_minor__ < 2)) */ DNS_NAME_INIT(&tname, NULL); dns_name_getlabelsequence(wname, 1, labels - 1, &tname); if (dns_name_fullcompare(name, &tname, &order, &nlabels) == @@ -1977,12 +1971,6 @@ dns_name_towire2(const dns_name_t *name, dns_compress_t *cctx, * has one. */ if (name->offsets == NULL) { -#if defined(__clang__) && \ - (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 2)) - memset(&clname, 0, sizeof(clname)); -#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \ - * 3 \ - * && __clang_minor__ < 2)) */ DNS_NAME_INIT(&clname, clo); dns_name_clone(name, &clname); name = &clname; @@ -2300,12 +2288,6 @@ dns_name_digest(const dns_name_t *name, dns_digestfunc_t digest, void *arg) { REQUIRE(VALID_NAME(name)); REQUIRE(digest != NULL); -#if defined(__clang__) && \ - (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 2)) - memset(&downname, 0, sizeof(downname)); -#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \ - * 3 \ - * && __clang_minor__ < 2)) */ DNS_NAME_INIT(&downname, NULL); isc_buffer_init(&buffer, data, sizeof(data)); diff --git a/lib/dns/tsig.c b/lib/dns/tsig.c index 5d1e612295..4daf3bdff0 100644 --- a/lib/dns/tsig.c +++ b/lib/dns/tsig.c @@ -1145,18 +1145,6 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg, return (ret); } } -#if defined(__clang__) && (__clang_major__ < 3 || \ - (__clang_major__ == 3 && __clang_minor__ < 2) || \ - (__clang_major__ == 4 && __clang_minor__ < 2)) - /* false positive: http://llvm.org/bugs/show_bug.cgi?id=14461 */ - else - { - memset(&querytsig, 0, sizeof(querytsig)); - } -#endif /* if defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == \ - * 3 \ - * && __clang_minor__ < 2) || (__clang_major__ == 4 && __clang_minor__ \ - * < 2)) */ /* * Do the key name and algorithm match that of the query?