bind9/lib/dns
Ondřej Surý cf30e7d0d1 Use switch instead of if when evaluating curves
Previously, the code would do:

    REQUIRE(alg == CURVE1 || alg == CURVE2);

    [...]

    if (alg == CURVE1) { /* code for CURVE1 */ }
    else { /* code for CURVE2 */ }

This approach is less extensible and also more prone to errors in case
the initial REQUIRE() is forgotten.  The code has been refactored to
use:

    REQUIRE(alg == CURVE1 || alg == CURVE2);

    [...]

    switch (alg) {
    case CURVE1: /* code for CURVE1 */; break;
    case CURVE2: /* code for CURVE2 */; break;
    default: INSIST(0);
    }
2020-04-20 11:40:42 +02:00
..
include Move structure declarations from dns/peer.h into peer.c 2020-04-20 08:59:09 +00:00
rdata remove or comment empty conditional branches 2020-03-17 13:28:15 -07:00
tests Refactor the isc_log API so it cannot fail on memory failures 2020-03-18 09:05:59 +01:00
win32 Disable MSB8028 warning 2020-04-15 13:37:12 +02:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c apply the modified style 2020-02-13 15:05:06 -08:00
adb.c Workaround MSVC warning C4477 2020-04-15 12:47:42 +02:00
api prep 9.17.1 2020-04-16 23:03:54 +02:00
badcache.c Workaround for clang static analyzer bug. 2020-03-02 14:12:05 +01:00
byaddr.c apply the modified style 2020-02-13 15:05:06 -08:00
cache.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
callbacks.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
catz.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
client.c Refactor the isc_log API so it cannot fail on memory failures 2020-03-18 09:05:59 +01:00
clientinfo.c apply the modified style 2020-02-13 15:05:06 -08:00
compress.c Add an arena to compressctx 2020-02-26 07:57:44 +00:00
db.c apply the modified style 2020-02-13 15:05:06 -08:00
dbiterator.c apply the modified style 2020-02-13 15:05:06 -08:00
dbtable.c apply the modified style 2020-02-13 15:05:06 -08:00
diff.c apply the modified style 2020-02-13 15:05:06 -08:00
dispatch.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dlz.c apply the modified style 2020-02-13 15:05:06 -08:00
dns64.c apply the modified style 2020-02-13 15:05:06 -08:00
dnsrps.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
dnssec.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dnstap.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dnstap.proto fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
ds.c Stop leaking OpenSSL types and defines in the isc/md.h 2020-03-17 09:11:13 +01:00
dst_api.c Finish refactoring after the removal of --with-ecdsa and --with-eddsa. 2020-04-20 11:40:41 +02:00
dst_internal.h Finish refactoring after the removal of --with-ecdsa and --with-eddsa. 2020-04-20 11:40:41 +02:00
dst_openssl.h Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dst_parse.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
dst_parse.h Reformat using the new rules 2020-02-14 09:31:05 +01:00
dst_pkcs11.h Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
dst_result.c apply the modified style 2020-02-13 15:05:06 -08:00
dyndb.c apply the modified style 2020-02-13 15:05:06 -08:00
ecdb.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
ecs.c apply the modified style 2020-02-13 15:05:06 -08:00
fixedname.c apply the modified style 2020-02-13 15:05:06 -08:00
forward.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
gen-unix.h Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
gen-win32.h Add C11 localtime_r and gmtime_r shims for Windows 2020-03-17 13:28:15 -07:00
gen.c Add C11 localtime_r and gmtime_r shims for Windows 2020-03-17 13:28:15 -07:00
geoip2.c apply the modified style 2020-02-13 15:05:06 -08:00
gssapi_link.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
gssapictx.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
hmac_link.c Stop leaking OpenSSL types and defines in the isc/md.h 2020-03-17 09:11:13 +01:00
ipkeylist.c apply the modified style 2020-02-13 15:05:06 -08:00
iptable.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
journal.c dns_journal_iter_init() can now return the size of the delta 2020-03-05 17:20:16 -08:00
kasp.c Fix race condition dnssec-policy with views 2020-03-09 14:48:17 +01:00
key.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
keydata.c apply the modified style 2020-02-13 15:05:06 -08:00
keymgr.c Address Coverity warnings in keymgr.c 2020-04-20 09:21:40 +02:00
keytable.c apply the modified style 2020-02-13 15:05:06 -08:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
lib.c apply the modified style 2020-02-13 15:05:06 -08:00
log.c apply the modified style 2020-02-13 15:05:06 -08:00
lookup.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
Makefile.in Link with LMDB only where needed 2020-03-16 09:38:15 +01:00
mapapi improve calculation of database transfer size 2020-03-05 17:20:16 -08:00
master.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
masterdump.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
message.c Fixup the missing clang-format bits 2020-02-16 17:34:24 +01:00
name.c Fixup the missing clang-format bits 2020-02-16 17:34:24 +01:00
ncache.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
nsec.c apply the modified style 2020-02-13 15:05:06 -08:00
nsec3.c apply the modified style 2020-02-13 15:05:06 -08:00
nta.c list "validate-except" entries in "rndc nta -d" and "rndc secroots" 2020-03-04 00:44:32 -08:00
openssl_link.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
openssldh_link.c Remove unnecessary forward declarations. 2020-04-20 11:40:41 +02:00
opensslecdsa_link.c Remove unnecessary forward declarations. 2020-04-20 11:40:41 +02:00
openssleddsa_link.c Remove unnecessary forward declarations. 2020-04-20 11:40:41 +02:00
opensslrsa_link.c Remove unnecessary forward declarations. 2020-04-20 11:40:41 +02:00
order.c apply the modified style 2020-02-13 15:05:06 -08:00
peer.c Move structure declarations from dns/peer.h into peer.c 2020-04-20 08:59:09 +00:00
pkcs11.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
pkcs11ecdsa_link.c Use switch instead of if when evaluating curves 2020-04-20 11:40:42 +02:00
pkcs11eddsa_link.c Use switch instead of if when evaluating curves 2020-04-20 11:40:42 +02:00
pkcs11rsa_link.c Remove unnecessary forward declarations. 2020-04-20 11:40:41 +02:00
portlist.c apply the modified style 2020-02-13 15:05:06 -08:00
private.c apply the modified style 2020-02-13 15:05:06 -08:00
rbt.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
rbtdb.c Silence missing unlock from Coverity. 2020-03-13 12:42:52 +11:00
rbtdb.h Use clang-tidy to add curly braces around one-line statements 2020-02-13 22:07:21 +01:00
rcode.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
rdata.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
rdatalist.c apply the modified style 2020-02-13 15:05:06 -08:00
rdatalist_p.h Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
rdataset.c apply the modified style 2020-02-13 15:05:06 -08:00
rdatasetiter.c apply the modified style 2020-02-13 15:05:06 -08:00
rdataslab.c improve calculation of database transfer size 2020-03-05 17:20:16 -08:00
request.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
resolver.c Fixed rebinding protection bug when using forwarder setups 2020-04-08 09:37:33 +02:00
result.c apply the modified style 2020-02-13 15:05:06 -08:00
rootns.c adjust the clang-format penalties to reduce string breaking 2020-02-17 14:23:58 -08:00
rpz.c incrementally clean up old RPZ records during updates 2020-03-31 19:41:41 -07:00
rriterator.c apply the modified style 2020-02-13 15:05:06 -08:00
rrl.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
sdb.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
sdlz.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
soa.c apply the modified style 2020-02-13 15:05:06 -08:00
spnego.asn1 Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
spnego.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
spnego.h Use clang-tidy to add curly braces around one-line statements 2020-02-13 22:07:21 +01:00
spnego_asn1.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
spnego_asn1.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
ssu.c apply the modified style 2020-02-13 15:05:06 -08:00
ssu_external.c apply the modified style 2020-02-13 15:05:06 -08:00
stats.c Replace hard coded value with constant 2020-04-03 09:27:15 +02:00
tcpmsg.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
time.c apply the modified style 2020-02-13 15:05:06 -08:00
timer.c apply the modified style 2020-02-13 15:05:06 -08:00
tkey.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
tsec.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
tsig.c Use the new sorting rules to regroup #include headers 2020-03-09 16:19:22 +01:00
tsig_p.h Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
ttl.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
update.c Replace sign operation bool with enum 2020-04-03 09:27:15 +02:00
validator.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
version.c Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
view.c fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
xfrin.c Reject AXFR streams where the message id is not consistent. 2020-04-20 18:24:12 +10:00
zone.c dnssec-policy: to sign inline or not 2020-04-16 14:22:47 +02:00
zone_p.h Reformat using the new rules 2020-02-14 09:31:05 +01:00
zonekey.c apply the modified style 2020-02-13 15:05:06 -08:00
zoneverify.c remove or comment empty conditional branches 2020-03-17 13:28:15 -07:00
zt.c Reformat using the new rules 2020-02-14 09:31:05 +01:00