]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace custom isc_boolean_t with C standard bool type
authorOndřej Surý <ondrej@sury.org>
Tue, 17 Apr 2018 15:29:14 +0000 (08:29 -0700)
committerOndřej Surý <ondrej@sury.org>
Fri, 10 Aug 2018 13:20:57 +0000 (15:20 +0200)
(cherry picked from commit 994e656977b88516d76519c437b623ddb32b0769)
(cherry picked from commit 884929400c240eb97405e0f2267225580b50394c)

556 files changed:
bin/check/check-tool.c
bin/check/check-tool.h
bin/check/named-checkconf.c
bin/check/named-checkzone.c
bin/confgen/ddns-confgen.c
bin/confgen/keygen.c
bin/confgen/rndc-confgen.c
bin/confgen/util.c
bin/delv/delv.c
bin/dig/dig.c
bin/dig/dighost.c
bin/dig/host.c
bin/dig/include/dig/dig.h
bin/dig/nslookup.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-revoke.c
bin/dnssec/dnssec-settime.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssec-verify.c
bin/dnssec/dnssectool.c
bin/dnssec/dnssectool.h
bin/named/client.c
bin/named/control.c
bin/named/controlconf.c
bin/named/fuzz.c
bin/named/include/named/client.h
bin/named/include/named/control.h
bin/named/include/named/globals.h
bin/named/include/named/interfacemgr.h
bin/named/include/named/listenlist.h
bin/named/include/named/log.h
bin/named/include/named/lwdclient.h
bin/named/include/named/lwresd.h
bin/named/include/named/lwsearch.h
bin/named/include/named/query.h
bin/named/include/named/server.h
bin/named/include/named/zoneconf.h
bin/named/interfacemgr.c
bin/named/listenlist.c
bin/named/log.c
bin/named/logconf.c
bin/named/lwdclient.c
bin/named/lwdgabn.c
bin/named/lwdgnba.c
bin/named/lwdgrbn.c
bin/named/lwresd.c
bin/named/lwsearch.c
bin/named/main.c
bin/named/notify.c
bin/named/query.c
bin/named/server.c
bin/named/statschannel.c
bin/named/tkeyconf.c
bin/named/tsigconf.c
bin/named/unix/dlz_dlopen_driver.c
bin/named/unix/include/named/os.h
bin/named/unix/os.c
bin/named/update.c
bin/named/win32/dlz_dlopen_driver.c
bin/named/win32/include/named/os.h
bin/named/win32/ntservice.c
bin/named/win32/os.c
bin/named/xfrout.c
bin/named/zoneconf.c
bin/nsupdate/nsupdate.c
bin/pkcs11/pkcs11-destroy.c
bin/pkcs11/pkcs11-keygen.c
bin/pkcs11/pkcs11-list.c
bin/pkcs11/pkcs11-tokens.c
bin/rndc/rndc.c
bin/rndc/util.c
bin/tests/cfg_test.c
bin/tests/makejournal.c
bin/tests/optional/byaddr_test.c
bin/tests/optional/byname_test.c
bin/tests/optional/db_test.c
bin/tests/optional/dst_test.c
bin/tests/optional/entropy2_test.c
bin/tests/optional/entropy_test.c
bin/tests/optional/gsstest.c
bin/tests/optional/log_test.c
bin/tests/optional/master_test.c
bin/tests/optional/name_test.c
bin/tests/optional/nsecify.c
bin/tests/optional/rbt_test.c
bin/tests/optional/shutdown_test.c
bin/tests/optional/sig0_test.c
bin/tests/optional/sym_test.c
bin/tests/optional/timer_test.c
bin/tests/optional/zone_test.c
bin/tests/pkcs11/benchmarks/create.c
bin/tests/pkcs11/benchmarks/find.c
bin/tests/pkcs11/benchmarks/genrsa.c
bin/tests/pkcs11/benchmarks/privrsa.c
bin/tests/pkcs11/benchmarks/pubrsa.c
bin/tests/pkcs11/benchmarks/random.c
bin/tests/pkcs11/benchmarks/sha1.c
bin/tests/pkcs11/benchmarks/sign.c
bin/tests/pkcs11/benchmarks/verify.c
bin/tests/pkcs11/pkcs11-hmacmd5.c
bin/tests/pkcs11/pkcs11-md5sum.c
bin/tests/system/dlzexternal/driver.c
bin/tests/system/dyndb/driver/db.c
bin/tests/system/dyndb/driver/instance.h
bin/tests/system/dyndb/driver/syncptr.c
bin/tests/system/dyndb/driver/zone.c
bin/tests/system/pipelined/pipequeries.c
bin/tests/system/tkey/keycreate.c
bin/tests/system/tkey/keydelete.c
bin/tests/wire_test.c
bin/tools/dnstap-read.c
bin/tools/genrandom.c
bin/tools/mdig.c
bin/tools/named-rrchecker.c
bin/tools/nsec3hash.c
contrib/dlz/bin/dlzbdb/dlzbdb.c
contrib/dlz/drivers/dlz_filesystem_driver.c
contrib/dlz/drivers/dlz_ldap_driver.c
contrib/dlz/drivers/include/dlz/sdlz_helper.h
contrib/dlz/drivers/sdlz_helper.c
contrib/dlz/example/README
contrib/dlz/example/dlz_example.c
contrib/dlz/modules/common/dlz_dbi.c
contrib/dlz/modules/filesystem/dlz_filesystem_dynamic.c
contrib/dlz/modules/include/dlz_dbi.h
contrib/dlz/modules/include/dlz_minimal.h
contrib/dlz/modules/ldap/dlz_ldap_dynamic.c
contrib/dlz/modules/mysqldyn/dlz_mysqldyn_mod.c
contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c
contrib/sdb/bdb/bdb.c
contrib/sdb/bdb/zone2bdb.c
contrib/sdb/ldap/zone2ldap.c
contrib/sdb/pgsql/zonetodb.c
contrib/sdb/sqlite/zone2sqlite.c
doc/design/compression
doc/design/decompression
doc/design/zone
doc/dev/dev.md
doc/dev/rdata.md
doc/dev/results
lib/bind9/check.c
lib/bind9/getaddresses.c
lib/dns/acache.c
lib/dns/acl.c
lib/dns/adb.c
lib/dns/badcache.c
lib/dns/byaddr.c
lib/dns/cache.c
lib/dns/catz.c
lib/dns/client.c
lib/dns/compress.c
lib/dns/db.c
lib/dns/dbiterator.c
lib/dns/dbtable.c
lib/dns/diff.c
lib/dns/dispatch.c
lib/dns/dlz.c
lib/dns/dns64.c
lib/dns/dnssec.c
lib/dns/dnstap.c
lib/dns/dst_api.c
lib/dns/dst_internal.h
lib/dns/dst_parse.c
lib/dns/dyndb.c
lib/dns/ecdb.c
lib/dns/forward.c
lib/dns/gen-unix.h
lib/dns/gen-win32.h
lib/dns/gen.c
lib/dns/geoip.c
lib/dns/gssapi_link.c
lib/dns/gssapictx.c
lib/dns/hmac_link.c
lib/dns/include/dns/acache.h
lib/dns/include/dns/acl.h
lib/dns/include/dns/adb.h
lib/dns/include/dns/badcache.h
lib/dns/include/dns/bit.h
lib/dns/include/dns/byaddr.h
lib/dns/include/dns/cache.h
lib/dns/include/dns/catz.h
lib/dns/include/dns/compress.h
lib/dns/include/dns/db.h
lib/dns/include/dns/dbiterator.h
lib/dns/include/dns/dispatch.h
lib/dns/include/dns/dlz.h
lib/dns/include/dns/dlz_dlopen.h
lib/dns/include/dns/dns64.h
lib/dns/include/dns/dnssec.h
lib/dns/include/dns/dnstap.h
lib/dns/include/dns/dyndb.h
lib/dns/include/dns/geoip.h
lib/dns/include/dns/iptable.h
lib/dns/include/dns/journal.h
lib/dns/include/dns/keytable.h
lib/dns/include/dns/message.h
lib/dns/include/dns/name.h
lib/dns/include/dns/ncache.h
lib/dns/include/dns/nsec.h
lib/dns/include/dns/nsec3.h
lib/dns/include/dns/nta.h
lib/dns/include/dns/peer.h
lib/dns/include/dns/portlist.h
lib/dns/include/dns/private.h
lib/dns/include/dns/rbt.h
lib/dns/include/dns/rdata.h
lib/dns/include/dns/rdataset.h
lib/dns/include/dns/rdataslab.h
lib/dns/include/dns/request.h
lib/dns/include/dns/resolver.h
lib/dns/include/dns/rpz.h
lib/dns/include/dns/rrl.h
lib/dns/include/dns/sdlz.h
lib/dns/include/dns/ssu.h
lib/dns/include/dns/timer.h
lib/dns/include/dns/tkey.h
lib/dns/include/dns/tsig.h
lib/dns/include/dns/ttl.h
lib/dns/include/dns/types.h
lib/dns/include/dns/validator.h
lib/dns/include/dns/view.h
lib/dns/include/dns/zone.h
lib/dns/include/dns/zonekey.h
lib/dns/include/dns/zt.h
lib/dns/include/dst/dst.h
lib/dns/include/dst/gssapi.h
lib/dns/iptable.c
lib/dns/journal.c
lib/dns/key.c
lib/dns/keytable.c
lib/dns/lib.c
lib/dns/lookup.c
lib/dns/master.c
lib/dns/masterdump.c
lib/dns/message.c
lib/dns/name.c
lib/dns/ncache.c
lib/dns/nsec.c
lib/dns/nsec3.c
lib/dns/nta.c
lib/dns/openssl_link.c
lib/dns/openssldh_link.c
lib/dns/openssldsa_link.c
lib/dns/opensslecdsa_link.c
lib/dns/openssleddsa_link.c
lib/dns/opensslgost_link.c
lib/dns/opensslrsa_link.c
lib/dns/order.c
lib/dns/peer.c
lib/dns/pkcs11dh_link.c
lib/dns/pkcs11dsa_link.c
lib/dns/pkcs11ecdsa_link.c
lib/dns/pkcs11eddsa_link.c
lib/dns/pkcs11gost_link.c
lib/dns/pkcs11rsa_link.c
lib/dns/portlist.c
lib/dns/private.c
lib/dns/rbt.c
lib/dns/rbtdb.c
lib/dns/rcode.c
lib/dns/rdata.c
lib/dns/rdata/any_255/tsig_250.c
lib/dns/rdata/ch_3/a_1.c
lib/dns/rdata/generic/afsdb_18.c
lib/dns/rdata/generic/avc_258.c
lib/dns/rdata/generic/caa_257.c
lib/dns/rdata/generic/cdnskey_60.c
lib/dns/rdata/generic/cds_59.c
lib/dns/rdata/generic/cert_37.c
lib/dns/rdata/generic/cname_5.c
lib/dns/rdata/generic/csync_62.c
lib/dns/rdata/generic/dlv_32769.c
lib/dns/rdata/generic/dname_39.c
lib/dns/rdata/generic/dnskey_48.c
lib/dns/rdata/generic/doa_259.c
lib/dns/rdata/generic/ds_43.c
lib/dns/rdata/generic/eui48_108.c
lib/dns/rdata/generic/eui64_109.c
lib/dns/rdata/generic/gpos_27.c
lib/dns/rdata/generic/hinfo_13.c
lib/dns/rdata/generic/hip_55.c
lib/dns/rdata/generic/ipseckey_45.c
lib/dns/rdata/generic/isdn_20.c
lib/dns/rdata/generic/key_25.c
lib/dns/rdata/generic/keydata_65533.c
lib/dns/rdata/generic/l32_105.c
lib/dns/rdata/generic/l64_106.c
lib/dns/rdata/generic/loc_29.c
lib/dns/rdata/generic/lp_107.c
lib/dns/rdata/generic/mb_7.c
lib/dns/rdata/generic/md_3.c
lib/dns/rdata/generic/mf_4.c
lib/dns/rdata/generic/mg_8.c
lib/dns/rdata/generic/minfo_14.c
lib/dns/rdata/generic/mr_9.c
lib/dns/rdata/generic/mx_15.c
lib/dns/rdata/generic/naptr_35.c
lib/dns/rdata/generic/nid_104.c
lib/dns/rdata/generic/ninfo_56.c
lib/dns/rdata/generic/ns_2.c
lib/dns/rdata/generic/nsec3_50.c
lib/dns/rdata/generic/nsec3param_51.c
lib/dns/rdata/generic/nsec_47.c
lib/dns/rdata/generic/null_10.c
lib/dns/rdata/generic/nxt_30.c
lib/dns/rdata/generic/openpgpkey_61.c
lib/dns/rdata/generic/opt_41.c
lib/dns/rdata/generic/proforma.c
lib/dns/rdata/generic/ptr_12.c
lib/dns/rdata/generic/rkey_57.c
lib/dns/rdata/generic/rp_17.c
lib/dns/rdata/generic/rrsig_46.c
lib/dns/rdata/generic/rt_21.c
lib/dns/rdata/generic/sig_24.c
lib/dns/rdata/generic/sink_40.c
lib/dns/rdata/generic/smimea_53.c
lib/dns/rdata/generic/soa_6.c
lib/dns/rdata/generic/spf_99.c
lib/dns/rdata/generic/sshfp_44.c
lib/dns/rdata/generic/ta_32768.c
lib/dns/rdata/generic/talink_58.c
lib/dns/rdata/generic/tkey_249.c
lib/dns/rdata/generic/tlsa_52.c
lib/dns/rdata/generic/txt_16.c
lib/dns/rdata/generic/unspec_103.c
lib/dns/rdata/generic/uri_256.c
lib/dns/rdata/generic/x25_19.c
lib/dns/rdata/hs_4/a_1.c
lib/dns/rdata/in_1/a6_38.c
lib/dns/rdata/in_1/a_1.c
lib/dns/rdata/in_1/aaaa_28.c
lib/dns/rdata/in_1/apl_42.c
lib/dns/rdata/in_1/apl_42.h
lib/dns/rdata/in_1/dhcid_49.c
lib/dns/rdata/in_1/kx_36.c
lib/dns/rdata/in_1/nsap-ptr_23.c
lib/dns/rdata/in_1/nsap_22.c
lib/dns/rdata/in_1/px_26.c
lib/dns/rdata/in_1/srv_33.c
lib/dns/rdata/in_1/wks_11.c
lib/dns/rdataset.c
lib/dns/rdataslab.c
lib/dns/request.c
lib/dns/resolver.c
lib/dns/rootns.c
lib/dns/rpz.c
lib/dns/rrl.c
lib/dns/sdb.c
lib/dns/sdlz.c
lib/dns/ssu.c
lib/dns/ssu_external.c
lib/dns/stats.c
lib/dns/tests/acl_test.c
lib/dns/tests/db_test.c
lib/dns/tests/dbdiff_test.c
lib/dns/tests/dbiterator_test.c
lib/dns/tests/dbversion_test.c
lib/dns/tests/dh_test.c
lib/dns/tests/dispatch_test.c
lib/dns/tests/dnstap_test.c
lib/dns/tests/dnstest.c
lib/dns/tests/dnstest.h
lib/dns/tests/dst_test.c
lib/dns/tests/geoip_test.c
lib/dns/tests/gost_test.c
lib/dns/tests/keytable_test.c
lib/dns/tests/master_test.c
lib/dns/tests/name_test.c
lib/dns/tests/nsec3_test.c
lib/dns/tests/peer_test.c
lib/dns/tests/private_test.c
lib/dns/tests/rbt_serialize_test.c
lib/dns/tests/rbt_test.c
lib/dns/tests/rdata_test.c
lib/dns/tests/rdataset_test.c
lib/dns/tests/rdatasetstats_test.c
lib/dns/tests/resolver_test.c
lib/dns/tests/rsa_test.c
lib/dns/tests/sigs_test.c
lib/dns/tests/time_test.c
lib/dns/tests/tsig_test.c
lib/dns/tests/update_test.c
lib/dns/tests/zonemgr_test.c
lib/dns/tests/zt_test.c
lib/dns/timer.c
lib/dns/tkey.c
lib/dns/tsec.c
lib/dns/tsig.c
lib/dns/ttl.c
lib/dns/update.c
lib/dns/validator.c
lib/dns/view.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/dns/zone_p.h
lib/dns/zonekey.c
lib/dns/zt.c
lib/irs/context.c
lib/irs/getaddrinfo.c
lib/irs/getnameinfo.c
lib/isc/aes.c
lib/isc/app_api.c
lib/isc/base32.c
lib/isc/base64.c
lib/isc/bind9.c
lib/isc/buffer.c
lib/isc/commandline.c
lib/isc/counter.c
lib/isc/entropy.c
lib/isc/fsaccess.c
lib/isc/hash.c
lib/isc/heap.c
lib/isc/hex.c
lib/isc/hmacmd5.c
lib/isc/hmacsha.c
lib/isc/ht.c
lib/isc/httpd.c
lib/isc/include/isc/app.h
lib/isc/include/isc/bind9.h
lib/isc/include/isc/boolean.h [deleted file]
lib/isc/include/isc/buffer.h
lib/isc/include/isc/commandline.h
lib/isc/include/isc/entropy.h
lib/isc/include/isc/file.h
lib/isc/include/isc/hash.h
lib/isc/include/isc/heap.h
lib/isc/include/isc/hmacmd5.h
lib/isc/include/isc/hmacsha.h
lib/isc/include/isc/httpd.h
lib/isc/include/isc/lex.h
lib/isc/include/isc/likely.h
lib/isc/include/isc/list.h
lib/isc/include/isc/log.h
lib/isc/include/isc/md5.h
lib/isc/include/isc/mem.h
lib/isc/include/isc/netaddr.h
lib/isc/include/isc/portset.h
lib/isc/include/isc/queue.h
lib/isc/include/isc/radix.h
lib/isc/include/isc/ratelimiter.h
lib/isc/include/isc/safe.h
lib/isc/include/isc/serial.h
lib/isc/include/isc/sha1.h
lib/isc/include/isc/sockaddr.h
lib/isc/include/isc/socket.h
lib/isc/include/isc/symtab.h
lib/isc/include/isc/task.h
lib/isc/include/isc/taskpool.h
lib/isc/include/isc/timer.h
lib/isc/include/isc/types.h
lib/isc/include/pk11/pk11.h
lib/isc/lex.c
lib/isc/lib.c
lib/isc/log.c
lib/isc/md5.c
lib/isc/mem.c
lib/isc/netaddr.c
lib/isc/nothreads/include/isc/once.h
lib/isc/pk11.c
lib/isc/portset.c
lib/isc/print.c
lib/isc/pthreads/mutex.c
lib/isc/radix.c
lib/isc/random.c
lib/isc/ratelimiter.c
lib/isc/regex.c
lib/isc/rwlock.c
lib/isc/safe.c
lib/isc/serial.c
lib/isc/sha1.c
lib/isc/sha2.c
lib/isc/sockaddr.c
lib/isc/socket_api.c
lib/isc/symtab.c
lib/isc/task.c
lib/isc/task_p.h
lib/isc/taskpool.c
lib/isc/tests/atomic_test.c
lib/isc/tests/buffer_test.c
lib/isc/tests/counter_test.c
lib/isc/tests/hash_test.c
lib/isc/tests/heap_test.c
lib/isc/tests/isctest.c
lib/isc/tests/isctest.h
lib/isc/tests/mem_test.c
lib/isc/tests/netaddr_test.c
lib/isc/tests/parse_test.c
lib/isc/tests/pool_test.c
lib/isc/tests/queue_test.c
lib/isc/tests/radix_test.c
lib/isc/tests/random_test.c
lib/isc/tests/sockaddr_test.c
lib/isc/tests/socket_test.c
lib/isc/tests/symtab_test.c
lib/isc/tests/task_test.c
lib/isc/tests/taskpool_test.c
lib/isc/tests/timer_test.c
lib/isc/timer.c
lib/isc/unix/app.c
lib/isc/unix/entropy.c
lib/isc/unix/errno.c
lib/isc/unix/errno2result.c
lib/isc/unix/errno2result.h
lib/isc/unix/file.c
lib/isc/unix/fsaccess.c
lib/isc/unix/ifiter_getifaddrs.c
lib/isc/unix/ifiter_ioctl.c
lib/isc/unix/include/isc/keyboard.h
lib/isc/unix/include/isc/time.h
lib/isc/unix/keyboard.c
lib/isc/unix/net.c
lib/isc/unix/resource.c
lib/isc/unix/socket.c
lib/isc/unix/stdtime.c
lib/isc/unix/time.c
lib/isc/win32/app.c
lib/isc/win32/condition.c
lib/isc/win32/dir.c
lib/isc/win32/entropy.c
lib/isc/win32/errno.c
lib/isc/win32/errno2result.c
lib/isc/win32/errno2result.h
lib/isc/win32/file.c
lib/isc/win32/fsaccess.c
lib/isc/win32/include/isc/dir.h
lib/isc/win32/include/isc/keyboard.h
lib/isc/win32/include/isc/time.h
lib/isc/win32/interfaceiter.c
lib/isc/win32/keyboard.c
lib/isc/win32/libisc.vcxproj.filters.in
lib/isc/win32/libisc.vcxproj.in
lib/isc/win32/socket.c
lib/isc/win32/time.c
lib/isccc/alist.c
lib/isccc/cc.c
lib/isccc/include/isccc/alist.h
lib/isccc/include/isccc/cc.h
lib/isccc/include/isccc/sexpr.h
lib/isccc/include/isccc/symtab.h
lib/isccc/include/isccc/types.h
lib/isccc/sexpr.c
lib/isccc/symtab.c
lib/isccfg/aclconf.c
lib/isccfg/include/isccfg/cfg.h
lib/isccfg/include/isccfg/grammar.h
lib/isccfg/namedconf.c
lib/isccfg/parser.c
lib/samples/nsprobe.c
lib/samples/resolve.c
lib/samples/sample-async.c
lib/samples/sample-update.c
util/check-includes.pl
util/copyrights

index 2f78904504646c866b701e2fc5639ba8a6f4ad9d..dab9e8d394cb849bf2f95d142072f4d7e36e2f87 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <inttypes.h>
 
@@ -87,15 +88,15 @@ static const char *dbtype[] = { "rbt" };
 
 int debug = 0;
 const char *journal = NULL;
-isc_boolean_t nomerge = ISC_TRUE;
+bool nomerge = true;
 #if CHECK_LOCAL
-isc_boolean_t docheckmx = ISC_TRUE;
-isc_boolean_t dochecksrv = ISC_TRUE;
-isc_boolean_t docheckns = ISC_TRUE;
+bool docheckmx = true;
+bool dochecksrv = true;
+bool docheckns = true;
 #else
-isc_boolean_t docheckmx = ISC_FALSE;
-isc_boolean_t dochecksrv = ISC_FALSE;
-isc_boolean_t docheckns = ISC_FALSE;
+bool docheckmx = false;
+bool dochecksrv = false;
+bool docheckns = false;
 #endif
 unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
                            DNS_ZONEOPT_CHECKMX |
@@ -149,7 +150,7 @@ add(char *key, int value) {
 
        if (symtab == NULL) {
                result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
-                                          ISC_FALSE, &symtab);
+                                          false, &symtab);
                if (result != ISC_R_SUCCESS)
                        return;
        }
@@ -165,20 +166,20 @@ add(char *key, int value) {
                isc_mem_free(sym_mctx, key);
 }
 
-static isc_boolean_t
+static bool
 logged(char *key, int value) {
        isc_result_t result;
 
        if (symtab == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        result = isc_symtab_lookup(symtab, key, value, NULL);
        if (result == ISC_R_SUCCESS)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
        dns_rdataset_t *a, dns_rdataset_t *aaaa)
 {
@@ -189,8 +190,8 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
        char namebuf[DNS_NAME_FORMATSIZE + 1];
        char ownerbuf[DNS_NAME_FORMATSIZE];
        char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
-       isc_boolean_t answer = ISC_TRUE;
-       isc_boolean_t match;
+       bool answer = true;
+       bool match;
        const char *type;
        void *ptr = NULL;
        int result;
@@ -239,7 +240,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                                     ownerbuf, namebuf,
                                     cur->ai_canonname);
                        /* XXX950 make fatal for 9.5.0 */
-                       /* answer = ISC_FALSE; */
+                       /* answer = false; */
                        add(namebuf, ERR_IS_CNAME);
                }
                break;
@@ -255,7 +256,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                        add(namebuf, ERR_NO_ADDRESSES);
                }
                /* XXX950 make fatal for 9.5.0 */
-               return (ISC_TRUE);
+               return (true);
 
        default:
                if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -264,7 +265,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                                     namebuf, gai_strerror(result));
                        add(namebuf, ERR_LOOKUP_FAILURE);
                }
-               return (ISC_TRUE);
+               return (true);
        }
 
        /*
@@ -275,13 +276,13 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
        result = dns_rdataset_first(a);
        while (result == ISC_R_SUCCESS) {
                dns_rdataset_current(a, &rdata);
-               match = ISC_FALSE;
+               match = false;
                for (cur = ai; cur != NULL; cur = cur->ai_next) {
                        if (cur->ai_family != AF_INET)
                                continue;
                        ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
                        if (memcmp(ptr, rdata.data, rdata.length) == 0) {
-                               match = ISC_TRUE;
+                               match = true;
                                break;
                        }
                }
@@ -293,7 +294,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                                               addrbuf, sizeof(addrbuf)));
                        add(namebuf, ERR_EXTRA_A);
                        /* XXX950 make fatal for 9.5.0 */
-                       /* answer = ISC_FALSE; */
+                       /* answer = false; */
                }
                dns_rdata_reset(&rdata);
                result = dns_rdataset_next(a);
@@ -305,13 +306,13 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
        result = dns_rdataset_first(aaaa);
        while (result == ISC_R_SUCCESS) {
                dns_rdataset_current(aaaa, &rdata);
-               match = ISC_FALSE;
+               match = false;
                for (cur = ai; cur != NULL; cur = cur->ai_next) {
                        if (cur->ai_family != AF_INET6)
                                continue;
                        ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
                        if (memcmp(ptr, rdata.data, rdata.length) == 0) {
-                               match = ISC_TRUE;
+                               match = true;
                                break;
                        }
                }
@@ -323,7 +324,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                                               addrbuf, sizeof(addrbuf)));
                        add(namebuf, ERR_EXTRA_AAAA);
                        /* XXX950 make fatal for 9.5.0. */
-                       /* answer = ISC_FALSE; */
+                       /* answer = false; */
                }
                dns_rdata_reset(&rdata);
                result = dns_rdataset_next(aaaa);
@@ -334,7 +335,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
         * Check that all addresses appear in the glue.
         */
        if (!logged(namebuf, ERR_MISSING_GLUE)) {
-               isc_boolean_t missing_glue = ISC_FALSE;
+               bool missing_glue = false;
                for (cur = ai; cur != NULL; cur = cur->ai_next) {
                        switch (cur->ai_family) {
                        case AF_INET:
@@ -350,7 +351,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                        default:
                                 continue;
                        }
-                       match = ISC_FALSE;
+                       match = false;
                        if (dns_rdataset_isassociated(rdataset))
                                result = dns_rdataset_first(rdataset);
                        else
@@ -358,7 +359,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                        while (result == ISC_R_SUCCESS && !match) {
                                dns_rdataset_current(rdataset, &rdata);
                                if (memcmp(ptr, rdata.data, rdata.length) == 0)
-                                       match = ISC_TRUE;
+                                       match = true;
                                dns_rdata_reset(&rdata);
                                result = dns_rdataset_next(rdataset);
                        }
@@ -369,8 +370,8 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
                                             inet_ntop(cur->ai_family, ptr,
                                                       addrbuf, sizeof(addrbuf)));
                                /* XXX950 make fatal for 9.5.0. */
-                               /* answer = ISC_FALSE; */
-                               missing_glue = ISC_TRUE;
+                               /* answer = false; */
+                               missing_glue = true;
                        }
                }
                if (missing_glue)
@@ -379,11 +380,11 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
        freeaddrinfo(ai);
        return (answer);
 #else
-       return (ISC_TRUE);
+       return (true);
 #endif
 }
 
-static isc_boolean_t
+static bool
 checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
 #ifdef USE_GETADDRINFO
        struct addrinfo hints, *ai, *cur;
@@ -391,7 +392,7 @@ checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
        char ownerbuf[DNS_NAME_FORMATSIZE];
        int result;
        int level = ISC_LOG_ERROR;
-       isc_boolean_t answer = ISC_TRUE;
+       bool answer = true;
 
        memset(&hints, 0, sizeof(hints));
        hints.ai_flags = AI_CANONNAME;
@@ -435,7 +436,7 @@ checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
                                        add(namebuf, ERR_IS_MXCNAME);
                                }
                                if (level == ISC_LOG_ERROR)
-                                       answer = ISC_FALSE;
+                                       answer = false;
                        }
                }
                freeaddrinfo(ai);
@@ -453,7 +454,7 @@ checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
                        add(namebuf, ERR_NO_ADDRESSES);
                }
                /* XXX950 make fatal for 9.5.0. */
-               return (ISC_TRUE);
+               return (true);
 
        default:
                if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -462,14 +463,14 @@ checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
                             namebuf, gai_strerror(result));
                        add(namebuf, ERR_LOOKUP_FAILURE);
                }
-               return (ISC_TRUE);
+               return (true);
        }
 #else
-       return (ISC_TRUE);
+       return (true);
 #endif
 }
 
-static isc_boolean_t
+static bool
 checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
 #ifdef USE_GETADDRINFO
        struct addrinfo hints, *ai, *cur;
@@ -477,7 +478,7 @@ checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
        char ownerbuf[DNS_NAME_FORMATSIZE];
        int result;
        int level = ISC_LOG_ERROR;
-       isc_boolean_t answer = ISC_TRUE;
+       bool answer = true;
 
        memset(&hints, 0, sizeof(hints));
        hints.ai_flags = AI_CANONNAME;
@@ -520,7 +521,7 @@ checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
                                        add(namebuf, ERR_IS_SRVCNAME);
                                }
                                if (level == ISC_LOG_ERROR)
-                                       answer = ISC_FALSE;
+                                       answer = false;
                        }
                }
                freeaddrinfo(ai);
@@ -538,7 +539,7 @@ checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
                        add(namebuf, ERR_NO_ADDRESSES);
                }
                /* XXX950 make fatal for 9.5.0. */
-               return (ISC_TRUE);
+               return (true);
 
        default:
                if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -547,10 +548,10 @@ checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
                                     namebuf, gai_strerror(result));
                        add(namebuf, ERR_LOOKUP_FAILURE);
                }
-               return (ISC_TRUE);
+               return (true);
        }
 #else
-       return (ISC_TRUE);
+       return (true);
 #endif
 }
 
@@ -656,7 +657,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
        if (dbiter != NULL)
                dns_dbiterator_destroy(&dbiter);
        if (version != NULL)
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
        if (db != NULL)
                dns_db_detach(&db);
 
@@ -702,8 +703,8 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
        CHECK(dns_rdataclass_fromtext(&rdclass, &region));
 
        dns_zone_setclass(zone, rdclass);
-       dns_zone_setoption(zone, zone_options, ISC_TRUE);
-       dns_zone_setoption2(zone, zone_options2, ISC_TRUE);
+       dns_zone_setoption(zone, zone_options, true);
+       dns_zone_setoption2(zone, zone_options2, true);
        dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
 
        dns_zone_setmaxttl(zone, maxttl);
@@ -795,4 +796,3 @@ DestroySockets(void) {
        WSACleanup();
 }
 #endif
-
index 8fa785012c6184f660d2db63f19e2d69daaf2ea7..a1acbe27100202803482d5eee40ad8579319dc3f 100644 (file)
@@ -16,6 +16,7 @@
 /*! \file */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/stdio.h>
@@ -46,10 +47,10 @@ void DestroySockets(void);
 
 extern int debug;
 extern const char *journal;
-extern isc_boolean_t nomerge;
-extern isc_boolean_t docheckmx;
-extern isc_boolean_t docheckns;
-extern isc_boolean_t dochecksrv;
+extern bool nomerge;
+extern bool docheckmx;
+extern bool docheckns;
+extern bool dochecksrv;
 extern unsigned int zone_options;
 extern unsigned int zone_options2;
 
index c46a1c48107adf58b39a1ba2028af422ac4bf3ec..29ff8218b773496ec9a6bed9d214ed7ea3a6c115 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <errno.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -92,18 +93,18 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
        int i;
        for (i = 0;; i++) {
                if (maps[i] == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
-                       return (ISC_TRUE);
+                       return (true);
        }
 }
 
-static isc_boolean_t
+static bool
 get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
        const cfg_listelt_t *element;
        const cfg_obj_t *checknames;
@@ -114,14 +115,14 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
 
        for (i = 0;; i++) {
                if (maps[i] == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                checknames = NULL;
                result = cfg_map_get(maps[i], "check-names", &checknames);
                if (result != ISC_R_SUCCESS)
                        continue;
                if (checknames != NULL && !cfg_obj_islist(checknames)) {
                        *obj = checknames;
-                       return (ISC_TRUE);
+                       return (true);
                }
                for (element = cfg_list_first(checknames);
                     element != NULL;
@@ -131,7 +132,7 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
                        if (strcasecmp(cfg_obj_asstring(type), "master") != 0)
                                continue;
                        *obj = cfg_tuple_get(value, "mode");
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
 }
@@ -517,11 +518,11 @@ main(int argc, char **argv) {
        isc_result_t result;
        int exit_status = 0;
        isc_entropy_t *ectx = NULL;
-       isc_boolean_t load_zones = ISC_FALSE;
-       isc_boolean_t print = ISC_FALSE;
+       bool load_zones = false;
+       bool print = false;
        unsigned int flags = 0;
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        /*
         * Process memory debugging argument first.
@@ -545,7 +546,7 @@ main(int argc, char **argv) {
                        break;
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
 
        RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
 
@@ -556,7 +557,7 @@ main(int argc, char **argv) {
                        break;
 
                case 'j':
-                       nomerge = ISC_FALSE;
+                       nomerge = false;
                        break;
 
                case 'm':
@@ -572,7 +573,7 @@ main(int argc, char **argv) {
                        break;
 
                case 'p':
-                       print = ISC_TRUE;
+                       print = true;
                        break;
 
                case 'v':
@@ -584,10 +585,10 @@ main(int argc, char **argv) {
                        break;
 
                case 'z':
-                       load_zones = ISC_TRUE;
-                       docheckmx = ISC_FALSE;
-                       docheckns = ISC_FALSE;
-                       dochecksrv = ISC_FALSE;
+                       load_zones = true;
+                       docheckmx = false;
+                       docheckns = false;
+                       dochecksrv = false;
                        break;
 
                case '?':
index 5ee7dd637dbcfdac667a8219043845371b35555a..0f491fa03d6ea786b79b3de7d4f084082f12d912 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <inttypes.h>
 
@@ -111,8 +112,8 @@ main(int argc, char **argv) {
        dns_masterrawheader_t header;
        uint32_t rawversion = 1, serialnum = 0;
        dns_ttl_t maxttl = 0;
-       isc_boolean_t snset = ISC_FALSE;
-       isc_boolean_t logdump = ISC_FALSE;
+       bool snset = false;
+       bool logdump = false;
        FILE *errout = stdout;
        char *endp;
 
@@ -162,7 +163,7 @@ main(int argc, char **argv) {
 
 #define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((c = isc_commandline_parse(argc, argv,
                               "c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
@@ -180,33 +181,33 @@ main(int argc, char **argv) {
                        if (ARGCMP("full")) {
                                zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
                                                DNS_ZONEOPT_CHECKSIBLING;
-                               docheckmx = ISC_TRUE;
-                               docheckns = ISC_TRUE;
-                               dochecksrv = ISC_TRUE;
+                               docheckmx = true;
+                               docheckns = true;
+                               dochecksrv = true;
                        } else if (ARGCMP("full-sibling")) {
                                zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
                                zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
-                               docheckmx = ISC_TRUE;
-                               docheckns = ISC_TRUE;
-                               dochecksrv = ISC_TRUE;
+                               docheckmx = true;
+                               docheckns = true;
+                               dochecksrv = true;
                        } else if (ARGCMP("local")) {
                                zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
                                zone_options |= DNS_ZONEOPT_CHECKSIBLING;
-                               docheckmx = ISC_FALSE;
-                               docheckns = ISC_FALSE;
-                               dochecksrv = ISC_FALSE;
+                               docheckmx = false;
+                               docheckns = false;
+                               dochecksrv = false;
                        } else if (ARGCMP("local-sibling")) {
                                zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
                                zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
-                               docheckmx = ISC_FALSE;
-                               docheckns = ISC_FALSE;
-                               dochecksrv = ISC_FALSE;
+                               docheckmx = false;
+                               docheckns = false;
+                               dochecksrv = false;
                        } else if (ARGCMP("none")) {
                                zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
                                zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
-                               docheckmx = ISC_FALSE;
-                               docheckns = ISC_FALSE;
-                               dochecksrv = ISC_FALSE;
+                               docheckmx = false;
+                               docheckns = false;
+                               dochecksrv = false;
                        } else {
                                fprintf(stderr, "invalid argument to -i: %s\n",
                                        isc_commandline_argument);
@@ -223,12 +224,12 @@ main(int argc, char **argv) {
                        break;
 
                case 'j':
-                       nomerge = ISC_FALSE;
+                       nomerge = false;
                        break;
 
                case 'J':
                        journal = isc_commandline_argument;
-                       nomerge = ISC_FALSE;
+                       nomerge = false;
                        break;
 
                case 'k':
@@ -249,7 +250,7 @@ main(int argc, char **argv) {
                        break;
 
                case 'L':
-                       snset = ISC_TRUE;
+                       snset = true;
                        endp = NULL;
                        serialnum = strtol(isc_commandline_argument, &endp, 0);
                        if (*endp != '\0') {
@@ -508,7 +509,7 @@ main(int argc, char **argv) {
             strcmp(output_filename, "/dev/fd/1") == 0 ||
             strcmp(output_filename, "/dev/stdout") == 0)) {
                errout = stderr;
-               logdump = ISC_FALSE;
+               logdump = false;
        }
 
        if (isc_commandline_index + 2 != argc)
index f9ed35e6245bb3abb0c40bbe502097eafcc6ff09..5220ed6995f6846082c659fb5f1b4acde1954e47 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdarg.h>
 
@@ -57,7 +58,7 @@
 static char program[256];
 const char *progname;
 static enum { progmode_keygen, progmode_confgen} progmode;
-isc_boolean_t verbose = ISC_FALSE; /* needed by util.c but not used here */
+bool verbose = false; /* needed by util.c but not used here */
 
 ISC_PLATFORM_NORETURN_PRE static void
 usage(int status) ISC_PLATFORM_NORETURN_POST;
@@ -90,8 +91,8 @@ Usage:\n\
 int
 main(int argc, char **argv) {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t show_final_mem = ISC_FALSE;
-       isc_boolean_t quiet = ISC_FALSE;
+       bool show_final_mem = false;
+       bool quiet = false;
        isc_buffer_t key_txtbuffer;
        char key_txtsecret[256];
        isc_mem_t *mctx = NULL;
@@ -128,13 +129,13 @@ main(int argc, char **argv) {
 
        if (PROGCMP("tsig-keygen")) {
                progmode = progmode_keygen;
-               quiet = ISC_TRUE;
+               quiet = true;
        } else if (PROGCMP("ddns-confgen"))
                progmode = progmode_confgen;
        else
                INSIST(0);
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((ch = isc_commandline_parse(argc, argv,
                                           "a:hk:Mmr:qs:y:z:")) != -1) {
@@ -159,11 +160,11 @@ main(int argc, char **argv) {
                        isc_mem_debugging = ISC_MEM_DEBUGTRACE;
                        break;
                case 'm':
-                       show_final_mem = ISC_TRUE;
+                       show_final_mem = true;
                        break;
                case 'q':
                        if (progmode == progmode_confgen)
-                               quiet = ISC_TRUE;
+                               quiet = true;
                        else
                                usage(1);
                        break;
index 453c641dba5aebeb6d35cee4b1924e866ec519c5..8931ad584d1cd1536d89db73f2c64696ea0c94dc 100644 (file)
@@ -226,4 +226,3 @@ write_key_file(const char *keyfile, const char *user,
                fatal("fclose(%s) failed\n", keyfile);
        fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
 }
-
index 2925baf32f12c2cfaf1b75413dc0957a3bdd5aa4..5ca3d7665cecd088e9874606aaca17320ace2acb 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdarg.h>
 
@@ -60,7 +61,7 @@
 static char program[256];
 const char *progname;
 
-isc_boolean_t verbose = ISC_FALSE;
+bool verbose = false;
 
 const char *keyfile, *keydef;
 
@@ -109,7 +110,7 @@ Usage:\n\
 
 int
 main(int argc, char **argv) {
-       isc_boolean_t show_final_mem = ISC_FALSE;
+       bool show_final_mem = false;
        isc_buffer_t key_txtbuffer;
        char key_txtsecret[256];
        isc_mem_t *mctx = NULL;
@@ -127,7 +128,7 @@ main(int argc, char **argv) {
        struct in6_addr addr6_dummy;
        char *chrootdir = NULL;
        char *user = NULL;
-       isc_boolean_t keyonly = ISC_FALSE;
+       bool keyonly = false;
        int len;
 
        keydef = keyfile = RNDC_KEYFILE;
@@ -146,14 +147,14 @@ main(int argc, char **argv) {
        serveraddr = DEFAULT_SERVER;
        port = DEFAULT_PORT;
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((ch = isc_commandline_parse(argc, argv,
                                           "aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
        {
                switch (ch) {
                case 'a':
-                       keyonly = ISC_TRUE;
+                       keyonly = true;
                        break;
                case 'A':
                        algname = isc_commandline_argument;
@@ -180,7 +181,7 @@ main(int argc, char **argv) {
                        break;
 
                case 'm':
-                       show_final_mem = ISC_TRUE;
+                       show_final_mem = true;
                        break;
                case 'p':
                        port = strtol(isc_commandline_argument, &p, 10);
@@ -204,7 +205,7 @@ main(int argc, char **argv) {
                        user = isc_commandline_argument;
                        break;
                case 'V':
-                       verbose = ISC_TRUE;
+                       verbose = true;
                        break;
                case '?':
                        if (isc_commandline_option != '?') {
index b5543a3be4d54be86bd221550caa1139ffc2d68a..0066e7cbfdd5b4f431b1f4803508c9677acbec9d 100644 (file)
 #include <config.h>
 
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <isc/boolean.h>
 #include <isc/print.h>
 
 #include "util.h"
 
-extern isc_boolean_t verbose;
+extern bool verbose;
 extern const char *progname;
 
 void
index 496843441e8e8e3c4a25c13b3e851f59648ef949..d0b5515d4a7bbb4d99fce33072ebe41b2d900f87 100644 (file)
@@ -24,6 +24,7 @@
 #include <netdb.h>
 #endif
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <stdlib.h>
@@ -95,40 +96,40 @@ static const char *port = "53";
 static isc_sockaddr_t *srcaddr4 = NULL, *srcaddr6 = NULL;
 static isc_sockaddr_t a4, a6;
 static char *curqname = NULL, *qname = NULL;
-static isc_boolean_t classset = ISC_FALSE;
+static bool classset = false;
 static dns_rdatatype_t qtype = dns_rdatatype_none;
-static isc_boolean_t typeset = ISC_FALSE;
+static bool typeset = false;
 
 static unsigned int styleflags = 0;
 static uint32_t splitwidth = 0xffffffff;
-static isc_boolean_t
-       showcomments = ISC_TRUE,
-       showdnssec = ISC_TRUE,
-       showtrust = ISC_TRUE,
-       rrcomments = ISC_TRUE,
-       noclass = ISC_FALSE,
-       nocrypto = ISC_FALSE,
-       nottl = ISC_FALSE,
-       multiline = ISC_FALSE,
-       short_form = ISC_FALSE,
-       print_unknown_format = ISC_FALSE;
-
-static isc_boolean_t
-       resolve_trace = ISC_FALSE,
-       validator_trace = ISC_FALSE,
-       message_trace = ISC_FALSE;
-
-static isc_boolean_t
-       use_ipv4 = ISC_TRUE,
-       use_ipv6 = ISC_TRUE;
-
-static isc_boolean_t
-       cdflag = ISC_FALSE,
-       no_sigs = ISC_FALSE,
-       root_validation = ISC_TRUE,
-       dlv_validation = ISC_TRUE;
-
-static isc_boolean_t use_tcp = ISC_FALSE;
+static bool
+       showcomments = true,
+       showdnssec = true,
+       showtrust = true,
+       rrcomments = true,
+       noclass = false,
+       nocrypto = false,
+       nottl = false,
+       multiline = false,
+       short_form = false,
+       print_unknown_format = false;
+
+static bool
+       resolve_trace = false,
+       validator_trace = false,
+       message_trace = false;
+
+static bool
+       use_ipv4 = true,
+       use_ipv6 = true;
+
+static bool
+       cdflag = false,
+       no_sigs = false,
+       root_validation = true,
+       dlv_validation = true;
+
+static bool use_tcp = false;
 
 static char *anchorfile = NULL;
 static char *trust_anchor = NULL;
@@ -145,7 +146,7 @@ static char anchortext[] = MANAGED_KEYS;
  * Static function prototypes
  */
 static isc_result_t
-get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict);
+get_reverse(char *reverse, size_t len, char *value, bool strict);
 
 static isc_result_t
 parse_uint(uint32_t *uip, const char *value, uint32_t max,
@@ -409,7 +410,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
 {
        isc_result_t result = ISC_R_SUCCESS;
        static dns_trust_t trust;
-       static isc_boolean_t first = ISC_TRUE;
+       static bool first = true;
        isc_buffer_t target;
        isc_region_t r;
        char *t = NULL;
@@ -431,7 +432,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
                        putchar('\n');
                print_status(rdataset);
                trust = rdataset->trust;
-               first = ISC_FALSE;
+               first = false;
        }
 
        do {
@@ -577,7 +578,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
        dns_fixedname_t fkeyname;
        dns_name_t *keyname;
        isc_result_t result;
-       isc_boolean_t match_root = ISC_FALSE, match_dlv = ISC_FALSE;
+       bool match_root = false, match_dlv = false;
 
        keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
        CHECK(convert_name(&fkeyname, &keyname, keynamestr));
@@ -977,7 +978,7 @@ plus_option(char *option) {
        isc_result_t result;
        char option_store[256];
        char *cmd, *value, *ptr;
-       isc_boolean_t state = ISC_TRUE;
+       bool state = true;
 
        strlcpy(option_store, option, sizeof(option_store));
        ptr = option_store;
@@ -989,7 +990,7 @@ plus_option(char *option) {
        value = ptr;
        if (strncasecmp(cmd, "no", 2)==0) {
                cmd += 2;
-               state = ISC_FALSE;
+               state = false;
        }
 
 #define FULLCHECK(A) \
@@ -1014,7 +1015,7 @@ plus_option(char *option) {
                        break;
                case 'l': /* class */
                        FULLCHECK("class");
-                       noclass = ISC_TF(!state);
+                       noclass = !state;
                        break;
                case 'o': /* comments */
                        FULLCHECK("comments");
@@ -1022,7 +1023,7 @@ plus_option(char *option) {
                        break;
                case 'r': /* crypto */
                        FULLCHECK("crypto");
-                       nocrypto = ISC_TF(!state);
+                       nocrypto = !state;
                        break;
                default:
                        goto invalid_option;
@@ -1095,10 +1096,10 @@ plus_option(char *option) {
                        FULLCHECK("short");
                        short_form = state;
                        if (short_form) {
-                               multiline = ISC_FALSE;
-                               showcomments = ISC_FALSE;
-                               showtrust = ISC_FALSE;
-                               showdnssec = ISC_FALSE;
+                               multiline = false;
+                               showcomments = false;
+                               showtrust = false;
+                               showdnssec = false;
                        }
                        break;
                case 'p': /* split */
@@ -1150,7 +1151,7 @@ plus_option(char *option) {
                        break;
                case 't': /* ttl */
                        FULLCHECK("ttl");
-                       nottl = ISC_TF(!state);
+                       nottl = !state;
                        break;
                default:
                        goto invalid_option;
@@ -1178,11 +1179,11 @@ plus_option(char *option) {
  * options: "46a:b:c:d:himp:q:t:vx:";
  */
 static const char *single_dash_opts = "46himv";
-static isc_boolean_t
-dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
+static bool
+dash_option(char *option, char *next, bool *open_type_class) {
        char opt, *value;
        isc_result_t result;
-       isc_boolean_t value_from_next;
+       bool value_from_next;
        isc_textregion_t tr;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
@@ -1206,7 +1207,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                                fatal("IPv4 networking not available");
                        if (use_ipv6) {
                                isc_net_disableipv6();
-                               use_ipv6 = ISC_FALSE;
+                               use_ipv6 = false;
                        }
                        break;
                case '6':
@@ -1214,7 +1215,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                                fatal("IPv6 networking not available");
                        if (use_ipv4) {
                                isc_net_disableipv4();
-                               use_ipv4 = ISC_FALSE;
+                               use_ipv4 = false;
                        }
                        break;
                case 'h':
@@ -1222,9 +1223,9 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                        exit(0);
                        /* NOTREACHED */
                case 'i':
-                       no_sigs = ISC_TRUE;
-                       dlv_validation = ISC_FALSE;
-                       root_validation = ISC_FALSE;
+                       no_sigs = true;
+                       dlv_validation = false;
+                       root_validation = false;
                        break;
                case 'm':
                        /* handled in preparse_args() */
@@ -1239,14 +1240,14 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                if (strlen(option) > 1U)
                        option = &option[1];
                else
-                       return (ISC_FALSE);
+                       return (false);
        }
        opt = option[0];
        if (strlen(option) > 1U) {
-               value_from_next = ISC_FALSE;
+               value_from_next = false;
                value = &option[1];
        } else {
-               value_from_next = ISC_TRUE;
+               value_from_next = true;
                value = next;
        }
        if (value == NULL)
@@ -1292,13 +1293,13 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                if (classset)
                        warn("extra query class");
 
-               *open_type_class = ISC_FALSE;
+               *open_type_class = false;
                tr.base = value;
                tr.length = strlen(value);
                result = dns_rdataclass_fromtext(&rdclass,
                                                 (isc_textregion_t *)&tr);
                if (result == ISC_R_SUCCESS)
-                       classset = ISC_TRUE;
+                       classset = true;
                else if (rdclass != dns_rdataclass_in)
                        warn("ignoring non-IN query class");
                else
@@ -1323,7 +1324,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                        fatal("out of memory");
                return (value_from_next);
        case 't':
-               *open_type_class = ISC_FALSE;
+               *open_type_class = false;
                tr.base = value;
                tr.length = strlen(value);
                result = dns_rdatatype_fromtext(&rdtype,
@@ -1335,13 +1336,13 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                            rdtype == dns_rdatatype_axfr)
                                fatal("Transfer not supported");
                        qtype = rdtype;
-                       typeset = ISC_TRUE;
+                       typeset = true;
                } else
                        warn("ignoring invalid type");
                return (value_from_next);
        case 'x':
                result = get_reverse(textname, sizeof(textname), value,
-                                    ISC_FALSE);
+                                    false);
                if (result == ISC_R_SUCCESS) {
                        if (curqname != NULL) {
                                isc_mem_free(mctx, curqname);
@@ -1353,7 +1354,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                        if (typeset)
                                warn("extra query type");
                        qtype = dns_rdatatype_ptr;
-                       typeset = ISC_TRUE;
+                       typeset = true;
                } else {
                        fprintf(stderr, "Invalid IP address %s\n", value);
                        exit(1);
@@ -1365,7 +1366,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
                usage();
        }
        /* NOTREACHED */
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -1374,7 +1375,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
  */
 static void
 preparse_args(int argc, char **argv) {
-       isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
+       bool ipv4only = false, ipv6only = false;
        char *option;
 
        for (argc--, argv++; argc > 0; argc--, argv++) {
@@ -1391,13 +1392,13 @@ preparse_args(int argc, char **argv) {
                                if (ipv6only) {
                                        fatal("only one of -4 and -6 allowed");
                                }
-                               ipv4only = ISC_TRUE;
+                               ipv4only = true;
                                break;
                        case '6':
                                if (ipv4only) {
                                        fatal("only one of -4 and -6 allowed");
                                }
-                               ipv6only = ISC_TRUE;
+                               ipv6only = true;
                                break;
                        }
                        option = &option[1];
@@ -1417,7 +1418,7 @@ parse_args(int argc, char **argv) {
        isc_textregion_t tr;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
-       isc_boolean_t open_type_class = ISC_TRUE;
+       bool open_type_class = true;
 
        for (; argc > 0; argc--, argv++) {
                if (argv[0][0] == '@') {
@@ -1456,7 +1457,7 @@ parse_args(int argc, char **argv) {
                                            rdtype == dns_rdatatype_axfr)
                                                fatal("Transfer not supported");
                                        qtype = rdtype;
-                                       typeset = ISC_TRUE;
+                                       typeset = true;
                                        continue;
                                }
                                result = dns_rdataclass_fromtext(&rdclass,
@@ -1525,7 +1526,7 @@ reverse_octets(const char *in, char **p, char *end) {
 }
 
 static isc_result_t
-get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
+get_reverse(char *reverse, size_t len, char *value, bool strict) {
        int r;
        isc_result_t result;
        isc_netaddr_t addr;
index 66609d726f1137869c6705a0b3bd6dc75497b562..39f74be3b323cef2946d202bdb2b886e3d65fe4d 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 #include <ctype.h>
@@ -63,12 +64,12 @@ static int addresscount = 0;
 static char domainopt[DNS_NAME_MAXTEXT];
 static char hexcookie[81];
 
-static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
-       ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
-       multiline = ISC_FALSE, nottl = ISC_FALSE, noclass = ISC_FALSE,
-       onesoa = ISC_FALSE, use_usec = ISC_FALSE,
-       nocrypto = ISC_FALSE, ttlunits = ISC_FALSE,
-       ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
+static bool short_form = false, printcmd = true,
+       ip6_int = false, plusquest = false, pluscomm = false,
+       multiline = false, nottl = false, noclass = false,
+       onesoa = false, use_usec = false,
+       nocrypto = false, ttlunits = false,
+       ipv4only = false, ipv6only = false;
 static uint32_t splitwidth = 0xffffffff;
 
 /*% rrcomments are neither explicitly enabled nor disabled by default */
@@ -437,7 +438,7 @@ printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
        unsigned int styleflags = 0;
 
        if (rdataset == NULL || owner_name == NULL || target == NULL)
-               return(ISC_FALSE);
+               return(false);
 
        styleflags |= DNS_STYLEFLAG_REL_OWNER;
        if (ttlunits)
@@ -487,7 +488,7 @@ printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
 }
 #endif
 
-static isc_boolean_t
+static bool
 isdotlocal(dns_message_t *msg) {
        isc_result_t result;
        static unsigned char local_ndata[] = { "\005local\0" };
@@ -502,16 +503,16 @@ isdotlocal(dns_message_t *msg) {
                dns_name_t *name = NULL;
                dns_message_currentname(msg, DNS_SECTION_QUESTION, &name);
                if (dns_name_issubdomain(name, &local))
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
  * Callback from dighost.c to print the reply from a server
  */
 static isc_result_t
-printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
+printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
        isc_result_t result;
        dns_messagetextflag_t flags;
        isc_buffer_t *buf = NULL;
@@ -753,7 +754,7 @@ cleanup:
 static void
 printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
        int i;
-       static isc_boolean_t first = ISC_TRUE;
+       static bool first = true;
        char append[MXNAME];
 
        if (printcmd) {
@@ -780,7 +781,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
                                 ";; global options:%s%s\n",
                                 short_form ? " +short" : "",
                                 printcmd ? " +cmd" : "");
-                       first = ISC_FALSE;
+                       first = false;
                        strlcat(lookup->cmdline, append,
                                sizeof(lookup->cmdline));
                }
@@ -795,14 +796,14 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
  */
 
 static void
-plus_option(const char *option, isc_boolean_t is_batchfile,
+plus_option(const char *option, bool is_batchfile,
            dig_lookup_t *lookup)
 {
        isc_result_t result;
        char option_store[256];
        char *cmd, *value, *ptr, *code;
        uint32_t num;
-       isc_boolean_t state = ISC_TRUE;
+       bool state = true;
        size_t n;
 
        strlcpy(option_store, option, sizeof(option_store));
@@ -815,7 +816,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
        value = ptr;
        if (strncasecmp(cmd, "no", 2)==0) {
                cmd += 2;
-               state = ISC_FALSE;
+               state = false;
        }
 
 #define FULLCHECK(A) \
@@ -918,7 +919,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                case 'l': /* class */
                        /* keep +cl for backwards compatibility */
                        FULLCHECK2("cl", "class");
-                       noclass = ISC_TF(!state);
+                       noclass = !state;
                        break;
                case 'm': /* cmd */
                        FULLCHECK("cmd");
@@ -952,7 +953,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                        break;
                case 'r':
                        FULLCHECK("crypto");
-                       nocrypto = ISC_TF(!state);
+                       nocrypto = !state;
                        break;
                default:
                        goto invalid_option;
@@ -1181,17 +1182,17 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                                FULLCHECK("nssearch");
                                lookup->ns_search_only = state;
                                if (state) {
-                                       lookup->trace_root = ISC_TRUE;
-                                       lookup->recurse = ISC_TRUE;
-                                       lookup->identify = ISC_TRUE;
-                                       lookup->stats = ISC_FALSE;
-                                       lookup->comments = ISC_FALSE;
-                                       lookup->section_additional = ISC_FALSE;
-                                       lookup->section_authority = ISC_FALSE;
-                                       lookup->section_question = ISC_FALSE;
+                                       lookup->trace_root = true;
+                                       lookup->recurse = true;
+                                       lookup->identify = true;
+                                       lookup->stats = false;
+                                       lookup->comments = false;
+                                       lookup->section_additional = false;
+                                       lookup->section_authority = false;
+                                       lookup->section_question = false;
                                        lookup->rdtype = dns_rdatatype_ns;
-                                       lookup->rdtypeset = ISC_TRUE;
-                                       short_form = ISC_TRUE;
+                                       lookup->rdtypeset = true;
+                                       short_form = true;
                                        rrcomments = 0;
                                }
                                break;
@@ -1304,13 +1305,13 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                                FULLCHECK("short");
                                short_form = state;
                                if (state) {
-                                       printcmd = ISC_FALSE;
-                                       lookup->section_additional = ISC_FALSE;
-                                       lookup->section_answer = ISC_TRUE;
-                                       lookup->section_authority = ISC_FALSE;
-                                       lookup->section_question = ISC_FALSE;
-                                       lookup->comments = ISC_FALSE;
-                                       lookup->stats = ISC_FALSE;
+                                       printcmd = false;
+                                       lookup->section_additional = false;
+                                       lookup->section_answer = true;
+                                       lookup->section_authority = false;
+                                       lookup->section_question = false;
+                                       lookup->comments = false;
+                                       lookup->stats = false;
                                        rrcomments = -1;
                                }
                                break;
@@ -1330,7 +1331,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                        FULLCHECK("sigchase");
                        lookup->sigchase = state;
                        if (lookup->sigchase)
-                               lookup->dnssec = ISC_TRUE;
+                               lookup->dnssec = true;
                        break;
 #endif
                case 'p': /* split */
@@ -1398,7 +1399,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                        FULLCHECK("tcp");
                        if (!is_batchfile) {
                                lookup->tcp_mode = state;
-                               lookup->tcp_mode_set = ISC_TRUE;
+                               lookup->tcp_mode_set = true;
                        }
                        break;
                case 'i': /* timeout */
@@ -1427,17 +1428,17 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                                lookup->trace = state;
                                lookup->trace_root = state;
                                if (state) {
-                                       lookup->recurse = ISC_FALSE;
-                                       lookup->identify = ISC_TRUE;
-                                       lookup->comments = ISC_FALSE;
+                                       lookup->recurse = false;
+                                       lookup->identify = true;
+                                       lookup->comments = false;
                                        rrcomments = 0;
-                                       lookup->stats = ISC_FALSE;
-                                       lookup->section_additional = ISC_FALSE;
-                                       lookup->section_authority = ISC_TRUE;
-                                       lookup->section_question = ISC_FALSE;
-                                       lookup->dnssec = ISC_TRUE;
-                                       lookup->sendcookie = ISC_TRUE;
-                                       usesearch = ISC_FALSE;
+                                       lookup->stats = false;
+                                       lookup->section_additional = false;
+                                       lookup->section_authority = true;
+                                       lookup->section_question = false;
+                                       lookup->dnssec = true;
+                                       lookup->sendcookie = true;
+                                       usesearch = false;
                                }
                                break;
                        case 'i': /* tries */
@@ -1477,12 +1478,12 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                                case 0:
                                case 'i': /* ttlid */
                                        FULLCHECK2("ttl", "ttlid");
-                                       nottl = ISC_TF(!state);
+                                       nottl = !state;
                                        break;
                                case 'u': /* ttlunits */
                                        FULLCHECK("ttlunits");
-                                       nottl = ISC_FALSE;
-                                       ttlunits = ISC_TF(state);
+                                       nottl = false;
+                                       ttlunits = state;
                                        break;
                                default:
                                        goto invalid_option;
@@ -1504,7 +1505,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
                FULLCHECK("vc");
                if (!is_batchfile) {
                        lookup->tcp_mode = state;
-                       lookup->tcp_mode_set = ISC_TRUE;
+                       lookup->tcp_mode_set = true;
                }
                break;
        case 'z': /* zflag */
@@ -1522,19 +1523,19 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
 }
 
 /*%
- * #ISC_TRUE returned if value was used
+ * #true returned if value was used
  */
 static const char *single_dash_opts = "46dhimnuv";
 static const char *dash_opts = "46bcdfhikmnptvyx";
-static isc_boolean_t
+static bool
 dash_option(char *option, char *next, dig_lookup_t **lookup,
-           isc_boolean_t *open_type_class, isc_boolean_t *need_clone,
-           isc_boolean_t config_only, int argc, char **argv,
-           isc_boolean_t *firstarg)
+           bool *open_type_class, bool *need_clone,
+           bool config_only, int argc, char **argv,
+           bool *firstarg)
 {
        char opt, *value, *ptr, *ptr2, *ptr3;
        isc_result_t result;
-       isc_boolean_t value_from_next;
+       bool value_from_next;
        isc_textregion_t tr;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
@@ -1556,21 +1557,21 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                case '4':
                        if (have_ipv4) {
                                isc_net_disableipv6();
-                               have_ipv6 = ISC_FALSE;
+                               have_ipv6 = false;
                        } else {
                                fatal("can't find IPv4 networking");
                                /* NOTREACHED */
-                               return (ISC_FALSE);
+                               return (false);
                        }
                        break;
                case '6':
                        if (have_ipv6) {
                                isc_net_disableipv4();
-                               have_ipv4 = ISC_FALSE;
+                               have_ipv4 = false;
                        } else {
                                fatal("can't find IPv6 networking");
                                /* NOTREACHED */
-                               return (ISC_FALSE);
+                               return (false);
                        }
                        break;
                case 'd':
@@ -1578,17 +1579,17 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        if (ptr != &option[1]) {
                                cmd = option;
                                FULLCHECK("debug");
-                               debugging = ISC_TRUE;
-                               return (ISC_FALSE);
+                               debugging = true;
+                               return (false);
                        } else
-                               debugging = ISC_TRUE;
+                               debugging = true;
                        break;
                case 'h':
                        help();
                        exit(0);
                        break;
                case 'i':
-                       ip6_int = ISC_TRUE;
+                       ip6_int = true;
                        break;
                case 'm': /* memdebug */
                        /* memdebug is handled in preparse_args() */
@@ -1597,7 +1598,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        /* deprecated */
                        break;
                case 'u':
-                       use_usec = ISC_TRUE;
+                       use_usec = true;
                        break;
                case 'v':
                        version();
@@ -1607,14 +1608,14 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                if (strlen(option) > 1U)
                        option = &option[1];
                else
-                       return (ISC_FALSE);
+                       return (false);
        }
        opt = option[0];
        if (strlen(option) > 1U) {
-               value_from_next = ISC_FALSE;
+               value_from_next = false;
                value = &option[1];
        } else {
-               value_from_next = ISC_TRUE;
+               value_from_next = true;
                value = next;
        }
        if (value == NULL)
@@ -1644,20 +1645,20 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                }
                if (hash != NULL)
                        *hash = '#';
-               specified_source = ISC_TRUE;
+               specified_source = true;
                return (value_from_next);
        case 'c':
                if ((*lookup)->rdclassset) {
                        fprintf(stderr, ";; Warning, extra class option\n");
                }
-               *open_type_class = ISC_FALSE;
+               *open_type_class = false;
                tr.base = value;
                tr.length = (unsigned int) strlen(value);
                result = dns_rdataclass_fromtext(&rdclass,
                                                 (isc_textregion_t *)&tr);
                if (result == ISC_R_SUCCESS) {
                        (*lookup)->rdclass = rdclass;
-                       (*lookup)->rdclassset = ISC_TRUE;
+                       (*lookup)->rdclassset = true;
                } else
                        fprintf(stderr, ";; Warning, ignoring "
                                "invalid class %s\n",
@@ -1679,23 +1680,23 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                if (!config_only) {
                        if (*need_clone)
                                (*lookup) = clone_lookup(default_lookup,
-                                                        ISC_TRUE);
-                       *need_clone = ISC_TRUE;
+                                                        true);
+                       *need_clone = true;
                        strlcpy((*lookup)->textname, value,
                                sizeof((*lookup)->textname));
-                       (*lookup)->trace_root = ISC_TF((*lookup)->trace  ||
-                                                    (*lookup)->ns_search_only);
-                       (*lookup)->new_search = ISC_TRUE;
+                       (*lookup)->trace_root = ((*lookup)->trace  ||
+                                                (*lookup)->ns_search_only);
+                       (*lookup)->new_search = true;
                        if (*firstarg) {
                                printgreeting(argc, argv, *lookup);
-                               *firstarg = ISC_FALSE;
+                               *firstarg = false;
                        }
                        ISC_LIST_APPEND(lookup_list, (*lookup), link);
                        debug("looking up %s", (*lookup)->textname);
                }
                return (value_from_next);
        case 't':
-               *open_type_class = ISC_FALSE;
+               *open_type_class = false;
                if (strncasecmp(value, "ixfr=", 5) == 0) {
                        rdtype = dns_rdatatype_ixfr;
                        result = ISC_R_SUCCESS;
@@ -1717,7 +1718,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        if (rdtype == dns_rdatatype_ixfr) {
                                uint32_t serial;
                                (*lookup)->rdtype = dns_rdatatype_ixfr;
-                               (*lookup)->rdtypeset = ISC_TRUE;
+                               (*lookup)->rdtypeset = true;
                                result = parse_uint(&serial, &value[5],
                                           MAXSERIAL, "serial number");
                                if (result != ISC_R_SUCCESS)
@@ -1726,19 +1727,19 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                                (*lookup)->section_question = plusquest;
                                (*lookup)->comments = pluscomm;
                                if (!(*lookup)->tcp_mode_set)
-                                       (*lookup)->tcp_mode = ISC_TRUE;
+                                       (*lookup)->tcp_mode = true;
                        } else {
                                (*lookup)->rdtype = rdtype;
                                if (!config_only)
-                                       (*lookup)->rdtypeset = ISC_TRUE;
+                                       (*lookup)->rdtypeset = true;
                                if (rdtype == dns_rdatatype_axfr) {
                                        (*lookup)->section_question = plusquest;
                                        (*lookup)->comments = pluscomm;
                                } else if (rdtype == dns_rdatatype_any) {
                                        if (!(*lookup)->tcp_mode_set)
-                                               (*lookup)->tcp_mode = ISC_TRUE;
+                                               (*lookup)->tcp_mode = true;
                                }
-                               (*lookup)->ixfr_serial = ISC_FALSE;
+                               (*lookup)->ixfr_serial = false;
                        }
                } else
                        fprintf(stderr, ";; Warning, ignoring "
@@ -1771,24 +1772,24 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                return (value_from_next);
        case 'x':
                if (*need_clone)
-                       *lookup = clone_lookup(default_lookup, ISC_TRUE);
-               *need_clone = ISC_TRUE;
+                       *lookup = clone_lookup(default_lookup, true);
+               *need_clone = true;
                if (get_reverse(textname, sizeof(textname), value,
-                               ip6_int, ISC_FALSE) == ISC_R_SUCCESS) {
+                               ip6_int, false) == ISC_R_SUCCESS) {
                        strlcpy((*lookup)->textname, textname,
                                sizeof((*lookup)->textname));
                        debug("looking up %s", (*lookup)->textname);
-                       (*lookup)->trace_root = ISC_TF((*lookup)->trace  ||
-                                               (*lookup)->ns_search_only);
+                       (*lookup)->trace_root = ((*lookup)->trace  ||
+                                                (*lookup)->ns_search_only);
                        (*lookup)->ip6_int = ip6_int;
                        if (!(*lookup)->rdtypeset)
                                (*lookup)->rdtype = dns_rdatatype_ptr;
                        if (!(*lookup)->rdclassset)
                                (*lookup)->rdclass = dns_rdataclass_in;
-                       (*lookup)->new_search = ISC_TRUE;
+                       (*lookup)->new_search = true;
                        if (*firstarg) {
                                printgreeting(argc, argv, *lookup);
-                               *firstarg = ISC_FALSE;
+                               *firstarg = false;
                        }
                        ISC_LIST_APPEND(lookup_list, *lookup, link);
                } else {
@@ -1802,7 +1803,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                usage();
        }
        /* NOTREACHED */
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%
@@ -1829,19 +1830,19 @@ preparse_args(int argc, char **argv) {
                while (strpbrk(option, single_dash_opts) == &option[0]) {
                        switch (option[0]) {
                        case 'm':
-                               memdebugging = ISC_TRUE;
+                               memdebugging = true;
                                isc_mem_debugging = ISC_MEM_DEBUGTRACE |
                                        ISC_MEM_DEBUGRECORD;
                                break;
                        case '4':
                                if (ipv6only)
                                        fatal("only one of -4 and -6 allowed");
-                               ipv4only = ISC_TRUE;
+                               ipv4only = true;
                                break;
                        case '6':
                                if (ipv4only)
                                        fatal("only one of -4 and -6 allowed");
-                               ipv6only = ISC_TRUE;
+                               ipv6only = true;
                                break;
                        }
                        option = &option[1];
@@ -1850,16 +1851,16 @@ preparse_args(int argc, char **argv) {
 }
 
 static void
-parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
+parse_args(bool is_batchfile, bool config_only,
           int argc, char **argv)
 {
        isc_result_t result;
        isc_textregion_t tr;
-       isc_boolean_t firstarg = ISC_TRUE;
+       bool firstarg = true;
        dig_lookup_t *lookup = NULL;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
-       isc_boolean_t open_type_class = ISC_TRUE;
+       bool open_type_class = true;
        char batchline[MXNAME];
        int bargc;
        char *bargv[64];
@@ -1871,7 +1872,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
 #endif
        char *input;
        int i;
-       isc_boolean_t need_clone = ISC_TRUE;
+       bool need_clone = true;
 
        /*
         * The semantics for parsing the args is a bit complex; if
@@ -1888,9 +1889,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
        if (!is_batchfile) {
                debug("making new lookup");
                default_lookup = make_empty_lookup();
-               default_lookup->adflag = ISC_TRUE;
+               default_lookup->adflag = true;
                default_lookup->edns = 0;
-               default_lookup->sendcookie = ISC_TRUE;
+               default_lookup->sendcookie = true;
 
 #ifndef NOPOSIX
                /*
@@ -1924,7 +1925,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                for(i = 0; i < bargc; i++)
                                        debug(".digrc argv %d: %s",
                                              i, bargv[i]);
-                               parse_args(ISC_TRUE, ISC_TRUE, bargc,
+                               parse_args(true, true, bargc,
                                           (char **)bargv);
                        }
                        fclose(batchfp);
@@ -1934,8 +1935,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
 
        if (is_batchfile && !config_only) {
                /* Processing '-f batchfile'. */
-               lookup = clone_lookup(default_lookup, ISC_TRUE);
-               need_clone = ISC_FALSE;
+               lookup = clone_lookup(default_lookup, true);
+               need_clone = false;
        } else
                lookup = default_lookup;
 
@@ -2020,7 +2021,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                                uint32_t serial;
                                                lookup->rdtype =
                                                        dns_rdatatype_ixfr;
-                                               lookup->rdtypeset = ISC_TRUE;
+                                               lookup->rdtypeset = true;
                                                result = parse_uint(&serial,
                                                                    &rv[0][5],
                                                                    MAXSERIAL,
@@ -2033,10 +2034,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                                        plusquest;
                                                lookup->comments = pluscomm;
                                                if (!lookup->tcp_mode_set)
-                                                       lookup->tcp_mode = ISC_TRUE;
+                                                       lookup->tcp_mode = true;
                                        } else {
                                                lookup->rdtype = rdtype;
-                                               lookup->rdtypeset = ISC_TRUE;
+                                               lookup->rdtypeset = true;
                                                if (rdtype ==
                                                    dns_rdatatype_axfr) {
                                                    lookup->section_question =
@@ -2046,8 +2047,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                                if (rdtype ==
                                                    dns_rdatatype_any &&
                                                    !lookup->tcp_mode_set)
-                                                       lookup->tcp_mode = ISC_TRUE;
-                                               lookup->ixfr_serial = ISC_FALSE;
+                                                       lookup->tcp_mode = true;
+                                               lookup->ixfr_serial = false;
                                        }
                                        continue;
                                }
@@ -2059,7 +2060,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                                                        "extra class option\n");
                                        }
                                        lookup->rdclass = rdclass;
-                                       lookup->rdclassset = ISC_TRUE;
+                                       lookup->rdclassset = true;
                                        continue;
                                }
                        }
@@ -2067,16 +2068,16 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                        if (!config_only) {
                                if (need_clone)
                                        lookup = clone_lookup(default_lookup,
-                                                                     ISC_TRUE);
-                               need_clone = ISC_TRUE;
+                                                                     true);
+                               need_clone = true;
                                strlcpy(lookup->textname, rv[0],
                                        sizeof(lookup->textname));
-                               lookup->trace_root = ISC_TF(lookup->trace  ||
-                                                    lookup->ns_search_only);
-                               lookup->new_search = ISC_TRUE;
+                               lookup->trace_root = (lookup->trace  ||
+                                                     lookup->ns_search_only);
+                               lookup->new_search = true;
                                if (firstarg) {
                                        printgreeting(argc, argv, lookup);
-                                       firstarg = ISC_FALSE;
+                                       firstarg = false;
                                }
                                ISC_LIST_APPEND(lookup_list, lookup, link);
                                debug("looking up %s", lookup->textname);
@@ -2121,7 +2122,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
 
                        for(i = 0; i < bargc; i++)
                                debug("batch argv %d: %s", i, bargv[i]);
-                       parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
+                       parse_args(true, false, bargc, (char **)bargv);
                        return;
                }
                return;
@@ -2131,17 +2132,17 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
         */
        if ((lookup_list.head == NULL) && !config_only) {
                if (need_clone)
-                       lookup = clone_lookup(default_lookup, ISC_TRUE);
-               need_clone = ISC_TRUE;
-               lookup->trace_root = ISC_TF(lookup->trace ||
-                                           lookup->ns_search_only);
-               lookup->new_search = ISC_TRUE;
+                       lookup = clone_lookup(default_lookup, true);
+               need_clone = true;
+               lookup->trace_root = (lookup->trace ||
+                                     lookup->ns_search_only);
+               lookup->new_search = true;
                strlcpy(lookup->textname, ".", sizeof(lookup->textname));
                lookup->rdtype = dns_rdatatype_ns;
-               lookup->rdtypeset = ISC_TRUE;
+               lookup->rdtypeset = true;
                if (firstarg) {
                        printgreeting(argc, argv, lookup);
-                       firstarg = ISC_FALSE;
+                       firstarg = false;
                }
                ISC_LIST_APPEND(lookup_list, lookup, link);
        }
@@ -2190,7 +2191,7 @@ query_finished(void) {
 
                for(i = 0; i < bargc; i++)
                        debug("batch argv %d: %s", i, bargv[i]);
-               parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
+               parse_args(true, false, bargc, (char **)bargv);
                start_lookup();
        } else {
                batchname = NULL;
@@ -2230,7 +2231,7 @@ void dig_setup(int argc, char **argv)
        setup_system(ipv4only, ipv6only);
 }
 
-void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
+void dig_query_setup(bool is_batchfile, bool config_only,
                int argc, char **argv)
 {
        debug("dig_query_setup");
@@ -2242,7 +2243,7 @@ void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
                setup_text_key();
        if (domainopt[0] != '\0') {
                set_search_domain(domainopt);
-               usesearch = ISC_TRUE;
+               usesearch = true;
        }
 }
 
@@ -2284,7 +2285,7 @@ int
 main(int argc, char **argv) {
 
        dig_setup(argc, argv);
-       dig_query_setup(ISC_FALSE, ISC_FALSE, argc, argv);
+       dig_query_setup(false, false, argc, argv);
        dig_startup();
        dig_shutdown();
 
index eadebe0f590bc552ef92e72de3b67a68868e3805..be472d0d2616564c2cb0312ffe84aff397c91f19 100644 (file)
@@ -22,6 +22,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -124,19 +125,19 @@ dig_lookuplist_t lookup_list;
 dig_serverlist_t server_list;
 dig_searchlistlist_t search_list;
 
-isc_boolean_t
-       check_ra = ISC_FALSE,
-       have_ipv4 = ISC_FALSE,
-       have_ipv6 = ISC_FALSE,
-       specified_source = ISC_FALSE,
-       free_now = ISC_FALSE,
-       cancel_now = ISC_FALSE,
-       usesearch = ISC_FALSE,
-       showsearch = ISC_FALSE,
-       qr = ISC_FALSE,
-       is_dst_up = ISC_FALSE,
-       keep_open = ISC_FALSE,
-       verbose = ISC_FALSE;
+bool
+       check_ra = false,
+       have_ipv4 = false,
+       have_ipv6 = false,
+       specified_source = false,
+       free_now = false,
+       cancel_now = false,
+       usesearch = false,
+       showsearch = false,
+       qr = false,
+       is_dst_up = false,
+       keep_open = false,
+       verbose = false;
 in_port_t port = 53;
 unsigned int timeout = 0;
 unsigned int extrabytes;
@@ -170,7 +171,7 @@ static isc_result_t idn_ace_to_locale(const char *from,
                size_t tolen);
 static isc_result_t output_filter(isc_buffer_t *buffer,
                unsigned int used_org,
-               isc_boolean_t absolute);
+               bool absolute);
 #define MAXDLEN 256
 
 #ifdef WITH_IDNKIT
@@ -202,12 +203,12 @@ dns_name_t *hmacname = NULL;
 unsigned int digestbits = 0;
 isc_buffer_t *namebuf = NULL;
 dns_tsigkey_t *tsigkey = NULL;
-isc_boolean_t validated = ISC_TRUE;
+bool validated = true;
 isc_entropy_t *entp = NULL;
 isc_mempool_t *commctx = NULL;
-isc_boolean_t debugging = ISC_FALSE;
-isc_boolean_t debugtiming = ISC_FALSE;
-isc_boolean_t memdebugging = ISC_FALSE;
+bool debugging = false;
+bool debugtiming = false;
+bool memdebugging = false;
 char *progname = NULL;
 isc_mutex_t lookup_lock;
 dig_lookup_t *current_lookup = NULL;
@@ -217,7 +218,7 @@ dig_lookup_t *current_lookup = NULL;
 isc_result_t     get_trusted_key(void);
 dns_rdataset_t *  sigchase_scanname(dns_rdatatype_t type,
                                    dns_rdatatype_t covers,
-                                   isc_boolean_t *lookedup,
+                                   bool *lookedup,
                                    dns_name_t *rdata_name);
 dns_rdataset_t *  chase_scanname_section(dns_message_t *msg,
                                         dns_name_t *name,
@@ -228,7 +229,7 @@ isc_result_t          advanced_rrsearch(dns_rdataset_t **rdataset,
                                    dns_name_t *name,
                                    dns_rdatatype_t type,
                                    dns_rdatatype_t covers,
-                                   isc_boolean_t *lookedup);
+                                   bool *lookedup);
 isc_result_t     sigchase_verify_sig_key(dns_name_t *name,
                                          dns_rdataset_t *rdataset,
                                          dst_key_t* dnsseckey,
@@ -318,25 +319,25 @@ dns_name_t chase_signame;
 #endif
 
 
-isc_boolean_t chase_siglookedup = ISC_FALSE;
-isc_boolean_t chase_keylookedup = ISC_FALSE;
-isc_boolean_t chase_sigkeylookedup = ISC_FALSE;
-isc_boolean_t chase_dslookedup = ISC_FALSE;
-isc_boolean_t chase_sigdslookedup = ISC_FALSE;
+bool chase_siglookedup = false;
+bool chase_keylookedup = false;
+bool chase_sigkeylookedup = false;
+bool chase_dslookedup = false;
+bool chase_sigdslookedup = false;
 #if DIG_SIGCHASE_TD
-isc_boolean_t chase_nslookedup = ISC_FALSE;
-isc_boolean_t chase_lookedup = ISC_FALSE;
+bool chase_nslookedup = false;
+bool chase_lookedup = false;
 
 
-isc_boolean_t delegation_follow = ISC_FALSE;
-isc_boolean_t grandfather_pb = ISC_FALSE;
-isc_boolean_t have_response = ISC_FALSE;
-isc_boolean_t have_delegation_ns = ISC_FALSE;
+bool delegation_follow = false;
+bool grandfather_pb = false;
+bool have_response = false;
+bool have_delegation_ns = false;
 dns_message_t * error_message = NULL;
 #endif
 
-isc_boolean_t dsvalidating = ISC_FALSE;
-isc_boolean_t chase_name_dup = ISC_FALSE;
+bool dsvalidating = false;
+bool chase_name_dup = false;
 
 ISC_LIST(dig_message_t) chase_message_list;
 ISC_LIST(dig_message_t) chase_message_list2;
@@ -379,7 +380,7 @@ isc_result_t
 
 isc_result_t
 (*dighost_printmessage)(dig_query_t *query, dns_message_t *msg,
-       isc_boolean_t headers);
+       bool headers);
 
 void
 (*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
@@ -405,12 +406,12 @@ static void
 connect_timeout(isc_task_t *task, isc_event_t *event);
 
 static void
-launch_next_query(dig_query_t *query, isc_boolean_t include_question);
+launch_next_query(dig_query_t *query, bool include_question);
 
 static void
 check_next_lookup(dig_lookup_t *lookup);
 
-static isc_boolean_t
+static bool
 next_origin(dig_lookup_t *oldlookup);
 
 static void *
@@ -517,8 +518,8 @@ reverse_octets(const char *in, char **p, char *end) {
 }
 
 isc_result_t
-get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
-           isc_boolean_t strict)
+get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
+           bool strict)
 {
        int r;
        isc_result_t result;
@@ -790,92 +791,92 @@ make_empty_lookup(void) {
        if (looknew == NULL)
                fatal("memory allocation failure in %s:%d",
                       __FILE__, __LINE__);
-       looknew->pending = ISC_TRUE;
+       looknew->pending = true;
        looknew->textname[0] = 0;
        looknew->cmdline[0] = 0;
        looknew->rdtype = dns_rdatatype_a;
        looknew->qrdtype = dns_rdatatype_a;
        looknew->rdclass = dns_rdataclass_in;
-       looknew->rdtypeset = ISC_FALSE;
-       looknew->rdclassset = ISC_FALSE;
+       looknew->rdtypeset = false;
+       looknew->rdclassset = false;
        looknew->sendspace = NULL;
        looknew->sendmsg = NULL;
        looknew->name = NULL;
        looknew->oname = NULL;
        looknew->xfr_q = NULL;
        looknew->current_query = NULL;
-       looknew->doing_xfr = ISC_FALSE;
+       looknew->doing_xfr = false;
        looknew->ixfr_serial = 0;
-       looknew->trace = ISC_FALSE;
-       looknew->trace_root = ISC_FALSE;
-       looknew->identify = ISC_FALSE;
-       looknew->identify_previous_line = ISC_FALSE;
-       looknew->ignore = ISC_FALSE;
-       looknew->servfail_stops = ISC_TRUE;
-       looknew->besteffort = ISC_TRUE;
-       looknew->dnssec = ISC_FALSE;
+       looknew->trace = false;
+       looknew->trace_root = false;
+       looknew->identify = false;
+       looknew->identify_previous_line = false;
+       looknew->ignore = false;
+       looknew->servfail_stops = true;
+       looknew->besteffort = true;
+       looknew->dnssec = false;
        looknew->ednsflags = 0;
        looknew->opcode = dns_opcode_query;
-       looknew->expire = ISC_FALSE;
-       looknew->nsid = ISC_FALSE;
-       looknew->header_only = ISC_FALSE;
-       looknew->sendcookie = ISC_FALSE;
-       looknew->seenbadcookie = ISC_FALSE;
-       looknew->badcookie = ISC_TRUE;
+       looknew->expire = false;
+       looknew->nsid = false;
+       looknew->header_only = false;
+       looknew->sendcookie = false;
+       looknew->seenbadcookie = false;
+       looknew->badcookie = true;
 #ifdef WITH_IDN_SUPPORT
-       looknew->idnin = ISC_TRUE;
+       looknew->idnin = true;
 #else
-       looknew->idnin = ISC_FALSE;
+       looknew->idnin = false;
 #endif
 #ifdef WITH_IDN_OUT_SUPPORT
-       looknew->idnout = ISC_TRUE;
+       looknew->idnout = true;
 #else
-       looknew->idnout = ISC_FALSE;
+       looknew->idnout = false;
 #endif
 #ifdef DIG_SIGCHASE
-       looknew->sigchase = ISC_FALSE;
+       looknew->sigchase = false;
 #if DIG_SIGCHASE_TD
-       looknew->do_topdown = ISC_FALSE;
-       looknew->trace_root_sigchase = ISC_FALSE;
-       looknew->rdtype_sigchaseset = ISC_FALSE;
+       looknew->do_topdown = false;
+       looknew->trace_root_sigchase = false;
+       looknew->rdtype_sigchaseset = false;
        looknew->rdtype_sigchase = dns_rdatatype_any;
        looknew->qrdtype_sigchase = dns_rdatatype_any;
        looknew->rdclass_sigchase = dns_rdataclass_in;
-       looknew->rdclass_sigchaseset = ISC_FALSE;
+       looknew->rdclass_sigchaseset = false;
 #endif
 #endif
        looknew->udpsize = 0;
        looknew->edns = -1;
-       looknew->recurse = ISC_TRUE;
-       looknew->aaonly = ISC_FALSE;
-       looknew->adflag = ISC_FALSE;
-       looknew->cdflag = ISC_FALSE;
-       looknew->print_unknown_format = ISC_FALSE;
-       looknew->zflag = ISC_FALSE;
-       looknew->ns_search_only = ISC_FALSE;
+       looknew->recurse = true;
+       looknew->aaonly = false;
+       looknew->adflag = false;
+       looknew->cdflag = false;
+       looknew->print_unknown_format = false;
+       looknew->zflag = false;
+       looknew->ns_search_only = false;
        looknew->origin = NULL;
        looknew->tsigctx = NULL;
        looknew->querysig = NULL;
        looknew->retries = tries;
        looknew->nsfound = 0;
-       looknew->tcp_mode = ISC_FALSE;
-       looknew->tcp_mode_set = ISC_FALSE;
-       looknew->ip6_int = ISC_FALSE;
-       looknew->comments = ISC_TRUE;
-       looknew->stats = ISC_TRUE;
-       looknew->section_question = ISC_TRUE;
-       looknew->section_answer = ISC_TRUE;
-       looknew->section_authority = ISC_TRUE;
-       looknew->section_additional = ISC_TRUE;
-       looknew->new_search = ISC_FALSE;
-       looknew->done_as_is = ISC_FALSE;
-       looknew->need_search = ISC_FALSE;
+       looknew->tcp_mode = false;
+       looknew->tcp_mode_set = false;
+       looknew->ip6_int = false;
+       looknew->comments = true;
+       looknew->stats = true;
+       looknew->section_question = true;
+       looknew->section_answer = true;
+       looknew->section_authority = true;
+       looknew->section_additional = true;
+       looknew->new_search = false;
+       looknew->done_as_is = false;
+       looknew->need_search = false;
        looknew->ecs_addr = NULL;
        looknew->cookie = NULL;
        looknew->ednsopts = NULL;
        looknew->ednsoptscnt = 0;
-       looknew->ednsneg = ISC_TRUE;
-       looknew->mapped = ISC_TRUE;
+       looknew->ednsneg = true;
+       looknew->mapped = true;
        looknew->dscp = -1;
        looknew->eoferr = 0;
        dns_fixedname_init(&looknew->fdomain);
@@ -929,7 +930,7 @@ cloneopts(dig_lookup_t *looknew, dig_lookup_t *lookold) {
  * list separately from somewhere else, or construct it by hand.
  */
 dig_lookup_t *
-clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
+clone_lookup(dig_lookup_t *lookold, bool servers) {
        dig_lookup_t *looknew;
 
        debug("clone_lookup()");
@@ -1041,7 +1042,7 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
  * queue getting run.
  */
 dig_lookup_t *
-requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
+requeue_lookup(dig_lookup_t *lookold, bool servers) {
        dig_lookup_t *looknew;
 
        debug("requeue_lookup()");
@@ -1098,7 +1099,7 @@ setup_text_key(void) {
                goto failure;
 
        result = dns_tsigkey_create(&keyname, hmacname, secretstore,
-                                   (int)secretsize, ISC_FALSE, NULL, 0, 0,
+                                   (int)secretsize, false, NULL, 0, 0,
                                    mctx, NULL, &tsigkey);
  failure:
        if (result != ISC_R_SUCCESS)
@@ -1160,8 +1161,8 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
        struct in6_addr in6;
        uint32_t prefix_length = 0xffffffff;
        char *slash = NULL;
-       isc_boolean_t parsed = ISC_FALSE;
-       isc_boolean_t prefix_parsed = ISC_FALSE;
+       bool parsed = false;
+       bool prefix_parsed = false;
        char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX/128")];
 
        REQUIRE(sap != NULL && *sap == NULL);
@@ -1188,16 +1189,16 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
                        fatal("invalid prefix length in '%s': %s\n",
                              value, isc_result_totext(result));
                }
-               prefix_parsed = ISC_TRUE;
+               prefix_parsed = true;
        }
 
        if (inet_pton(AF_INET6, buf, &in6) == 1) {
-               parsed = ISC_TRUE;
+               parsed = true;
                isc_sockaddr_fromin6(sa, &in6, 0);
                if (prefix_length > 128)
                        prefix_length = 128;
        } else if (inet_pton(AF_INET, buf, &in4) == 1) {
-               parsed = ISC_TRUE;
+               parsed = true;
                isc_sockaddr_fromin(sa, &in4, 0);
                if (prefix_length > 32)
                        prefix_length = 32;
@@ -1207,7 +1208,7 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
                for (i = 0; i < 3 && strlen(buf) < sizeof(buf) - 2; i++) {
                        strlcat(buf, ".0", sizeof(buf));
                        if (inet_pton(AF_INET, buf, &in4) == 1) {
-                               parsed = ISC_TRUE;
+                               parsed = true;
                                isc_sockaddr_fromin(sa, &in4, 0);
                                break;
                        }
@@ -1391,7 +1392,7 @@ setup_file_key(void) {
                goto failure;
        }
        result = dns_tsigkey_createfromkey(dst_key_name(dstkey), hmacname,
-                                          dstkey, ISC_FALSE, NULL, 0, 0,
+                                          dstkey, false, NULL, 0, 0,
                                           mctx, NULL, &tsigkey);
        if (result != ISC_R_SUCCESS) {
                printf(";; Couldn't create key %s: %s\n",
@@ -1444,7 +1445,7 @@ create_search_list(lwres_conf_t *confdata) {
  * settings.
  */
 void
-setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
+setup_system(bool ipv4only, bool ipv6only) {
        dig_searchlist_t *domain = NULL;
        lwres_result_t lwresult;
        unsigned int lwresflags;
@@ -1455,7 +1456,7 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
        if (ipv4only) {
                if (have_ipv4) {
                        isc_net_disableipv6();
-                       have_ipv6 = ISC_FALSE;
+                       have_ipv6 = false;
                } else {
                        fatal("can't find IPv4 networking");
                }
@@ -1464,7 +1465,7 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
        if (ipv6only) {
                if (have_ipv6) {
                        isc_net_disableipv4();
-                       have_ipv4 = ISC_FALSE;
+                       have_ipv4 = false;
                } else {
                        fatal("can't find IPv6 networking");
                }
@@ -1499,7 +1500,7 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
        }
 
        if (lwconf->resdebug) {
-               verbose = ISC_TRUE;
+               verbose = true;
                debug("verbose is on");
        }
        if (ndots == -1) {
@@ -1605,11 +1606,11 @@ setup_libs(void) {
 
        result = isc_net_probeipv4();
        if (result == ISC_R_SUCCESS)
-               have_ipv4 = ISC_TRUE;
+               have_ipv4 = true;
 
        result = isc_net_probeipv6();
        if (result == ISC_R_SUCCESS)
-               have_ipv6 = ISC_TRUE;
+               have_ipv6 = true;
        if (!have_ipv6 && !have_ipv4)
                fatal("can't find either v4 or v6 networking");
 
@@ -1647,7 +1648,7 @@ setup_libs(void) {
 
        result = dst_lib_init(mctx, entp, 0);
        check_result(result, "dst_lib_init");
-       is_dst_up = ISC_TRUE;
+       is_dst_up = true;
 
        result = isc_mempool_create(mctx, COMMSIZE, &commctx);
        check_result(result, "isc_mempool_create");
@@ -1691,7 +1692,7 @@ save_opt(dig_lookup_t *lookup, char *code, char *value) {
        isc_result_t result;
        uint32_t num = 0;
        isc_buffer_t b;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
        unsigned int i;
 
        if (lookup->ednsoptscnt >= EDNSOPT_OPTIONS)
@@ -1700,7 +1701,7 @@ save_opt(dig_lookup_t *lookup, char *code, char *value) {
        for (i = 0; i < N_EDNS_OPTNAMES; i++) {
                if (strcasecmp(code, optnames[i].name) == 0) {
                        num = optnames[i].code;
-                       found = ISC_TRUE;
+                       found = true;
                        break;
                }
        }
@@ -1839,17 +1840,17 @@ clear_query(dig_query_t *query) {
        isc_buffer_invalidate(&query->recvbuf);
        isc_buffer_invalidate(&query->lengthbuf);
        if (query->waiting_senddone)
-               query->pending_free = ISC_TRUE;
+               query->pending_free = true;
        else
                isc_mem_free(mctx, query);
 }
 
 /*%
- * Try and clear out a lookup if we're done with it.  Return ISC_TRUE if
- * the lookup was successfully cleared.  If ISC_TRUE is returned, the
+ * Try and clear out a lookup if we're done with it.  Return true if
+ * the lookup was successfully cleared.  If true is returned, the
  * lookup pointer has been invalidated.
  */
-static isc_boolean_t
+static bool
 try_clear_lookup(dig_lookup_t *lookup) {
        dig_query_t *q;
 
@@ -1874,7 +1875,7 @@ try_clear_lookup(dig_lookup_t *lookup) {
                                q = ISC_LIST_NEXT(q, clink);
                        }
                }
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -1882,7 +1883,7 @@ try_clear_lookup(dig_lookup_t *lookup) {
         * so can make it go away also.
         */
        destroy_lookup(lookup);
-       return (ISC_TRUE);
+       return (true);
 }
 
 void
@@ -1966,7 +1967,7 @@ start_lookup(void) {
                        if (result != ISC_R_SUCCESS) {
                                printf("\n;; No trusted key, "
                                       "+sigchase option is disabled\n");
-                               current_lookup->sigchase = ISC_FALSE;
+                               current_lookup->sigchase = false;
                                goto novalidation;
                        }
                        dns_name_init(&query_name, NULL);
@@ -1976,7 +1977,7 @@ start_lookup(void) {
                                key_name = dst_key_name(tk_list.key[i]);
 
                                if (dns_name_issubdomain(&query_name,
-                                                        key_name) == ISC_TRUE)
+                                                        key_name) == true)
                                        dstkey = tk_list.key[i];
                                /*
                                 * Verify temp is really the lowest
@@ -1988,7 +1989,7 @@ start_lookup(void) {
                                dns_name_print(&query_name, stdout);
                                printf(" isn't a subdomain of any Trusted Keys"
                                       ": +sigchase option is disable\n");
-                               current_lookup->sigchase = ISC_FALSE;
+                               current_lookup->sigchase = false;
                                free_name(&query_name);
                                goto novalidation;
                        }
@@ -2013,12 +2014,12 @@ start_lookup(void) {
                        strlcpy(current_lookup->textnamesigchase,
                                current_lookup->textname, MXNAME);
 
-                       current_lookup->trace_root_sigchase = ISC_TRUE;
+                       current_lookup->trace_root_sigchase = true;
 
                        result = isc_buffer_allocate(mctx, &b, BUFSIZE);
                        check_result(result, "isc_buffer_allocate");
                        result = dns_name_totext(dst_key_name(dstkey),
-                                                ISC_FALSE, b);
+                                                false, b);
                        check_result(result, "dns_name_totext");
                        isc_buffer_usedregion(b, &r);
                        r.base[r.length] = '\0';
@@ -2078,13 +2079,13 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_name_t *name = NULL;
        isc_result_t result;
-       isc_boolean_t success = ISC_FALSE;
+       bool success = false;
        int numLookups = 0;
        int num;
        isc_result_t lresult, addresses_result;
        char bad_namestr[DNS_NAME_FORMATSIZE];
        dns_name_t *domain;
-       isc_boolean_t horizontal = ISC_FALSE, bad = ISC_FALSE;
+       bool horizontal = false, bad = false;
 
        INSIST(!free_now);
 
@@ -2124,11 +2125,11 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
                        if (namereln == dns_namereln_equal) {
                                if (!horizontal)
                                        printf(";; BAD (HORIZONTAL) REFERRAL\n");
-                               horizontal = ISC_TRUE;
+                               horizontal = true;
                        } else if (namereln != dns_namereln_subdomain) {
                                if (!bad)
                                        printf(";; BAD REFERRAL\n");
-                               bad = ISC_TRUE;
+                               bad = true;
                                continue;
                        }
                }
@@ -2154,22 +2155,22 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
                        /* Initialize lookup if we've not yet */
                        debug("found NS %s", namestr);
                        if (!success) {
-                               success = ISC_TRUE;
+                               success = true;
                                lookup_counter++;
                                lookup = requeue_lookup(query->lookup,
-                                                       ISC_FALSE);
+                                                       false);
                                cancel_lookup(query->lookup);
-                               lookup->doing_xfr = ISC_FALSE;
+                               lookup->doing_xfr = false;
                                if (!lookup->trace_root &&
                                    section == DNS_SECTION_ANSWER)
-                                       lookup->trace = ISC_FALSE;
+                                       lookup->trace = false;
                                else
                                        lookup->trace = query->lookup->trace;
                                lookup->ns_search_only =
                                        query->lookup->ns_search_only;
-                               lookup->trace_root = ISC_FALSE;
+                               lookup->trace_root = false;
                                if (lookup->ns_search_only)
-                                       lookup->recurse = ISC_FALSE;
+                                       lookup->recurse = false;
                                domain = dns_fixedname_name(&lookup->fdomain);
                                dns_name_copy(name, domain, NULL);
                        }
@@ -2235,9 +2236,9 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
  * Create and queue a new lookup using the next origin from the search
  * list, read in setup_system().
  *
- * Return ISC_TRUE iff there was another searchlist entry.
+ * Return true iff there was another searchlist entry.
  */
-static isc_boolean_t
+static bool
 next_origin(dig_lookup_t *oldlookup) {
        dig_lookup_t *newlookup;
        dig_searchlist_t *search;
@@ -2255,7 +2256,7 @@ next_origin(dig_lookup_t *oldlookup) {
                 * We're not using a search list, so don't even think
                 * about finding the next entry.
                 */
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * Check for a absolute name or ndots being met.
@@ -2266,26 +2267,26 @@ next_origin(dig_lookup_t *oldlookup) {
        if (result == ISC_R_SUCCESS &&
            (dns_name_isabsolute(name) ||
             (int)dns_name_countlabels(name) > ndots))
-               return (ISC_FALSE);
+               return (false);
 
        if (oldlookup->origin == NULL && !oldlookup->need_search)
                /*
                 * Then we just did rootorg; there's nothing left.
                 */
-               return (ISC_FALSE);
+               return (false);
        if (oldlookup->origin == NULL && oldlookup->need_search) {
-               newlookup = requeue_lookup(oldlookup, ISC_TRUE);
+               newlookup = requeue_lookup(oldlookup, true);
                newlookup->origin = ISC_LIST_HEAD(search_list);
-               newlookup->need_search = ISC_FALSE;
+               newlookup->need_search = false;
        } else {
                search = ISC_LIST_NEXT(oldlookup->origin, link);
                if (search == NULL && oldlookup->done_as_is)
-                       return (ISC_FALSE);
-               newlookup = requeue_lookup(oldlookup, ISC_TRUE);
+                       return (false);
+               newlookup = requeue_lookup(oldlookup, true);
                newlookup->origin = search;
        }
        cancel_lookup(oldlookup);
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*%
@@ -2363,7 +2364,7 @@ compute_cookie(unsigned char *clientcookie, size_t len) {
  * well as the query structures and buffer space for the replies.  If the
  * server list is empty, clone it from the system default list.
  */
-isc_boolean_t
+bool
 setup_lookup(dig_lookup_t *lookup) {
        isc_result_t result;
        uint32_t id;
@@ -2440,11 +2441,11 @@ setup_lookup(dig_lookup_t *lookup) {
                if ((count_dots(textname) >= ndots) || !usesearch)
                {
                        lookup->origin = NULL; /* Force abs lookup */
-                       lookup->done_as_is = ISC_TRUE;
+                       lookup->done_as_is = true;
                        lookup->need_search = usesearch;
                } else if (lookup->origin == NULL && usesearch) {
                        lookup->origin = ISC_LIST_HEAD(search_list);
-                       lookup->need_search = ISC_FALSE;
+                       lookup->need_search = false;
                }
        }
 
@@ -2504,7 +2505,7 @@ setup_lookup(dig_lookup_t *lookup) {
                                dns_message_puttempname(lookup->sendmsg,
                                                        &lookup->oname);
                                if (result == DNS_R_NAMETOOLONG)
-                                       return (ISC_FALSE);
+                                       return (false);
                                fatal("'%s' is not in legal name syntax (%s)",
                                      lookup->textname,
                                      isc_result_totext(result));
@@ -2544,7 +2545,7 @@ setup_lookup(dig_lookup_t *lookup) {
         * it's meaningless for traces.
         */
        if (lookup->trace || (lookup->ns_search_only && !lookup->trace_root))
-               lookup->recurse = ISC_FALSE;
+               lookup->recurse = false;
 
        if (lookup->recurse &&
            lookup->rdtype != dns_rdatatype_axfr &&
@@ -2588,10 +2589,10 @@ setup_lookup(dig_lookup_t *lookup) {
                 * Force TCP mode if we're doing an axfr.
                 */
                if (lookup->rdtype == dns_rdatatype_axfr) {
-                       lookup->doing_xfr = ISC_TRUE;
-                       lookup->tcp_mode = ISC_TRUE;
+                       lookup->doing_xfr = true;
+                       lookup->tcp_mode = true;
                } else if (lookup->tcp_mode) {
-                       lookup->doing_xfr = ISC_TRUE;
+                       lookup->doing_xfr = true;
                }
        }
 
@@ -2786,9 +2787,9 @@ setup_lookup(dig_lookup_t *lookup) {
         * Force TCP mode if the request is larger than 512 bytes.
         */
        if (isc_buffer_usedlength(&lookup->renderbuf) > 512)
-               lookup->tcp_mode = ISC_TRUE;
+               lookup->tcp_mode = true;
 
-       lookup->pending = ISC_FALSE;
+       lookup->pending = false;
 
        for (serv = ISC_LIST_HEAD(lookup->my_server_list);
             serv != NULL;
@@ -2801,16 +2802,16 @@ setup_lookup(dig_lookup_t *lookup) {
                       query, lookup);
                query->lookup = lookup;
                query->timer = NULL;
-               query->waiting_connect = ISC_FALSE;
-               query->waiting_senddone = ISC_FALSE;
-               query->pending_free = ISC_FALSE;
-               query->recv_made = ISC_FALSE;
-               query->first_pass = ISC_TRUE;
-               query->first_soa_rcvd = ISC_FALSE;
-               query->second_rr_rcvd = ISC_FALSE;
-               query->first_repeat_rcvd = ISC_FALSE;
-               query->warn_id = ISC_TRUE;
-               query->timedout = ISC_FALSE;
+               query->waiting_connect = false;
+               query->waiting_senddone = false;
+               query->pending_free = false;
+               query->recv_made = false;
+               query->first_pass = true;
+               query->first_soa_rcvd = false;
+               query->second_rr_rcvd = false;
+               query->first_repeat_rcvd = false;
+               query->warn_id = true;
+               query->timedout = false;
                query->first_rr_serial = 0;
                query->second_rr_serial = 0;
                query->servname = serv->servername;
@@ -2818,7 +2819,7 @@ setup_lookup(dig_lookup_t *lookup) {
                query->rr_count = 0;
                query->msg_count = 0;
                query->byte_count = 0;
-               query->ixfr_axfr = ISC_FALSE;
+               query->ixfr_axfr = false;
                ISC_LIST_INIT(query->recvlist);
                ISC_LIST_INIT(query->lengthlist);
                query->sock = NULL;
@@ -2840,12 +2841,12 @@ setup_lookup(dig_lookup_t *lookup) {
        if (!ISC_LIST_EMPTY(lookup->q) && qr) {
                extrabytes = 0;
                dighost_printmessage(ISC_LIST_HEAD(lookup->q), lookup->sendmsg,
-                            ISC_TRUE);
+                            true);
                if (lookup->stats)
                        printf(";; QUERY SIZE: %u\n\n",
                               isc_buffer_usedlength(&lookup->renderbuf));
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*%
@@ -2878,7 +2879,7 @@ send_done(isc_task_t *_task, isc_event_t *event) {
        }
 
        query = event->ev_arg;
-       query->waiting_senddone = ISC_FALSE;
+       query->waiting_senddone = false;
        l = query->lookup;
 
        if (l->ns_search_only && !l->trace_root && !l->tcp_mode) {
@@ -2919,7 +2920,7 @@ cancel_lookup(dig_lookup_t *lookup) {
                }
                query = next;
        }
-       lookup->pending = ISC_FALSE;
+       lookup->pending = false;
        lookup->retries = 0;
 }
 
@@ -2996,7 +2997,7 @@ send_tcp_connect(dig_query_t *query) {
        debug("send_tcp_connect(%p)", query);
 
        l = query->lookup;
-       query->waiting_connect = ISC_TRUE;
+       query->waiting_connect = true;
        query->lookup->current_query = query;
        result = get_address(query->servname, port, &query->sockaddr);
        if (result != ISC_R_SUCCESS) {
@@ -3018,7 +3019,7 @@ send_tcp_connect(dig_query_t *query) {
                isc_netaddr_format(&netaddr, buf, sizeof(buf));
                printf(";; Skipping mapped address '%s'\n", buf);
 
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                if (ISC_LINK_LINKED(query, link))
                        next = ISC_LIST_NEXT(query, link);
                else
@@ -3039,7 +3040,7 @@ send_tcp_connect(dig_query_t *query) {
             isc_sockaddr_pf(&bind_address))) {
                printf(";; Skipping server %s, incompatible "
                       "address family\n", query->servname);
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                if (ISC_LINK_LINKED(query, link))
                        next = ISC_LIST_NEXT(query, link);
                else
@@ -3060,8 +3061,8 @@ send_tcp_connect(dig_query_t *query) {
        if (keep != NULL && isc_sockaddr_equal(&keepaddr, &query->sockaddr)) {
                sockcount++;
                isc_socket_attach(keep, &query->sock);
-               query->waiting_connect = ISC_FALSE;
-               launch_next_query(query, ISC_TRUE);
+               query->waiting_connect = false;
+               launch_next_query(query, true);
                goto search;
        }
 
@@ -3073,7 +3074,7 @@ send_tcp_connect(dig_query_t *query) {
        debug("sockcount=%d", sockcount);
        if (query->lookup->dscp != -1)
                isc_socket_dscp(query->sock, query->lookup->dscp);
-       isc_socket_ipv6only(query->sock, ISC_TF(!query->lookup->mapped));
+       isc_socket_ipv6only(query->sock, !query->lookup->mapped);
        if (specified_source)
                result = isc_socket_bind(query->sock, &bind_address,
                                         ISC_SOCKET_REUSEADDRESS);
@@ -3139,7 +3140,7 @@ send_udp(dig_query_t *query) {
        debug("working on lookup %p, query %p", query->lookup, query);
        if (!query->recv_made) {
                /* XXX Check the sense of this, need assertion? */
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                result = get_address(query->servname, port, &query->sockaddr);
                if (result != ISC_R_SUCCESS) {
                        /* This servname doesn't have an address. */
@@ -3178,7 +3179,7 @@ send_udp(dig_query_t *query) {
                if (query->lookup->dscp != -1)
                        isc_socket_dscp(query->sock, query->lookup->dscp);
                isc_socket_ipv6only(query->sock,
-                                   ISC_TF(!query->lookup->mapped));
+                                   !query->lookup->mapped);
                if (specified_source) {
                        result = isc_socket_bind(query->sock, &bind_address,
                                                 ISC_SOCKET_REUSEADDRESS);
@@ -3189,7 +3190,7 @@ send_udp(dig_query_t *query) {
                }
                check_result(result, "isc_socket_bind");
 
-               query->recv_made = ISC_TRUE;
+               query->recv_made = true;
                ISC_LINK_INIT(&query->recvbuf, link);
                ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf,
                                 link);
@@ -3207,7 +3208,7 @@ send_udp(dig_query_t *query) {
        debug("sending a request");
        TIME_NOW(&query->time_sent);
        INSIST(query->sock != NULL);
-       query->waiting_senddone = ISC_TRUE;
+       query->waiting_senddone = true;
        result = isc_socket_sendtov2(query->sock, &query->sendlist,
                                     global_task, send_done, query,
                                     &query->sockaddr, NULL,
@@ -3256,7 +3257,7 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
        }
 
        if (l->tcp_mode && query->sock != NULL) {
-               query->timedout = ISC_TRUE;
+               query->timedout = true;
                isc_socket_cancel(query->sock, NULL, ISC_SOCKCANCEL_ALL);
        }
 
@@ -3269,7 +3270,7 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
                        debug("making new TCP request, %d tries left",
                              l->retries);
                        l->retries--;
-                       requeue_lookup(l, ISC_TRUE);
+                       requeue_lookup(l, true);
                        cancel_lookup(l);
                        check_next_lookup(l);
                }
@@ -3340,7 +3341,7 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
                debug("sockcount=%d", sockcount);
                INSIST(sockcount >= 0);
                if (sevent->result == ISC_R_EOF && l->eoferr == 0U) {
-                       n = requeue_lookup(l, ISC_TRUE);
+                       n = requeue_lookup(l, true);
                        n->eoferr++;
                }
                isc_event_free(&event);
@@ -3353,7 +3354,7 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
        length = isc_buffer_getuint16(b);
        if (length == 0) {
                isc_event_free(&event);
-               launch_next_query(query, ISC_FALSE);
+               launch_next_query(query, false);
                UNLOCK_LOOKUP;
                return;
        }
@@ -3383,7 +3384,7 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
  * launch the next recv.
  */
 static void
-launch_next_query(dig_query_t *query, isc_boolean_t include_question) {
+launch_next_query(dig_query_t *query, bool include_question) {
        isc_result_t result;
        dig_lookup_t *l;
        isc_buffer_t *buffer;
@@ -3398,7 +3399,7 @@ launch_next_query(dig_query_t *query, isc_boolean_t include_question) {
                sockcount--;
                debug("sockcount=%d", sockcount);
                INSIST(sockcount >= 0);
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                l = query->lookup;
                clear_query(query);
                check_next_lookup(l);
@@ -3430,14 +3431,14 @@ launch_next_query(dig_query_t *query, isc_boolean_t include_question) {
        if (!query->first_soa_rcvd) {
                debug("sending a request in launch_next_query");
                TIME_NOW(&query->time_sent);
-               query->waiting_senddone = ISC_TRUE;
+               query->waiting_senddone = true;
                result = isc_socket_sendv(query->sock, &query->sendlist,
                                          global_task, send_done, query);
                check_result(result, "isc_socket_sendv");
                sendcount++;
                debug("sendcount=%d", sendcount);
        }
-       query->waiting_connect = ISC_FALSE;
+       query->waiting_connect = false;
 #if 0
        check_next_lookup(query->lookup);
 #endif
@@ -3469,7 +3470,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
 
        INSIST(query->waiting_connect);
 
-       query->waiting_connect = ISC_FALSE;
+       query->waiting_connect = false;
 
        if (sevent->result == ISC_R_CANCELED) {
                debug("in cancel handler");
@@ -3483,7 +3484,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
                INSIST(sockcount > 0);
                sockcount--;
                debug("sockcount=%d", sockcount);
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                isc_event_free(&event);
                l = query->lookup;
                clear_query(query);
@@ -3508,7 +3509,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
                if (exitcode < 9)
                        exitcode = 9;
                debug("sockcount=%d", sockcount);
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                isc_event_free(&event);
                l = query->lookup;
                if ((l->current_query != NULL) &&
@@ -3531,7 +3532,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
                isc_socket_attach(query->sock, &keep);
                keepaddr = query->sockaddr;
        }
-       launch_next_query(query, ISC_TRUE);
+       launch_next_query(query, true);
        isc_event_free(&event);
        UNLOCK_LOOKUP;
 }
@@ -3540,9 +3541,9 @@ connect_done(isc_task_t *task, isc_event_t *event) {
  * Check if the ongoing XFR needs more data before it's complete, using
  * the semantics of IXFR and AXFR protocols.  Much of the complexity of
  * this routine comes from determining when an IXFR is complete.
- * ISC_FALSE means more data is on the way, and the recv has been issued.
+ * false means more data is on the way, and the recv has been issued.
  */
-static isc_boolean_t
+static bool
 check_for_more_data(dig_query_t *query, dns_message_t *msg,
                    isc_socketevent_t *sevent)
 {
@@ -3551,8 +3552,8 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
        dns_rdata_soa_t soa;
        uint32_t ixfr_serial = query->lookup->ixfr_serial, serial;
        isc_result_t result;
-       isc_boolean_t ixfr = query->lookup->rdtype == dns_rdatatype_ixfr;
-       isc_boolean_t axfr = query->lookup->rdtype == dns_rdatatype_axfr;
+       bool ixfr = query->lookup->rdtype == dns_rdatatype_ixfr;
+       bool axfr = query->lookup->rdtype == dns_rdatatype_axfr;
 
        if (ixfr)
                axfr = query->ixfr_axfr;
@@ -3573,7 +3574,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
        result = dns_message_firstname(msg, DNS_SECTION_ANSWER);
        if (result != ISC_R_SUCCESS) {
                puts("; Transfer failed.");
-               return (ISC_TRUE);
+               return (true);
        }
        do {
                dns_name_t *name;
@@ -3598,14 +3599,14 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
                                    (rdata.type != dns_rdatatype_soa)) {
                                        puts("; Transfer failed.  "
                                             "Didn't start with SOA answer.");
-                                       return (ISC_TRUE);
+                                       return (true);
                                }
                                if ((!query->second_rr_rcvd) &&
                                    (rdata.type != dns_rdatatype_soa)) {
-                                       query->second_rr_rcvd = ISC_TRUE;
+                                       query->second_rr_rcvd = true;
                                        query->second_rr_serial = 0;
                                        debug("got the second rr as nonsoa");
-                                       axfr = query->ixfr_axfr = ISC_TRUE;
+                                       axfr = query->ixfr_axfr = true;
                                        goto next_rdata;
                                }
 
@@ -3623,7 +3624,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
                                serial = soa.serial;
                                dns_rdata_freestruct(&soa);
                                if (!query->first_soa_rcvd) {
-                                       query->first_soa_rcvd = ISC_TRUE;
+                                       query->first_soa_rcvd = true;
                                        query->first_rr_serial = serial;
                                        debug("this is the first serial %u",
                                              serial);
@@ -3647,7 +3648,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
                                        }
                                        debug("this is the second serial %u",
                                              serial);
-                                       query->second_rr_rcvd = ISC_TRUE;
+                                       query->second_rr_rcvd = true;
                                        query->second_rr_serial = serial;
                                        goto next_rdata;
                                }
@@ -3660,7 +3661,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
                                        debug("got a match for ixfr");
                                        if (!query->first_repeat_rcvd) {
                                                query->first_repeat_rcvd =
-                                                       ISC_TRUE;
+                                                       true;
                                                goto next_rdata;
                                        }
                                        debug("done with ixfr");
@@ -3673,11 +3674,11 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
                }
                result = dns_message_nextname(msg, DNS_SECTION_ANSWER);
        } while (result == ISC_R_SUCCESS);
-       launch_next_query(query, ISC_FALSE);
-       return (ISC_FALSE);
+       launch_next_query(query, false);
+       return (false);
  doexit:
        dighost_received(sevent->n, &sevent->address, query);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -3688,7 +3689,7 @@ process_cookie(dig_lookup_t *l, dns_message_t *msg,
        isc_buffer_t hexbuf;
        size_t len;
        const unsigned char *sent;
-       isc_boolean_t copy = ISC_TRUE;
+       bool copy = true;
        isc_result_t result;
 
        if (l->cookie != NULL) {
@@ -3709,12 +3710,12 @@ process_cookie(dig_lookup_t *l, dns_message_t *msg,
                } else {
                        printf(";; Warning: Client COOKIE mismatch\n");
                        msg->cc_bad = 1;
-                       copy = ISC_FALSE;
+                       copy = false;
                }
        } else {
                printf(";; Warning: COOKIE bad token (too short)\n");
                msg->cc_bad = 1;
-               copy = ISC_FALSE;
+               copy = false;
        }
        if (copy) {
                isc_region_t r;
@@ -3739,7 +3740,7 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
        isc_buffer_t optbuf;
        uint16_t optcode, optlen;
        dns_rdataset_t *opt = msg->opt;
-       isc_boolean_t seen_cookie = ISC_FALSE;
+       bool seen_cookie = false;
 
        result = dns_rdataset_first(opt);
        if (result == ISC_R_SUCCESS) {
@@ -3760,7 +3761,7 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
                                        break;
                                }
                                process_cookie(l, msg, &optbuf, optlen);
-                               seen_cookie = ISC_TRUE;
+                               seen_cookie = true;
                                break;
                        default:
                                isc_buffer_forward(&optbuf, optlen);
@@ -3791,13 +3792,13 @@ recv_done(isc_task_t *task, isc_event_t *event) {
 #endif
        isc_result_t result;
        dig_lookup_t *n, *l;
-       isc_boolean_t docancel = ISC_FALSE;
-       isc_boolean_t match = ISC_TRUE;
+       bool docancel = false;
+       bool match = true;
        unsigned int parseflags;
        dns_messageid_t id;
        unsigned int msgflags;
 #ifdef DIG_SIGCHASE
-       isc_result_t do_sigchase = ISC_FALSE;
+       isc_result_t do_sigchase = false;
 
        dns_message_t *msg_temp = NULL;
        isc_region_t r;
@@ -3833,7 +3834,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
        if ((!l->pending && !l->ns_search_only) || cancel_now) {
                debug("no longer pending.  Got %s",
                        isc_result_totext(sevent->result));
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
 
                isc_event_free(&event);
                clear_query(query);
@@ -3845,7 +3846,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
        if (sevent->result != ISC_R_SUCCESS) {
                if (sevent->result == ISC_R_CANCELED) {
                        debug("in recv cancel handler");
-                       query->waiting_connect = ISC_FALSE;
+                       query->waiting_connect = false;
                } else {
                        printf(";; communications error: %s\n",
                               isc_result_totext(sevent->result));
@@ -3857,7 +3858,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                        INSIST(sockcount >= 0);
                }
                if (sevent->result == ISC_R_EOF && l->eoferr == 0U) {
-                       n = requeue_lookup(l, ISC_TRUE);
+                       n = requeue_lookup(l, true);
                        n->eoferr++;
                }
                isc_event_free(&event);
@@ -3898,15 +3899,15 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                        sizeof(buf2));
                        printf(";; reply from unexpected source: %s,"
                        " expected %s\n", buf1, buf2);
-                       match = ISC_FALSE;
+                       match = false;
                }
        }
 
        result = dns_message_peekheader(b, &id, &msgflags);
        if (result != ISC_R_SUCCESS || l->sendmsg->id != id) {
-               match = ISC_FALSE;
+               match = false;
                if (l->tcp_mode) {
-                       isc_boolean_t fail = ISC_TRUE;
+                       bool fail = true;
                        if (result == ISC_R_SUCCESS) {
                                if (!query->first_soa_rcvd ||
                                     query->warn_id)
@@ -3916,8 +3917,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                                               "WARNING" : "ERROR",
                                               l->sendmsg->id, id);
                                if (query->first_soa_rcvd)
-                                       fail = ISC_FALSE;
-                               query->warn_id = ISC_FALSE;
+                                       fail = false;
+                               query->warn_id = false;
                        } else
                                printf(";; ERROR: short "
                                       "(< header size) message\n");
@@ -3929,7 +3930,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                                UNLOCK_LOOKUP;
                                return;
                        }
-                       match = ISC_TRUE;
+                       match = true;
                } else if (result == ISC_R_SUCCESS)
                        printf(";; Warning: ID mismatch: "
                               "expected ID %u, got %u\n", l->sendmsg->id, id);
@@ -3969,10 +3970,10 @@ recv_done(isc_task_t *task, isc_event_t *event) {
        parseflags = DNS_MESSAGEPARSE_PRESERVEORDER;
 #ifdef DIG_SIGCHASE
        if (!l->sigchase) {
-               do_sigchase = ISC_FALSE;
+               do_sigchase = false;
        } else {
                parseflags = 0;
-               do_sigchase = ISC_TRUE;
+               do_sigchase = true;
        }
 #endif
        if (l->besteffort) {
@@ -3988,7 +3989,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
        if (result != ISC_R_SUCCESS) {
                printf(";; Got bad packet: %s\n", isc_result_totext(result));
                hex_dump(b);
-               query->waiting_connect = ISC_FALSE;
+               query->waiting_connect = false;
                dns_message_destroy(&msg);
                isc_event_free(&event);
                clear_query(query);
@@ -3998,7 +3999,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                return;
        }
        if (msg->counts[DNS_SECTION_QUESTION] != 0) {
-               match = ISC_TRUE;
+               match = true;
                for (result = dns_message_firstname(msg, DNS_SECTION_QUESTION);
                     result == ISC_R_SUCCESS && match;
                     result = dns_message_nextname(msg, DNS_SECTION_QUESTION)) {
@@ -4027,7 +4028,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                                        printf(";; Question section mismatch: "
                                               "got %s/%s/%s\n",
                                               namestr, typebuf, classbuf);
-                                       match = ISC_FALSE;
+                                       match = false;
                                }
                        }
                }
@@ -4053,7 +4054,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                        printf(";; BADVERS, retrying with EDNS version %u.\n",
                               (unsigned int)newedns);
                l->edns = newedns;
-               n = requeue_lookup(l, ISC_TRUE);
+               n = requeue_lookup(l, true);
                if (l->trace && l->trace_root)
                        n->rdtype = l->qrdtype;
                dns_message_destroy(&msg);
@@ -4070,8 +4071,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                        process_opt(l, msg);
                if (l->comments)
                        printf(";; Truncated, retrying in TCP mode.\n");
-               n = requeue_lookup(l, ISC_TRUE);
-               n->tcp_mode = ISC_TRUE;
+               n = requeue_lookup(l, true);
+               n->tcp_mode = true;
                if (l->trace && l->trace_root)
                        n->rdtype = l->qrdtype;
                dns_message_destroy(&msg);
@@ -4089,10 +4090,10 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                        if (l->comments)
                                printf(";; BADCOOKIE, retrying%s.\n",
                                       l->seenbadcookie ? " in TCP mode" : "");
-                       n = requeue_lookup(l, ISC_TRUE);
+                       n = requeue_lookup(l, true);
                        if (l->seenbadcookie)
-                               n->tcp_mode = ISC_TRUE;
-                       n->seenbadcookie = ISC_TRUE;
+                               n->tcp_mode = true;
+                       n->seenbadcookie = true;
                        if (l->trace && l->trace_root)
                                n->rdtype = l->qrdtype;
                        dns_message_destroy(&msg);
@@ -4145,7 +4146,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                if (result != ISC_R_SUCCESS) {
                        printf(";; Couldn't verify signature: %s\n",
                               isc_result_totext(result));
-                       validated = ISC_FALSE;
+                       validated = false;
                }
                l->tsigctx = msg->tsigctx;
                msg->tsigctx = NULL;
@@ -4187,7 +4188,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                                                 isc_timertype_once,
                                                 NULL,
                                                 &l->interval,
-                                                ISC_FALSE);
+                                                false);
                        check_result(result, "isc_timer_reset");
                }
        }
@@ -4203,21 +4204,21 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                if (msg->rcode == dns_rcode_nxdomain &&
                    (l->origin != NULL || l->need_search)) {
                        if (!next_origin(query->lookup) || showsearch) {
-                               dighost_printmessage(query, msg, ISC_TRUE);
+                               dighost_printmessage(query, msg, true);
                                dighost_received(b->used, &sevent->address, query);
                        }
                } else if (!l->trace && !l->ns_search_only) {
 #ifdef DIG_SIGCHASE
                        if (!do_sigchase)
 #endif
-                               dighost_printmessage(query, msg, ISC_TRUE);
+                               dighost_printmessage(query, msg, true);
                } else if (l->trace) {
                        int nl = 0;
                        int count = msg->counts[DNS_SECTION_ANSWER];
 
                        debug("in TRACE code");
                        if (!l->ns_search_only)
-                               dighost_printmessage(query, msg, ISC_TRUE);
+                               dighost_printmessage(query, msg, true);
 
                        l->rdtype = l->qrdtype;
                        if (l->trace_root || (l->ns_search_only && count > 0)) {
@@ -4225,12 +4226,12 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                                        l->rdtype = dns_rdatatype_soa;
                                nl = followup_lookup(msg, query,
                                                     DNS_SECTION_ANSWER);
-                               l->trace_root = ISC_FALSE;
+                               l->trace_root = false;
                        } else if (count == 0)
                                nl = followup_lookup(msg, query,
                                                     DNS_SECTION_AUTHORITY);
                        if (nl == 0)
-                               docancel = ISC_TRUE;
+                               docancel = true;
                } else {
                        debug("in NSSEARCH code");
 
@@ -4244,14 +4245,14 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                                nl = followup_lookup(msg, query,
                                                     DNS_SECTION_ANSWER);
                                if (nl == 0)
-                                       docancel = ISC_TRUE;
-                               l->trace_root = ISC_FALSE;
-                               usesearch = ISC_FALSE;
+                                       docancel = true;
+                               l->trace_root = false;
+                               usesearch = false;
                        } else
 #ifdef DIG_SIGCHASE
                                if (!do_sigchase)
 #endif
-                               dighost_printmessage(query, msg, ISC_TRUE);
+                               dighost_printmessage(query, msg, true);
                }
 #ifdef DIG_SIGCHASE
                if (do_sigchase) {
@@ -4306,7 +4307,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                if (query != l->xfr_q) {
                        dns_message_destroy(&msg);
                        isc_event_free(&event);
-                       query->waiting_connect = ISC_FALSE;
+                       query->waiting_connect = false;
                        UNLOCK_LOOKUP;
                        return;
                }
@@ -4329,7 +4330,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
                }
 
                if (!query->lookup->ns_search_only)
-                       query->lookup->pending = ISC_FALSE;
+                       query->lookup->pending = false;
                if (!query->lookup->ns_search_only ||
                    query->lookup->trace_root || docancel) {
 #ifdef DIG_SIGCHASE
@@ -4376,7 +4377,7 @@ isc_result_t
 get_address(char *host, in_port_t myport, isc_sockaddr_t *sockaddr) {
        int count;
        isc_result_t result;
-       isc_boolean_t is_running;
+       bool is_running;
 
        is_running = isc_app_isrunning();
        if (is_running)
@@ -4432,7 +4433,7 @@ do_lookup(dig_lookup_t *lookup) {
        REQUIRE(lookup != NULL);
 
        debug("do_lookup()");
-       lookup->pending = ISC_TRUE;
+       lookup->pending = true;
        query = ISC_LIST_HEAD(lookup->q);
        if (query != NULL) {
                if (lookup->tcp_mode)
@@ -4471,7 +4472,7 @@ cancel_all(void) {
                UNLOCK_LOOKUP;
                return;
        }
-       cancel_now = ISC_TRUE;
+       cancel_now = true;
        if (current_lookup != NULL) {
                for (q = ISC_LIST_HEAD(current_lookup->q);
                     q != NULL;
@@ -4548,7 +4549,7 @@ destroy_libs(void) {
        INSIST(current_lookup == NULL);
        INSIST(!free_now);
 
-       free_now = ISC_TRUE;
+       free_now = true;
 
        lwres_conf_clear(lwctx);
        lwres_context_destroy(&lwctx);
@@ -4585,7 +4586,7 @@ destroy_libs(void) {
        if (is_dst_up) {
                debug("destroy DST lib");
                dst_lib_destroy();
-               is_dst_up = ISC_FALSE;
+               is_dst_up = false;
        }
        if (entp != NULL) {
                debug("detach from entropy");
@@ -4644,11 +4645,11 @@ destroy_libs(void) {
 #ifdef WITH_IDN_OUT_SUPPORT
 static isc_result_t
 output_filter(isc_buffer_t *buffer, unsigned int used_org,
-             isc_boolean_t absolute)
+             bool absolute)
 {
        char tmp1[MAXDLEN], tmp2[MAXDLEN];
        size_t fromlen, tolen;
-       isc_boolean_t end_with_dot;
+       bool end_with_dot;
        isc_result_t result;
 
        /*
@@ -4660,7 +4661,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
                return (ISC_R_SUCCESS);
 
        memmove(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen);
-       end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE;
+       end_with_dot = (tmp1[fromlen - 1] == '.') ? true : false;
        if (absolute && !end_with_dot) {
                fromlen++;
                if (fromlen >= MAXDLEN)
@@ -5033,7 +5034,7 @@ chase_scanname(dns_name_t *name, dns_rdatatype_t type, dns_rdatatype_t covers)
 
 dns_rdataset_t *
 sigchase_scanname(dns_rdatatype_t type, dns_rdatatype_t covers,
-                 isc_boolean_t * lookedup, dns_name_t *rdata_name)
+                 bool * lookedup, dns_name_t *rdata_name)
 {
        dig_lookup_t *lookup;
        isc_buffer_t *b = NULL;
@@ -5046,16 +5047,16 @@ sigchase_scanname(dns_rdatatype_t type, dns_rdatatype_t covers,
        if (temp != NULL)
                return (temp);
 
-       if (*lookedup == ISC_TRUE)
+       if (*lookedup == true)
                return (NULL);
 
-       lookup = clone_lookup(current_lookup, ISC_TRUE);
-       lookup->trace_root = ISC_FALSE;
-       lookup->new_search = ISC_TRUE;
+       lookup = clone_lookup(current_lookup, true);
+       lookup->trace_root = false;
+       lookup->new_search = true;
 
        result = isc_buffer_allocate(mctx, &b, BUFSIZE);
        check_result(result, "isc_buffer_allocate");
-       result = dns_name_totext(rdata_name, ISC_FALSE, b);
+       result = dns_name_totext(rdata_name, false, b);
        check_result(result, "dns_name_totext");
        isc_buffer_usedregion(b, &r);
        r.base[r.length] = '\0';
@@ -5073,9 +5074,9 @@ sigchase_scanname(dns_rdatatype_t type, dns_rdatatype_t covers,
        }
 
        lookup->rdtype = querytype;
-       lookup->rdtypeset = ISC_TRUE;
+       lookup->rdtypeset = true;
        lookup->qrdtype = querytype;
-       *lookedup = ISC_TRUE;
+       *lookedup = true;
 
        ISC_LIST_APPEND(lookup_list, lookup, link);
        printf("\n\nLaunch a query to find a RRset of type ");
@@ -5165,11 +5166,11 @@ get_trusted_key(void) {
        dns_rdatacallbacks_t callbacks;
 
        result = isc_file_exists(trustedkey);
-       if (result !=  ISC_TRUE) {
+       if (result !=  true) {
                result = isc_file_exists("/etc/trusted-key.key");
-               if (result !=  ISC_TRUE) {
+               if (result !=  true) {
                        result = isc_file_exists("./trusted-key.key");
-                       if (result !=  ISC_TRUE)
+                       if (result !=  true)
                                return (ISC_R_FAILURE);
                        else
                                filename = "./trusted-key.key";
@@ -5226,15 +5227,15 @@ prepare_lookup(dns_name_t *name)
        dig_server_t *s;
        void *ptr;
 
-       lookup = clone_lookup(current_lookup, ISC_TRUE);
-       lookup->trace_root = ISC_FALSE;
-       lookup->new_search = ISC_TRUE;
-       lookup->trace_root_sigchase = ISC_FALSE;
+       lookup = clone_lookup(current_lookup, true);
+       lookup->trace_root = false;
+       lookup->new_search = true;
+       lookup->trace_root_sigchase = false;
 
        strlcpy(lookup->textname, lookup->textnamesigchase, MXNAME);
 
        lookup->rdtype = lookup->rdtype_sigchase;
-       lookup->rdtypeset = ISC_TRUE;
+       lookup->rdtypeset = true;
        lookup->qrdtype = lookup->qrdtype_sigchase;
 
        s = ISC_LIST_HEAD(lookup->my_server_list);
@@ -5261,7 +5262,7 @@ prepare_lookup(dns_name_t *name)
                isc_buffer_t *b = NULL;
                isc_region_t r;
                dns_rdataset_t *rdataset = NULL;
-               isc_boolean_t true = ISC_TRUE;
+               bool true = true;
 #endif
 
                memset(namestr, 0, DNS_NAME_FORMATSIZE);
@@ -5423,7 +5424,7 @@ isc_result_t
 initialization(dns_name_t *name)
 {
        isc_result_t   result;
-       isc_boolean_t  true = ISC_TRUE;
+       bool  true = true;
 
        chase_nsrdataset = NULL;
        result = advanced_rrsearch(&chase_nsrdataset, name, dns_rdatatype_ns,
@@ -5520,7 +5521,7 @@ contains_trusted_key(dns_name_t *name, dns_rdataset_t *rdataset,
 
                for (i = 0; i < tk_list.nb_tk; i++) {
                        if (dst_key_compare(tk_list.key[i], dnsseckey)
-                           == ISC_TRUE) {
+                           == true) {
                                dns_rdata_reset(&rdata);
 
                                printf(";; Ok, find a Trusted Key in the "
@@ -5623,7 +5624,7 @@ sigchase_verify_sig_key(dns_name_t *name, dns_rdataset_t *rdataset,
                        check_result(result, "empty DS dataset");
 
                        result = dns_dnssec_verify(name, &myrdataset, dnsseckey,
-                                                  ISC_FALSE, mctx, &sigrdata);
+                                                  false, mctx, &sigrdata);
 
                        printf(";; VERIFYING ");
                        print_type(rdataset->type);
@@ -5753,9 +5754,9 @@ sigchase_verify_ds(dns_name_t *name, dns_rdataset_t *keyrdataset,
 isc_result_t
 advanced_rrsearch(dns_rdataset_t **rdataset, dns_name_t *name,
                  dns_rdatatype_t type, dns_rdatatype_t covers,
-                 isc_boolean_t *lookedup)
+                 bool *lookedup)
 {
-       isc_boolean_t  tmplookedup;
+       bool  tmplookedup;
 
        INSIST(rdataset != NULL);
 
@@ -5769,7 +5770,7 @@ advanced_rrsearch(dns_rdataset_t **rdataset, dns_name_t *name,
                        return (ISC_R_FAILURE);
                return (ISC_R_NOTFOUND);
        }
-       *lookedup = ISC_FALSE;
+       *lookedup = false;
        return (ISC_R_SUCCESS);
 }
 
@@ -5781,8 +5782,8 @@ sigchase_td(dns_message_t *msg)
 {
        isc_result_t result;
        dns_name_t *name = NULL;
-       isc_boolean_t have_answer = ISC_FALSE;
-       isc_boolean_t true = ISC_TRUE;
+       bool have_answer = false;
+       bool true = true;
 
        if (msg->rcode != dns_rcode_noerror &&
            msg->rcode != dns_rcode_nxdomain) {
@@ -5824,7 +5825,7 @@ sigchase_td(dns_message_t *msg)
                                                         DNS_SECTION_AUTHORITY);
                        dup_name(name, &chase_authority_name);
                        if (chase_nsrdataset != NULL) {
-                               have_delegation_ns = ISC_TRUE;
+                               have_delegation_ns = true;
                                printf("no response but there is a delegation"
                                       " in authority section: ");
                                dns_name_print(name, stdout);
@@ -5855,7 +5856,7 @@ sigchase_td(dns_message_t *msg)
                                                 dns_rdatatype_any,
                                                 DNS_SECTION_ANSWER);
                if (chase_rdataset != NULL)
-                       have_response = ISC_TRUE;
+                       have_response = true;
        }
 
        result = advanced_rrsearch(&chase_keyrdataset,
@@ -5954,8 +5955,8 @@ sigchase_td(dns_message_t *msg)
                               " See 2.2.1 in RFC 3658\n");
                        chase_rdataset = NULL;
                        chase_sigrdataset = NULL;
-                       have_response = ISC_FALSE;
-                       have_delegation_ns = ISC_FALSE;
+                       have_response = false;
+                       have_delegation_ns = false;
 
                        dns_name_init(&tmp_name, NULL);
                        result = child_of_zone(&chase_name, &chase_current_name,
@@ -5967,7 +5968,7 @@ sigchase_td(dns_message_t *msg)
                               " validation of the zone: ");
                        dns_name_print(&chase_authority_name, stdout);
                        printf("\n");
-                       have_delegation_ns = ISC_TRUE;
+                       have_delegation_ns = true;
                } else {
                        if (have_response)
                                goto finalstep;
@@ -6038,9 +6039,9 @@ sigchase_td(dns_message_t *msg)
 
                prepare_lookup(&chase_authority_name);
 
-               have_response = ISC_FALSE;
-               have_delegation_ns = ISC_FALSE;
-               delegation_follow = ISC_TRUE;
+               have_response = false;
+               have_delegation_ns = false;
+               delegation_follow = true;
                error_message = NULL;
                dup_name(&chase_authority_name, &chase_current_name);
                free_name(&chase_authority_name);
@@ -6143,7 +6144,7 @@ getneededrr(dns_message_t *msg)
        dns_name_t *name = NULL;
        dns_rdata_t sigrdata = DNS_RDATA_INIT;
        dns_rdata_sig_t siginfo;
-       isc_boolean_t   true = ISC_TRUE;
+       bool   true = true;
 
        if ((result = dns_message_firstname(msg, DNS_SECTION_ANSWER))
            != ISC_R_SUCCESS) {
@@ -6358,10 +6359,10 @@ sigchase_bu(dns_message_t *msg)
                chase_sigkeyrdataset = NULL;
                chase_dsrdataset = NULL;
                chase_sigdsrdataset = NULL;
-               chase_siglookedup = ISC_FALSE;
-               chase_keylookedup = ISC_FALSE;
-               chase_dslookedup = ISC_FALSE;
-               chase_sigdslookedup = ISC_FALSE;
+               chase_siglookedup = false;
+               chase_keylookedup = false;
+               chase_dslookedup = false;
+               chase_sigdslookedup = false;
                sigchase(msg);
                clean_trustedkey();
                return;
@@ -6428,8 +6429,8 @@ sigchase_bu(dns_message_t *msg)
        chase_sigkeyrdataset = NULL;
        chase_dsrdataset = NULL;
        chase_sigdsrdataset = NULL;
-       chase_siglookedup = chase_keylookedup = ISC_FALSE;
-       chase_dslookedup = chase_sigdslookedup = ISC_FALSE;
+       chase_siglookedup = chase_keylookedup = false;
+       chase_dslookedup = chase_sigdslookedup = false;
 
        printf(";; Now, we want to validate the DS :  recursive call\n");
        sigchase(msg);
index d7ff9d3d346edc63cbbc52bf23f84c0b82ccb67f..d342b1e1492b1f1cfbc3dce24f5db58d61e66a22 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <limits.h>
 
 
 #include <dig/dig.h>
 
-static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
-static isc_boolean_t default_lookups = ISC_TRUE;
+static bool short_form = true, listed_server = false;
+static bool default_lookups = true;
 static int seen_error = -1;
-static isc_boolean_t list_addresses = ISC_TRUE;
+static bool list_addresses = true;
 static dns_rdatatype_t list_type = dns_rdatatype_a;
-static isc_boolean_t printed_server = ISC_FALSE;
-static isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
+static bool printed_server = false;
+static bool ipv4only = false, ipv6only = false;
 
 static const char *opcodetext[] = {
        "QUERY",
@@ -237,12 +238,12 @@ printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
   UNUSED(owner_name);
   UNUSED(rdataset);
   UNUSED(target);
-  return(ISC_FALSE);
+  return(false);
 }
 #endif
 static isc_result_t
 printsection(dns_message_t *msg, dns_section_t sectionid,
-            const char *section_name, isc_boolean_t headers,
+            const char *section_name, bool headers,
             dig_query_t *query)
 {
        dns_name_t *name, *print_name;
@@ -253,13 +254,13 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
        isc_region_t r;
        dns_name_t empty_name;
        char tbuf[4096];
-       isc_boolean_t first;
-       isc_boolean_t no_rdata;
+       bool first;
+       bool no_rdata;
 
        if (sectionid == DNS_SECTION_QUESTION)
-               no_rdata = ISC_TRUE;
+               no_rdata = true;
        else
-               no_rdata = ISC_FALSE;
+               no_rdata = false;
 
        if (headers)
                printf(";; %s SECTION:\n", section_name);
@@ -277,7 +278,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
                dns_message_currentname(msg, sectionid, &name);
 
                isc_buffer_init(&target, tbuf, sizeof(tbuf));
-               first = ISC_TRUE;
+               first = true;
                print_name = name;
 
                for (rdataset = ISC_LIST_HEAD(name->list);
@@ -296,7 +297,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
                        if (!short_form) {
                                result = dns_rdataset_totext(rdataset,
                                                             print_name,
-                                                            ISC_FALSE,
+                                                            false,
                                                             no_rdata,
                                                             &target);
                                if (result != ISC_R_SUCCESS)
@@ -304,7 +305,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
 #ifdef USEINITALWS
                                if (first) {
                                        print_name = &empty_name;
-                                       first = ISC_FALSE;
+                                       first = false;
                                }
 #else
                                UNUSED(first); /* Shut up compiler. */
@@ -362,7 +363,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
 
 static isc_result_t
 printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, dns_name_t *owner,
-          const char *set_name, isc_boolean_t headers)
+          const char *set_name, bool headers)
 {
        isc_buffer_t target;
        isc_result_t result;
@@ -375,7 +376,7 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, dns_name_t *owner,
 
        isc_buffer_init(&target, tbuf, sizeof(tbuf));
 
-       result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(rdataset, owner, false, false,
                                     &target);
        if (result != ISC_R_SUCCESS)
                return (result);
@@ -412,8 +413,8 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
 }
 
 static isc_result_t
-printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
-       isc_boolean_t did_flag = ISC_FALSE;
+printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
+       bool did_flag = false;
        dns_rdataset_t *opt, *tsig = NULL;
        dns_name_t *tsigname;
        isc_result_t result = ISC_R_SUCCESS;
@@ -436,7 +437,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                                    sizeof(sockstr));
                printf("Address: %s\n", sockstr);
                printf("Aliases: \n\n");
-               printed_server = ISC_TRUE;
+               printed_server = true;
        }
 
        if (msg->rcode != 0) {
@@ -468,22 +469,22 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                dns_name_copy(query->lookup->name, name, NULL);
                chase_cnamechain(msg, name);
                dns_name_format(name, namestr, sizeof(namestr));
-               lookup = clone_lookup(query->lookup, ISC_FALSE);
+               lookup = clone_lookup(query->lookup, false);
                if (lookup != NULL) {
                        strlcpy(lookup->textname, namestr,
                                sizeof(lookup->textname));
                        lookup->rdtype = dns_rdatatype_aaaa;
-                       lookup->rdtypeset = ISC_TRUE;
+                       lookup->rdtypeset = true;
                        lookup->origin = NULL;
                        lookup->retries = tries;
                        ISC_LIST_APPEND(lookup_list, lookup, link);
                }
-               lookup = clone_lookup(query->lookup, ISC_FALSE);
+               lookup = clone_lookup(query->lookup, false);
                if (lookup != NULL) {
                        strlcpy(lookup->textname, namestr,
                                sizeof(lookup->textname));
                        lookup->rdtype = dns_rdatatype_mx;
-                       lookup->rdtypeset = ISC_TRUE;
+                       lookup->rdtypeset = true;
                        lookup->origin = NULL;
                        lookup->retries = tries;
                        ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -497,31 +498,31 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                printf(";; flags: ");
                if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
                        printf("qr");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                }
                if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
                        printf("%saa", did_flag ? " " : "");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                }
                if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
                        printf("%stc", did_flag ? " " : "");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                }
                if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
                        printf("%srd", did_flag ? " " : "");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                }
                if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
                        printf("%sra", did_flag ? " " : "");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                }
                if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
                        printf("%sad", did_flag ? " " : "");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                }
                if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
                        printf("%scd", did_flag ? " " : "");
-                       did_flag = ISC_TRUE;
+                       did_flag = true;
                        POST(did_flag);
                }
                printf("; QUERY: %u, ANSWER: %u, "
@@ -544,7 +545,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
            !short_form) {
                printf("\n");
                result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
-                                     ISC_TRUE, query);
+                                     true, query);
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
@@ -552,7 +553,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                if (!short_form)
                        printf("\n");
                result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
-                                     ISC_TF(!short_form), query);
+                                     !short_form, query);
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
@@ -561,7 +562,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
            !short_form) {
                printf("\n");
                result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
-                                     ISC_TRUE, query);
+                                     true, query);
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
@@ -569,14 +570,14 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
            !short_form) {
                printf("\n");
                result = printsection(msg, DNS_SECTION_ADDITIONAL,
-                                     "ADDITIONAL", ISC_TRUE, query);
+                                     "ADDITIONAL", true, query);
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
        if ((tsig != NULL) && !short_form) {
                printf("\n");
                result = printrdata(msg, tsig, tsigname,
-                                   "PSEUDOSECTION TSIG", ISC_TRUE);
+                                   "PSEUDOSECTION TSIG", true);
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
@@ -611,7 +612,7 @@ pre_parse_args(int argc, char **argv) {
        while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
                switch (c) {
                case 'm':
-                       memdebugging = ISC_TRUE;
+                       memdebugging = true;
                        if (strcasecmp("trace", isc_commandline_argument) == 0)
                                isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
                        else if (strcasecmp("record",
@@ -625,12 +626,12 @@ pre_parse_args(int argc, char **argv) {
                case '4':
                        if (ipv6only)
                                fatal("only one of -4 and -6 allowed");
-                       ipv4only = ISC_TRUE;
+                       ipv4only = true;
                        break;
                case '6':
                        if (ipv4only)
                                fatal("only one of -4 and -6 allowed");
-                       ipv6only = ISC_TRUE;
+                       ipv6only = true;
                        break;
                case 'a': break;
                case 'c': break;
@@ -650,8 +651,8 @@ pre_parse_args(int argc, char **argv) {
                case 'C': break;
                case 'D':
                        if (debugging)
-                               debugtiming = ISC_TRUE;
-                       debugging = ISC_TRUE;
+                               debugtiming = true;
+                       debugging = true;
                        break;
                case 'N': break;
                case 'R': break;
@@ -661,12 +662,12 @@ pre_parse_args(int argc, char **argv) {
                        show_usage();
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
        isc_commandline_index = 1;
 }
 
 static void
-parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
+parse_args(bool is_batchfile, int argc, char **argv) {
        char hostname[MXNAME];
        dig_lookup_t *lookup;
        int c;
@@ -681,24 +682,24 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
 
        lookup = make_empty_lookup();
 
-       lookup->servfail_stops = ISC_FALSE;
-       lookup->comments = ISC_FALSE;
+       lookup->servfail_stops = false;
+       lookup->comments = false;
        short_form = !verbose;
 
        while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
                switch (c) {
                case 'l':
-                       lookup->tcp_mode = ISC_TRUE;
+                       lookup->tcp_mode = true;
                        lookup->rdtype = dns_rdatatype_axfr;
-                       lookup->rdtypeset = ISC_TRUE;
+                       lookup->rdtypeset = true;
                        fatalexit = 3;
                        break;
                case 'v':
                case 'd':
-                       short_form = ISC_FALSE;
+                       short_form = false;
                        break;
                case 'r':
-                       lookup->recurse = ISC_FALSE;
+                       lookup->recurse = false;
                        break;
                case 't':
                        if (strncasecmp(isc_commandline_argument,
@@ -723,22 +724,22 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                        if (!lookup->rdtypeset ||
                            lookup->rdtype != dns_rdatatype_axfr)
                                lookup->rdtype = rdtype;
-                       lookup->rdtypeset = ISC_TRUE;
+                       lookup->rdtypeset = true;
 #ifdef WITH_IDNKIT
                        idnoptions = 0;
 #endif
                        if (rdtype == dns_rdatatype_axfr) {
                                /* -l -t any -v */
                                list_type = dns_rdatatype_any;
-                               short_form = ISC_FALSE;
-                               lookup->tcp_mode = ISC_TRUE;
+                               short_form = false;
+                               lookup->tcp_mode = true;
                        } else if (rdtype == dns_rdatatype_ixfr) {
                                lookup->ixfr_serial = serial;
-                               lookup->tcp_mode = ISC_TRUE;
+                               lookup->tcp_mode = true;
                                list_type = rdtype;
                        } else if (rdtype == dns_rdatatype_any) {
                                if (!lookup->tcp_mode_set)
-                                       lookup->tcp_mode = ISC_TRUE;
+                                       lookup->tcp_mode = true;
 #ifdef WITH_IDNKIT
                        } else if (rdtype == dns_rdatatype_a ||
                                   rdtype == dns_rdatatype_aaaa ||
@@ -748,8 +749,8 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
 #endif
                        } else
                                list_type = rdtype;
-                       list_addresses = ISC_FALSE;
-                       default_lookups = ISC_FALSE;
+                       list_addresses = false;
+                       default_lookups = false;
                        break;
                case 'c':
                        tr.base = isc_commandline_argument;
@@ -763,9 +764,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                                      isc_commandline_argument);
                        } else {
                                lookup->rdclass = rdclass;
-                               lookup->rdclassset = ISC_TRUE;
+                               lookup->rdclassset = true;
                        }
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                        break;
                case 'a':
                        if (!lookup->rdtypeset ||
@@ -775,13 +776,13 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                        idnoptions = 0;
 #endif
                        list_type = dns_rdatatype_any;
-                       list_addresses = ISC_FALSE;
-                       lookup->rdtypeset = ISC_TRUE;
-                       short_form = ISC_FALSE;
-                       default_lookups = ISC_FALSE;
+                       list_addresses = false;
+                       lookup->rdtypeset = true;
+                       short_form = false;
+                       default_lookups = false;
                        break;
                case 'i':
-                       lookup->ip6_int = ISC_TRUE;
+                       lookup->ip6_int = true;
                        break;
                case 'n':
                        /* deprecated */
@@ -807,23 +808,23 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                                tries = 2;
                        break;
                case 'T':
-                       lookup->tcp_mode = ISC_TRUE;
-                       lookup->tcp_mode_set = ISC_TRUE;
+                       lookup->tcp_mode = true;
+                       lookup->tcp_mode_set = true;
                        break;
                case 'U':
-                       lookup->tcp_mode = ISC_FALSE;
-                       lookup->tcp_mode_set = ISC_TRUE;
+                       lookup->tcp_mode = false;
+                       lookup->tcp_mode_set = true;
                        break;
                case 'C':
                        debug("showing all SOAs");
                        lookup->rdtype = dns_rdatatype_ns;
-                       lookup->rdtypeset = ISC_TRUE;
+                       lookup->rdtypeset = true;
                        lookup->rdclass = dns_rdataclass_in;
-                       lookup->rdclassset = ISC_TRUE;
-                       lookup->ns_search_only = ISC_TRUE;
-                       lookup->trace_root = ISC_TRUE;
-                       lookup->identify_previous_line = ISC_TRUE;
-                       default_lookups = ISC_FALSE;
+                       lookup->rdclassset = true;
+                       lookup->ns_search_only = true;
+                       lookup->trace_root = true;
+                       lookup->identify_previous_line = true;
+                       default_lookups = false;
                        break;
                case 'N':
                        debug("setting NDOTS to %s",
@@ -840,7 +841,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                        /* Handled by pre_parse_args(). */
                        break;
                case 's':
-                       lookup->servfail_stops = ISC_TRUE;
+                       lookup->servfail_stops = true;
                        break;
                }
        }
@@ -855,22 +856,22 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
        if (argc > isc_commandline_index + 1) {
                set_nameserver(argv[isc_commandline_index+1]);
                debug("server is %s", argv[isc_commandline_index+1]);
-               listed_server = ISC_TRUE;
+               listed_server = true;
        } else
-               check_ra = ISC_TRUE;
+               check_ra = true;
 
-       lookup->pending = ISC_FALSE;
+       lookup->pending = false;
        if (get_reverse(store, sizeof(store), hostname,
-                       lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS) {
+                       lookup->ip6_int, true) == ISC_R_SUCCESS) {
                strlcpy(lookup->textname, store, sizeof(lookup->textname));
                lookup->rdtype = dns_rdatatype_ptr;
-               lookup->rdtypeset = ISC_TRUE;
-               default_lookups = ISC_FALSE;
+               lookup->rdtypeset = true;
+               default_lookups = false;
        } else {
                strlcpy(lookup->textname, hostname, sizeof(lookup->textname));
-               usesearch = ISC_TRUE;
+               usesearch = true;
        }
-       lookup->new_search = ISC_TRUE;
+       lookup->new_search = true;
        ISC_LIST_APPEND(lookup_list, lookup, link);
 }
 
@@ -905,7 +906,7 @@ main(int argc, char **argv) {
        check_result(result, "isc_app_start");
        setup_libs();
        setup_system(ipv4only, ipv6only);
-       parse_args(ISC_FALSE, argc, argv);
+       parse_args(false, argc, argv);
        if (keyfile[0] != 0)
                setup_file_key();
        else if (keysecret[0] != 0)
index 640ec72a16095c6591aa9dde4409c99f8cddc752..cc37c55db51c67b2f2574ce11c307efe65beea2d 100644 (file)
 /*! \file */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <dns/rdatalist.h>
 
 #include <dst/dst.h>
 
-#include <isc/boolean.h>
 #include <isc/buffer.h>
 #include <isc/bufferlist.h>
 #include <isc/formatcheck.h>
@@ -95,7 +95,7 @@ typedef struct dig_searchlist dig_searchlist_t;
 
 /*% The dig_lookup structure */
 struct dig_lookup {
-       isc_boolean_t
+       bool
                pending, /*%< Pending a successful answer */
                waiting_connect,
                doing_xfr,
@@ -138,9 +138,9 @@ struct dig_lookup {
                idnin,
                idnout;
 #ifdef DIG_SIGCHASE
-isc_boolean_t  sigchase;
+bool   sigchase;
 #if DIG_SIGCHASE_TD
-       isc_boolean_t do_topdown,
+       bool do_topdown,
                trace_root_sigchase,
                rdtype_sigchaseset,
                rdclass_sigchaseset;
@@ -159,8 +159,8 @@ isc_boolean_t       sigchase;
        dns_rdataclass_t rdclass_sigchase;
 #endif
        dns_rdataclass_t rdclass;
-       isc_boolean_t rdtypeset;
-       isc_boolean_t rdclassset;
+       bool rdtypeset;
+       bool rdclassset;
        char name_space[BUFSIZE];
        char oname_space[BUFSIZE];
        isc_buffer_t namebuf;
@@ -202,7 +202,7 @@ isc_boolean_t       sigchase;
 /*% The dig_query structure */
 struct dig_query {
        dig_lookup_t *lookup;
-       isc_boolean_t waiting_connect,
+       bool waiting_connect,
                pending_free,
                waiting_senddone,
                first_pass,
@@ -216,7 +216,7 @@ struct dig_query {
        uint32_t second_rr_serial;
        uint32_t msg_count;
        uint32_t rr_count;
-       isc_boolean_t ixfr_axfr;
+       bool ixfr_axfr;
        char *servname;
        char *userarg;
        isc_bufferlist_t sendlist,
@@ -268,7 +268,7 @@ extern dig_serverlist_t server_list;
 extern dig_searchlistlist_t search_list;
 extern unsigned int extrabytes;
 
-extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
+extern bool check_ra, have_ipv4, have_ipv6, specified_source,
        usesearch, showsearch, qr;
 extern in_port_t port;
 extern unsigned int timeout;
@@ -287,17 +287,17 @@ extern unsigned int digestbits;
 extern char trustedkey[MXNAME];
 #endif
 extern dns_tsigkey_t *tsigkey;
-extern isc_boolean_t validated;
+extern bool validated;
 extern isc_taskmgr_t *taskmgr;
 extern isc_task_t *global_task;
-extern isc_boolean_t free_now;
-extern isc_boolean_t debugging, debugtiming, memdebugging;
-extern isc_boolean_t keep_open;
+extern bool free_now;
+extern bool debugging, debugtiming, memdebugging;
+extern bool keep_open;
 
 extern char *progname;
 extern int tries;
 extern int fatalexit;
-extern isc_boolean_t verbose;
+extern bool verbose;
 #ifdef WITH_IDNKIT
 extern int idnoptions;
 #endif
@@ -312,8 +312,8 @@ int
 getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
 
 isc_result_t
-get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
-           isc_boolean_t strict);
+get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
+           bool strict);
 
 ISC_PLATFORM_NORETURN_PRE void
 fatal(const char *format, ...)
@@ -325,7 +325,7 @@ debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
 void
 check_result(isc_result_t result, const char *msg);
 
-isc_boolean_t
+bool
 setup_lookup(dig_lookup_t *lookup);
 
 void
@@ -347,7 +347,7 @@ void
 setup_libs(void);
 
 void
-setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only);
+setup_system(bool ipv4only, bool ipv6only);
 
 isc_result_t
 parse_uint(uint32_t *uip, const char *value, uint32_t max,
@@ -364,13 +364,13 @@ void
 parse_hmac(const char *hmacstr);
 
 dig_lookup_t *
-requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
+requeue_lookup(dig_lookup_t *lookold, bool servers);
 
 dig_lookup_t *
 make_empty_lookup(void);
 
 dig_lookup_t *
-clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
+clone_lookup(dig_lookup_t *lookold, bool servers);
 
 dig_server_t *
 make_server(const char *servname, const char *userarg);
@@ -413,7 +413,7 @@ extern isc_result_t
 #endif
 
 extern isc_result_t
-(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
+(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, bool headers);
 /*%<
  * Print the final result of the lookup.
  */
@@ -460,7 +460,7 @@ dig_setup(int argc, char **argv);
  * Call to supply new parameters for the next lookup
  */
 void
-dig_query_setup(isc_boolean_t, isc_boolean_t, int argc, char **argv);
+dig_query_setup(bool, bool, int argc, char **argv);
 
 /*%<
  * set the main application event cycle running
index 0bc29fb43fb488bac1c0f89e56330a120d92c8f6..59bd01b5c5dd4f6b87ce7cd1f7151001a23c33fa 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 
 #endif
 #endif
 
-static isc_boolean_t short_form = ISC_TRUE,
-       tcpmode = ISC_FALSE, tcpmode_set = ISC_FALSE,
-       identify = ISC_FALSE, stats = ISC_TRUE,
-       comments = ISC_TRUE, section_question = ISC_TRUE,
-       section_answer = ISC_TRUE, section_authority = ISC_TRUE,
-       section_additional = ISC_TRUE, recurse = ISC_TRUE,
-       aaonly = ISC_FALSE, nofail = ISC_TRUE,
-       default_lookups = ISC_TRUE, a_noanswer = ISC_FALSE;
+static bool short_form = true,
+       tcpmode = false, tcpmode_set = false,
+       identify = false, stats = true,
+       comments = true, section_question = true,
+       section_answer = true, section_authority = true,
+       section_additional = true, recurse = true,
+       aaonly = false, nofail = true,
+       default_lookups = true, a_noanswer = false;
 
-static isc_boolean_t interactive;
+static bool interactive;
 
-static isc_boolean_t in_use = ISC_FALSE;
+static bool in_use = false;
 static char defclass[MXRD] = "IN";
 static char deftype[MXRD] = "A";
 static isc_event_t *global_event = NULL;
@@ -218,7 +219,7 @@ printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
        UNUSED(owner_name);
        UNUSED(rdataset);
        UNUSED(target);
-       return(ISC_FALSE);
+       return(false);
 }
 #endif
 static void
@@ -226,7 +227,7 @@ printrdata(dns_rdata_t *rdata) {
        isc_result_t result;
        isc_buffer_t *b = NULL;
        unsigned int size = 1024;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 
        if (rdata->type < N_KNOWN_RRTYPES)
                printf("%s", rtypetext[rdata->type]);
@@ -241,7 +242,7 @@ printrdata(dns_rdata_t *rdata) {
                if (result == ISC_R_SUCCESS) {
                        printf("%.*s\n", (int)isc_buffer_usedlength(b),
                               (char *)isc_buffer_base(b));
-                       done = ISC_TRUE;
+                       done = true;
                } else if (result != ISC_R_NOSPACE)
                        check_result(result, "dns_rdata_totext");
                isc_buffer_free(&b);
@@ -250,7 +251,7 @@ printrdata(dns_rdata_t *rdata) {
 }
 
 static isc_result_t
-printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
+printsection(dig_query_t *query, dns_message_t *msg, bool headers,
             dns_section_t section) {
        isc_result_t result, loopresult;
        dns_name_t *name;
@@ -317,7 +318,7 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
 }
 
 static isc_result_t
-detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
+detailsection(dig_query_t *query, dns_message_t *msg, bool headers,
             dns_section_t section) {
        isc_result_t result, loopresult;
        dns_name_t *name;
@@ -442,7 +443,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
 }
 
 static isc_result_t
-printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
+printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
        char servtext[ISC_SOCKADDR_FORMATSIZE];
 
        /* I've we've gotten this far, we've reached a server. */
@@ -461,10 +462,10 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
        if (!short_form) {
                puts("------------");
                /*              detailheader(query, msg);*/
-               detailsection(query, msg, ISC_TRUE, DNS_SECTION_QUESTION);
-               detailsection(query, msg, ISC_TRUE, DNS_SECTION_ANSWER);
-               detailsection(query, msg, ISC_TRUE, DNS_SECTION_AUTHORITY);
-               detailsection(query, msg, ISC_TRUE, DNS_SECTION_ADDITIONAL);
+               detailsection(query, msg, true, DNS_SECTION_QUESTION);
+               detailsection(query, msg, true, DNS_SECTION_ANSWER);
+               detailsection(query, msg, true, DNS_SECTION_AUTHORITY);
+               detailsection(query, msg, true, DNS_SECTION_ADDITIONAL);
                puts("------------");
        }
 
@@ -492,12 +493,12 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                dns_name_copy(query->lookup->name, name, NULL);
                chase_cnamechain(msg, name);
                dns_name_format(name, namestr, sizeof(namestr));
-               lookup = clone_lookup(query->lookup, ISC_FALSE);
+               lookup = clone_lookup(query->lookup, false);
                if (lookup != NULL) {
                        strlcpy(lookup->textname, namestr,
                                sizeof(lookup->textname));
                        lookup->rdtype = dns_rdatatype_aaaa;
-                       lookup->rdtypeset = ISC_TRUE;
+                       lookup->rdtypeset = true;
                        lookup->origin = NULL;
                        lookup->retries = tries;
                        ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -511,7 +512,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
                printsection(query, msg, headers, DNS_SECTION_ANSWER);
        else {
                if (default_lookups && query->lookup->rdtype == dns_rdatatype_a)
-                       a_noanswer = ISC_TRUE;
+                       a_noanswer = true;
 
                else if (!default_lookups ||
                         (query->lookup->rdtype == dns_rdatatype_aaaa &&
@@ -533,7 +534,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
 }
 
 static void
-show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
+show_settings(bool full, bool serv_only) {
        dig_server_t *srv;
        isc_sockaddr_t sockaddr;
        dig_searchlist_t *listent;
@@ -578,7 +579,7 @@ show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
        printf("\n");
 }
 
-static isc_boolean_t
+static bool
 testtype(char *typetext) {
        isc_result_t result;
        isc_textregion_t tr;
@@ -588,14 +589,14 @@ testtype(char *typetext) {
        tr.length = strlen(typetext);
        result = dns_rdatatype_fromtext(&rdtype, &tr);
        if (result == ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
        else {
                printf("unknown query type: %s\n", typetext);
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
-static isc_boolean_t
+static bool
 testclass(char *typetext) {
        isc_result_t result;
        isc_textregion_t tr;
@@ -605,10 +606,10 @@ testclass(char *typetext) {
        tr.length = strlen(typetext);
        result = dns_rdataclass_fromtext(&rdclass, &tr);
        if (result == ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
        else {
                printf("unknown query class: %s\n", typetext);
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -657,7 +658,7 @@ setoption(char *opt) {
        ((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
 
        if (CHECKOPT("all", 3)) {
-               show_settings(ISC_TRUE, ISC_FALSE);
+               show_settings(true, false);
        } else if (strncasecmp(opt, "class=", 6) == 0) {
                if (testclass(&opt[6]))
                        strlcpy(defclass, &opt[6], sizeof(defclass));
@@ -667,41 +668,41 @@ setoption(char *opt) {
        } else if (strncasecmp(opt, "type=", 5) == 0) {
                if (testtype(&opt[5])) {
                        strlcpy(deftype, &opt[5], sizeof(deftype));
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                }
        } else if (strncasecmp(opt, "ty=", 3) == 0) {
                if (testtype(&opt[3])) {
                        strlcpy(deftype, &opt[3], sizeof(deftype));
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                }
        } else if (strncasecmp(opt, "querytype=", 10) == 0) {
                if (testtype(&opt[10])) {
                        strlcpy(deftype, &opt[10], sizeof(deftype));
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                }
        } else if (strncasecmp(opt, "query=", 6) == 0) {
                if (testtype(&opt[6])) {
                        strlcpy(deftype, &opt[6], sizeof(deftype));
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                }
        } else if (strncasecmp(opt, "qu=", 3) == 0) {
                if (testtype(&opt[3])) {
                        strlcpy(deftype, &opt[3], sizeof(deftype));
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                }
        } else if (strncasecmp(opt, "q=", 2) == 0) {
                if (testtype(&opt[2])) {
                        strlcpy(deftype, &opt[2], sizeof(deftype));
-                       default_lookups = ISC_FALSE;
+                       default_lookups = false;
                }
        } else if (strncasecmp(opt, "domain=", 7) == 0) {
                strlcpy(domainopt, &opt[7], sizeof(domainopt));
                set_search_domain(domainopt);
-               usesearch = ISC_TRUE;
+               usesearch = true;
        } else if (strncasecmp(opt, "do=", 3) == 0) {
                strlcpy(domainopt, &opt[3], sizeof(domainopt));
                set_search_domain(domainopt);
-               usesearch = ISC_TRUE;
+               usesearch = true;
        } else if (strncasecmp(opt, "port=", 5) == 0) {
                set_port(&opt[5]);
        } else if (strncasecmp(opt, "po=", 3) == 0) {
@@ -711,43 +712,43 @@ setoption(char *opt) {
        } else if (strncasecmp(opt, "t=", 2) == 0) {
                set_timeout(&opt[2]);
        } else if (CHECKOPT("recurse", 3)) {
-               recurse = ISC_TRUE;
+               recurse = true;
        } else if (CHECKOPT("norecurse", 5)) {
-               recurse = ISC_FALSE;
+               recurse = false;
        } else if (strncasecmp(opt, "retry=", 6) == 0) {
                set_tries(&opt[6]);
        } else if (strncasecmp(opt, "ret=", 4) == 0) {
                set_tries(&opt[4]);
        } else if (CHECKOPT("defname", 3)) {
-               usesearch = ISC_TRUE;
+               usesearch = true;
        } else if (CHECKOPT("nodefname", 5)) {
-               usesearch = ISC_FALSE;
+               usesearch = false;
        } else if (CHECKOPT("vc", 2)) {
-               tcpmode = ISC_TRUE;
-               tcpmode_set = ISC_TRUE;
+               tcpmode = true;
+               tcpmode_set = true;
        } else if (CHECKOPT("novc", 4)) {
-               tcpmode = ISC_FALSE;
-               tcpmode_set = ISC_TRUE;
+               tcpmode = false;
+               tcpmode_set = true;
        } else if (CHECKOPT("debug", 3)) {
-               short_form = ISC_FALSE;
-               showsearch = ISC_TRUE;
+               short_form = false;
+               showsearch = true;
        } else if (CHECKOPT("nodebug", 5)) {
-               short_form = ISC_TRUE;
-               showsearch = ISC_FALSE;
+               short_form = true;
+               showsearch = false;
        } else if (CHECKOPT("d2", 2)) {
-               debugging = ISC_TRUE;
+               debugging = true;
        } else if (CHECKOPT("nod2", 4)) {
-               debugging = ISC_FALSE;
+               debugging = false;
        } else if (CHECKOPT("search", 3)) {
-               usesearch = ISC_TRUE;
+               usesearch = true;
        } else if (CHECKOPT("nosearch", 5)) {
-               usesearch = ISC_FALSE;
+               usesearch = false;
        } else if (CHECKOPT("sil", 3)) {
-               /* deprecation_msg = ISC_FALSE; */
+               /* deprecation_msg = false; */
        } else if (CHECKOPT("fail", 3)) {
-               nofail=ISC_FALSE;
+               nofail=false;
        } else if (CHECKOPT("nofail", 5)) {
-               nofail=ISC_TRUE;
+               nofail=true;
        } else if (strncasecmp(opt, "ndots=", 6) == 0) {
                set_ndots(&opt[6]);
        } else {
@@ -766,7 +767,7 @@ addlookup(char *opt) {
 
        debug("addlookup()");
 
-       a_noanswer = ISC_FALSE;
+       a_noanswer = false;
 
        tr.base = deftype;
        tr.length = strlen(deftype);
@@ -783,21 +784,21 @@ addlookup(char *opt) {
                rdclass = dns_rdataclass_in;
        }
        lookup = make_empty_lookup();
-       if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, ISC_TRUE)
+       if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true)
            == ISC_R_SUCCESS) {
                strlcpy(lookup->textname, store, sizeof(lookup->textname));
                lookup->rdtype = dns_rdatatype_ptr;
-               lookup->rdtypeset = ISC_TRUE;
+               lookup->rdtypeset = true;
        } else {
                strlcpy(lookup->textname, opt, sizeof(lookup->textname));
                lookup->rdtype = rdtype;
-               lookup->rdtypeset = ISC_TRUE;
+               lookup->rdtypeset = true;
        }
        lookup->rdclass = rdclass;
-       lookup->rdclassset = ISC_TRUE;
-       lookup->trace = ISC_FALSE;
+       lookup->rdclassset = true;
+       lookup->trace = false;
        lookup->trace_root = lookup->trace;
-       lookup->ns_search_only = ISC_FALSE;
+       lookup->ns_search_only = false;
        lookup->identify = identify;
        lookup->recurse = recurse;
        lookup->aaonly = aaonly;
@@ -805,7 +806,7 @@ addlookup(char *opt) {
        lookup->udpsize = 0;
        lookup->comments = comments;
        if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set)
-               lookup->tcp_mode = ISC_TRUE;
+               lookup->tcp_mode = true;
        else
                lookup->tcp_mode = tcpmode;
        lookup->stats = stats;
@@ -813,9 +814,9 @@ addlookup(char *opt) {
        lookup->section_answer = section_answer;
        lookup->section_authority = section_authority;
        lookup->section_additional = section_additional;
-       lookup->new_search = ISC_TRUE;
+       lookup->new_search = true;
        if (nofail)
-               lookup->servfail_stops = ISC_FALSE;
+               lookup->servfail_stops = false;
        ISC_LIST_INIT(lookup->q);
        ISC_LINK_INIT(lookup, link);
        ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -839,11 +840,11 @@ do_next_command(char *input) {
                 (strcasecmp(ptr, "lserver") == 0)) {
                isc_app_block();
                set_nameserver(arg);
-               check_ra = ISC_FALSE;
+               check_ra = false;
                isc_app_unblock();
-               show_settings(ISC_TRUE, ISC_TRUE);
+               show_settings(true, true);
        } else if (strcasecmp(ptr, "exit") == 0) {
-               in_use = ISC_FALSE;
+               in_use = false;
        } else if (strcasecmp(ptr, "help") == 0 ||
                   strcasecmp(ptr, "?") == 0) {
                printf("The '%s' command is not yet implemented.\n", ptr);
@@ -880,7 +881,7 @@ get_next_command(void) {
                ptr = fgets(buf, COMMSIZE, stdin);
        isc_app_unblock();
        if (ptr == NULL) {
-               in_use = ISC_FALSE;
+               in_use = false;
        } else
                do_next_command(ptr);
 #ifdef HAVE_READLINE
@@ -892,9 +893,9 @@ get_next_command(void) {
 
 static void
 parse_args(int argc, char **argv) {
-       isc_boolean_t have_lookup = ISC_FALSE;
+       bool have_lookup = false;
 
-       usesearch = ISC_TRUE;
+       usesearch = true;
        for (argc--, argv++; argc > 0; argc--, argv++) {
                debug("main parsing %s", argv[0]);
                if (argv[0][0] == '-') {
@@ -904,15 +905,15 @@ parse_args(int argc, char **argv) {
                        } else if (argv[0][1] != 0) {
                                setoption(&argv[0][1]);
                        } else
-                               have_lookup = ISC_TRUE;
+                               have_lookup = true;
                } else {
                        if (!have_lookup) {
-                               have_lookup = ISC_TRUE;
-                               in_use = ISC_TRUE;
+                               have_lookup = true;
+                               in_use = true;
                                addlookup(argv[0]);
                        } else {
                                set_nameserver(argv[0]);
-                               check_ra = ISC_FALSE;
+                               check_ra = false;
                        }
                }
        }
@@ -983,13 +984,13 @@ int
 main(int argc, char **argv) {
        isc_result_t result;
 
-       interactive = ISC_TF(isatty(0));
+       interactive = isatty(0);
 
        ISC_LIST_INIT(lookup_list);
        ISC_LIST_INIT(server_list);
        ISC_LIST_INIT(search_list);
 
-       check_ra = ISC_TRUE;
+       check_ra = true;
 
        /* setup dighost callbacks */
 #ifdef DIG_SIGCHASE
@@ -1006,7 +1007,7 @@ main(int argc, char **argv) {
        setup_libs();
        progname = argv[0];
 
-       setup_system(ISC_FALSE, ISC_FALSE);
+       setup_system(false, false);
        parse_args(argc, argv);
        if (keyfile[0] != 0)
                setup_file_key();
@@ -1020,7 +1021,7 @@ main(int argc, char **argv) {
        else
                result = isc_app_onrun(mctx, global_task, getinput, NULL);
        check_result(result, "isc_app_onrun");
-       in_use = ISC_TF(!in_use);
+       in_use = !in_use;
 
        (void)isc_app_run();
 
index bbf2f6b5985adf392c2250b66c91c7a8f1545f9e..65fdaaad4cf4cedd044ab6d25d854a017147fb10 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -61,7 +62,7 @@ static dns_fixedname_t        fixed;
 static dns_name_t      *name = NULL;
 static isc_mem_t       *mctx = NULL;
 static uint32_t        ttl;
-static isc_boolean_t   emitttl = ISC_FALSE;
+static bool    emitttl = false;
 
 static isc_result_t
 initname(char *setname) {
@@ -120,7 +121,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
                              isc_result_totext(result));
        }
 
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result != ISC_R_SUCCESS)
                fatal("can't find %s node in %s", setname, filename);
 
@@ -161,7 +162,7 @@ loadkeyset(char *dirname, dns_rdataset_t *rdataset) {
                return (ISC_R_NOSPACE);
        isc_buffer_putstr(&buf, "keyset-");
 
-       result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
+       result = dns_name_tofilenametext(name, false, &buf);
        check_result(result, "dns_name_tofilenametext()");
        if (isc_buffer_availablelength(&buf) == 0)
                return (ISC_R_NOSPACE);
@@ -235,8 +236,8 @@ logkey(dns_rdata_t *rdata)
 }
 
 static void
-emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
-     isc_boolean_t cds, dns_rdata_t *rdata)
+emit(unsigned int dtype, bool showall, char *lookaside,
+     bool cds, dns_rdata_t *rdata)
 {
        isc_result_t result;
        unsigned char buf[DNS_DS_BUFFERSIZE];
@@ -265,7 +266,7 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
        if (result != ISC_R_SUCCESS)
                fatal("can't build record");
 
-       result = dns_name_totext(name, ISC_FALSE, &nameb);
+       result = dns_name_totext(name, false, &nameb);
        if (result != ISC_R_SUCCESS)
                fatal("can't print name");
 
@@ -354,10 +355,10 @@ main(int argc, char **argv) {
        char            *endp;
        int             ch;
        unsigned int    dtype = DNS_DSDIGEST_SHA1;
-       isc_boolean_t   cds = ISC_FALSE;
-       isc_boolean_t   both = ISC_TRUE;
-       isc_boolean_t   usekeyset = ISC_FALSE;
-       isc_boolean_t   showall = ISC_FALSE;
+       bool    cds = false;
+       bool    both = true;
+       bool    usekeyset = false;
+       bool    showall = false;
        isc_result_t    result;
        isc_log_t       *log = NULL;
        isc_entropy_t   *ectx = NULL;
@@ -378,31 +379,31 @@ main(int argc, char **argv) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
 #define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
        while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
                switch (ch) {
                case '1':
                        dtype = DNS_DSDIGEST_SHA1;
-                       both = ISC_FALSE;
+                       both = false;
                        break;
                case '2':
                        dtype = DNS_DSDIGEST_SHA256;
-                       both = ISC_FALSE;
+                       both = false;
                        break;
                case 'A':
-                       showall = ISC_TRUE;
+                       showall = true;
                        break;
                case 'a':
                        algname = isc_commandline_argument;
-                       both = ISC_FALSE;
+                       both = false;
                        break;
                case 'C':
                        if (lookaside != NULL)
                                fatal("lookaside and CDS are mutually"
                                      " exclusive");
-                       cds = ISC_TRUE;
+                       cds = true;
                        break;
                case 'c':
                        classname = isc_commandline_argument;
@@ -428,10 +429,10 @@ main(int argc, char **argv) {
                                fatal("lookaside must be a non-empty string");
                        break;
                case 's':
-                       usekeyset = ISC_TRUE;
+                       usekeyset = true;
                        break;
                case 'T':
-                       emitttl = ISC_TRUE;
+                       emitttl = true;
                        ttl = atol(isc_commandline_argument);
                        break;
                case 'v':
@@ -487,7 +488,7 @@ main(int argc, char **argv) {
 
        /* When not using -f, -A is implicit */
        if (filename == NULL)
-               showall = ISC_TRUE;
+               showall = true;
 
        if (argc < isc_commandline_index + 1 && filename == NULL)
                fatal("the key file name was not specified");
index 2edf61485b95811903ca5c8fafc48cb2e8d16a49..0d1e7f87c057b0eccccf642a80e6570db29cb67b 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -59,13 +60,13 @@ static dns_rdataclass_t rdclass;
 static dns_fixedname_t fixed;
 static dns_name_t      *name = NULL;
 static isc_mem_t       *mctx = NULL;
-static isc_boolean_t   setpub = ISC_FALSE, setdel = ISC_FALSE;
-static isc_boolean_t   setttl = ISC_FALSE;
+static bool    setpub = false, setdel = false;
+static bool    setttl = false;
 static isc_stdtime_t   pub = 0, del = 0;
 static dns_ttl_t       ttl = 0;
 static isc_stdtime_t   syncadd = 0, syncdel = 0;
-static isc_boolean_t   setsyncadd = ISC_FALSE;
-static isc_boolean_t   setsyncdel = ISC_FALSE;
+static bool    setsyncadd = false;
+static bool    setsyncdel = false;
 
 static isc_result_t
 initname(char *setname) {
@@ -125,7 +126,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
                              isc_result_totext(result));
        }
 
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result != ISC_R_SUCCESS)
                fatal("can't find %s node in %s", setname, filename);
 
@@ -227,7 +228,7 @@ emit(const char *dir, dns_rdata_t *rdata) {
                dst_key_free(&tmp);
        }
 
-       dst_key_setexternal(key, ISC_TRUE);
+       dst_key_setexternal(key, true);
        if (setpub)
                dst_key_settime(key, DST_TIME_PUBLISH, pub);
        if (setdel)
@@ -317,7 +318,7 @@ main(int argc, char **argv) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
 #define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
        while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
@@ -348,7 +349,7 @@ main(int argc, char **argv) {
                        break;
                case 'L':
                        ttl = strtottl(isc_commandline_argument);
-                       setttl = ISC_TRUE;
+                       setttl = true;
                        break;
                case 'P':
                        /* -Psync ? */
index 0c2b46b7cc79ebebbf976751bc406456390acaee..f65afd3164bc15a9d3e80a757a5b3fe51d0315a4 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -145,7 +146,7 @@ main(int argc, char **argv) {
        dns_name_t      *name;
        uint16_t        flags = 0, kskflag = 0, revflag = 0;
        dns_secalg_t    alg;
-       isc_boolean_t   oldstyle = ISC_FALSE;
+       bool    oldstyle = false;
        isc_mem_t       *mctx = NULL;
        int             ch;
        int             protocol = -1, signatory = 0;
@@ -163,20 +164,20 @@ main(int argc, char **argv) {
        isc_stdtime_t   inactive = 0, deltime = 0;
        isc_stdtime_t   now;
        int             prepub = -1;
-       isc_boolean_t   setpub = ISC_FALSE, setact = ISC_FALSE;
-       isc_boolean_t   setrev = ISC_FALSE, setinact = ISC_FALSE;
-       isc_boolean_t   setdel = ISC_FALSE, setttl = ISC_FALSE;
-       isc_boolean_t   unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
-       isc_boolean_t   unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
-       isc_boolean_t   unsetdel = ISC_FALSE;
-       isc_boolean_t   genonly = ISC_FALSE;
-       isc_boolean_t   use_nsec3 = ISC_FALSE;
-       isc_boolean_t   avoid_collisions = ISC_TRUE;
-       isc_boolean_t   exact;
+       bool    setpub = false, setact = false;
+       bool    setrev = false, setinact = false;
+       bool    setdel = false, setttl = false;
+       bool    unsetpub = false, unsetact = false;
+       bool    unsetrev = false, unsetinact = false;
+       bool    unsetdel = false;
+       bool    genonly = false;
+       bool    use_nsec3 = false;
+       bool   avoid_collisions = true;
+       bool    exact;
        unsigned char   c;
        isc_stdtime_t   syncadd = 0, syncdel = 0;
-       isc_boolean_t   unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
-       isc_boolean_t   unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
+       bool    unsetsyncadd = false, setsyncadd = false;
+       bool    unsetsyncdel = false, setsyncdel = false;
 
        if (argc == 1)
                usage();
@@ -188,7 +189,7 @@ main(int argc, char **argv) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        isc_stdtime_get(&now);
 
@@ -196,13 +197,13 @@ main(int argc, char **argv) {
        while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
            switch (ch) {
                case '3':
-                       use_nsec3 = ISC_TRUE;
+                       use_nsec3 = true;
                        break;
                case 'a':
                        algname = isc_commandline_argument;
                        break;
                case 'C':
-                       oldstyle = ISC_TRUE;
+                       oldstyle = true;
                        break;
                case 'c':
                        classname = isc_commandline_argument;
@@ -232,7 +233,7 @@ main(int argc, char **argv) {
                        break;
                case 'L':
                        ttl = strtottl(isc_commandline_argument);
-                       setttl = ISC_TRUE;
+                       setttl = true;
                        break;
                case 'l':
                        label = isc_mem_strdup(mctx, isc_commandline_argument);
@@ -255,10 +256,10 @@ main(int argc, char **argv) {
                                fatal("-v must be followed by a number");
                        break;
                case 'y':
-                       avoid_collisions = ISC_FALSE;
+                       avoid_collisions = false;
                        break;
                case 'G':
-                       genonly = ISC_TRUE;
+                       genonly = true;
                        break;
                case 'P':
                        /* -Psync ? */
@@ -468,14 +469,14 @@ main(int argc, char **argv) {
                                      "prepublication interval.");
 
                        if (!setpub && !setact) {
-                               setpub = setact = ISC_TRUE;
+                               setpub = setact = true;
                                publish = now;
                                activate = now + prepub;
                        } else if (setpub && !setact) {
-                               setact = ISC_TRUE;
+                               setact = true;
                                activate = publish + prepub;
                        } else if (setact && !setpub) {
-                               setpub = ISC_TRUE;
+                               setpub = true;
                                publish = activate - prepub;
                        }
 
@@ -563,7 +564,7 @@ main(int argc, char **argv) {
                                        "You can use dnssec-settime -D to "
                                        "change this.\n", program, keystr);
 
-               setpub = setact = ISC_TRUE;
+               setpub = setact = true;
        }
 
        if (nametype == NULL) {
index 764cbdf577ec5657eba63bef96b76f22e0635f6d..f57021c912336d49245f3fd8e5a442a08b34f0af 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -180,9 +181,9 @@ usage(void) {
        exit (-1);
 }
 
-static isc_boolean_t
+static bool
 dsa_size_ok(int size) {
-       return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
+       return (size >= 512 && size <= 1024 && size % 64 == 0);
 }
 
 static void
@@ -221,8 +222,8 @@ main(int argc, char **argv) {
        dns_name_t      *name;
        uint16_t        flags = 0, kskflag = 0, revflag = 0;
        dns_secalg_t    alg;
-       isc_boolean_t   conflict = ISC_FALSE, null_key = ISC_FALSE;
-       isc_boolean_t   oldstyle = ISC_FALSE;
+       bool    conflict = false, null_key = false;
+       bool    oldstyle = false;
        isc_mem_t       *mctx = NULL;
        int             ch, generator = 0, param = 0;
        int             protocol = -1, size = -1, signatory = 0;
@@ -244,24 +245,24 @@ main(int argc, char **argv) {
        int             options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
        int             dbits = 0;
        dns_ttl_t       ttl = 0;
-       isc_boolean_t   use_default = ISC_FALSE, use_nsec3 = ISC_FALSE;
+       bool    use_default = false, use_nsec3 = false;
        isc_stdtime_t   publish = 0, activate = 0, revokekey = 0;
        isc_stdtime_t   inactive = 0, deltime = 0;
        isc_stdtime_t   now;
        int             prepub = -1;
-       isc_boolean_t   setpub = ISC_FALSE, setact = ISC_FALSE;
-       isc_boolean_t   setrev = ISC_FALSE, setinact = ISC_FALSE;
-       isc_boolean_t   setdel = ISC_FALSE, setttl = ISC_FALSE;
-       isc_boolean_t   unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
-       isc_boolean_t   unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
-       isc_boolean_t   unsetdel = ISC_FALSE;
-       isc_boolean_t   genonly = ISC_FALSE;
-       isc_boolean_t   quiet = ISC_FALSE;
-       isc_boolean_t   show_progress = ISC_FALSE;
+       bool    setpub = false, setact = false;
+       bool    setrev = false, setinact = false;
+       bool    setdel = false, setttl = false;
+       bool    unsetpub = false, unsetact = false;
+       bool    unsetrev = false, unsetinact = false;
+       bool    unsetdel = false;
+       bool    genonly = false;
+       bool    quiet = false;
+       bool    show_progress = false;
        unsigned char   c;
        isc_stdtime_t   syncadd = 0, syncdel = 0;
-       isc_boolean_t   setsyncadd = ISC_FALSE;
-       isc_boolean_t   setsyncdel = ISC_FALSE;
+       bool    setsyncadd = false;
+       bool    setsyncdel = false;
 
        if (argc == 1)
                usage();
@@ -271,7 +272,7 @@ main(int argc, char **argv) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        /*
         * Process memory debugging argument first.
@@ -296,7 +297,7 @@ main(int argc, char **argv) {
                        break;
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
 
        RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
 
@@ -305,7 +306,7 @@ main(int argc, char **argv) {
        while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
            switch (ch) {
                case '3':
-                       use_nsec3 = ISC_TRUE;
+                       use_nsec3 = true;
                        break;
                case 'a':
                        algname = isc_commandline_argument;
@@ -316,7 +317,7 @@ main(int argc, char **argv) {
                                fatal("-b requires a non-negative number");
                        break;
                case 'C':
-                       oldstyle = ISC_TRUE;
+                       oldstyle = true;
                        break;
                case 'c':
                        classname = isc_commandline_argument;
@@ -364,7 +365,7 @@ main(int argc, char **argv) {
                        break;
                case 'L':
                        ttl = strtottl(isc_commandline_argument);
-                       setttl = ISC_TRUE;
+                       setttl = true;
                        break;
                case 'n':
                        nametype = isc_commandline_argument;
@@ -378,7 +379,7 @@ main(int argc, char **argv) {
                                      "[0..255]");
                        break;
                case 'q':
-                       quiet = ISC_TRUE;
+                       quiet = true;
                        break;
                case 'r':
                        setup_entropy(mctx, isc_commandline_argument, &ectx);
@@ -414,7 +415,7 @@ main(int argc, char **argv) {
                        /* already the default */
                        break;
                case 'G':
-                       genonly = ISC_TRUE;
+                       genonly = true;
                        break;
                case 'P':
                        /* -Psync ? */
@@ -508,7 +509,7 @@ main(int argc, char **argv) {
        }
 
        if (!isatty(0))
-               quiet = ISC_TRUE;
+               quiet = true;
 
        if (ectx == NULL)
                setup_entropy(mctx, NULL, &ectx);
@@ -540,7 +541,7 @@ main(int argc, char **argv) {
                              isc_result_totext(ret));
 
                if (algname == NULL) {
-                       use_default = ISC_TRUE;
+                       use_default = true;
                        if (use_nsec3)
                                algname = strdup(DEFAULT_NSEC3_ALGORITHM);
                        else
@@ -656,14 +657,14 @@ main(int argc, char **argv) {
                                      "prepublication interval.");
 
                        if (!setpub && !setact) {
-                               setpub = setact = ISC_TRUE;
+                               setpub = setact = true;
                                publish = now;
                                activate = now + prepub;
                        } else if (setpub && !setact) {
-                               setact = ISC_TRUE;
+                               setact = true;
                                activate = publish + prepub;
                        } else if (setact && !setpub) {
-                               setpub = ISC_TRUE;
+                               setpub = true;
                                publish = activate - prepub;
                        }
 
@@ -749,7 +750,7 @@ main(int argc, char **argv) {
                                        "You can use dnssec-settime -D to "
                                        "change this.\n", program, keystr);
 
-               setpub = setact = ISC_TRUE;
+               setpub = setact = true;
        }
 
        switch (alg) {
@@ -909,7 +910,7 @@ main(int argc, char **argv) {
        case DNS_KEYALG_NSEC3RSASHA1:
        case DNS_KEYALG_RSASHA256:
        case DNS_KEYALG_RSASHA512:
-               show_progress = ISC_TRUE;
+               show_progress = true;
                break;
 
        case DNS_KEYALG_DH:
@@ -923,7 +924,7 @@ main(int argc, char **argv) {
        case DST_ALG_ECDSA384:
        case DST_ALG_ED25519:
        case DST_ALG_ED448:
-               show_progress = ISC_TRUE;
+               show_progress = true;
                /* fall through */
 
        case DST_ALG_HMACMD5:
@@ -937,12 +938,12 @@ main(int argc, char **argv) {
        }
 
        if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY)
-               null_key = ISC_TRUE;
+               null_key = true;
 
        isc_buffer_init(&buf, filename, sizeof(filename) - 1);
 
        do {
-               conflict = ISC_FALSE;
+               conflict = false;
 
                if (!quiet && show_progress) {
                        fprintf(stderr, "Generating key pair.");
@@ -1065,7 +1066,7 @@ main(int argc, char **argv) {
                 * or another key being revoked.
                 */
                if (key_collision(key, name, directory, mctx, NULL)) {
-                       conflict = ISC_TRUE;
+                       conflict = true;
                        if (null_key) {
                                dst_key_free(&key);
                                break;
@@ -1086,7 +1087,7 @@ main(int argc, char **argv) {
 
                        dst_key_free(&key);
                }
-       } while (conflict == ISC_TRUE);
+       } while (conflict == true);
 
        if (conflict)
                fatal("cannot generate a null key due to possible key ID "
index 32b8f11ae61569b92e1c61368afff77dbfddb184..1a2b5455b7b58d57179d401f06be2e671cf958ec 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -92,9 +93,9 @@ main(int argc, char **argv) {
        dst_key_t *key = NULL;
        uint32_t flags;
        isc_buffer_t buf;
-       isc_boolean_t force = ISC_FALSE;
-       isc_boolean_t removefile = ISC_FALSE;
-       isc_boolean_t id = ISC_FALSE;
+       bool force = false;
+       bool removefile = false;
+       bool id = false;
 
        if (argc == 1)
                usage();
@@ -108,7 +109,7 @@ main(int argc, char **argv) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
                switch (ch) {
@@ -116,7 +117,7 @@ main(int argc, char **argv) {
                        engine = isc_commandline_argument;
                        break;
                    case 'f':
-                       force = ISC_TRUE;
+                       force = true;
                        break;
                    case 'K':
                        /*
@@ -130,10 +131,10 @@ main(int argc, char **argv) {
                        }
                        break;
                    case 'r':
-                       removefile = ISC_TRUE;
+                       removefile = true;
                        break;
                    case 'R':
-                       id = ISC_TRUE;
+                       id = true;
                        break;
                    case 'v':
                        verbose = strtol(isc_commandline_argument, &endp, 0);
index c980e5d966b70361e7cb73459bf28d524bfc63d9..f3559037e29d984a37d3e0b5326f27caf28771e6 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -104,7 +105,7 @@ usage(void) {
 }
 
 static void
-printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
+printtime(dst_key_t *key, int type, const char *tag, bool epoch,
          FILE *stream)
 {
        isc_result_t result;
@@ -154,23 +155,23 @@ main(int argc, char **argv) {
        isc_stdtime_t   now;
        isc_stdtime_t   pub = 0, act = 0, rev = 0, inact = 0, del = 0;
        isc_stdtime_t   prevact = 0, previnact = 0, prevdel = 0;
-       isc_boolean_t   setpub = ISC_FALSE, setact = ISC_FALSE;
-       isc_boolean_t   setrev = ISC_FALSE, setinact = ISC_FALSE;
-       isc_boolean_t   setdel = ISC_FALSE, setttl = ISC_FALSE;
-       isc_boolean_t   unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
-       isc_boolean_t   unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
-       isc_boolean_t   unsetdel = ISC_FALSE;
-       isc_boolean_t   printcreate = ISC_FALSE, printpub = ISC_FALSE;
-       isc_boolean_t   printact = ISC_FALSE,  printrev = ISC_FALSE;
-       isc_boolean_t   printinact = ISC_FALSE, printdel = ISC_FALSE;
-       isc_boolean_t   force = ISC_FALSE;
-       isc_boolean_t   epoch = ISC_FALSE;
-       isc_boolean_t   changed = ISC_FALSE;
+       bool    setpub = false, setact = false;
+       bool    setrev = false, setinact = false;
+       bool    setdel = false, setttl = false;
+       bool    unsetpub = false, unsetact = false;
+       bool    unsetrev = false, unsetinact = false;
+       bool    unsetdel = false;
+       bool    printcreate = false, printpub = false;
+       bool    printact = false,  printrev = false;
+       bool    printinact = false, printdel = false;
+       bool    force = false;
+       bool   epoch = false;
+       bool   changed = false;
        isc_log_t       *log = NULL;
        isc_stdtime_t   syncadd = 0, syncdel = 0;
-       isc_boolean_t   unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
-       isc_boolean_t   unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
-       isc_boolean_t   printsyncadd = ISC_FALSE, printsyncdel = ISC_FALSE;
+       bool    unsetsyncadd = false, setsyncadd = false;
+       bool    unsetsyncdel = false, setsyncdel = false;
+       bool    printsyncadd = false, printsyncdel = false;
 
        if (argc == 1)
                usage();
@@ -186,7 +187,7 @@ main(int argc, char **argv) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        isc_stdtime_get(&now);
 
@@ -197,51 +198,51 @@ main(int argc, char **argv) {
                        engine = isc_commandline_argument;
                        break;
                case 'f':
-                       force = ISC_TRUE;
+                       force = true;
                        break;
                case 'p':
                        p = isc_commandline_argument;
                        if (!strcasecmp(p, "all")) {
-                               printcreate = ISC_TRUE;
-                               printpub = ISC_TRUE;
-                               printact = ISC_TRUE;
-                               printrev = ISC_TRUE;
-                               printinact = ISC_TRUE;
-                               printdel = ISC_TRUE;
-                               printsyncadd = ISC_TRUE;
-                               printsyncdel = ISC_TRUE;
+                               printcreate = true;
+                               printpub = true;
+                               printact = true;
+                               printrev = true;
+                               printinact = true;
+                               printdel = true;
+                               printsyncadd = true;
+                               printsyncdel = true;
                                break;
                        }
 
                        do {
                                switch (*p++) {
                                case 'C':
-                                       printcreate = ISC_TRUE;
+                                       printcreate = true;
                                        break;
                                case 'P':
                                        if (!strncmp(p, "sync", 4)) {
                                                p += 4;
-                                               printsyncadd = ISC_TRUE;
+                                               printsyncadd = true;
                                                break;
                                        }
-                                       printpub = ISC_TRUE;
+                                       printpub = true;
                                        break;
                                case 'A':
-                                       printact = ISC_TRUE;
+                                       printact = true;
                                        break;
                                case 'R':
-                                       printrev = ISC_TRUE;
+                                       printrev = true;
                                        break;
                                case 'I':
-                                       printinact = ISC_TRUE;
+                                       printinact = true;
                                        break;
                                case 'D':
                                        if (!strncmp(p, "sync", 4)) {
                                                p += 4;
-                                               printsyncdel = ISC_TRUE;
+                                               printsyncdel = true;
                                                break;
                                        }
-                                       printdel = ISC_TRUE;
+                                       printdel = true;
                                        break;
                                case ' ':
                                        break;
@@ -252,7 +253,7 @@ main(int argc, char **argv) {
                        } while (*p != '\0');
                        break;
                case 'u':
-                       epoch = ISC_TRUE;
+                       epoch = true;
                        break;
                case 'K':
                        /*
@@ -268,7 +269,7 @@ main(int argc, char **argv) {
                        break;
                case 'L':
                        ttl = strtottl(isc_commandline_argument);
-                       setttl = ISC_TRUE;
+                       setttl = true;
                        break;
                case 'v':
                        verbose = strtol(isc_commandline_argument, &endp, 0);
@@ -282,7 +283,7 @@ main(int argc, char **argv) {
                                        fatal("-P sync specified more than "
                                              "once");
 
-                               changed = ISC_TRUE;
+                               changed = true;
                                syncadd = strtotime(isc_commandline_argument,
                                                   now, now, &setsyncadd);
                                unsetsyncadd = !setsyncadd;
@@ -292,7 +293,7 @@ main(int argc, char **argv) {
                        if (setpub || unsetpub)
                                fatal("-P specified more than once");
 
-                       changed = ISC_TRUE;
+                       changed = true;
                        pub = strtotime(isc_commandline_argument,
                                        now, now, &setpub);
                        unsetpub = !setpub;
@@ -301,7 +302,7 @@ main(int argc, char **argv) {
                        if (setact || unsetact)
                                fatal("-A specified more than once");
 
-                       changed = ISC_TRUE;
+                       changed = true;
                        act = strtotime(isc_commandline_argument,
                                        now, now, &setact);
                        unsetact = !setact;
@@ -310,7 +311,7 @@ main(int argc, char **argv) {
                        if (setrev || unsetrev)
                                fatal("-R specified more than once");
 
-                       changed = ISC_TRUE;
+                       changed = true;
                        rev = strtotime(isc_commandline_argument,
                                        now, now, &setrev);
                        unsetrev = !setrev;
@@ -319,7 +320,7 @@ main(int argc, char **argv) {
                        if (setinact || unsetinact)
                                fatal("-I specified more than once");
 
-                       changed = ISC_TRUE;
+                       changed = true;
                        inact = strtotime(isc_commandline_argument,
                                        now, now, &setinact);
                        unsetinact = !setinact;
@@ -331,7 +332,7 @@ main(int argc, char **argv) {
                                        fatal("-D sync specified more than "
                                              "once");
 
-                               changed = ISC_TRUE;
+                               changed = true;
                                syncdel = strtotime(isc_commandline_argument,
                                                   now, now, &setsyncdel);
                                unsetsyncdel = !setsyncdel;
@@ -342,7 +343,7 @@ main(int argc, char **argv) {
                        if (setdel || unsetdel)
                                fatal("-D specified more than once");
 
-                       changed = ISC_TRUE;
+                       changed = true;
                        del = strtotime(isc_commandline_argument,
                                        now, now, &setdel);
                        unsetdel = !setdel;
@@ -460,7 +461,7 @@ main(int argc, char **argv) {
                                        "before it is scheduled to be "
                                        "inactive.\n", program);
 
-               changed = setpub = setact = ISC_TRUE;
+               changed = setpub = setact = true;
        } else {
                if (prepub < 0)
                        prepub = 0;
@@ -472,10 +473,10 @@ main(int argc, char **argv) {
                                      "prepublication interval.");
 
                        if (setpub && !setact) {
-                               setact = ISC_TRUE;
+                               setact = true;
                                act = pub + prepub;
                        } else if (setact && !setpub) {
-                               setpub = ISC_TRUE;
+                               setpub = true;
                                pub = act - prepub;
                        }
 
@@ -606,11 +607,11 @@ main(int argc, char **argv) {
        if (force && !changed) {
                dst_key_settime(key, DST_TIME_PUBLISH, now);
                dst_key_settime(key, DST_TIME_ACTIVATE, now);
-               changed = ISC_TRUE;
+               changed = true;
        }
 
        if (!changed && setttl)
-               changed = ISC_TRUE;
+               changed = true;
 
        /*
         * Print out time values, if -p was used.
index 857c9d82dad735fef345895f3c5f1984887fe69e..c6a0313074dc601f92d6382a8c046465de172f19 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
@@ -127,8 +128,8 @@ isc_rwlock_t keylist_lock;
 static isc_stdtime_t starttime = 0, endtime = 0, dnskey_endtime = 0, now;
 static int cycle = -1;
 static int jitter = 0;
-static isc_boolean_t tryverify = ISC_FALSE;
-static isc_boolean_t printstats = ISC_FALSE;
+static bool tryverify = false;
+static bool printstats = false;
 static isc_mem_t *mctx = NULL;
 static isc_entropy_t *ectx = NULL;
 static dns_ttl_t zone_soa_min_ttl;
@@ -139,7 +140,7 @@ static const dns_master_style_t *masterstyle;
 static dns_masterformat_t inputformat = dns_masterformat_text;
 static dns_masterformat_t outputformat = dns_masterformat_text;
 static uint32_t rawversion = 1, serialnum = 0;
-static isc_boolean_t snset = ISC_FALSE;
+static bool snset = false;
 static unsigned int nsigned = 0, nretained = 0, ndropped = 0;
 static unsigned int nverified = 0, nverifyfailed = 0;
 static const char *directory = NULL, *dsdir = NULL;
@@ -157,28 +158,28 @@ static unsigned char *gsalt = saltbuf;
 static size_t salt_length = 0;
 static isc_task_t *master = NULL;
 static unsigned int ntasks = 0;
-static isc_boolean_t shuttingdown = ISC_FALSE, finished = ISC_FALSE;
-static isc_boolean_t nokeys = ISC_FALSE;
-static isc_boolean_t removefile = ISC_FALSE;
-static isc_boolean_t generateds = ISC_FALSE;
-static isc_boolean_t ignore_kskflag = ISC_FALSE;
-static isc_boolean_t keyset_kskonly = ISC_FALSE;
+static bool shuttingdown = false, finished = false;
+static bool nokeys = false;
+static bool removefile = false;
+static bool generateds = false;
+static bool ignore_kskflag = false;
+static bool keyset_kskonly = false;
 static dns_name_t *dlv = NULL;
 static dns_fixedname_t dlv_fixed;
 static dns_master_style_t *dsstyle = NULL;
 static unsigned int serialformat = SOA_SERIAL_KEEP;
 static unsigned int hash_length = 0;
-static isc_boolean_t unknownalg = ISC_FALSE;
-static isc_boolean_t disable_zone_check = ISC_FALSE;
-static isc_boolean_t update_chain = ISC_FALSE;
-static isc_boolean_t set_keyttl = ISC_FALSE;
+static bool unknownalg = false;
+static bool disable_zone_check = false;
+static bool update_chain = false;
+static bool set_keyttl = false;
 static dns_ttl_t keyttl;
-static isc_boolean_t smartsign = ISC_FALSE;
-static isc_boolean_t remove_orphansigs = ISC_FALSE;
-static isc_boolean_t remove_inactkeysigs = ISC_FALSE;
-static isc_boolean_t output_dnssec_only = ISC_FALSE;
-static isc_boolean_t output_stdout = ISC_FALSE;
-isc_boolean_t set_maxttl = ISC_FALSE;
+static bool smartsign = false;
+static bool remove_orphansigs = false;
+static bool remove_inactkeysigs = false;
+static bool output_dnssec_only = false;
+static bool output_stdout = false;
+bool set_maxttl = false;
 static dns_ttl_t maxttl = 0;
 
 #define INCSTAT(counter)               \
@@ -308,7 +309,7 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
 
        if (tryverify) {
                result = dns_dnssec_verify(name, rdataset, key,
-                                          ISC_TRUE, mctx, &trdata);
+                                          true, mctx, &trdata);
                if (result == ISC_R_SUCCESS) {
                        vbprintf(3, "\tsignature verified\n");
                        INCSTAT(nverified);
@@ -325,29 +326,29 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
        dns_diff_append(add, &tuple);
 }
 
-static inline isc_boolean_t
+static inline bool
 issigningkey(dns_dnsseckey_t *key) {
        return (key->force_sign || key->hint_sign);
 }
 
-static inline isc_boolean_t
+static inline bool
 ispublishedkey(dns_dnsseckey_t *key) {
        return ((key->force_publish || key->hint_publish) &&
                !key->hint_remove);
 }
 
-static inline isc_boolean_t
+static inline bool
 iszonekey(dns_dnsseckey_t *key) {
-       return (ISC_TF(dns_name_equal(dst_key_name(key->key), gorigin) &&
-                      dst_key_iszonekey(key->key)));
+       return (dns_name_equal(dst_key_name(key->key), gorigin) &&
+               dst_key_iszonekey(key->key));
 }
 
-static inline isc_boolean_t
+static inline bool
 isksk(dns_dnsseckey_t *key) {
        return (key->ksk);
 }
 
-static inline isc_boolean_t
+static inline bool
 iszsk(dns_dnsseckey_t *key) {
        return (ignore_kskflag || !key->ksk);
 }
@@ -422,8 +423,8 @@ keythatsigned(dns_rdata_rrsig_t *rrsig) {
                result = dns_dnsseckey_create(mctx, &pubkey, &key);
 
        if (result == ISC_R_SUCCESS) {
-               key->force_publish = ISC_FALSE;
-               key->force_sign = ISC_FALSE;
+               key->force_publish = false;
+               key->force_sign = false;
                key->index = keycount++;
                ISC_LIST_APPEND(keylist, key, link);
        }
@@ -437,7 +438,7 @@ keythatsigned(dns_rdata_rrsig_t *rrsig) {
  * and can't find the signing key that we expect to find, we drop the rrsig.
  * I'm not sure if this is completely correct, but it seems to work.
  */
-static isc_boolean_t
+static bool
 expecttofindkey(dns_name_t *name) {
        unsigned int options = DNS_DBFIND_NOWILD;
        dns_fixedname_t fname;
@@ -451,31 +452,31 @@ expecttofindkey(dns_name_t *name) {
        case ISC_R_SUCCESS:
        case DNS_R_NXDOMAIN:
        case DNS_R_NXRRSET:
-               return (ISC_TRUE);
+               return (true);
        case DNS_R_DELEGATION:
        case DNS_R_CNAME:
        case DNS_R_DNAME:
-               return (ISC_FALSE);
+               return (false);
        }
        dns_name_format(name, namestr, sizeof(namestr));
        fatal("failure looking for '%s DNSKEY' in database: %s",
              namestr, isc_result_totext(result));
        /* NOTREACHED */
-       return (ISC_FALSE); /* removes a warning */
+       return (false); /* removes a warning */
 }
 
-static inline isc_boolean_t
+static inline bool
 setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
            dns_rdata_t *rrsig)
 {
        isc_result_t result;
-       result = dns_dnssec_verify(name, set, key, ISC_FALSE, mctx, rrsig);
+       result = dns_dnssec_verify(name, set, key, false, mctx, rrsig);
        if (result == ISC_R_SUCCESS) {
                INCSTAT(nverified);
-               return (ISC_TRUE);
+               return (true);
        } else {
                INCSTAT(nverifyfailed);
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -493,8 +494,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
        dns_rdata_rrsig_t rrsig;
        dns_dnsseckey_t *key;
        isc_result_t result;
-       isc_boolean_t nosigs = ISC_FALSE;
-       isc_boolean_t *wassignedby, *nowsignedby;
+       bool nosigs = false;
+       bool *wassignedby, *nowsignedby;
        int arraysize;
        dns_difftuple_t *tuple;
        dns_ttl_t ttl;
@@ -515,7 +516,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
                vbprintf(2, "no existing signatures for %s/%s\n",
                         namestr, typestr);
                result = ISC_R_SUCCESS;
-               nosigs = ISC_TRUE;
+               nosigs = true;
        }
        if (result != ISC_R_SUCCESS)
                fatal("failed while looking for '%s RRSIG %s': %s",
@@ -526,13 +527,13 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
        arraysize = keycount;
        if (!nosigs)
                arraysize += dns_rdataset_count(&sigset);
-       wassignedby = isc_mem_get(mctx, arraysize * sizeof(isc_boolean_t));
-       nowsignedby = isc_mem_get(mctx, arraysize * sizeof(isc_boolean_t));
+       wassignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
+       nowsignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
        if (wassignedby == NULL || nowsignedby == NULL)
                fatal("out of memory");
 
        for (i = 0; i < arraysize; i++)
-               wassignedby[i] = nowsignedby[i] = ISC_FALSE;
+               wassignedby[i] = nowsignedby[i] = false;
 
        if (nosigs)
                result = ISC_R_NOMORE;
@@ -540,8 +541,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
                result = dns_rdataset_first(&sigset);
 
        while (result == ISC_R_SUCCESS) {
-               isc_boolean_t expired, future;
-               isc_boolean_t keep = ISC_FALSE, resign = ISC_FALSE;
+               bool expired, future;
+               bool keep = false, resign = false;
 
                dns_rdataset_current(&sigset, &sigrdata);
 
@@ -574,33 +575,33 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
                                 keep ? "retained" : "dropped", sigstr);
                } else if (!dns_dnssec_keyactive(key->key, now) &&
                           remove_inactkeysigs) {
-                       keep = ISC_FALSE;
+                       keep = false;
                        vbprintf(2, "\trrsig by %s dropped - key inactive\n",
                                 sigstr);
                } else if (issigningkey(key)) {
-                       wassignedby[key->index] = ISC_TRUE;
+                       wassignedby[key->index] = true;
 
                        if (!expired && rrsig.originalttl == set->ttl &&
                            setverifies(name, set, key->key, &sigrdata)) {
                                vbprintf(2, "\trrsig by %s retained\n", sigstr);
-                               keep = ISC_TRUE;
+                               keep = true;
                        } else {
                                vbprintf(2, "\trrsig by %s dropped - %s\n",
                                         sigstr, expired ? "expired" :
                                         rrsig.originalttl != set->ttl ?
                                         "ttl change" : "failed to verify");
-                               resign = ISC_TRUE;
+                               resign = true;
                        }
                } else if (!ispublishedkey(key) && remove_orphansigs) {
                        vbprintf(2, "\trrsig by %s dropped - dnskey removed\n",
                                 sigstr);
                } else if (iszonekey(key)) {
-                       wassignedby[key->index] = ISC_TRUE;
+                       wassignedby[key->index] = true;
 
                        if (!expired && rrsig.originalttl == set->ttl &&
                            setverifies(name, set, key->key, &sigrdata)) {
                                vbprintf(2, "\trrsig by %s retained\n", sigstr);
-                               keep = ISC_TRUE;
+                               keep = true;
                        } else {
                                vbprintf(2, "\trrsig by %s dropped - %s\n",
                                         sigstr, expired ? "expired" :
@@ -609,14 +610,14 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
                        }
                } else if (!expired) {
                        vbprintf(2, "\trrsig by %s retained\n", sigstr);
-                       keep = ISC_TRUE;
+                       keep = true;
                } else {
                        vbprintf(2, "\trrsig by %s expired\n", sigstr);
                }
 
                if (keep) {
                        if (key != NULL)
-                               nowsignedby[key->index] = ISC_TRUE;
+                               nowsignedby[key->index] = true;
                        INCSTAT(nretained);
                        if (sigset.ttl != ttl) {
                                vbprintf(2, "\tfixing ttl %s\n", sigstr);
@@ -651,7 +652,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
 
                        signwithkey(name, set, key->key, ttl, add,
                                    "resigning with dnskey");
-                       nowsignedby[key->index] = ISC_TRUE;
+                       nowsignedby[key->index] = true;
                }
 
                dns_rdata_reset(&sigrdata);
@@ -677,7 +678,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
 
                if (set->type == dns_rdatatype_dnskey &&
                     dns_name_equal(name, gorigin)) {
-                       isc_boolean_t have_ksk;
+                       bool have_ksk;
                        dns_dnsseckey_t *tmpkey;
 
                        have_ksk = isksk(key);
@@ -690,7 +691,7 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
                                if (REVOKE(tmpkey->key))
                                        continue;
                                if (isksk(tmpkey))
-                                       have_ksk = ISC_TRUE;
+                                       have_ksk = true;
                        }
                        if (isksk(key) || !have_ksk ||
                            (iszsk(key) && !keyset_kskonly))
@@ -704,8 +705,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
                }
        }
 
-       isc_mem_put(mctx, wassignedby, arraysize * sizeof(isc_boolean_t));
-       isc_mem_put(mctx, nowsignedby, arraysize * sizeof(isc_boolean_t));
+       isc_mem_put(mctx, wassignedby, arraysize * sizeof(bool));
+       isc_mem_put(mctx, nowsignedby, arraysize * sizeof(bool));
 }
 
 struct hashlist {
@@ -764,7 +765,7 @@ static void
 hashlist_add_dns_name(hashlist_t *l, /*const*/ dns_name_t *name,
                      unsigned int hashalg, unsigned int iterations,
                      const unsigned char *salt, size_t salt_len,
-                     isc_boolean_t speculative)
+                     bool speculative)
 {
        char nametext[DNS_NAME_FORMATSIZE];
        unsigned char hash[NSEC3_MAX_HASH_LENGTH + 1];
@@ -794,7 +795,7 @@ hashlist_sort(hashlist_t *l) {
        qsort(l->hashbuf, l->entries, l->length, hashlist_comp);
 }
 
-static isc_boolean_t
+static bool
 hashlist_hasdup(hashlist_t *l) {
        unsigned char *current;
        unsigned char *next = l->hashbuf;
@@ -814,10 +815,10 @@ hashlist_hasdup(hashlist_t *l) {
                if (next[l->length-1] != 0)
                        continue;
                if (isc_safe_memequal(current, next, l->length - 1))
-                       return (ISC_TRUE);
+                       return (true);
                current = next;
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static const unsigned char *
@@ -841,14 +842,14 @@ hashlist_findnext(const hashlist_t *l,
        return (next);
 }
 
-static isc_boolean_t
+static bool
 hashlist_exists(const hashlist_t *l,
                const unsigned char hash[NSEC3_MAX_HASH_LENGTH])
 {
        if (bsearch(hash, l->hashbuf, l->entries, l->length, hashlist_comp))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static void
@@ -869,7 +870,7 @@ addnowildcardhash(hashlist_t *l, /*const*/ dns_name_t *name,
                return;
        check_result(result,"addnowildcardhash: dns_name_concatenate()");
 
-       result = dns_db_findnode(gdb, wild, ISC_FALSE, &node);
+       result = dns_db_findnode(gdb, wild, false, &node);
        if (result == ISC_R_SUCCESS) {
                dns_db_detachnode(gdb, &node);
                return;
@@ -881,7 +882,7 @@ addnowildcardhash(hashlist_t *l, /*const*/ dns_name_t *name,
        }
 
        hashlist_add_dns_name(l, wild, hashalg, iterations, salt, salt_len,
-                             ISC_TRUE);
+                             true);
 }
 
 static void
@@ -904,7 +905,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
        if (strlen(prefix) > isc_buffer_availablelength(&b))
                fatal("path '%s' is too long", dsdir);
        isc_buffer_putstr(&b, prefix);
-       result = dns_name_tofilenametext(name, ISC_FALSE, &b);
+       result = dns_name_tofilenametext(name, false, &b);
        check_result(result, "dns_name_tofilenametext()");
        if (isc_buffer_availablelength(&b) == 0) {
                char namestr[DNS_NAME_FORMATSIZE];
@@ -941,7 +942,7 @@ loadds(dns_name_t *name, uint32_t ttl, dns_rdataset_t *dsset) {
 
        opendb("dsset-", name, gclass, &db);
        if (db != NULL) {
-               result = dns_db_findnode(db, name, ISC_FALSE, &node);
+               result = dns_db_findnode(db, name, false, &node);
                if (result == ISC_R_SUCCESS) {
                        dns_rdataset_init(dsset);
                        result = dns_db_findrdataset(db, node, NULL,
@@ -964,7 +965,7 @@ loadds(dns_name_t *name, uint32_t ttl, dns_rdataset_t *dsset) {
                return (ISC_R_NOTFOUND);
        }
 
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result != ISC_R_SUCCESS) {
                dns_db_detach(&db);
                return (result);
@@ -1015,7 +1016,7 @@ loadds(dns_name_t *name, uint32_t ttl, dns_rdataset_t *dsset) {
        check_result(result, "dns_diff_apply");
        dns_diff_clear(&diff);
 
-       dns_db_closeversion(db, &ver, ISC_TRUE);
+       dns_db_closeversion(db, &ver, true);
 
        result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_ds, 0, 0,
                                     dsset, NULL);
@@ -1027,13 +1028,13 @@ loadds(dns_name_t *name, uint32_t ttl, dns_rdataset_t *dsset) {
        return (result);
 }
 
-static isc_boolean_t
+static bool
 secure(dns_name_t *name, dns_dbnode_t *node) {
        dns_rdataset_t dsset;
        isc_result_t result;
 
        if (dns_name_equal(name, gorigin))
-               return (ISC_FALSE);
+               return (false);
 
        dns_rdataset_init(&dsset);
        result = dns_db_findrdataset(gdb, node, gversion, dns_rdatatype_ds,
@@ -1041,7 +1042,7 @@ secure(dns_name_t *name, dns_dbnode_t *node) {
        if (dns_rdataset_isassociated(&dsset))
                dns_rdataset_disassociate(&dsset);
 
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
 /*%
@@ -1052,7 +1053,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
        isc_result_t result;
        dns_rdataset_t rdataset;
        dns_rdatasetiter_t *rdsiter;
-       isc_boolean_t isdelegation = ISC_FALSE;
+       bool isdelegation = false;
        dns_diff_t del, add;
        char namestr[DNS_NAME_FORMATSIZE];
 
@@ -1063,7 +1064,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
         * Determine if this is a delegation point.
         */
        if (is_delegation(gdb, gversion, gorigin, name, node, NULL))
-               isdelegation = ISC_TRUE;
+               isdelegation = true;
 
        /*
         * Now iterate through the rdatasets.
@@ -1127,16 +1128,16 @@ 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 extranous RRSIG records for node.
  */
-static inline isc_boolean_t
+static inline bool
 active_node(dns_dbnode_t *node) {
        dns_rdatasetiter_t *rdsiter = NULL;
        dns_rdatasetiter_t *rdsiter2 = NULL;
-       isc_boolean_t active = ISC_FALSE;
+       bool active = false;
        isc_result_t result;
        dns_rdataset_t rdataset;
        dns_rdatatype_t type;
        dns_rdatatype_t covers;
-       isc_boolean_t found;
+       bool found;
 
        dns_rdataset_init(&rdataset);
        result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
@@ -1147,7 +1148,7 @@ active_node(dns_dbnode_t *node) {
                if (rdataset.type != dns_rdatatype_nsec &&
                    rdataset.type != dns_rdatatype_nsec3 &&
                    rdataset.type != dns_rdatatype_rrsig)
-                       active = ISC_TRUE;
+                       active = true;
                dns_rdataset_disassociate(&rdataset);
                if (!active)
                        result = dns_rdatasetiter_next(rdsiter);
@@ -1204,13 +1205,13 @@ active_node(dns_dbnode_t *node) {
                        }
                        if (type != dns_rdatatype_rrsig)
                                continue;
-                       found = ISC_FALSE;
+                       found = false;
                        for (result = dns_rdatasetiter_first(rdsiter2);
                             !found && result == ISC_R_SUCCESS;
                             result = dns_rdatasetiter_next(rdsiter2)) {
                                dns_rdatasetiter_current(rdsiter2, &rdataset);
                                if (rdataset.type == covers)
-                                       found = ISC_TRUE;
+                                       found = true;
                                dns_rdataset_disassociate(&rdataset);
                        }
                        if (!found) {
@@ -1363,12 +1364,12 @@ cleannode(dns_db_t *db, dns_dbversion_t *dbversion, dns_dbnode_t *node) {
        check_result(result, "dns_db_allrdatasets");
        result = dns_rdatasetiter_first(rdsiter);
        while (result == ISC_R_SUCCESS) {
-               isc_boolean_t destroy = ISC_FALSE;
+               bool destroy = false;
                dns_rdatatype_t covers = 0;
                dns_rdatasetiter_current(rdsiter, &set);
                if (set.type == dns_rdatatype_rrsig) {
                        covers = set.covers;
-                       destroy = ISC_TRUE;
+                       destroy = true;
                }
                dns_rdataset_disassociate(&set);
                result = dns_rdatasetiter_next(rdsiter);
@@ -1428,7 +1429,7 @@ signapex(void) {
        dns_db_detachnode(gdb, &node);
        result = dns_dbiterator_first(gdbiter);
        if (result == ISC_R_NOMORE)
-               finished = ISC_TRUE;
+               finished = true;
        else if (result != ISC_R_SUCCESS)
                fatal("failure iterating database: %s",
                      isc_result_totext(result));
@@ -1445,7 +1446,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
        dns_dbnode_t *node;
        sevent_t *sevent;
        dns_rdataset_t nsec;
-       isc_boolean_t found;
+       bool found;
        isc_result_t result;
        static dns_name_t *zonecut = NULL;      /* Protected by namelock. */
        static dns_fixedname_t fzonecut;        /* Protected by namelock. */
@@ -1469,7 +1470,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
                fatal("out of memory");
        name = dns_fixedname_initname(fname);
        node = NULL;
-       found = ISC_FALSE;
+       found = false;
        while (!found) {
                result = dns_dbiterator_current(gdbiter, &node, name);
                check_dns_dbiterator_current(result);
@@ -1495,7 +1496,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
                if (dns_rdataset_isassociated(&nsec))
                        dns_rdataset_disassociate(&nsec);
                if (result == ISC_R_SUCCESS) {
-                       found = ISC_TRUE;
+                       found = true;
                } else if (nsec_datatype == dns_rdatatype_nsec3) {
                        if (dns_name_issubdomain(name, gorigin) &&
                            (zonecut == NULL ||
@@ -1506,12 +1507,12 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
                                        zonecut = savezonecut(&fzonecut, name);
                                        if (!OPTOUT(nsec3flags) ||
                                            secure(name, node))
-                                               found = ISC_TRUE;
+                                               found = true;
                                } else if (has_dname(gdb, gversion, node)) {
                                        zonecut = savezonecut(&fzonecut, name);
-                                       found = ISC_TRUE;
+                                       found = true;
                                } else {
-                                       found = ISC_TRUE;
+                                       found = true;
                                }
                        }
                }
@@ -1524,7 +1525,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
  next:
                result = dns_dbiterator_next(gdbiter);
                if (result == ISC_R_NOMORE) {
-                       finished = ISC_TRUE;
+                       finished = true;
                        break;
                } else if (result != ISC_R_SUCCESS)
                        fatal("failure iterating database: %s",
@@ -1649,7 +1650,7 @@ add_ds(dns_name_t *name, dns_dbnode_t *node, uint32_t nsttl) {
  */
 static void
 remove_records(dns_dbnode_t *node, dns_rdatatype_t which,
-              isc_boolean_t checknsec)
+              bool checknsec)
 {
        isc_result_t result;
        dns_rdatatype_t type, covers;
@@ -1694,7 +1695,7 @@ remove_records(dns_dbnode_t *node, dns_rdatatype_t which,
  * which case remove all signatures except for DS or nsec_datatype
  */
 static void
-remove_sigs(dns_dbnode_t *node, isc_boolean_t delegation,
+remove_sigs(dns_dbnode_t *node, bool delegation,
            dns_rdatatype_t which)
 {
        isc_result_t result;
@@ -1744,7 +1745,7 @@ nsecify(void) {
        dns_rdataset_t rdataset;
        dns_rdatasetiter_t *rdsiter = NULL;
        dns_rdatatype_t type, covers;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
        isc_result_t result;
        uint32_t nsttl = 0;
 
@@ -1797,7 +1798,7 @@ nsecify(void) {
                if (!dns_name_issubdomain(name, gorigin)) {
                        result = dns_dbiterator_next(dbiter);
                        if (result == ISC_R_NOMORE)
-                               done = ISC_TRUE;
+                               done = true;
                        else
                                check_result(result, "dns_dbiterator_next()");
                        dns_db_detachnode(gdb, &node);
@@ -1806,14 +1807,14 @@ nsecify(void) {
 
                if (dns_name_equal(name, gorigin)) {
                        remove_records(node, dns_rdatatype_nsec3param,
-                                      ISC_TRUE);
+                                      true);
                        /* Clean old rrsigs at apex. */
                        (void)active_node(node);
                }
 
                if (is_delegation(gdb, gversion, gorigin, name, node, &nsttl)) {
                        zonecut = savezonecut(&fzonecut, name);
-                       remove_sigs(node, ISC_TRUE, 0);
+                       remove_sigs(node, true, 0);
                        if (generateds)
                                add_ds(name, node, nsttl);
                } else if (has_dname(gdb, gversion, node)) {
@@ -1823,7 +1824,7 @@ nsecify(void) {
                result = dns_dbiterator_next(dbiter);
                nextnode = NULL;
                while (result == ISC_R_SUCCESS) {
-                       isc_boolean_t active = ISC_FALSE;
+                       bool active = false;
                        result = dns_dbiterator_current(dbiter, &nextnode,
                                                        nextname);
                        check_dns_dbiterator_current(result);
@@ -1837,9 +1838,9 @@ nsecify(void) {
                            (zonecut != NULL &&
                             dns_name_issubdomain(nextname, zonecut)))
                        {
-                               remove_sigs(nextnode, ISC_FALSE, 0);
+                               remove_sigs(nextnode, false, 0);
                                remove_records(nextnode, dns_rdatatype_nsec,
-                                              ISC_FALSE);
+                                              false);
                                dns_db_detachnode(gdb, &nextnode);
                                result = dns_dbiterator_next(dbiter);
                                continue;
@@ -1849,7 +1850,7 @@ nsecify(void) {
                }
                if (result == ISC_R_NOMORE) {
                        dns_name_clone(gorigin, nextname);
-                       done = ISC_TRUE;
+                       done = true;
                } else if (result != ISC_R_SUCCESS)
                        fatal("iterating through the database failed: %s",
                              isc_result_totext(result));
@@ -1900,7 +1901,7 @@ addnsec3param(const unsigned char *salt, size_t salt_len,
        result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
        check_result(result, "dns_rdatalist_tordataset()");
 
-       result = dns_db_findnode(gdb, gorigin, ISC_TRUE, &node);
+       result = dns_db_findnode(gdb, gorigin, true, &node);
        check_result(result, "dns_db_find(gorigin)");
 
        /*
@@ -1965,7 +1966,7 @@ addnsec3(dns_name_t *name, dns_dbnode_t *node,
        result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
        check_result(result, "dns_rdatalist_tordataset()");
        result = dns_db_findnsec3node(gdb, dns_fixedname_name(&hashname),
-                                     ISC_TRUE, &nsec3node);
+                                     true, &nsec3node);
        check_result(result, "addnsec3: dns_db_findnode()");
        result = dns_db_addrdataset(gdb, nsec3node, gversion, 0, &rdataset,
                                    0, NULL);
@@ -1995,11 +1996,11 @@ nsec3clean(dns_name_t *name, dns_dbnode_t *node,
        dns_rdata_t rdata, delrdata;
        dns_rdatalist_t rdatalist;
        dns_rdataset_t rdataset, delrdataset;
-       isc_boolean_t delete_rrsigs = ISC_FALSE;
+       bool delete_rrsigs = false;
        isc_buffer_t target;
        isc_result_t result;
        unsigned char hash[NSEC3_MAX_HASH_LENGTH + 1];
-       isc_boolean_t exists;
+       bool exists;
 
        /*
         * Get the first label.
@@ -2066,7 +2067,7 @@ nsec3clean(dns_name_t *name, dns_dbnode_t *node,
                dns_rdataset_disassociate(&delrdataset);
                if (result != ISC_R_SUCCESS && result != DNS_R_NXRRSET)
                        check_result(result, "dns_db_subtractrdataset(NSEC3)");
-               delete_rrsigs = ISC_TRUE;
+               delete_rrsigs = true;
        }
        dns_rdataset_disassociate(&rdataset);
        if (result != ISC_R_NOMORE)
@@ -2215,8 +2216,8 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
        dns_name_t *name, *nextname, *zonecut;
        dns_rdataset_t rdataset;
        int order;
-       isc_boolean_t active;
-       isc_boolean_t done = ISC_FALSE;
+       bool active;
+       bool done = false;
        isc_result_t result;
        uint32_t nsttl = 0;
        unsigned int count, nlabels;
@@ -2244,7 +2245,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                if (!dns_name_issubdomain(name, gorigin)) {
                        result = dns_dbiterator_next(dbiter);
                        if (result == ISC_R_NOMORE)
-                               done = ISC_TRUE;
+                               done = true;
                        else
                                check_result(result, "dns_dbiterator_next()");
                        dns_db_detachnode(gdb, &node);
@@ -2252,7 +2253,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                }
 
                if (dns_name_equal(name, gorigin)) {
-                       remove_records(node, dns_rdatatype_nsec, ISC_TRUE);
+                       remove_records(node, dns_rdatatype_nsec, true);
                        /* Clean old rrsigs at apex. */
                        (void)active_node(node);
                }
@@ -2276,7 +2277,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                        if (!dns_name_issubdomain(nextname, gorigin) ||
                            (zonecut != NULL &&
                             dns_name_issubdomain(nextname, zonecut))) {
-                               remove_sigs(nextnode, ISC_FALSE, 0);
+                               remove_sigs(nextnode, false, 0);
                                dns_db_detachnode(gdb, &nextnode);
                                result = dns_dbiterator_next(dbiter);
                                continue;
@@ -2285,7 +2286,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                                          nextname, nextnode, &nsttl))
                        {
                                zonecut = savezonecut(&fzonecut, nextname);
-                               remove_sigs(nextnode, ISC_TRUE, 0);
+                               remove_sigs(nextnode, true, 0);
                                if (generateds)
                                        add_ds(nextname, nextnode, nsttl);
                                if (OPTOUT(nsec3flags) &&
@@ -2302,13 +2303,13 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                }
                if (result == ISC_R_NOMORE) {
                        dns_name_copy(gorigin, nextname, NULL);
-                       done = ISC_TRUE;
+                       done = true;
                } else if (result != ISC_R_SUCCESS)
                        fatal("iterating through the database failed: %s",
                              isc_result_totext(result));
                dns_name_downcase(name, name, NULL);
                hashlist_add_dns_name(hashlist, name, hashalg, iterations,
-                                     salt, salt_len, ISC_FALSE);
+                                     salt, salt_len, false);
                dns_db_detachnode(gdb, &node);
                /*
                 * Add hashs for empty nodes.  Use closest encloser logic.
@@ -2326,7 +2327,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                        dns_name_split(nextname, count, NULL, nextname);
                        hashlist_add_dns_name(hashlist, nextname, hashalg,
                                              iterations, salt, salt_len,
-                                             ISC_FALSE);
+                                             false);
                        addnowildcardhash(hashlist, nextname, hashalg,
                                          iterations, salt, salt_len);
                }
@@ -2349,7 +2350,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
         * Generate the nsec3 records.
         */
        zonecut = NULL;
-       done = ISC_FALSE;
+       done = false;
 
        addnsec3param(salt, salt_len, iterations);
 
@@ -2388,7 +2389,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                if (!dns_name_issubdomain(name, gorigin)) {
                        result = dns_dbiterator_next(dbiter);
                        if (result == ISC_R_NOMORE)
-                               done = ISC_TRUE;
+                               done = true;
                        else
                                check_result(result, "dns_dbiterator_next()");
                        dns_db_detachnode(gdb, &node);
@@ -2436,7 +2437,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                }
                if (result == ISC_R_NOMORE) {
                        dns_name_copy(gorigin, nextname, NULL);
-                       done = ISC_TRUE;
+                       done = true;
                } else if (result != ISC_R_SUCCESS)
                        fatal("iterating through the database failed: %s",
                              isc_result_totext(result));
@@ -2498,14 +2499,14 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
  * private keys from disk.
  */
 static void
-loadzonekeys(isc_boolean_t preserve_keys, isc_boolean_t load_public) {
+loadzonekeys(bool preserve_keys, bool load_public) {
        dns_dbnode_t *node;
        dns_dbversion_t *currentversion = NULL;
        isc_result_t result;
        dns_rdataset_t rdataset, keysigs, soasigs;
 
        node = NULL;
-       result = dns_db_findnode(gdb, gorigin, ISC_FALSE, &node);
+       result = dns_db_findnode(gdb, gorigin, false, &node);
        if (result != ISC_R_SUCCESS)
                fatal("failed to find the zone's origin: %s",
                      isc_result_totext(result));
@@ -2559,11 +2560,11 @@ loadzonekeys(isc_boolean_t preserve_keys, isc_boolean_t load_public) {
        if (dns_rdataset_isassociated(&soasigs))
                dns_rdataset_disassociate(&soasigs);
        dns_db_detachnode(gdb, &node);
-       dns_db_closeversion(gdb, &currentversion, ISC_FALSE);
+       dns_db_closeversion(gdb, &currentversion, false);
 }
 
 static void
-loadexplicitkeys(char *keyfiles[], int n, isc_boolean_t setksk) {
+loadexplicitkeys(char *keyfiles[], int n, bool setksk) {
        isc_result_t result;
        int i;
 
@@ -2605,11 +2606,11 @@ loadexplicitkeys(char *keyfiles[], int n, isc_boolean_t setksk) {
                        key->key = newkey;
                }
 
-               key->force_publish = ISC_TRUE;
-               key->force_sign = ISC_TRUE;
+               key->force_publish = true;
+               key->force_sign = true;
 
                if (setksk)
-                       key->ksk = ISC_TRUE;
+                       key->ksk = true;
        }
 }
 
@@ -2658,7 +2659,7 @@ build_final_keylist(void) {
                fatal("failed to update DNSKEY RRset at node '%s': %s",
                      name, isc_result_totext(result));
 
-       dns_db_closeversion(gdb, &ver, ISC_TRUE);
+       dns_db_closeversion(gdb, &ver, true);
 
        dns_diff_clear(&diff);
 }
@@ -2671,11 +2672,11 @@ warnifallksk(dns_db_t *db) {
        dns_rdata_t rdata = DNS_RDATA_INIT;
        isc_result_t result;
        dns_rdata_dnskey_t dnskey;
-       isc_boolean_t have_non_ksk = ISC_FALSE;
+       bool have_non_ksk = false;
 
        dns_db_currentversion(db, &currentversion);
 
-       result = dns_db_findnode(db, gorigin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, gorigin, false, &node);
        if (result != ISC_R_SUCCESS)
                fatal("failed to find the zone's origin: %s",
                      isc_result_totext(result));
@@ -2695,7 +2696,7 @@ warnifallksk(dns_db_t *db) {
                result = dns_rdata_tostruct(&rdata, &dnskey, NULL);
                check_result(result, "dns_rdata_tostruct");
                if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0) {
-                       have_non_ksk = ISC_TRUE;
+                       have_non_ksk = true;
                        result = ISC_R_NOMORE;
                } else
                        result = dns_rdataset_next(&rdataset);
@@ -2703,7 +2704,7 @@ warnifallksk(dns_db_t *db) {
        }
        dns_rdataset_disassociate(&rdataset);
        dns_db_detachnode(db, &node);
-       dns_db_closeversion(db, &currentversion, ISC_FALSE);
+       dns_db_closeversion(db, &currentversion, false);
        if (!have_non_ksk && !ignore_kskflag) {
                if (disable_zone_check)
                        fprintf(stderr, "%s: warning: No non-KSK DNSKEY found; "
@@ -2716,8 +2717,8 @@ warnifallksk(dns_db_t *db) {
 }
 
 static void
-set_nsec3params(isc_boolean_t update, isc_boolean_t set_salt,
-               isc_boolean_t set_optout, isc_boolean_t set_iter)
+set_nsec3params(bool update, bool set_salt,
+               bool set_optout, bool set_iter)
 {
        isc_result_t result;
        dns_dbversion_t *ver = NULL;
@@ -2773,7 +2774,7 @@ set_nsec3params(isc_boolean_t update, isc_boolean_t set_salt,
                                    orig_iter, orig_salt, orig_saltlen);
        check_result(result, "dns_nsec3_hashname");
 
-       result = dns_db_findnsec3node(gdb, hashname, ISC_FALSE, &node);
+       result = dns_db_findnsec3node(gdb, hashname, false, &node);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -2805,7 +2806,7 @@ set_nsec3params(isc_boolean_t update, isc_boolean_t set_salt,
                dns_rdataset_disassociate(&rdataset);
        if (node != NULL)
                dns_db_detachnode(gdb, &node);
-       dns_db_closeversion(gdb, &ver, ISC_FALSE);
+       dns_db_closeversion(gdb, &ver, false);
 }
 
 static void
@@ -2819,8 +2820,8 @@ writeset(const char *prefix, dns_rdatatype_t type) {
        dns_fixedname_t fixed;
        dns_name_t *name;
        dns_rdata_t rdata, ds;
-       isc_boolean_t have_ksk = ISC_FALSE;
-       isc_boolean_t have_non_ksk = ISC_FALSE;
+       bool have_ksk = false;
+       bool have_non_ksk = false;
        isc_buffer_t b;
        isc_buffer_t namebuf;
        isc_region_t r;
@@ -2833,7 +2834,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
                (type == dns_rdatatype_dnskey) ? masterstyle : dsstyle;
 
        isc_buffer_init(&namebuf, namestr, sizeof(namestr));
-       result = dns_name_tofilenametext(gorigin, ISC_FALSE, &namebuf);
+       result = dns_name_tofilenametext(gorigin, false, &namebuf);
        check_result(result, "dns_name_tofilenametext");
        isc_buffer_putuint8(&namebuf, 0);
        filenamelen = strlen(prefix) + strlen(namestr) + 1;
@@ -2871,11 +2872,11 @@ writeset(const char *prefix, dns_rdatatype_t type) {
                if (REVOKE(key->key))
                        continue;
                if (isksk(key)) {
-                       have_ksk = ISC_TRUE;
-                       have_non_ksk = ISC_FALSE;
+                       have_ksk = true;
+                       have_non_ksk = false;
                } else {
-                       have_ksk = ISC_FALSE;
-                       have_non_ksk = ISC_TRUE;
+                       have_ksk = false;
+                       have_non_ksk = true;
                }
                for (tmpkey = ISC_LIST_HEAD(keylist);
                     tmpkey != NULL;
@@ -2885,9 +2886,9 @@ writeset(const char *prefix, dns_rdatatype_t type) {
                        if (REVOKE(tmpkey->key))
                                continue;
                        if (isksk(tmpkey))
-                               have_ksk = ISC_TRUE;
+                               have_ksk = true;
                        else
-                               have_non_ksk = ISC_TRUE;
+                               have_non_ksk = true;
                }
                if (have_ksk && have_non_ksk && !isksk(key))
                        continue;
@@ -2947,7 +2948,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
 
        isc_mem_put(mctx, filename, filenamelen);
 
-       dns_db_closeversion(db, &dbversion, ISC_FALSE);
+       dns_db_closeversion(db, &dbversion, false);
        dns_db_detach(&db);
 }
 
@@ -3130,25 +3131,25 @@ main(int argc, char *argv[]) {
        dns_dnsseckey_t *key;
        isc_result_t result;
        isc_log_t *log = NULL;
-       isc_boolean_t pseudorandom = ISC_FALSE;
+       bool pseudorandom = false;
 #ifdef USE_PKCS11
        const char *engine = PKCS11_ENGINE;
 #else
        const char *engine = NULL;
 #endif
        unsigned int eflags;
-       isc_boolean_t free_output = ISC_FALSE;
+       bool free_output = false;
        int tempfilelen = 0;
        dns_rdataclass_t rdclass;
        isc_task_t **tasks = NULL;
        isc_buffer_t b;
        int len;
        hashlist_t hashlist;
-       isc_boolean_t make_keyset = ISC_FALSE;
-       isc_boolean_t set_salt = ISC_FALSE;
-       isc_boolean_t set_optout = ISC_FALSE;
-       isc_boolean_t set_iter = ISC_FALSE;
-       isc_boolean_t nonsecify = ISC_FALSE;
+       bool make_keyset = false;
+       bool set_salt = false;
+       bool set_optout = false;
+       bool set_iter = false;
+       bool nonsecify = false;
 
        /* Unused letters: Bb G J q Yy (and F is reserved). */
 #define CMDLINE_FLAGS \
@@ -3175,7 +3176,7 @@ main(int argc, char *argv[]) {
                        break;
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
 
 #ifdef _WIN32
        InitSockets();
@@ -3194,12 +3195,12 @@ main(int argc, char *argv[]) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
                switch (ch) {
                case '3':
-                       set_salt = ISC_TRUE;
+                       set_salt = true;
                        nsec_datatype = dns_rdatatype_nsec3;
                        if (strcmp(isc_commandline_argument, "-") != 0) {
                                isc_buffer_t target;
@@ -3216,7 +3217,7 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'A':
-                       set_optout = ISC_TRUE;
+                       set_optout = true;
                        if (OPTOUT(nsec3flags))
                                nsec3flags &= ~DNS_NSEC3FLAG_OPTOUT;
                        else
@@ -3224,11 +3225,11 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'a':
-                       tryverify = ISC_TRUE;
+                       tryverify = true;
                        break;
 
                case 'C':
-                       make_keyset = ISC_TRUE;
+                       make_keyset = true;
                        break;
 
                case 'c':
@@ -3246,7 +3247,7 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'D':
-                       output_dnssec_only = ISC_TRUE;
+                       output_dnssec_only = true;
                        break;
 
                case 'E':
@@ -3260,15 +3261,15 @@ main(int argc, char *argv[]) {
                case 'f':
                        output = isc_commandline_argument;
                        if (strcmp(output, "-") == 0)
-                               output_stdout = ISC_TRUE;
+                               output_stdout = true;
                        break;
 
                case 'g':
-                       generateds = ISC_TRUE;
+                       generateds = true;
                        break;
 
                case 'H':
-                       set_iter = ISC_TRUE;
+                       set_iter = true;
                        nsec3iter = strtoul(isc_commandline_argument, &endp, 0);
                        if (*endp != '\0')
                                fatal("iterations must be numeric");
@@ -3306,7 +3307,7 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'L':
-                       snset = ISC_TRUE;
+                       snset = true;
                        endp = NULL;
                        serialnum = strtol(isc_commandline_argument, &endp, 0);
                        if (*endp != '\0') {
@@ -3329,7 +3330,7 @@ main(int argc, char *argv[]) {
 
                case 'M':
                        endp = NULL;
-                       set_maxttl = ISC_TRUE;
+                       set_maxttl = true;
                        maxttl = strtol(isc_commandline_argument, &endp, 0);
                        if (*endp != '\0') {
                                fprintf(stderr, "maximum TTL "
@@ -3361,19 +3362,19 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'P':
-                       disable_zone_check = ISC_TRUE;
+                       disable_zone_check = true;
                        break;
 
                case 'p':
-                       pseudorandom = ISC_TRUE;
+                       pseudorandom = true;
                        break;
 
                case 'Q':
-                       remove_inactkeysigs = ISC_TRUE;
+                       remove_inactkeysigs = true;
                        break;
 
                case 'R':
-                       remove_orphansigs = ISC_TRUE;
+                       remove_orphansigs = true;
                        break;
 
                case 'r':
@@ -3381,7 +3382,7 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'S':
-                       smartsign = ISC_TRUE;
+                       smartsign = true;
                        break;
 
                case 's':
@@ -3390,20 +3391,20 @@ main(int argc, char *argv[]) {
 
                case 'T':
                        endp = NULL;
-                       set_keyttl = ISC_TRUE;
+                       set_keyttl = true;
                        keyttl = strtottl(isc_commandline_argument);
                        break;
 
                case 't':
-                       printstats = ISC_TRUE;
+                       printstats = true;
                        break;
 
                case 'U':       /* Undocumented for testing only. */
-                       unknownalg = ISC_TRUE;
+                       unknownalg = true;
                        break;
 
                case 'u':
-                       update_chain = ISC_TRUE;
+                       update_chain = true;
                        break;
 
                case 'v':
@@ -3418,11 +3419,11 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'x':
-                       keyset_kskonly = ISC_TRUE;
+                       keyset_kskonly = true;
                        break;
 
                case 'z':
-                       ignore_kskflag = ISC_TRUE;
+                       ignore_kskflag = true;
                        break;
 
                case 'F':
@@ -3443,7 +3444,7 @@ main(int argc, char *argv[]) {
 
                case 'Z':       /* Undocumented test options */
                        if (!strcmp(isc_commandline_argument, "nonsecify"))
-                               nonsecify = ISC_TRUE;
+                               nonsecify = true;
                        break;
 
                default:
@@ -3518,7 +3519,7 @@ main(int argc, char *argv[]) {
 
        if (output == NULL) {
                size_t size;
-               free_output = ISC_TRUE;
+               free_output = true;
                size = strlen(file) + strlen(".signed") + 1;
                output = isc_mem_allocate(mctx, size);
                if (output == NULL)
@@ -3644,10 +3645,10 @@ main(int argc, char *argv[]) {
         *    not specified on the command line.
         */
        if (argc == 0 || smartsign)
-               loadzonekeys(!smartsign, ISC_FALSE);
-       loadexplicitkeys(argv, argc, ISC_FALSE);
-       loadexplicitkeys(dskeyfile, ndskeys, ISC_TRUE);
-       loadzonekeys(!smartsign, ISC_TRUE);
+               loadzonekeys(!smartsign, false);
+       loadexplicitkeys(argv, argc, false);
+       loadexplicitkeys(dskeyfile, ndskeys, true);
+       loadzonekeys(!smartsign, true);
 
        /*
         * If we're doing smart signing, look in the key repository for
@@ -3670,14 +3671,14 @@ main(int argc, char *argv[]) {
                                        "or found\n", program);
                else
                        fatal("No signing keys specified or found.");
-               nokeys = ISC_TRUE;
+               nokeys = true;
        }
 
        warnifallksk(gdb);
 
        if (IS_NSEC3) {
                unsigned int max;
-               isc_boolean_t answer;
+               bool answer;
 
                hash_length = dns_nsec3_hashlength(dns_hash_sha1);
                hashlist_init(&hashlist, dns_db_nodecount(gdb) * 2,
@@ -3762,7 +3763,7 @@ main(int argc, char *argv[]) {
                if (result != ISC_R_SUCCESS)
                        fatal("failed to open temporary output file: %s",
                              isc_result_totext(result));
-               removefile = ISC_TRUE;
+               removefile = true;
                setfatalcallback(&removetempfile);
        }
 
@@ -3814,7 +3815,7 @@ main(int argc, char *argv[]) {
                        fatal("process aborted by user");
        } else
                isc_task_detach(&master);
-       shuttingdown = ISC_TRUE;
+       shuttingdown = true;
        for (i = 0; i < (int)ntasks; i++)
                isc_task_detach(&tasks[i]);
        isc_taskmgr_destroy(&taskmgr);
@@ -3848,7 +3849,7 @@ main(int argc, char *argv[]) {
        if (!output_stdout) {
                result = isc_stdio_close(outfp);
                check_result(result, "isc_stdio_close");
-               removefile = ISC_FALSE;
+               removefile = false;
 
                result = isc_file_rename(tempfile, output);
                if (result != ISC_R_SUCCESS)
@@ -3858,7 +3859,7 @@ main(int argc, char *argv[]) {
                printf("%s\n", output);
        }
 
-       dns_db_closeversion(gdb, &gversion, ISC_FALSE);
+       dns_db_closeversion(gdb, &gversion, false);
        dns_db_detach(&gdb);
 
        hashlist_free(&hashlist);
index 792510a0938212e0de6803a549a033fb16627b46..4c293bf53c035850a23d63d6bf5db461fb1a0de0 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 
@@ -79,8 +80,8 @@ static dns_db_t *gdb;                 /* The database */
 static dns_dbversion_t *gversion;      /* The database version */
 static dns_rdataclass_t gclass;                /* The class */
 static dns_name_t *gorigin;            /* The database origin */
-static isc_boolean_t ignore_kskflag = ISC_FALSE;
-static isc_boolean_t keyset_kskonly = ISC_FALSE;
+static bool ignore_kskflag = false;
+static bool keyset_kskonly = false;
 
 /*%
  * Load the zone file from disk
@@ -206,7 +207,7 @@ main(int argc, char *argv[]) {
                        break;
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
        check_result(isc_app_start(), "isc_app_start");
 
        result = isc_mem_create(0, 0, &mctx);
@@ -218,7 +219,7 @@ main(int argc, char *argv[]) {
 #endif
        dns_result_register();
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
                switch (ch) {
@@ -249,11 +250,11 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'x':
-                       keyset_kskonly = ISC_TRUE;
+                       keyset_kskonly = true;
                        break;
 
                case 'z':
-                       ignore_kskflag = ISC_TRUE;
+                       ignore_kskflag = true;
                        break;
 
                case '?':
@@ -334,7 +335,7 @@ main(int argc, char *argv[]) {
        verifyzone(gdb, gversion, gorigin, mctx,
                   ignore_kskflag, keyset_kskonly);
 
-       dns_db_closeversion(gdb, &gversion, ISC_FALSE);
+       dns_db_closeversion(gdb, &gversion, false);
        dns_db_detach(&gdb);
 
        cleanup_logging(&log);
index 90767675b2be53632a821e5c366773503138b7de..fbc7eceb81357ef7af78c3931e5c385a9c063101 100644 (file)
@@ -18,6 +18,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #ifdef _WIN32
@@ -307,10 +308,10 @@ time_units(isc_stdtime_t offset, char *suffix, const char *str) {
        return(0); /* silence compiler warning */
 }
 
-static inline isc_boolean_t
+static inline bool
 isnone(const char *str) {
-       return (ISC_TF((strcasecmp(str, "none") == 0) ||
-                      (strcasecmp(str, "never") == 0)));
+       return ((strcasecmp(str, "none") == 0) ||
+               (strcasecmp(str, "never") == 0));
 }
 
 dns_ttl_t
@@ -331,7 +332,7 @@ strtottl(const char *str) {
 
 isc_stdtime_t
 strtotime(const char *str, int64_t now, int64_t base,
-         isc_boolean_t *setp)
+         bool *setp)
 {
        int64_t val, offset;
        isc_result_t result;
@@ -341,12 +342,12 @@ strtotime(const char *str, int64_t now, int64_t base,
 
        if (isnone(str)) {
                if (setp != NULL)
-                       *setp = ISC_FALSE;
+                       *setp = false;
                return ((isc_stdtime_t) 0);
        }
 
        if (setp != NULL)
-               *setp = ISC_TRUE;
+               *setp = true;
 
        if ((str[0] == '0' || str[0] == '-') && str[1] == '\0')
                return ((isc_stdtime_t) 0);
@@ -464,12 +465,12 @@ set_keyversion(dst_key_t *key) {
        }
 }
 
-isc_boolean_t
+bool
 key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
-             isc_mem_t *mctx, isc_boolean_t *exact)
+             isc_mem_t *mctx, bool *exact)
 {
        isc_result_t result;
-       isc_boolean_t conflict = ISC_FALSE;
+       bool conflict = false;
        dns_dnsseckeylist_t matchkeys;
        dns_dnsseckey_t *key = NULL;
        uint16_t id, oldid;
@@ -479,7 +480,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
        isc_buffer_t fileb;
 
        if (exact != NULL)
-               *exact = ISC_FALSE;
+               *exact = false;
 
        id = dst_key_id(dstkey);
        rid = dst_key_rid(dstkey);
@@ -503,14 +504,14 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
                result = dst_key_buildfilename(dstkey, DST_TYPE_PRIVATE,
                                               dir, &fileb);
                if (result != ISC_R_SUCCESS)
-                       return (ISC_TRUE);
+                       return (true);
                return (isc_file_exists(filename));
        }
 
        ISC_LIST_INIT(matchkeys);
        result = dns_dnssec_findmatchingkeys(name, dir, mctx, &matchkeys);
        if (result == ISC_R_NOTFOUND)
-               return (ISC_FALSE);
+               return (false);
 
        while (!ISC_LIST_EMPTY(matchkeys) && !conflict) {
                key = ISC_LIST_HEAD(matchkeys);
@@ -521,7 +522,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
                roldid = dst_key_rid(key->key);
 
                if (oldid == rid || roldid == id || id == oldid) {
-                       conflict = ISC_TRUE;
+                       conflict = true;
                        if (id != oldid) {
                                if (verbose > 1)
                                        fprintf(stderr, "Key ID %d could "
@@ -529,7 +530,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
                                                id, oldid);
                        } else {
                                if (exact != NULL)
-                                       *exact = ISC_TRUE;
+                                       *exact = true;
                                if (verbose > 1)
                                        fprintf(stderr, "Key ID %d exists\n",
                                                id);
@@ -551,7 +552,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
        return (conflict);
 }
 
-isc_boolean_t
+bool
 is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
              dns_name_t *name, dns_dbnode_t *node, uint32_t *ttlp)
 {
@@ -559,7 +560,7 @@ is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
        isc_result_t result;
 
        if (dns_name_equal(name, origin))
-               return (ISC_FALSE);
+               return (false);
 
        dns_rdataset_init(&nsset);
        result = dns_db_findrdataset(db, node, ver, dns_rdatatype_ns,
@@ -570,10 +571,10 @@ is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
                dns_rdataset_disassociate(&nsset);
        }
 
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 has_dname(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node) {
        dns_rdataset_t dnameset;
        isc_result_t result;
@@ -585,10 +586,10 @@ has_dname(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node) {
                dns_rdataset_disassociate(&dnameset);
        }
 
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 goodsig(dns_name_t *origin, dns_rdata_t *sigrdata, dns_name_t *name,
        dns_rdataset_t *keyrdataset, dns_rdataset_t *rdataset, isc_mem_t *mctx)
 {
@@ -610,23 +611,23 @@ goodsig(dns_name_t *origin, dns_rdata_t *sigrdata, dns_name_t *name,
                result = dns_dnssec_keyfromrdata(origin, &rdata, mctx,
                                                 &dstkey);
                if (result != ISC_R_SUCCESS)
-                       return (ISC_FALSE);
+                       return (false);
                if (sig.algorithm != key.algorithm ||
                    sig.keyid != dst_key_id(dstkey) ||
                    !dns_name_equal(&sig.signer, origin)) {
                        dst_key_free(&dstkey);
                        continue;
                }
-               result = dns_dnssec_verify(name, rdataset, dstkey, ISC_FALSE,
+               result = dns_dnssec_verify(name, rdataset, dstkey, false,
                                           mctx, sigrdata);
                dst_key_free(&dstkey);
                if (result == ISC_R_SUCCESS)
-                       return(ISC_TRUE);
+                       return(true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 nsec_bitmap_equal(dns_rdata_nsec_t *nsec, dns_rdata_t *rdata) {
        isc_result_t result;
        dns_rdata_nsec_t tmpnsec;
@@ -636,9 +637,9 @@ nsec_bitmap_equal(dns_rdata_nsec_t *nsec, dns_rdata_t *rdata) {
 
        if (nsec->len != tmpnsec.len ||
            memcmp(nsec->typebits, tmpnsec.typebits, nsec->len) != 0) {
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -738,7 +739,7 @@ check_no_rrsig(dns_db_t *db, dns_dbversion_t *ver, dns_rdataset_t *rdataset,
        dns_rdatasetiter_destroy(&rdsiter);
 }
 
-static isc_boolean_t
+static bool
 chain_compare(void *arg1, void *arg2) {
        struct nsec3_chain_fixed *e1 = arg1, *e2 = arg2;
        size_t len;
@@ -747,43 +748,43 @@ chain_compare(void *arg1, void *arg2) {
         * Do each element in turn to get a stable sort.
         */
        if (e1->hash < e2->hash)
-               return (ISC_TRUE);
+               return (true);
        if (e1->hash > e2->hash)
-               return (ISC_FALSE);
+               return (false);
        if (e1->iterations < e2->iterations)
-               return (ISC_TRUE);
+               return (true);
        if (e1->iterations > e2->iterations)
-               return (ISC_FALSE);
+               return (false);
        if (e1->salt_length < e2->salt_length)
-               return (ISC_TRUE);
+               return (true);
        if (e1->salt_length > e2->salt_length)
-               return (ISC_FALSE);
+               return (false);
        if (e1->next_length < e2->next_length)
-               return (ISC_TRUE);
+               return (true);
        if (e1->next_length > e2->next_length)
-               return (ISC_FALSE);
+               return (false);
        len = e1->salt_length + 2 * e1->next_length;
        if (memcmp(e1 + 1, e2 + 1, len) < 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 chain_equal(struct nsec3_chain_fixed *e1, struct nsec3_chain_fixed *e2) {
        size_t len;
 
        if (e1->hash != e2->hash)
-               return (ISC_FALSE);
+               return (false);
        if (e1->iterations != e2->iterations)
-               return (ISC_FALSE);
+               return (false);
        if (e1->salt_length != e2->salt_length)
-               return (ISC_FALSE);
+               return (false);
        if (e1->next_length != e2->next_length)
-               return (ISC_FALSE);
+               return (false);
        len = e1->salt_length + 2 * e1->next_length;
        if (memcmp(e1 + 1, e2 + 1, len) != 0)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 static isc_result_t
@@ -903,7 +904,7 @@ match_nsec3(dns_name_t *name, isc_mem_t *mctx,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 innsec3params(dns_rdata_nsec3_t *nsec3, dns_rdataset_t *nsec3paramset) {
        dns_rdata_nsec3param_t nsec3param;
        isc_result_t result;
@@ -922,9 +923,9 @@ innsec3params(dns_rdata_nsec3_t *nsec3, dns_rdataset_t *nsec3paramset) {
                    nsec3param.salt_length == nsec3->salt_length &&
                    memcmp(nsec3param.salt, nsec3->salt,
                           nsec3->salt_length) == 0)
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -983,7 +984,7 @@ record_found(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 isoptout(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
         dns_rdata_t *nsec3rdata)
 {
@@ -997,7 +998,7 @@ isoptout(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
        dns_dbnode_t *node = NULL;
        unsigned char rawhash[NSEC3_MAX_HASH_LENGTH];
        size_t rhsize = sizeof(rawhash);
-       isc_boolean_t ret;
+       bool ret;
 
        result = dns_rdata_tostruct(nsec3rdata, &nsec3param, NULL);
        check_result(result, "dns_rdata_tostruct()");
@@ -1010,12 +1011,12 @@ isoptout(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 
        dns_rdataset_init(&rdataset);
        hashname = dns_fixedname_name(&fixed);
-       result = dns_db_findnsec3node(db, hashname, ISC_FALSE, &node);
+       result = dns_db_findnsec3node(db, hashname, false, &node);
        if (result == ISC_R_SUCCESS)
                result = dns_db_findrdataset(db, node, ver, dns_rdatatype_nsec3,
                                             0, 0, &rdataset, NULL);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        result = dns_rdataset_first(&rdataset);
        check_result(result, "dns_rdataset_first()");
@@ -1024,9 +1025,9 @@ isoptout(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 
        result = dns_rdata_tostruct(&rdata, &nsec3, NULL);
        if (result != ISC_R_SUCCESS)
-               ret = ISC_FALSE;
+               ret = false;
        else
-               ret = ISC_TF((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) != 0);
+               ret = (nsec3.flags & DNS_NSEC3FLAG_OPTOUT);
 
        if (dns_rdataset_isassociated(&rdataset))
                dns_rdataset_disassociate(&rdataset);
@@ -1039,7 +1040,7 @@ isoptout(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 static isc_result_t
 verifynsec3(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
            isc_mem_t *mctx, dns_name_t *name, dns_rdata_t *rdata,
-           isc_boolean_t delegation, isc_boolean_t empty,
+           bool delegation, bool empty,
            unsigned char types[8192], unsigned int maxtype)
 {
        char namebuf[DNS_NAME_FORMATSIZE];
@@ -1052,7 +1053,7 @@ verifynsec3(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
        dns_dbnode_t *node = NULL;
        unsigned char rawhash[NSEC3_MAX_HASH_LENGTH];
        size_t rhsize = sizeof(rawhash);
-       isc_boolean_t optout;
+       bool optout;
 
        result = dns_rdata_tostruct(rdata, &nsec3param, NULL);
        check_result(result, "dns_rdata_tostruct()");
@@ -1079,7 +1080,7 @@ verifynsec3(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
         */
        dns_rdataset_init(&rdataset);
        hashname = dns_fixedname_name(&fixed);
-       result = dns_db_findnsec3node(db, hashname, ISC_FALSE, &node);
+       result = dns_db_findnsec3node(db, hashname, false, &node);
        if (result == ISC_R_SUCCESS)
                result = dns_db_findrdataset(db, node, ver, dns_rdatatype_nsec3,
                                             0, 0, &rdataset, NULL);
@@ -1111,7 +1112,7 @@ verifynsec3(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 static isc_result_t
 verifynsec3s(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
             isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *nsec3paramset,
-            isc_boolean_t delegation, isc_boolean_t empty,
+            bool delegation, bool empty,
             unsigned char types[8192], unsigned int maxtype)
 {
        isc_result_t result;
@@ -1212,7 +1213,7 @@ verifyset(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 static isc_result_t
 verifynode(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
           isc_mem_t *mctx, dns_name_t *name, dns_dbnode_t *node,
-          isc_boolean_t delegation, dns_rdataset_t *keyrdataset,
+          bool delegation, dns_rdataset_t *keyrdataset,
           unsigned char *act_algorithms, unsigned char *bad_algorithms,
           dns_rdataset_t *nsecset, dns_rdataset_t *nsec3paramset,
           dns_name_t *nextname)
@@ -1268,7 +1269,7 @@ verifynode(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 
        if (nsec3paramset != NULL && dns_rdataset_isassociated(nsec3paramset)) {
                tresult = verifynsec3s(db, ver, origin, mctx, name,
-                                      nsec3paramset, delegation, ISC_FALSE,
+                                      nsec3paramset, delegation, false,
                                       types, maxtype);
                if (result == ISC_R_SUCCESS && tresult != ISC_R_SUCCESS)
                        result = tresult;
@@ -1276,7 +1277,7 @@ verifynode(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 is_empty(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node) {
        dns_rdatasetiter_t *rdsiter = NULL;
        isc_result_t result;
@@ -1286,8 +1287,8 @@ is_empty(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node) {
        result = dns_rdatasetiter_first(rdsiter);
        dns_rdatasetiter_destroy(&rdsiter);
        if (result == ISC_R_NOMORE)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 static void
@@ -1310,7 +1311,7 @@ check_no_nsec(dns_name_t *name, dns_dbnode_t *node, dns_db_t *db,
                dns_rdataset_disassociate(&rdataset);
 }
 
-static isc_boolean_t
+static bool
 newchain(const struct nsec3_chain_fixed *first,
         const struct nsec3_chain_fixed *e)
 {
@@ -1319,8 +1320,8 @@ newchain(const struct nsec3_chain_fixed *first,
            first->salt_length != e->salt_length ||
            first->next_length != e->next_length ||
            memcmp(first + 1, e + 1, first->salt_length) != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 static void
@@ -1331,7 +1332,7 @@ free_element(isc_mem_t *mctx, struct nsec3_chain_fixed *e) {
        isc_mem_put(mctx, e, len);
 }
 
-static isc_boolean_t
+static bool
 checknext(const struct nsec3_chain_fixed *first,
          const struct nsec3_chain_fixed *e)
 {
@@ -1345,7 +1346,7 @@ checknext(const struct nsec3_chain_fixed *first,
        d2 += e->salt_length;
 
        if (memcmp(d1, d2, first->next_length) == 0)
-               return (ISC_TRUE);
+               return (true);
 
        DE_CONST(d1 - first->next_length, sr.base);
        sr.length = first->next_length;
@@ -1367,7 +1368,7 @@ checknext(const struct nsec3_chain_fixed *first,
        isc_base32hex_totext(&sr, 1, "", &b);
        fprintf(stderr, "Found: %.*s\n", (int) isc_buffer_usedlength(&b), buf);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 #define EXPECTEDANDFOUND "Expected and found NSEC3 chains not equal\n"
@@ -1459,7 +1460,7 @@ verify_nsec3_chains(isc_mem_t *mctx) {
 static isc_result_t
 verifyemptynodes(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
                 isc_mem_t *mctx, dns_name_t *name, dns_name_t *prevname,
-                isc_boolean_t isdelegation, dns_rdataset_t *nsec3paramset)
+                bool isdelegation, dns_rdataset_t *nsec3paramset)
 {
        dns_namereln_t reln;
        int order;
@@ -1483,7 +1484,7 @@ verifyemptynodes(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
                             dns_rdataset_isassociated(nsec3paramset)) {
                                tresult = verifynsec3s(db, ver, origin, mctx,
                                                       &suffix, nsec3paramset,
-                                                      isdelegation, ISC_TRUE,
+                                                      isdelegation, true,
                                                       NULL, 0);
                                if (result == ISC_R_SUCCESS &&
                                    tresult != ISC_R_SUCCESS)
@@ -1509,7 +1510,7 @@ verifyemptynodes(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
 void
 verifyzone(dns_db_t *db, dns_dbversion_t *ver,
           dns_name_t *origin, isc_mem_t *mctx,
-          isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly)
+          bool ignore_kskflag, bool keyset_kskonly)
 {
        char algbuf[80];
        dns_dbiterator_t *dbiter = NULL;
@@ -1523,10 +1524,10 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
        dns_rdataset_t nsecset, nsecsigs;
        dns_rdataset_t nsec3paramset, nsec3paramsigs;
        int i;
-       isc_boolean_t done = ISC_FALSE;
-       isc_boolean_t first = ISC_TRUE;
-       isc_boolean_t goodksk = ISC_FALSE;
-       isc_boolean_t goodzsk = ISC_FALSE;
+       bool done = false;
+       bool first = true;
+       bool goodksk = false;
+       bool goodzsk = false;
        isc_result_t result, vresult = ISC_R_UNSET;
        unsigned char revoked_ksk[256];
        unsigned char revoked_zsk[256];
@@ -1544,7 +1545,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                                 &found_chains);
        check_result(result, "isc_heap_create()");
 
-       result = dns_db_findnode(db, origin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, origin, false, &node);
        if (result != ISC_R_SUCCESS)
                fatal("failed to find the zone's origin: %s",
                      isc_result_totext(result));
@@ -1623,7 +1624,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                else if ((dnskey.flags & DNS_KEYFLAG_REVOKE) != 0) {
                        if ((dnskey.flags & DNS_KEYFLAG_KSK) != 0 &&
                            !dns_dnssec_selfsigns(&rdata, origin, &keyset,
-                                                 &keysigs, ISC_FALSE,
+                                                 &keysigs, false,
                                                  mctx)) {
                                char namebuf[DNS_NAME_FORMATSIZE];
                                char buffer[1024];
@@ -1646,21 +1647,21 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                                revoked_zsk[dnskey.algorithm]++;
                } else if ((dnskey.flags & DNS_KEYFLAG_KSK) != 0) {
                        if (dns_dnssec_selfsigns(&rdata, origin, &keyset,
-                                                &keysigs, ISC_FALSE, mctx)) {
+                                                &keysigs, false, mctx)) {
                                if (ksk_algorithms[dnskey.algorithm] != 255)
                                        ksk_algorithms[dnskey.algorithm]++;
-                               goodksk = ISC_TRUE;
+                               goodksk = true;
                        } else {
                                if (standby_ksk[dnskey.algorithm] != 255)
                                        standby_ksk[dnskey.algorithm]++;
                        }
                } else if (dns_dnssec_selfsigns(&rdata, origin, &keyset,
-                                               &keysigs, ISC_FALSE, mctx)) {
+                                               &keysigs, false, mctx)) {
                        if (zsk_algorithms[dnskey.algorithm] != 255)
                                zsk_algorithms[dnskey.algorithm]++;
-                       goodzsk = ISC_TRUE;
+                       goodzsk = true;
                } else if (dns_dnssec_signs(&rdata, origin, &soaset,
-                                           &soasigs, ISC_FALSE, mctx)) {
+                                           &soasigs, false, mctx)) {
                        if (zsk_algorithms[dnskey.algorithm] != 255)
                                zsk_algorithms[dnskey.algorithm]++;
                } else {
@@ -1737,7 +1738,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
        check_result(result, "dns_dbiterator_first()");
 
        while (!done) {
-               isc_boolean_t isdelegation = ISC_FALSE;
+               bool isdelegation = false;
 
                result = dns_dbiterator_current(dbiter, &node, name);
                check_dns_dbiterator_current(result);
@@ -1746,7 +1747,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                        dns_db_detachnode(db, &node);
                        result = dns_dbiterator_next(dbiter);
                        if (result == ISC_R_NOMORE)
-                               done = ISC_TRUE;
+                               done = true;
                        else
                                check_result(result, "dns_dbiterator_next()");
                        continue;
@@ -1754,7 +1755,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                if (is_delegation(db, ver, origin, name, node, NULL)) {
                        zonecut = dns_fixedname_name(&fzonecut);
                        dns_name_copy(name, zonecut, NULL);
-                       isdelegation = ISC_TRUE;
+                       isdelegation = true;
                } else if (has_dname(db, ver, node)) {
                        zonecut = dns_fixedname_name(&fzonecut);
                        dns_name_copy(name, zonecut, NULL);
@@ -1783,7 +1784,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                        break;
                }
                if (result == ISC_R_NOMORE) {
-                       done = ISC_TRUE;
+                       done = true;
                        nextname = origin;
                } else if (result != ISC_R_SUCCESS)
                        fatal("iterating through the database failed: %s",
@@ -1819,7 +1820,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                result = dns_dbiterator_current(dbiter, &node, name);
                check_dns_dbiterator_current(result);
                result = verifynode(db, ver, origin, mctx, name, node,
-                                   ISC_FALSE, &keyset, act_algorithms,
+                                   false, &keyset, act_algorithms,
                                    bad_algorithms, NULL, NULL, NULL);
                check_result(result, "verifynode");
                record_found(db, ver, mctx, name, node, &nsec3paramset);
@@ -1852,7 +1853,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                                        "for the following algorithms:");
                        dns_secalg_format(i, algbuf, sizeof(algbuf));
                        fprintf(stderr, " %s", algbuf);
-                       first = ISC_FALSE;
+                       first = false;
                }
        }
        if (!first) {
@@ -1893,7 +1894,7 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
        }
 }
 
-isc_boolean_t
+bool
 isoptarg(const char *arg, char **argv, void(*usage)(void)) {
        if (!strcasecmp(isc_commandline_argument, arg)) {
                if (argv[isc_commandline_index] == NULL) {
@@ -1905,9 +1906,9 @@ isoptarg(const char *arg, char **argv, void(*usage)(void)) {
                isc_commandline_argument = argv[isc_commandline_index];
                /* skip to next arguement */
                isc_commandline_index++;
-               return (ISC_TRUE);
+               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 #ifdef _WIN32
index 1d8cda1d9c37e4a20e42302a075b2ac1dbf78189..b984a43f675d6084c0dc1475c4a19b9e4113d0df 100644 (file)
@@ -14,6 +14,7 @@
 #define DNSSECTOOL_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/log.h>
 #include <isc/stdtime.h>
@@ -67,7 +68,7 @@ dns_ttl_t strtottl(const char *str);
 
 isc_stdtime_t
 strtotime(const char *str, int64_t now, int64_t base,
-         isc_boolean_t *setp);
+         bool *setp);
 
 dns_rdataclass_t
 strtoclass(const char *str);
@@ -81,27 +82,27 @@ check_keyversion(dst_key_t *key, char *keystr);
 void
 set_keyversion(dst_key_t *key);
 
-isc_boolean_t
+bool
 key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
-             isc_mem_t *mctx, isc_boolean_t *exact);
+             isc_mem_t *mctx, bool *exact);
 
-isc_boolean_t
+bool
 is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
                      dns_name_t *name, dns_dbnode_t *node, uint32_t *ttlp);
 
 /*%
- * Return ISC_TRUE if version 'ver' of database 'db' contains a DNAME RRset at
- * 'node'; return ISC_FALSE otherwise.
+ * Return true if version 'ver' of database 'db' contains a DNAME RRset at
+ * 'node'; return false otherwise.
  */
-isc_boolean_t
+bool
 has_dname(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node);
 
 void
 verifyzone(dns_db_t *db, dns_dbversion_t *ver,
                   dns_name_t *origin, isc_mem_t *mctx,
-                  isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly);
+                  bool ignore_kskflag, bool keyset_kskonly);
 
-isc_boolean_t
+bool
 isoptarg(const char *arg, char **argv, void (*usage)(void));
 
 #ifdef _WIN32
index 3d1c1142e63b4d7958fc07dddc66b414c87d3813..0f6e1624773eb40817a7ae6c8056ccf78aed3ed0 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/aes.h>
 #include <isc/formatcheck.h>
@@ -138,7 +139,7 @@ struct ns_clientmgr {
 
        /* Lock covers manager state. */
        isc_mutex_t                     lock;
-       isc_boolean_t                   exiting;
+       bool                    exiting;
 
        /* Lock covers the clients list */
        isc_mutex_t                     listlock;
@@ -237,16 +238,16 @@ static void client_read(ns_client_t *client);
 static void client_accept(ns_client_t *client);
 static void client_udprecv(ns_client_t *client);
 static void clientmgr_destroy(ns_clientmgr_t *manager);
-static isc_boolean_t exit_check(ns_client_t *client);
+static bool exit_check(ns_client_t *client);
 static void ns_client_endrequest(ns_client_t *client);
 static void client_start(isc_task_t *task, isc_event_t *event);
 static void client_request(isc_task_t *task, isc_event_t *event);
 static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
 static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
-                              dns_dispatch_t *disp, isc_boolean_t tcp);
+                              dns_dispatch_t *disp, bool tcp);
 static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
                               isc_socket_t *sock);
-static inline isc_boolean_t
+static inline bool
 allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr,
        uint8_t ecs_addrlen, uint8_t *ecs_scope, dns_acl_t *acl);
 static void compute_cookie(ns_client_t *client, uint32_t when,
@@ -286,8 +287,8 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
 
        isc_interval_set(&interval, seconds, 0);
        result = isc_timer_reset(client->timer, isc_timertype_once, NULL,
-                                &interval, ISC_FALSE);
-       client->timerset = ISC_TRUE;
+                                &interval, false);
+       client->timerset = true;
        if (result != ISC_R_SUCCESS) {
                ns_client_log(client, NS_LOGCATEGORY_CLIENT,
                              NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
@@ -299,20 +300,20 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
 
 /*%
  * Check for a deactivation or shutdown request and take appropriate
- * action.  Returns ISC_TRUE if either is in progress; in this case
+ * action.  Returns true if either is in progress; in this case
  * the caller must no longer use the client object as it may have been
  * freed.
  */
-static isc_boolean_t
+static bool
 exit_check(ns_client_t *client) {
-       isc_boolean_t destroy_manager = ISC_FALSE;
+       bool destroy_manager = false;
        ns_clientmgr_t *manager = NULL;
 
        REQUIRE(NS_CLIENT_VALID(client));
        manager = client->manager;
 
        if (client->state <= client->newstate)
-               return (ISC_FALSE); /* Business as usual. */
+               return (false); /* Business as usual. */
 
        INSIST(client->newstate < NS_CLIENTSTATE_RECURSING);
 
@@ -339,7 +340,7 @@ exit_check(ns_client_t *client) {
                 * Let the update processing complete.
                 */
                if (client->nupdates > 0)
-                       return (ISC_TRUE);
+                       return (true);
 
                /*
                 * We are trying to abort request processing.
@@ -361,7 +362,7 @@ exit_check(ns_client_t *client) {
                         * Still waiting for I/O cancel completion.
                         * or lingering references.
                         */
-                       return (ISC_TRUE);
+                       return (true);
                }
 
                /*
@@ -389,11 +390,11 @@ exit_check(ns_client_t *client) {
                        if (!client->pipelined) {
                                client_read(client);
                                client->newstate = NS_CLIENTSTATE_MAX;
-                               return (ISC_TRUE); /* We're done. */
+                               return (true); /* We're done. */
                        } else if (client->mortal) {
                                client->newstate = NS_CLIENTSTATE_INACTIVE;
                        } else
-                               return (ISC_FALSE);
+                               return (false);
                }
        }
 
@@ -408,12 +409,12 @@ exit_check(ns_client_t *client) {
                        dns_tcpmsg_cancelread(&client->tcpmsg);
                if (client->nreads != 0) {
                        /* Still waiting for read cancel completion. */
-                       return (ISC_TRUE);
+                       return (true);
                }
 
                if (client->tcpmsg_valid) {
                        dns_tcpmsg_invalidate(&client->tcpmsg);
-                       client->tcpmsg_valid = ISC_FALSE;
+                       client->tcpmsg_valid = false;
                }
                if (client->tcpsocket != NULL) {
                        CTRACE("closetcp");
@@ -426,13 +427,13 @@ exit_check(ns_client_t *client) {
                if (client->timerset) {
                        (void)isc_timer_reset(client->timer,
                                              isc_timertype_inactive,
-                                             NULL, NULL, ISC_TRUE);
-                       client->timerset = ISC_FALSE;
+                                             NULL, NULL, true);
+                       client->timerset = false;
                }
 
-               client->pipelined = ISC_FALSE;
+               client->pipelined = false;
 
-               client->peeraddr_valid = ISC_FALSE;
+               client->peeraddr_valid = false;
 
                client->state = NS_CLIENTSTATE_READY;
                INSIST(client->recursionquota == NULL);
@@ -451,7 +452,7 @@ exit_check(ns_client_t *client) {
                        LOCK(&client->interface->lock);
                        if (client->interface->ntcpcurrent <
                                    client->interface->ntcptarget)
-                               client->mortal = ISC_FALSE;
+                               client->mortal = false;
                        UNLOCK(&client->interface->lock);
                }
 
@@ -470,7 +471,7 @@ exit_check(ns_client_t *client) {
                        } else
                                client_udprecv(client);
                        client->newstate = NS_CLIENTSTATE_MAX;
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
 
@@ -486,7 +487,7 @@ exit_check(ns_client_t *client) {
 
                /* Still waiting for accept cancel completion. */
                if (! (client->naccepts == 0))
-                       return (ISC_TRUE);
+                       return (true);
 
                /* Accept cancel is complete. */
                if (client->nrecvs > 0)
@@ -495,11 +496,11 @@ exit_check(ns_client_t *client) {
 
                /* Still waiting for recv cancel completion. */
                if (! (client->nrecvs == 0))
-                       return (ISC_TRUE);
+                       return (true);
 
                /* Still waiting for control event to be delivered */
                if (client->nctls > 0)
-                       return (ISC_TRUE);
+                       return (true);
 
                /* Deactivate the client. */
                if (client->interface)
@@ -517,7 +518,7 @@ exit_check(ns_client_t *client) {
                        dns_dispatch_detach(&client->dispatch);
 
                client->attributes = 0;
-               client->mortal = ISC_FALSE;
+               client->mortal = false;
 
                if (client->keytag != NULL) {
                        isc_mem_put(client->mctx, client->keytag,
@@ -543,7 +544,7 @@ exit_check(ns_client_t *client) {
                                               ilink);
                        if (client->needshutdown)
                                isc_task_shutdown(client->task);
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
 
@@ -568,7 +569,7 @@ exit_check(ns_client_t *client) {
                        LOCK(&manager->lock);
                        if (manager->exiting &&
                            ISC_LIST_EMPTY(manager->clients))
-                               destroy_manager = ISC_TRUE;
+                               destroy_manager = true;
                        UNLOCK(&manager->lock);
                        UNLOCK(&manager->listlock);
                }
@@ -630,7 +631,7 @@ exit_check(ns_client_t *client) {
        if (destroy_manager && manager != NULL)
                clientmgr_destroy(manager);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*%
@@ -692,7 +693,7 @@ client_shutdown(isc_task_t *task, isc_event_t *event) {
                ISC_QUEUE_UNLINK(client->manager->inactive, client, ilink);
 
        client->newstate = NS_CLIENTSTATE_FREED;
-       client->needshutdown = ISC_FALSE;
+       client->needshutdown = false;
        (void)exit_check(client);
 }
 
@@ -1019,11 +1020,11 @@ client_send(ns_client_t *client) {
        isc_buffer_t tcpbuffer;
        isc_region_t r;
        dns_compress_t cctx;
-       isc_boolean_t cleanup_cctx = ISC_FALSE;
+       bool cleanup_cctx = false;
        unsigned char sendbuf[SEND_BUFFER_SIZE];
        unsigned int render_opts;
        unsigned int preferred_glue;
-       isc_boolean_t opt_included = ISC_FALSE;
+       bool opt_included = false;
        size_t respsize;
 #ifdef HAVE_DNSTAP
        unsigned char zone[DNS_NAME_MAXWIRE];
@@ -1110,14 +1111,14 @@ client_send(ns_client_t *client) {
                    !allowed(&netaddr, name, NULL, 0, NULL,
                             client->view->nocasecompress))
                {
-                       dns_compress_setsensitive(&cctx, ISC_TRUE);
+                       dns_compress_setsensitive(&cctx, true);
                }
 
-               if (client->view->msgcompression == ISC_FALSE) {
+               if (client->view->msgcompression == false) {
                        dns_compress_disable(&cctx);
                }
        }
-       cleanup_cctx = ISC_TRUE;
+       cleanup_cctx = true;
 
        result = dns_message_renderbegin(client->message, &cctx, &buffer);
        if (result != ISC_R_SUCCESS)
@@ -1125,7 +1126,7 @@ client_send(ns_client_t *client) {
 
        if (client->opt != NULL) {
                result = dns_message_setopt(client->message, client->opt);
-               opt_included = ISC_TRUE;
+               opt_included = true;
                client->opt = NULL;
                if (result != ISC_R_SUCCESS)
                        goto done;
@@ -1198,7 +1199,7 @@ client_send(ns_client_t *client) {
 
        if (cleanup_cctx) {
                dns_compress_invalidate(&cctx);
-               cleanup_cctx = ISC_FALSE;
+               cleanup_cctx = false;
        }
 
        if (TCP_CLIENT(client)) {
@@ -1209,7 +1210,7 @@ client_send(ns_client_t *client) {
                if (client->view != NULL) {
                        dns_dt_send(client->view, dtmsgtype,
                                    &client->peeraddr, &client->destsockaddr,
-                                   ISC_TRUE, &zr, &client->requesttime, NULL,
+                                   true, &zr, &client->requesttime, NULL,
                                    &buffer);
                }
 #endif /* HAVE_DNSTAP */
@@ -1239,7 +1240,7 @@ client_send(ns_client_t *client) {
                        dns_dt_send(client->view, dtmsgtype,
                                    &client->peeraddr,
                                    &client->destsockaddr,
-                                   ISC_FALSE, &zr,
+                                   false, &zr,
                                    &client->requesttime, NULL, &buffer);
                }
 #endif /* HAVE_DNSTAP */
@@ -1427,7 +1428,7 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
         * Try to rate limit error responses.
         */
        if (client->view != NULL && client->view->rrl != NULL) {
-               isc_boolean_t wouldlog;
+               bool wouldlog;
                char log_buf[DNS_RRL_LOG_BUF_LEN];
                dns_rrl_result_t rrl_result;
                int loglevel;
@@ -1483,14 +1484,14 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
         * AA and AD shouldn't be set.
         */
        message->flags &= ~(DNS_MESSAGEFLAG_AA | DNS_MESSAGEFLAG_AD);
-       result = dns_message_reply(message, ISC_TRUE);
+       result = dns_message_reply(message, true);
        if (result != ISC_R_SUCCESS) {
                /*
                 * It could be that we've got a query with a good header,
                 * but a bad question section, so we try again with
-                * want_question_section set to ISC_FALSE.
+                * want_question_section set to false.
                 */
-               result = dns_message_reply(message, ISC_FALSE);
+               result = dns_message_reply(message, false);
                if (result != ISC_R_SUCCESS) {
                        ns_client_next(client, result);
                        return;
@@ -1546,7 +1547,7 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
                        dns_badcache_add(client->view->failcache,
                                         client->query.qname,
                                         client->query.qtype,
-                                        ISC_TRUE, flags, &expire);
+                                        true, flags, &expire);
        }
        ns_client_send(client);
 }
@@ -1694,7 +1695,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
        return (result);
 }
 
-static inline isc_boolean_t
+static inline bool
 allowed(isc_netaddr_t *addr, dns_name_t *signer,
        isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen,
        uint8_t *ecs_scope, dns_acl_t *acl)
@@ -1703,12 +1704,12 @@ allowed(isc_netaddr_t *addr, dns_name_t *signer,
        isc_result_t result;
 
        if (acl == NULL)
-               return (ISC_TRUE);
+               return (true);
        result = dns_acl_match2(addr, signer, ecs_addr, ecs_addrlen, ecs_scope,
                                acl, &ns_g_server->aclenv, &match, NULL);
        if (result == ISC_R_SUCCESS && match > 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 /*
@@ -1719,7 +1720,7 @@ allowed(isc_netaddr_t *addr, dns_name_t *signer,
  * We run this unlocked as both the view list and the interface list
  * are updated when the appropriate task has exclusivity.
  */
-isc_boolean_t
+bool
 ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
                 isc_sockaddr_t *srcaddr, isc_sockaddr_t *dstaddr,
                 dns_rdataclass_t rdclass, void *arg)
@@ -1736,10 +1737,10 @@ ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
         * ns_g_server->interfacemgr is task exclusive locked.
         */
        if (ns_g_server->interfacemgr == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        if (!ns_interfacemgr_listeningon(ns_g_server->interfacemgr, dstaddr))
-               return (ISC_FALSE);
+               return (false);
 
        isc_netaddr_fromsockaddr(&netsrc, srcaddr);
        isc_netaddr_fromsockaddr(&netdst, dstaddr);
@@ -1755,7 +1756,7 @@ ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
                        continue;
 
                if (mykey != NULL) {
-                       isc_boolean_t match;
+                       bool match;
                        isc_result_t result;
 
                        result = dns_view_gettsig(view, &mykey->name, &key);
@@ -1774,7 +1775,7 @@ ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
                            view->matchdestinations))
                        break;
        }
-       return (ISC_TF(view == myview));
+       return (view == myview);
 }
 
 static void
@@ -2245,12 +2246,12 @@ client_request(isc_task_t *task, isc_event_t *event) {
        dns_view_t *view;
        dns_rdataset_t *opt;
        dns_name_t *signame;
-       isc_boolean_t ra;       /* Recursion available. */
+       bool ra;        /* Recursion available. */
        isc_netaddr_t netaddr;
        int match;
        dns_messageid_t id;
        unsigned int flags;
-       isc_boolean_t notimp;
+       bool notimp;
        size_t reqsize;
 #ifdef HAVE_DNSTAP
        dns_dtmsgtype_t dtmsgtype;
@@ -2279,7 +2280,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
                result = sevent->result;
                if (result == ISC_R_SUCCESS) {
                        client->peeraddr = sevent->address;
-                       client->peeraddr_valid = ISC_TRUE;
+                       client->peeraddr_valid = true;
                }
                if ((sevent->attributes & ISC_SOCKEVENTATTR_DSCP) != 0) {
                        ns_client_log(client, NS_LOGCATEGORY_CLIENT,
@@ -2481,7 +2482,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
         * Pipeline TCP query processing.
         */
        if (client->message->opcode != dns_opcode_query)
-               client->pipelined = ISC_FALSE;
+               client->pipelined = false;
        if (TCP_CLIENT(client) && client->pipelined) {
                result = isc_quota_reserve(&ns_g_server->tcpquota);
                if (result == ISC_R_SUCCESS)
@@ -2491,7 +2492,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
                                      NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
                                      "no more TCP clients(read): %s",
                                      isc_result_totext(result));
-                       client->pipelined = ISC_FALSE;
+                       client->pipelined = false;
                }
        }
 
@@ -2501,11 +2502,11 @@ client_request(isc_task_t *task, isc_event_t *event) {
        case dns_opcode_query:
        case dns_opcode_update:
        case dns_opcode_notify:
-               notimp = ISC_FALSE;
+               notimp = false;
                break;
        case dns_opcode_iquery:
        default:
-               notimp = ISC_TRUE;
+               notimp = true;
                break;
        }
 
@@ -2544,7 +2545,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
                    client->message->opcode == dns_opcode_query &&
                    client->message->counts[DNS_SECTION_QUESTION] == 0U)
                {
-                       result = dns_message_reply(client->message, ISC_TRUE);
+                       result = dns_message_reply(client->message, true);
                        if (result != ISC_R_SUCCESS) {
                                ns_client_error(client, result);
                                return;
@@ -2792,24 +2793,24 @@ client_request(isc_task_t *task, isc_event_t *event) {
         * responses to ordinary queries.  Note if you can't query the
         * cache there is no point in setting RA.
         */
-       ra = ISC_FALSE;
+       ra = false;
        if (client->view->resolver != NULL &&
-           client->view->recursion == ISC_TRUE &&
+           client->view->recursion == true &&
            ns_client_checkaclsilent(client, NULL,
                                     client->view->recursionacl,
-                                    ISC_TRUE) == ISC_R_SUCCESS &&
+                                    true) == ISC_R_SUCCESS &&
            ns_client_checkaclsilent(client, NULL,
                                     client->view->cacheacl,
-                                    ISC_TRUE) == ISC_R_SUCCESS &&
+                                    true) == ISC_R_SUCCESS &&
            ns_client_checkaclsilent(client, &client->destaddr,
                                     client->view->recursiononacl,
-                                    ISC_TRUE) == ISC_R_SUCCESS &&
+                                    true) == ISC_R_SUCCESS &&
            ns_client_checkaclsilent(client, &client->destaddr,
                                     client->view->cacheonacl,
-                                    ISC_TRUE) == ISC_R_SUCCESS)
-               ra = ISC_TRUE;
+                                    true) == ISC_R_SUCCESS)
+               ra = true;
 
-       if (ra == ISC_TRUE)
+       if (ra == true)
                client->attributes |= NS_CLIENTATTR_RA;
 
        ns_client_log(client, DNS_LOGCATEGORY_SECURITY, NS_LOGMODULE_CLIENT,
@@ -2983,7 +2984,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
                                  client, &client->timer);
        if (result != ISC_R_SUCCESS)
                goto cleanup_task;
-       client->timerset = ISC_FALSE;
+       client->timerset = false;
 
        client->delaytimer = NULL;
 
@@ -3034,7 +3035,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
        client->udpsocket = NULL;
        client->tcplistener = NULL;
        client->tcpsocket = NULL;
-       client->tcpmsg_valid = ISC_FALSE;
+       client->tcpmsg_valid = false;
        client->tcpbuf = NULL;
        client->opt = NULL;
        client->udpsize = 512;
@@ -3046,12 +3047,12 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
        client->shutdown_arg = NULL;
        client->signer = NULL;
        dns_name_init(&client->signername, NULL);
-       client->mortal = ISC_FALSE;
-       client->pipelined = ISC_FALSE;
+       client->mortal = false;
+       client->pipelined = false;
        client->tcpquota = NULL;
        client->recursionquota = NULL;
        client->interface = NULL;
-       client->peeraddr_valid = ISC_FALSE;
+       client->peeraddr_valid = false;
        client->ecs_addrlen = 0;
        client->ecs_scope = 0;
 #ifdef ALLOW_FILTER_AAAA
@@ -3184,7 +3185,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
 
                (void)isc_socket_getpeername(client->tcpsocket,
                                             &client->peeraddr);
-               client->peeraddr_valid = ISC_TRUE;
+               client->peeraddr_valid = true;
                ns_client_log(client, NS_LOGCATEGORY_CLIENT,
                           NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
                           "new TCP connection");
@@ -3229,10 +3230,10 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
                        goto freeevent;
                }
 
-               INSIST(client->tcpmsg_valid == ISC_FALSE);
+               INSIST(client->tcpmsg_valid == false);
                dns_tcpmsg_init(client->mctx, client->tcpsocket,
                                &client->tcpmsg);
-               client->tcpmsg_valid = ISC_TRUE;
+               client->tcpmsg_valid = true;
 
                /*
                 * Let a new client take our place immediately, before
@@ -3240,7 +3241,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
                 * telnetting to port 53 (once per CPU) will
                 * deny service to legitimate TCP clients.
                 */
-               client->pipelined = ISC_FALSE;
+               client->pipelined = false;
                result = isc_quota_attach(&ns_g_server->tcpquota,
                                          &client->tcpquota);
                if (result == ISC_R_SUCCESS)
@@ -3253,7 +3254,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
                } else if (ns_g_server->keepresporder == NULL ||
                           !allowed(&netaddr, NULL, NULL, 0, NULL,
                                    ns_g_server->keepresporder)) {
-                       client->pipelined = ISC_TRUE;
+                       client->pipelined = true;
                }
 
                client_read(client);
@@ -3343,15 +3344,15 @@ ns_client_detach(ns_client_t **clientp) {
        (void)exit_check(client);
 }
 
-isc_boolean_t
+bool
 ns_client_shuttingdown(ns_client_t *client) {
-       return (ISC_TF(client->newstate == NS_CLIENTSTATE_FREED));
+       return (client->newstate == NS_CLIENTSTATE_FREED);
 }
 
 isc_result_t
 ns_client_replace(ns_client_t *client) {
        isc_result_t result;
-       isc_boolean_t tcp;
+       bool tcp;
 
        CTRACE("replace");
 
@@ -3374,7 +3375,7 @@ ns_client_replace(ns_client_t *client) {
         * transferred to the new client.  Therefore, the old client
         * should refrain from listening for any more requests.
         */
-       client->mortal = ISC_TRUE;
+       client->mortal = true;
 
        return (ISC_R_SUCCESS);
 }
@@ -3437,7 +3438,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
        manager->mctx = mctx;
        manager->taskmgr = taskmgr;
        manager->timermgr = timermgr;
-       manager->exiting = ISC_FALSE;
+       manager->exiting = false;
        ISC_LIST_INIT(manager->clients);
        ISC_LIST_INIT(manager->recursing);
        ISC_QUEUE_INIT(manager->inactive, ilink);
@@ -3471,7 +3472,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
        isc_result_t result;
        ns_clientmgr_t *manager;
        ns_client_t *client;
-       isc_boolean_t need_destroy = ISC_FALSE, unlock = ISC_FALSE;
+       bool need_destroy = false, unlock = false;
 
        REQUIRE(managerp != NULL);
        manager = *managerp;
@@ -3486,9 +3487,9 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
         */
        result = isc_task_beginexclusive(ns_g_server->task);
        if (result == ISC_R_SUCCESS)
-               unlock = ISC_TRUE;
+               unlock = true;
 
-       manager->exiting = ISC_TRUE;
+       manager->exiting = true;
 
        for (client = ISC_LIST_HEAD(manager->clients);
             client != NULL;
@@ -3496,7 +3497,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
                isc_task_shutdown(client->task);
 
        if (ISC_LIST_EMPTY(manager->clients))
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
 
        if (unlock)
                isc_task_endexclusive(ns_g_server->task);
@@ -3509,7 +3510,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
 
 static isc_result_t
 get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
-          dns_dispatch_t *disp, isc_boolean_t tcp)
+          dns_dispatch_t *disp, bool tcp)
 {
        isc_result_t result = ISC_R_SUCCESS;
        isc_event_t *ev;
@@ -3618,18 +3619,18 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
        client->dscp = ifp->dscp;
 
        client->attributes |= NS_CLIENTATTR_TCP;
-       client->pipelined = ISC_TRUE;
-       client->mortal = ISC_TRUE;
+       client->pipelined = true;
+       client->mortal = true;
 
        isc_socket_attach(ifp->tcpsocket, &client->tcplistener);
        isc_socket_attach(sock, &client->tcpsocket);
        isc_socket_setname(client->tcpsocket, "worker-tcp", NULL);
        (void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr);
-       client->peeraddr_valid = ISC_TRUE;
+       client->peeraddr_valid = true;
 
-       INSIST(client->tcpmsg_valid == ISC_FALSE);
+       INSIST(client->tcpmsg_valid == false);
        dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg);
-       client->tcpmsg_valid = ISC_TRUE;
+       client->tcpmsg_valid = true;
 
        INSIST(client->nctls == 0);
        client->nctls++;
@@ -3641,7 +3642,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
 
 isc_result_t
 ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
-                          ns_interface_t *ifp, isc_boolean_t tcp)
+                          ns_interface_t *ifp, bool tcp)
 {
        isc_result_t result = ISC_R_SUCCESS;
        unsigned int disp;
@@ -3672,7 +3673,7 @@ ns_client_getdestaddr(ns_client_t *client) {
 
 isc_result_t
 ns_client_checkaclsilent(ns_client_t *client, isc_netaddr_t *netaddr,
-                        dns_acl_t *acl, isc_boolean_t default_allow)
+                        dns_acl_t *acl, bool default_allow)
 {
        isc_result_t result;
        isc_netaddr_t tmpnetaddr;
@@ -3718,7 +3719,7 @@ ns_client_checkaclsilent(ns_client_t *client, isc_netaddr_t *netaddr,
 isc_result_t
 ns_client_checkacl(ns_client_t *client, isc_sockaddr_t *sockaddr,
                   const char *opname, dns_acl_t *acl,
-                  isc_boolean_t default_allow, int log_level)
+                  bool default_allow, int log_level)
 {
        isc_result_t result;
        isc_netaddr_t netaddr;
index 6acdfafc7e7cdd460643b4725201188744626fe4..c53d8d0eba2f24762487769850494c7d5ca9df03 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <config.h>
 
-
+#include <stdbool.h>
 #include <isc/app.h>
 #include <isc/event.h>
 #include <isc/lex.h>
@@ -59,9 +59,9 @@ getcommand(isc_lex_t *lex, char **cmdp) {
        return (ISC_R_SUCCESS);
 }
 
-static inline isc_boolean_t
+static inline bool
 command_compare(const char *str, const char *command) {
-       return ISC_TF(strcasecmp(str, command) == 0);
+       return (strcasecmp(str, command) == 0);
 }
 
 /*%
@@ -69,7 +69,7 @@ command_compare(const char *str, const char *command) {
  * when a control channel message is received.
  */
 isc_result_t
-ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
+ns_control_docommand(isccc_sexpr_t *message, bool readonly,
                     isc_buffer_t **text)
 {
        isccc_sexpr_t *data;
@@ -183,7 +183,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
                 */
 #endif
                /* Do not flush master files */
-               ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
+               ns_server_flushonshutdown(ns_g_server, false);
                ns_os_shutdownmsg(cmdline, *text);
                isc_app_shutdown();
                result = ISC_R_SUCCESS;
@@ -200,7 +200,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
                if (ns_smf_got_instance == 1 && ns_smf_chroot == 0)
                        ns_smf_want_disable = 1;
 #endif
-               ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
+               ns_server_flushonshutdown(ns_g_server, true);
                ns_os_shutdownmsg(cmdline, *text);
                isc_app_shutdown();
                result = ISC_R_SUCCESS;
@@ -222,9 +222,9 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
        } else if (command_compare(command, NS_COMMAND_FLUSH)) {
                result = ns_server_flushcache(ns_g_server, lex);
        } else if (command_compare(command, NS_COMMAND_FLUSHNAME)) {
-               result = ns_server_flushnode(ns_g_server, lex, ISC_FALSE);
+               result = ns_server_flushnode(ns_g_server, lex, false);
        } else if (command_compare(command, NS_COMMAND_FLUSHTREE)) {
-               result = ns_server_flushnode(ns_g_server, lex, ISC_TRUE);
+               result = ns_server_flushnode(ns_g_server, lex, true);
        } else if (command_compare(command, NS_COMMAND_STATUS)) {
                result = ns_server_status(ns_g_server, text);
        } else if (command_compare(command, NS_COMMAND_TSIGLIST)) {
@@ -232,11 +232,11 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
        } else if (command_compare(command, NS_COMMAND_TSIGDELETE)) {
                result = ns_server_tsigdelete(ns_g_server, lex, text);
        } else if (command_compare(command, NS_COMMAND_FREEZE)) {
-               result = ns_server_freeze(ns_g_server, ISC_TRUE, lex,
+               result = ns_server_freeze(ns_g_server, true, lex,
                                          text);
        } else if (command_compare(command, NS_COMMAND_UNFREEZE) ||
                   command_compare(command, NS_COMMAND_THAW)) {
-               result = ns_server_freeze(ns_g_server, ISC_FALSE, lex,
+               result = ns_server_freeze(ns_g_server, false, lex,
                                          text);
        } else if (command_compare(command, NS_COMMAND_SCAN)) {
                result = ISC_R_SUCCESS;
index c88b4c51726a6a20e90b85666de4fda215673f96..d955c2f9ebb3fcc0ce58befd7fa9ff4e9e3d5ae7 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/base64.h>
 #include <isc/buffer.h>
@@ -74,8 +75,8 @@ struct controlkey {
 struct controlconnection {
        isc_socket_t *                  sock;
        isccc_ccmsg_t                   ccmsg;
-       isc_boolean_t                   ccmsg_valid;
-       isc_boolean_t                   sending;
+       bool                    ccmsg_valid;
+       bool                    sending;
        isc_timer_t *                   timer;
        isc_buffer_t *                  buffer;
        controllistener_t *             listener;
@@ -90,22 +91,22 @@ struct controllistener {
        isc_sockaddr_t                  address;
        isc_socket_t *                  sock;
        dns_acl_t *                     acl;
-       isc_boolean_t                   listening;
-       isc_boolean_t                   exiting;
+       bool                    listening;
+       bool                    exiting;
        controlkeylist_t                keys;
        controlconnectionlist_t         connections;
        isc_sockettype_t                type;
        uint32_t                        perm;
        uint32_t                        owner;
        uint32_t                        group;
-       isc_boolean_t                   readonly;
+       bool                    readonly;
        ISC_LINK(controllistener_t)     link;
 };
 
 struct ns_controls {
        ns_server_t                     *server;
        controllistenerlist_t           listeners;
-       isc_boolean_t                   shuttingdown;
+       bool                    shuttingdown;
        isccc_symtab_t                  *symtab;
 };
 
@@ -203,8 +204,8 @@ shutdown_listener(controllistener_t *listener) {
                              NS_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
                              "stopping command channel on %s", socktext);
                if (listener->type == isc_sockettype_unix)
-                       isc_socket_cleanunix(&listener->address, ISC_TRUE);
-               listener->exiting = ISC_TRUE;
+                       isc_socket_cleanunix(&listener->address, true);
+               listener->exiting = true;
        }
 
        for (conn = ISC_LIST_HEAD(listener->connections);
@@ -222,7 +223,7 @@ shutdown_listener(controllistener_t *listener) {
        maybe_free_listener(listener);
 }
 
-static isc_boolean_t
+static bool
 address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
        isc_netaddr_t netaddr;
        isc_result_t result;
@@ -234,9 +235,9 @@ address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
                               &ns_g_server->aclenv, &match, NULL);
 
        if (result != ISC_R_SUCCESS || match <= 0)
-               return (ISC_FALSE);
+               return (false);
        else
-               return (ISC_TRUE);
+               return (true);
 }
 
 static isc_result_t
@@ -250,7 +251,7 @@ control_accept(controllistener_t *listener) {
                                 "isc_socket_accept() failed: %s",
                                 isc_result_totext(result));
        else
-               listener->listening = ISC_TRUE;
+               listener->listening = true;
        return (result);
 }
 
@@ -283,7 +284,7 @@ control_senddone(isc_task_t *task, isc_event_t *event) {
 
        UNUSED(task);
 
-       conn->sending = ISC_FALSE;
+       conn->sending = false;
 
        if (sevent->result != ISC_R_SUCCESS &&
            sevent->result != ISC_R_CANCELED)
@@ -518,7 +519,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
        result = isc_socket_send(conn->sock, &r, task, control_senddone, conn);
        if (result != ISC_R_SUCCESS)
                goto cleanup_response;
-       conn->sending = ISC_TRUE;
+       conn->sending = true;
 
        isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
        isccc_sexpr_free(&request);
@@ -538,7 +539,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
  cleanup:
        isc_socket_detach(&conn->sock);
        isccc_ccmsg_invalidate(&conn->ccmsg);
-       conn->ccmsg_valid = ISC_FALSE;
+       conn->ccmsg_valid = false;
        maybe_free_connection(conn);
        maybe_free_listener(listener);
 }
@@ -571,8 +572,8 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) {
        /* Set a 32 KiB upper limit on incoming message. */
        isccc_ccmsg_setmaxsize(&conn->ccmsg, 32768);
 
-       conn->ccmsg_valid = ISC_TRUE;
-       conn->sending = ISC_FALSE;
+       conn->ccmsg_valid = true;
+       conn->sending = false;
        conn->buffer = NULL;
        conn->timer = NULL;
        isc_interval_set(&interval, 60, 0);
@@ -619,7 +620,7 @@ control_newconn(isc_task_t *task, isc_event_t *event) {
 
        UNUSED(task);
 
-       listener->listening = ISC_FALSE;
+       listener->listening = false;
 
        if (nevent->result != ISC_R_SUCCESS) {
                if (nevent->result == ISC_R_CANCELED) {
@@ -683,7 +684,7 @@ controls_shutdown(ns_controls_t *controls) {
 void
 ns_controls_shutdown(ns_controls_t *controls) {
        controls_shutdown(controls);
-       controls->shuttingdown = ISC_TRUE;
+       controls->shuttingdown = true;
 }
 
 static isc_result_t
@@ -1134,14 +1135,14 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
                listener->task = cp->server->task;
                listener->address = *addr;
                listener->sock = NULL;
-               listener->listening = ISC_FALSE;
-               listener->exiting = ISC_FALSE;
+               listener->listening = false;
+               listener->exiting = false;
                listener->acl = NULL;
                listener->type = type;
                listener->perm = 0;
                listener->owner = 0;
                listener->group = 0;
-               listener->readonly = ISC_FALSE;
+               listener->readonly = false;
                ISC_LINK_INIT(listener, link);
                ISC_LIST_INIT(listener->keys);
                ISC_LIST_INIT(listener->connections);
@@ -1204,7 +1205,7 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
        }
 
        if (result == ISC_R_SUCCESS && type == isc_sockettype_unix)
-               isc_socket_cleanunix(&listener->address, ISC_FALSE);
+               isc_socket_cleanunix(&listener->address, false);
 
        if (result == ISC_R_SUCCESS)
                result = isc_socket_create(ns_g_socketmgr,
@@ -1215,7 +1216,7 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
 
 #ifndef ISC_ALLOW_MAPPED
        if (result == ISC_R_SUCCESS)
-               isc_socket_ipv6only(listener->sock, ISC_TRUE);
+               isc_socket_ipv6only(listener->sock, true);
 #endif
 
        if (result == ISC_R_SUCCESS)
@@ -1246,7 +1247,7 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
 
        } else {
                if (listener != NULL) {
-                       listener->exiting = ISC_TRUE;
+                       listener->exiting = true;
                        free_listener(listener);
                }
 
@@ -1506,7 +1507,7 @@ ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp) {
                return (ISC_R_NOMEMORY);
        controls->server = server;
        ISC_LIST_INIT(controls->listeners);
-       controls->shuttingdown = ISC_FALSE;
+       controls->shuttingdown = false;
        controls->symtab = NULL;
        result = isccc_cc_createsymtab(&controls->symtab);
        if (result != ISC_R_SUCCESS) {
index f20773fda94574cae3eefe4c7c5ec57f85cd6032..92f3f8b77b4d7ae893f81794173d1d21ec386726 100644 (file)
@@ -12,6 +12,7 @@
 #include "config.h"
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <named/fuzz.h>
 
@@ -46,7 +47,7 @@
  */
 static pthread_cond_t cond;
 static pthread_mutex_t mutex;
-static isc_boolean_t ready;
+static bool ready;
 
 
 static void *
@@ -103,7 +104,7 @@ fuzz_main_client(void *arg) {
                if (length > 4096) {
                        if (getenv("AFL_CMIN")) {
                                ns_server_flushonshutdown(ns_g_server,
-                                                         ISC_FALSE);
+                                                         false);
                                isc_app_shutdown();
                                return (NULL);
                        }
@@ -113,7 +114,7 @@ fuzz_main_client(void *arg) {
 
                RUNTIME_CHECK(pthread_mutex_lock(&mutex) == ISC_R_SUCCESS);
 
-               ready = ISC_FALSE;
+               ready = false;
 
                ssize_t sent;
 
@@ -133,7 +134,7 @@ fuzz_main_client(void *arg) {
        free(buf);
        close(sockfd);
 
-       ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
+       ns_server_flushonshutdown(ns_g_server, false);
        isc_app_shutdown();
 
        return (NULL);
@@ -216,7 +217,7 @@ fuzz_main_resolver(void *arg) {
                if (length > 4096) {
                        if (getenv("AFL_CMIN")) {
                                ns_server_flushonshutdown(ns_g_server,
-                                       ISC_FALSE);
+                                       false);
                                isc_app_shutdown();
                                return (NULL);
                        }
@@ -230,7 +231,7 @@ fuzz_main_resolver(void *arg) {
 
                RUNTIME_CHECK(pthread_mutex_lock(&mutex) == ISC_R_SUCCESS);
 
-               ready = ISC_FALSE;
+               ready = false;
 
                ssize_t sent;
                /* Randomize query ID. */
@@ -309,7 +310,7 @@ fuzz_main_resolver(void *arg) {
        free(buf);
        free(rbuf);
        close(sockfd);
-       ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
+       ns_server_flushonshutdown(ns_g_server, false);
        isc_app_shutdown();
 
        /*
@@ -391,7 +392,7 @@ fuzz_main_tcp(void *arg) {
 
                RUNTIME_CHECK(pthread_mutex_lock(&mutex) == ISC_R_SUCCESS);
 
-               ready = ISC_FALSE;
+               ready = false;
 
                ssize_t sent;
                int yes = 1;
@@ -422,7 +423,7 @@ fuzz_main_tcp(void *arg) {
 
        free(buf);
        close(sockfd);
-       ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
+       ns_server_flushonshutdown(ns_g_server, false);
        isc_app_shutdown();
 
        return (NULL);
@@ -434,7 +435,7 @@ void
 named_fuzz_notify(void) {
 #ifdef ENABLE_AFL
        if (getenv("AFL_CMIN")) {
-               ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
+               ns_server_flushonshutdown(ns_g_server, false);
                isc_app_shutdown();
                return;
        }
@@ -443,7 +444,7 @@ named_fuzz_notify(void) {
 
        RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
 
-       ready = ISC_TRUE;
+       ready = true;
 
        RUNTIME_CHECK(pthread_cond_signal(&cond) == 0);
        RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0);
index f3ba52e695f1d95bd186d083ee6867d1f2fede3b..b23a7b191dcc750ee29ac42419a0d959a1b5dd6c 100644 (file)
@@ -57,6 +57,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/magic.h>
@@ -93,7 +94,7 @@ struct ns_client {
        int                     nupdates;
        int                     nctls;
        int                     references;
-       isc_boolean_t           needshutdown;   /*
+       bool            needshutdown;   /*
                                                 * Used by clienttest to get
                                                 * the client to go from
                                                 * inactive to free state
@@ -109,10 +110,10 @@ struct ns_client {
        isc_socket_t *          tcpsocket;
        unsigned char *         tcpbuf;
        dns_tcpmsg_t            tcpmsg;
-       isc_boolean_t           tcpmsg_valid;
+       bool            tcpmsg_valid;
        isc_timer_t *           timer;
        isc_timer_t *           delaytimer;
-       isc_boolean_t           timerset;
+       bool            timerset;
        dns_message_t *         message;
        isc_socketevent_t *     sendevent;
        isc_socketevent_t *     recvevent;
@@ -130,14 +131,14 @@ struct ns_client {
        isc_time_t              tnow;
        dns_name_t              signername;   /*%< [T]SIG key name */
        dns_name_t *            signer;       /*%< NULL if not valid sig */
-       isc_boolean_t           mortal;       /*%< Die after handling request */
-       isc_boolean_t           pipelined;   /*%< TCP queries not in sequence */
+       bool            mortal;       /*%< Die after handling request */
+       bool            pipelined;   /*%< TCP queries not in sequence */
        isc_quota_t             *tcpquota;
        isc_quota_t             *recursionquota;
        ns_interface_t          *interface;
 
        isc_sockaddr_t          peeraddr;
-       isc_boolean_t           peeraddr_valid;
+       bool            peeraddr_valid;
        isc_netaddr_t           destaddr;
        isc_sockaddr_t          destsockaddr;
 
@@ -249,10 +250,10 @@ ns_client_next(ns_client_t *client, isc_result_t result);
  * return no response to the client.
  */
 
-isc_boolean_t
+bool
 ns_client_shuttingdown(ns_client_t *client);
 /*%
- * Return ISC_TRUE iff the client is currently shutting down.
+ * Return true iff the client is currently shutting down.
  */
 
 void
@@ -297,10 +298,10 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp);
 
 isc_result_t
 ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
-                          ns_interface_t *ifp, isc_boolean_t tcp);
+                          ns_interface_t *ifp, bool tcp);
 /*%
  * Create up to 'n' clients listening on interface 'ifp'.
- * If 'tcp' is ISC_TRUE, the clients will listen for TCP connections,
+ * If 'tcp' is true, the clients will listen for TCP connections,
  * otherwise for UDP requests.
  */
 
@@ -320,13 +321,13 @@ ns_client_getdestaddr(ns_client_t *client);
 
 isc_result_t
 ns_client_checkaclsilent(ns_client_t *client, isc_netaddr_t *netaddr,
-                        dns_acl_t *acl, isc_boolean_t default_allow);
+                        dns_acl_t *acl, bool default_allow);
 
 /*%
  * Convenience function for client request ACL checking.
  *
  * Check the current client request against 'acl'.  If 'acl'
- * is NULL, allow the request iff 'default_allow' is ISC_TRUE.
+ * is NULL, allow the request iff 'default_allow' is true.
  * If netaddr is NULL, check the ACL against client->peeraddr;
  * otherwise check it against netaddr.
  *
@@ -352,7 +353,7 @@ isc_result_t
 ns_client_checkacl(ns_client_t  *client,
                   isc_sockaddr_t *sockaddr,
                   const char *opname, dns_acl_t *acl,
-                  isc_boolean_t default_allow,
+                  bool default_allow,
                   int log_level);
 /*%
  * Like ns_client_checkaclsilent, except the outcome of the check is
@@ -407,7 +408,7 @@ ns_client_qnamereplace(ns_client_t *client, dns_name_t *name);
  * Replace the qname.
  */
 
-isc_boolean_t
+bool
 ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
                 isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
                 dns_rdataclass_t rdclass, void *arg);
index 238c8cce37b72407143ab01b71c70fb25d1fcd98..8705fdd68ab8109a319c7c01f4414affe27e0a0e 100644 (file)
@@ -19,6 +19,7 @@
  * The name server command channel.
  */
 
+#include <stdbool.h>
 #include <isccc/types.h>
 
 #include <isccfg/aclconf.h>
@@ -101,7 +102,7 @@ ns_controls_shutdown(ns_controls_t *controls);
  */
 
 isc_result_t
-ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
+ns_control_docommand(isccc_sexpr_t *message, bool readonly,
                     isc_buffer_t **text);
 
 #endif /* NAMED_CONTROL_H */
index f17ee931ece667d86d966faa8a958b3e53f6bf06..494e005f381ac26c496cbcc98858376934a7cc24 100644 (file)
@@ -14,6 +14,7 @@
 
 /*! \file */
 
+#include <stdbool.h>
 #include <isc/rwlock.h>
 #include <isc/log.h>
 #include <isc/net.h>
@@ -53,7 +54,7 @@ EXTERN isc_entropy_t *                ns_g_fallbackentropy    INIT(NULL);
 EXTERN unsigned int            ns_g_cpus_detected      INIT(1);
 
 #ifdef ENABLE_AFL
-EXTERN isc_boolean_t           ns_g_run_done           INIT(ISC_FALSE);
+EXTERN bool            ns_g_run_done           INIT(false);
 #endif
 /*
  * XXXRTH  We're going to want multiple timer managers eventually.  One
@@ -76,7 +77,7 @@ EXTERN in_port_t              lwresd_g_listenport     INIT(0);
 
 EXTERN ns_server_t *           ns_g_server             INIT(NULL);
 
-EXTERN isc_boolean_t           ns_g_lwresdonly         INIT(ISC_FALSE);
+EXTERN bool            ns_g_lwresdonly         INIT(false);
 
 /*
  * Logging.
@@ -104,8 +105,8 @@ EXTERN const char *         lwresd_g_conffile       INIT(NS_SYSCONFDIR
                                                             "/lwresd.conf");
 EXTERN const char *            lwresd_g_resolvconffile INIT("/etc"
                                                             "/resolv.conf");
-EXTERN isc_boolean_t           ns_g_conffileset        INIT(ISC_FALSE);
-EXTERN isc_boolean_t           lwresd_g_useresolvconf  INIT(ISC_FALSE);
+EXTERN bool            ns_g_conffileset        INIT(false);
+EXTERN bool            lwresd_g_useresolvconf  INIT(false);
 EXTERN uint16_t                ns_g_udpsize            INIT(4096);
 EXTERN cfg_aclconfctx_t *      ns_g_aclconfctx         INIT(NULL);
 
@@ -120,11 +121,11 @@ EXTERN isc_resourcevalue_t        ns_g_initopenfiles      INIT(0);
 /*
  * Misc.
  */
-EXTERN isc_boolean_t           ns_g_coreok             INIT(ISC_TRUE);
+EXTERN bool            ns_g_coreok             INIT(true);
 EXTERN const char *            ns_g_chrootdir          INIT(NULL);
-EXTERN isc_boolean_t           ns_g_foreground         INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_logstderr          INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_nosyslog           INIT(ISC_FALSE);
+EXTERN bool            ns_g_foreground         INIT(false);
+EXTERN bool            ns_g_logstderr          INIT(false);
+EXTERN bool            ns_g_nosyslog           INIT(false);
 EXTERN const char *            ns_g_logfile            INIT(NULL);
 
 EXTERN const char *            ns_g_defaultsessionkeyfile
@@ -133,7 +134,7 @@ EXTERN const char *         ns_g_defaultsessionkeyfile
 EXTERN const char *            ns_g_defaultlockfile    INIT(NS_LOCALSTATEDIR
                                                             "/run/named/"
                                                             "named.lock");
-EXTERN isc_boolean_t           ns_g_forcelock          INIT(ISC_FALSE);
+EXTERN bool            ns_g_forcelock          INIT(false);
 
 #if NS_RUN_PID_DIR
 EXTERN const char *            ns_g_defaultpidfile     INIT(NS_LOCALSTATEDIR
@@ -168,21 +169,21 @@ EXTERN const char *               ns_g_engine             INIT(NULL);
 EXTERN int                     ns_g_listen             INIT(3);
 EXTERN isc_time_t              ns_g_boottime;
 EXTERN isc_time_t              ns_g_configtime;
-EXTERN isc_boolean_t           ns_g_memstatistics      INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_clienttest         INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_dropedns           INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_noedns             INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_nosoa              INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_noaa               INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_keepstderr         INIT(ISC_FALSE);
+EXTERN bool            ns_g_memstatistics      INIT(false);
+EXTERN bool            ns_g_clienttest         INIT(false);
+EXTERN bool            ns_g_dropedns           INIT(false);
+EXTERN bool            ns_g_noedns             INIT(false);
+EXTERN bool            ns_g_nosoa              INIT(false);
+EXTERN bool            ns_g_noaa               INIT(false);
+EXTERN bool            ns_g_keepstderr         INIT(false);
 EXTERN unsigned int            ns_g_delay              INIT(0);
-EXTERN isc_boolean_t           ns_g_nonearest          INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_notcp              INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_disable6           INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_disable4           INIT(ISC_FALSE);
+EXTERN bool            ns_g_nonearest          INIT(false);
+EXTERN bool            ns_g_notcp              INIT(false);
+EXTERN bool            ns_g_disable6           INIT(false);
+EXTERN bool            ns_g_disable4           INIT(false);
 EXTERN unsigned int            ns_g_tat_interval       INIT(24*3600);
-EXTERN isc_boolean_t           ns_g_fixedlocal         INIT(ISC_FALSE);
-EXTERN isc_boolean_t           ns_g_sigvalinsecs       INIT(ISC_FALSE);
+EXTERN bool            ns_g_fixedlocal         INIT(false);
+EXTERN bool            ns_g_sigvalinsecs       INIT(false);
 
 #ifdef HAVE_GEOIP
 EXTERN dns_geoip_databases_t   *ns_g_geoip             INIT(NULL);
index 36870f35cd64b696fc7e4335d8b2d3bc0b907912..7d1883e1e814ab3ebc2d04ab2a1ed89f51c2bcd0 100644 (file)
@@ -42,6 +42,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/magic.h>
 #include <isc/mem.h>
 #include <isc/socket.h>
@@ -109,7 +111,7 @@ ns_interfacemgr_detach(ns_interfacemgr_t **targetp);
 void
 ns_interfacemgr_shutdown(ns_interfacemgr_t *mgr);
 
-isc_boolean_t
+bool
 ns_interfacemgr_islistening(ns_interfacemgr_t *mgr);
 /*%
  * Return if the manager is listening on any interface. It can be called
@@ -117,7 +119,7 @@ ns_interfacemgr_islistening(ns_interfacemgr_t *mgr);
  */
 
 isc_result_t
-ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose);
+ns_interfacemgr_scan(ns_interfacemgr_t *mgr, bool verbose);
 /*%
  * Scan the operatings system's list of network interfaces
  * and create listeners when new interfaces are discovered.
@@ -130,7 +132,7 @@ ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose);
 
 isc_result_t
 ns_interfacemgr_adjust(ns_interfacemgr_t *mgr, ns_listenlist_t *list,
-                      isc_boolean_t verbose);
+                      bool verbose);
 /*%
  * Similar to ns_interfacemgr_scan(), but this function also tries to see the
  * need for an explicit listen-on when a list element in 'list' is going to
@@ -175,7 +177,7 @@ ns_interface_shutdown(ns_interface_t *ifp);
 void
 ns_interfacemgr_dumprecursing(FILE *f, ns_interfacemgr_t *mgr);
 
-isc_boolean_t
+bool
 ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr);
 
 #endif /* NAMED_INTERFACEMGR_H */
index 330d2627dd7c46865df2de261509c942d9c1e345..d44594c5283dd91efd71736923b35a1286a5b0d4 100644 (file)
@@ -26,6 +26,9 @@
 /***
  *** Imports
  ***/
+
+
+#include <stdbool.h>
 #include <isc/net.h>
 
 #include <dns/types.h>
@@ -88,13 +91,11 @@ ns_listenlist_detach(ns_listenlist_t **listp);
 
 isc_result_t
 ns_listenlist_default(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp,
-                     isc_boolean_t enabled, ns_listenlist_t **target);
+                     bool enabled, ns_listenlist_t **target);
 /*%
  * Create a listen-on list with default contents, matching
- * all addresses with port 'port' (if 'enabled' is ISC_TRUE),
- * or no addresses (if 'enabled' is ISC_FALSE).
+ * all addresses with port 'port' (if 'enabled' is true),
+ * or no addresses (if 'enabled' is false).
  */
 
 #endif /* NAMED_LISTENLIST_H */
-
-
index cd73e2e22169ae324d0532dab88cadbb159394fe..56bfcd46688330b3ee9470693ecea56e3a779d3e 100644 (file)
@@ -51,7 +51,7 @@
 #define NS_LOGMODULE_LWRESD            (&ns_g_modules[10])
 
 isc_result_t
-ns_log_init(isc_boolean_t safe);
+ns_log_init(bool safe);
 /*%
  * Initialize the logging system and set up an initial default
  * logging default configuration that will be used until the
index ed6f32c4acbf22d2b1d4b9ff98e1875cd44d83a2..65e630d0d9ab90a98da4e0bdd568b0c8ec5a8498 100644 (file)
@@ -37,7 +37,7 @@
 struct ns_lwdclient {
        isc_sockaddr_t          address;        /*%< where to reply */
        struct in6_pktinfo      pktinfo;
-       isc_boolean_t           pktinfo_valid;
+       bool            pktinfo_valid;
        ns_lwdclientmgr_t       *clientmgr;     /*%< our parent */
        ISC_LINK(ns_lwdclient_t) link;
        unsigned int            state;
index e615a052c737d4f9ab8e65f8105cda2b6c822a8a..90e511360843fa77e9d1f1868ba868d0eb316ba0 100644 (file)
@@ -33,7 +33,7 @@ struct ns_lwresd {
        unsigned int ntasks;
        unsigned int nclients;
        isc_mem_t *mctx;
-       isc_boolean_t shutting_down;
+       bool shutting_down;
        unsigned int refs;
 };
 
index 3083086f0da2f0124b9645a91a375d6bebb33116..cf3bc6aa601abf5dc734a53e016751535abbd34c 100644 (file)
@@ -47,8 +47,8 @@ struct ns_lwsearchctx {
        dns_name_t *searchname;
        unsigned int ndots;
        ns_lwsearchlist_t *list;
-       isc_boolean_t doneexact;
-       isc_boolean_t exactfirst;
+       bool doneexact;
+       bool exactfirst;
 };
 
 isc_result_t
index 3582f3e3916d827493c404920291bd0bc761c0ac..9661f56b72635cbdb33b4aaf66d17821e25084e6 100644 (file)
@@ -14,6 +14,8 @@
 
 /*! \file */
 
+#include <stdbool.h>
+
 #include <isc/types.h>
 #include <isc/buffer.h>
 #include <isc/netaddr.h>
@@ -28,8 +30,8 @@
 typedef struct ns_dbversion {
        dns_db_t                        *db;
        dns_dbversion_t                 *version;
-       isc_boolean_t                   acl_checked;
-       isc_boolean_t                   queryok;
+       bool                    acl_checked;
+       bool                    queryok;
        ISC_LINK(struct ns_dbversion)   link;
 } ns_dbversion_t;
 
@@ -37,7 +39,7 @@ typedef struct ns_dbversion {
 struct ns_query {
        unsigned int                    attributes;
        unsigned int                    restarts;
-       isc_boolean_t                   timerset;
+       bool                    timerset;
        dns_name_t *                    qname;
        dns_name_t *                    origqname;
        dns_rdatatype_t                 qtype;
@@ -46,8 +48,8 @@ struct ns_query {
        dns_db_t *                      gluedb;
        dns_db_t *                      authdb;
        dns_zone_t *                    authzone;
-       isc_boolean_t                   authdbset;
-       isc_boolean_t                   isreferral;
+       bool                    authdbset;
+       bool                    isreferral;
        isc_mutex_t                     fetchlock;
        dns_fetch_t *                   fetch;
        dns_fetch_t *                   prefetch;
@@ -57,7 +59,7 @@ struct ns_query {
        ISC_LIST(ns_dbversion_t)        freeversions;
        dns_rdataset_t *                dns64_aaaa;
        dns_rdataset_t *                dns64_sigaaaa;
-       isc_boolean_t *                 dns64_aaaaok;
+       bool *                  dns64_aaaaok;
        unsigned int                    dns64_aaaaoklen;
        unsigned int                    dns64_options;
        unsigned int                    dns64_ttl;
@@ -71,12 +73,12 @@ struct ns_query {
                isc_result_t            result;
                dns_rdataset_t *        rdataset;
                dns_rdataset_t *        sigrdataset;
-               isc_boolean_t           authoritative;
-               isc_boolean_t           is_zone;
+               bool            authoritative;
+               bool            is_zone;
        } redirect;
        dns_keytag_t root_key_sentinel_keyid;
-       isc_boolean_t root_key_sentinel_is_ta;
-       isc_boolean_t root_key_sentinel_not_ta;
+       bool root_key_sentinel_is_ta;
+       bool root_key_sentinel_not_ta;
 };
 
 #define NS_QUERYATTR_RECURSIONOK       0x0001
index 5c251e8532b559dbd4015b504867cfb4e60f3b3f..f5ed2b75f69cbb9dc7039804e8ee06eab41e3cdd 100644 (file)
@@ -15,6 +15,7 @@
 /*! \file */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/log.h>
 #include <isc/magic.h>
@@ -55,12 +56,12 @@ struct ns_server {
        char *                  secrootsfile;   /*%< Secroots file name */
        char *                  bindkeysfile;   /*%< bind.keys file name */
        char *                  recfile;        /*%< Recursive file name */
-       isc_boolean_t           version_set;    /*%< User has set version */
+       bool            version_set;    /*%< User has set version */
        char *                  version;        /*%< User-specified version */
-       isc_boolean_t           hostname_set;   /*%< User has set hostname */
+       bool            hostname_set;   /*%< User has set hostname */
        char *                  hostname;       /*%< User-specified hostname */
        /*% Use hostname for server id */
-       isc_boolean_t           server_usehostname;
+       bool            server_usehostname;
        char *                  server_id;      /*%< User-specified server id */
 
        /*%
@@ -89,8 +90,8 @@ struct ns_server {
        isc_mutex_t             reload_event_lock;
        isc_event_t *           reload_event;
 
-       isc_boolean_t           flushonshutdown;
-       isc_boolean_t           log_queries;    /*%< For BIND 8 compatibility */
+       bool            flushonshutdown;
+       bool            log_queries;    /*%< For BIND 8 compatibility */
 
        ns_cachelist_t          cachelist;      /*%< Possibly shared caches */
        isc_stats_t *           nsstats;        /*%< Server stats */
@@ -122,11 +123,11 @@ struct ns_server {
        dns_name_t              *session_keyname;
        unsigned int            session_keyalg;
        uint16_t                session_keybits;
-       isc_boolean_t           interface_auto;
+       bool            interface_auto;
        unsigned char           secret[32];     /*%< Server Cookie Secret */
        ns_altsecretlist_t      altsecrets;
        ns_cookiealg_t          cookiealg;
-       isc_boolean_t           answercookie;
+       bool            answercookie;
 
        dns_dtenv_t             *dtenv;         /*%< Dnstap environment */
 
@@ -542,7 +543,7 @@ ns_server_scan_interfaces(ns_server_t *server);
  */
 
 void
-ns_server_flushonshutdown(ns_server_t *server, isc_boolean_t flush);
+ns_server_flushonshutdown(ns_server_t *server, bool flush);
 /*%<
  * Inform the server that the zones should be flushed to disk on shutdown.
  */
@@ -638,7 +639,7 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex);
  */
 isc_result_t
 ns_server_flushnode(ns_server_t *server, isc_lex_t *lex,
-                   isc_boolean_t tree);
+                   bool tree);
 
 /*%
  * Report the server's status.
@@ -663,7 +664,7 @@ ns_server_tsigdelete(ns_server_t *server, isc_lex_t *lex,
  * Enable or disable updates for a zone.
  */
 isc_result_t
-ns_server_freeze(ns_server_t *server, isc_boolean_t freeze,
+ns_server_freeze(ns_server_t *server, bool freeze,
                 isc_lex_t *lex, isc_buffer_t **text);
 
 /*%
@@ -736,7 +737,7 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text);
  * duration, in a particular view if specified, or in all views.
  */
 isc_result_t
-ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
+ns_server_nta(ns_server_t *server, isc_lex_t *lex, bool readonly,
              isc_buffer_t **text);
 
 /*%
index 28bb91bf52c79b8e66bfa4512ff7efe4155a7553..5e016f7bb39a2d3efe02848e00c25f348035da11 100644 (file)
@@ -16,6 +16,7 @@
 
 /*! \file */
 
+#include <stdbool.h>
 #include <isc/lang.h>
 #include <isc/types.h>
 
@@ -43,13 +44,13 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
  * \li 'zone' to be initialized.
  */
 
-isc_boolean_t
+bool
 ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
 /*%<
  * If 'zone' can be safely reconfigured according to the configuration
- * data in 'zconfig', return ISC_TRUE.  If the configuration data is so
+ * data in 'zconfig', return true.  If the configuration data is so
  * different from the current zone state that the zone needs to be destroyed
- * and recreated, return ISC_FALSE.
+ * and recreated, return false.
  */
 
 isc_result_t
index d8c718818611130129272efb9071a6e5ba460852..419927bf54ebfc8e4c058fb0040b11b5763c3082 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/interfaceiter.h>
 #include <isc/os.h>
 #include <isc/string.h>
@@ -96,7 +98,7 @@ route_event(isc_task_t *task, isc_event_t *event) {
        isc_region_t r;
        isc_result_t result;
        struct MSGHDR *rtm;
-       isc_boolean_t done = ISC_TRUE;
+       bool done = true;
 
        UNUSED(task);
 
@@ -149,7 +151,7 @@ route_event(isc_task_t *task, isc_event_t *event) {
                result = isc_socket_recv(mgr->route, &r, 1, mgr->task,
                                         route_event, mgr);
                if (result == ISC_R_SUCCESS)
-                       done = ISC_FALSE;
+                       done = false;
        }
        UNLOCK(&mgr->lock);
 
@@ -300,7 +302,7 @@ ns_interfacemgr_attach(ns_interfacemgr_t *source, ns_interfacemgr_t **target) {
 
 void
 ns_interfacemgr_detach(ns_interfacemgr_t **targetp) {
-       isc_result_t need_destroy = ISC_FALSE;
+       isc_result_t need_destroy = false;
        ns_interfacemgr_t *target = *targetp;
        REQUIRE(target != NULL);
        REQUIRE(NS_INTERFACEMGR_VALID(target));
@@ -308,7 +310,7 @@ ns_interfacemgr_detach(ns_interfacemgr_t **targetp) {
        REQUIRE(target->references > 0);
        target->references--;
        if (target->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&target->lock);
        if (need_destroy)
                ns_interfacemgr_destroy(target);
@@ -451,7 +453,7 @@ ns_interface_listenudp(ns_interface_t *ifp) {
        }
 
        result = ns_clientmgr_createclients(ifp->clientmgr, ifp->nudpdispatch,
-                                           ifp, ISC_FALSE);
+                                           ifp, false);
        if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "UDP ns_clientmgr_createclients(): %s",
@@ -492,7 +494,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
        }
        isc_socket_setname(ifp->tcpsocket, "dispatcher", NULL);
 #ifndef ISC_ALLOW_MAPPED
-       isc_socket_ipv6only(ifp->tcpsocket, ISC_TRUE);
+       isc_socket_ipv6only(ifp->tcpsocket, true);
 #endif
        result = isc_socket_bind(ifp->tcpsocket, &ifp->addr,
                                 ISC_SOCKET_REUSEADDRESS);
@@ -522,7 +524,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
 
        result = ns_clientmgr_createclients(ifp->clientmgr,
                                            ifp->ntcptarget, ifp,
-                                           ISC_TRUE);
+                                           true);
        if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "TCP ns_clientmgr_createclients(): %s",
@@ -542,13 +544,13 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
 static isc_result_t
 ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
                   const char *name, ns_interface_t **ifpret,
-                  isc_boolean_t accept_tcp, isc_dscp_t dscp,
-                  isc_boolean_t *addr_in_use)
+                  bool accept_tcp, isc_dscp_t dscp,
+                  bool *addr_in_use)
 {
        isc_result_t result;
        ns_interface_t *ifp = NULL;
        REQUIRE(ifpret != NULL && *ifpret == NULL);
-       REQUIRE(addr_in_use == NULL || *addr_in_use == ISC_FALSE);
+       REQUIRE(addr_in_use == NULL || *addr_in_use == false);
 
        result = ns_interface_create(mgr, addr, name, &ifp);
        if (result != ISC_R_SUCCESS)
@@ -559,16 +561,16 @@ ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
        result = ns_interface_listenudp(ifp);
        if (result != ISC_R_SUCCESS) {
                if ((result == ISC_R_ADDRINUSE) && (addr_in_use != NULL))
-                       *addr_in_use = ISC_TRUE;
+                       *addr_in_use = true;
                goto cleanup_interface;
        }
 
-       if (!ns_g_notcp && accept_tcp == ISC_TRUE) {
+       if (!ns_g_notcp && accept_tcp == true) {
                result = ns_interface_accepttcp(ifp);
                if (result != ISC_R_SUCCESS) {
                        if ((result == ISC_R_ADDRINUSE) &&
                            (addr_in_use != NULL))
-                               *addr_in_use = ISC_TRUE;
+                               *addr_in_use = true;
 
                        /*
                         * XXXRTH We don't currently have a way to easily stop
@@ -633,7 +635,7 @@ ns_interface_attach(ns_interface_t *source, ns_interface_t **target) {
 
 void
 ns_interface_detach(ns_interface_t **targetp) {
-       isc_result_t need_destroy = ISC_FALSE;
+       isc_result_t need_destroy = false;
        ns_interface_t *target = *targetp;
        REQUIRE(target != NULL);
        REQUIRE(NS_INTERFACE_VALID(target));
@@ -641,7 +643,7 @@ ns_interface_detach(ns_interface_t **targetp) {
        REQUIRE(target->references > 0);
        target->references--;
        if (target->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&target->lock);
        if (need_destroy)
                ns_interface_destroy(target);
@@ -698,7 +700,7 @@ clearacl(isc_mem_t *mctx, dns_acl_t **aclp) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 listenon_is_ip6_any(ns_listenelt_t *elt) {
        REQUIRE(elt && elt->acl);
        return dns_acl_isany(elt->acl);
@@ -715,7 +717,7 @@ setup_locals(ns_interfacemgr_t *mgr, isc_interface_t *interface) {
        /* First add localhost address */
        prefixlen = (netaddr->family == AF_INET) ? 32 : 128;
        result = dns_iptable_addprefix(mgr->aclenv.localhost->iptable,
-                                      netaddr, prefixlen, ISC_TRUE);
+                                      netaddr, prefixlen, true);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -745,7 +747,7 @@ setup_locals(ns_interfacemgr_t *mgr, isc_interface_t *interface) {
        }
 
        result = dns_iptable_addprefix(mgr->aclenv.localnets->iptable,
-                                      netaddr, prefixlen, ISC_TRUE);
+                                      netaddr, prefixlen, true);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -791,30 +793,30 @@ clearlistenon(ns_interfacemgr_t *mgr) {
 
 static isc_result_t
 do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
-       isc_boolean_t verbose)
+       bool verbose)
 {
        isc_interfaceiter_t *iter = NULL;
-       isc_boolean_t scan_ipv4 = ISC_FALSE;
-       isc_boolean_t scan_ipv6 = ISC_FALSE;
-       isc_boolean_t adjusting = ISC_FALSE;
-       isc_boolean_t ipv6only = ISC_TRUE;
-       isc_boolean_t ipv6pktinfo = ISC_TRUE;
+       bool scan_ipv4 = false;
+       bool scan_ipv6 = false;
+       bool adjusting = false;
+       bool ipv6only = true;
+       bool ipv6pktinfo = true;
        isc_result_t result;
        isc_netaddr_t zero_address, zero_address6;
        ns_listenelt_t *le;
        isc_sockaddr_t listen_addr;
        ns_interface_t *ifp;
-       isc_boolean_t log_explicit = ISC_FALSE;
-       isc_boolean_t dolistenon;
+       bool log_explicit = false;
+       bool dolistenon;
        char sabuf[ISC_SOCKADDR_FORMATSIZE];
-       isc_boolean_t tried_listening;
-       isc_boolean_t all_addresses_in_use;
+       bool tried_listening;
+       bool all_addresses_in_use;
 
        if (ext_listen != NULL)
-               adjusting = ISC_TRUE;
+               adjusting = true;
 
        if (isc_net_probeipv6() == ISC_R_SUCCESS)
-               scan_ipv6 = ISC_TRUE;
+               scan_ipv6 = true;
 #ifdef WANT_IPV6
        else if (!ns_g_disable6)
                isc_log_write(IFMGR_COMMON_LOGARGS,
@@ -823,7 +825,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
 #endif
 
        if (isc_net_probeipv4() == ISC_R_SUCCESS)
-               scan_ipv4 = ISC_TRUE;
+               scan_ipv4 = true;
        else if (!ns_g_disable4)
                isc_log_write(IFMGR_COMMON_LOGARGS,
                              verbose ? ISC_LOG_INFO : ISC_LOG_DEBUG(1),
@@ -838,18 +840,18 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
         * allowed.
         */
 #ifndef ISC_ALLOW_MAPPED
-       if (scan_ipv6 == ISC_TRUE &&
+       if (scan_ipv6 == true &&
            isc_net_probe_ipv6only() != ISC_R_SUCCESS) {
-               ipv6only = ISC_FALSE;
-               log_explicit = ISC_TRUE;
+               ipv6only = false;
+               log_explicit = true;
        }
 #endif
-       if (scan_ipv6 == ISC_TRUE &&
+       if (scan_ipv6 == true &&
            isc_net_probe_ipv6pktinfo() != ISC_R_SUCCESS) {
-               ipv6pktinfo = ISC_FALSE;
-               log_explicit = ISC_TRUE;
+               ipv6pktinfo = false;
+               log_explicit = true;
        }
-       if (scan_ipv6 == ISC_TRUE && ipv6only && ipv6pktinfo) {
+       if (scan_ipv6 == true && ipv6only && ipv6pktinfo) {
                for (le = ISC_LIST_HEAD(mgr->listenon6->elts);
                     le != NULL;
                     le = ISC_LIST_NEXT(le, link)) {
@@ -884,7 +886,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                                              le->port);
                                result = ns_interface_setup(mgr, &listen_addr,
                                                            "<any>", &ifp,
-                                                           ISC_TRUE,
+                                                           true,
                                                            le->dscp,
                                                            NULL);
                                if (result == ISC_R_SUCCESS)
@@ -906,7 +908,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       if (adjusting == ISC_FALSE) {
+       if (adjusting == false) {
                result = clearacl(mgr->mctx, &mgr->aclenv.localhost);
                if (result != ISC_R_SUCCESS)
                        goto cleanup_iter;
@@ -916,8 +918,8 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                clearlistenon(mgr);
        }
 
-       tried_listening = ISC_FALSE;
-       all_addresses_in_use = ISC_TRUE;
+       tried_listening = false;
+       all_addresses_in_use = true;
        for (result = isc_interfaceiter_first(iter);
             result == ISC_R_SUCCESS;
             result = isc_interfaceiter_next(iter))
@@ -933,9 +935,9 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                family = interface.address.family;
                if (family != AF_INET && family != AF_INET6)
                        continue;
-               if (scan_ipv4 == ISC_FALSE && family == AF_INET)
+               if (scan_ipv4 == false && family == AF_INET)
                        continue;
-               if (scan_ipv6 == ISC_FALSE && family == AF_INET6)
+               if (scan_ipv6 == false && family == AF_INET6)
                        continue;
 
                /*
@@ -954,7 +956,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                        continue;
                }
 
-               if (adjusting == ISC_FALSE) {
+               if (adjusting == false) {
                        /*
                         * If running with -T fixedlocal, then we only
                         * want 127.0.0.1 and ::1 in the localhost ACL.
@@ -972,13 +974,13 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
 
  listenon:
                ll = (family == AF_INET) ? mgr->listenon4 : mgr->listenon6;
-               dolistenon = ISC_TRUE;
+               dolistenon = true;
                for (le = ISC_LIST_HEAD(ll->elts);
                     le != NULL;
                     le = ISC_LIST_NEXT(le, link))
                {
                        int match;
-                       isc_boolean_t ipv6_wildcard = ISC_FALSE;
+                       bool ipv6_wildcard = false;
                        isc_netaddr_t listen_netaddr;
                        isc_sockaddr_t listen_sockaddr;
 
@@ -1008,9 +1010,9 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                        if (match <= 0)
                                continue;
 
-                       if (adjusting == ISC_FALSE && dolistenon == ISC_TRUE) {
+                       if (adjusting == false && dolistenon == true) {
                                setup_listenon(mgr, &interface, le->port);
-                               dolistenon = ISC_FALSE;
+                               dolistenon = false;
                        }
 
                        /*
@@ -1019,7 +1021,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                         */
                        if (family == AF_INET6 && ipv6only && ipv6pktinfo &&
                            listenon_is_ip6_any(le))
-                               ipv6_wildcard = ISC_TRUE;
+                               ipv6_wildcard = true;
 
                        /*
                         * When adjusting interfaces with extra a listening
@@ -1028,7 +1030,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                         * interface, we need to listen on the address
                         * explicitly.
                         */
-                       if (adjusting == ISC_TRUE) {
+                       if (adjusting == true) {
                                ns_listenelt_t *ele;
 
                                match = 0;
@@ -1045,7 +1047,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                                        else
                                                match = 0;
                                }
-                               if (ipv6_wildcard == ISC_TRUE && match == 0)
+                               if (ipv6_wildcard == true && match == 0)
                                        continue;
                        }
 
@@ -1065,10 +1067,10 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                                                      sabuf, ifp->dscp);
                                }
                        } else {
-                               isc_boolean_t addr_in_use = ISC_FALSE;
+                               bool addr_in_use = false;
 
-                               if (adjusting == ISC_FALSE &&
-                                   ipv6_wildcard == ISC_TRUE)
+                               if (adjusting == false &&
+                                   ipv6_wildcard == true)
                                        continue;
 
                                if (log_explicit && family == AF_INET6 &&
@@ -1080,7 +1082,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                                                      "incomplete; explicitly "
                                                      "binding to each IPv6 "
                                                      "address separately");
-                                       log_explicit = ISC_FALSE;
+                                       log_explicit = false;
                                }
                                isc_sockaddr_format(&listen_sockaddr,
                                                    sabuf, sizeof(sabuf));
@@ -1089,7 +1091,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                                              "%s"
                                              "listening on %s interface "
                                              "%s, %s",
-                                             (adjusting == ISC_TRUE) ?
+                                             (adjusting == true) ?
                                              "additionally " : "",
                                              (family == AF_INET) ?
                                              "IPv4" : "IPv6",
@@ -1099,14 +1101,14 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
                                                    &listen_sockaddr,
                                                    interface.name,
                                                    &ifp,
-                                                   (adjusting == ISC_TRUE) ?
-                                                   ISC_FALSE : ISC_TRUE,
+                                                   (adjusting == true) ?
+                                                   false : true,
                                                    le->dscp,
                                                    &addr_in_use);
 
-                               tried_listening = ISC_TRUE;
+                               tried_listening = true;
                                if (!addr_in_use)
-                                       all_addresses_in_use = ISC_FALSE;
+                                       all_addresses_in_use = false;
 
                                if (result != ISC_R_SUCCESS) {
                                        isc_log_write(IFMGR_COMMON_LOGARGS,
@@ -1146,10 +1148,10 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
 
 static isc_result_t
 ns_interfacemgr_scan0(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
-                     isc_boolean_t verbose)
+                     bool verbose)
 {
        isc_result_t result;
-       isc_boolean_t purge = ISC_TRUE;
+       bool purge = true;
 
        REQUIRE(NS_INTERFACEMGR_VALID(mgr));
 
@@ -1157,7 +1159,7 @@ ns_interfacemgr_scan0(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
 
        result = do_scan(mgr, ext_listen, verbose);
        if ((result != ISC_R_SUCCESS) && (result != ISC_R_ADDRINUSE))
-               purge = ISC_FALSE;
+               purge = false;
 
        /*
         * Now go through the interface list and delete anything that
@@ -1182,21 +1184,21 @@ ns_interfacemgr_scan0(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
        return (result);
 }
 
-isc_boolean_t
+bool
 ns_interfacemgr_islistening(ns_interfacemgr_t *mgr) {
        REQUIRE(NS_INTERFACEMGR_VALID(mgr));
 
-       return (ISC_LIST_EMPTY(mgr->interfaces) ? ISC_FALSE : ISC_TRUE);
+       return (ISC_LIST_EMPTY(mgr->interfaces) ? false : true);
 }
 
 isc_result_t
-ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose) {
+ns_interfacemgr_scan(ns_interfacemgr_t *mgr, bool verbose) {
        return (ns_interfacemgr_scan0(mgr, NULL, verbose));
 }
 
 isc_result_t
 ns_interfacemgr_adjust(ns_interfacemgr_t *mgr, ns_listenlist_t *list,
-                      isc_boolean_t verbose)
+                      bool verbose)
 {
        return (ns_interfacemgr_scan0(mgr, list, verbose));
 }
@@ -1231,7 +1233,7 @@ ns_interfacemgr_dumprecursing(FILE *f, ns_interfacemgr_t *mgr) {
        UNLOCK(&mgr->lock);
 }
 
-isc_boolean_t
+bool
 ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr) {
        isc_sockaddr_t *old;
 
@@ -1239,6 +1241,6 @@ ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr) {
             old != NULL;
             old = ISC_LIST_NEXT(old, link))
                if (isc_sockaddr_equal(old, addr))
-                       return (ISC_TRUE);
-       return (ISC_FALSE);
+                       return (true);
+       return (false);
 }
index 075a3752134d14666ab073dc9db73fd6c9907e04..234ea75daab77bf3339884dd469d383c01ce49e4 100644 (file)
@@ -15,6 +15,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/util.h>
 
@@ -96,7 +98,7 @@ ns_listenlist_detach(ns_listenlist_t **listp) {
 
 isc_result_t
 ns_listenlist_default(isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp,
-                     isc_boolean_t enabled, ns_listenlist_t **target)
+                     bool enabled, ns_listenlist_t **target)
 {
        isc_result_t result;
        dns_acl_t *acl = NULL;
index 9c137d868182b050009aa9deefccbd099558bd7c..3aa25e9a95b38fa95d9eb82abe5fc5103dfb9150 100644 (file)
@@ -61,7 +61,7 @@ static isc_logmodule_t modules[] = {
 };
 
 isc_result_t
-ns_log_init(isc_boolean_t safe) {
+ns_log_init(bool safe) {
        isc_result_t result;
        isc_logconfig_t *lcfg = NULL;
 
index b23ce7c22d821bad59b3e53780531278b64af000..e1cd762df4f09f36055d9b19576577196bca211e 100644 (file)
@@ -16,6 +16,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/file.h>
 #include <isc/offset.h>
@@ -289,8 +290,8 @@ ns_log_configure(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) {
        const cfg_obj_t *channels = NULL;
        const cfg_obj_t *categories = NULL;
        const cfg_listelt_t *element;
-       isc_boolean_t default_set = ISC_FALSE;
-       isc_boolean_t unmatched_set = ISC_FALSE;
+       bool default_set = false;
+       bool unmatched_set = false;
        const cfg_obj_t *catname;
 
        if (logconfig != NULL)
@@ -315,12 +316,12 @@ ns_log_configure(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) {
                if (!default_set) {
                        catname = cfg_tuple_get(category, "name");
                        if (strcmp(cfg_obj_asstring(catname), "default") == 0)
-                               default_set = ISC_TRUE;
+                               default_set = true;
                }
                if (!unmatched_set) {
                        catname = cfg_tuple_get(category, "name");
                        if (strcmp(cfg_obj_asstring(catname), "unmatched") == 0)
-                               unmatched_set = ISC_TRUE;
+                               unmatched_set = true;
                }
        }
 
index 14acc055d42bb075ed2709c4c92695d7bc4d3d75..d34f831c42b0ae02b9c99d044b705e5c726b1bd1 100644 (file)
@@ -263,9 +263,9 @@ ns_lwdclient_recv(isc_task_t *task, isc_event_t *ev) {
        client->address = dev->address;
        if ((dev->attributes & ISC_SOCKEVENTATTR_PKTINFO) != 0) {
                client->pktinfo = dev->pktinfo;
-               client->pktinfo_valid = ISC_TRUE;
+               client->pktinfo_valid = true;
        } else
-               client->pktinfo_valid = ISC_FALSE;
+               client->pktinfo_valid = false;
        isc_event_free(&ev);
        dev = NULL;
 
@@ -288,12 +288,12 @@ ns_lwdclient_startrecv(ns_lwdclientmgr_t *cm) {
        ns_lwdclient_t *client;
        isc_result_t result;
        isc_region_t r;
-       isc_boolean_t destroy = ISC_FALSE;
+       bool destroy = false;
 
 
        LOCK(&cm->lock);
        if (SHUTTINGDOWN(cm)) {
-               destroy = ISC_TRUE;
+               destroy = true;
                result = ISC_R_SUCCESS;
                goto unlock;
        }
@@ -502,7 +502,7 @@ ns_lwdclient_initialize(ns_lwdclient_t *client, ns_lwdclientmgr_t *cmgr) {
 
        client->lookup = NULL;
 
-       client->pktinfo_valid = ISC_FALSE;
+       client->pktinfo_valid = false;
 
        LOCK(&cmgr->lock);
        ISC_LIST_APPEND(cmgr->idle, client, link);
index 7a9e7ed4e8278bd4965a8d2f3ff5aa0b9780b0da..01faa2609b1f828735daa29d3b75bfe75fe8d306 100644 (file)
@@ -279,7 +279,7 @@ add_alias(ns_lwdclient_t *client) {
         * Render the new name to the buffer.
         */
        result = dns_name_totext(dns_fixedname_name(&client->target_name),
-                                ISC_TRUE, &client->recv_buffer);
+                                true, &client->recv_buffer);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -318,7 +318,7 @@ store_realname(ns_lwdclient_t *client) {
        /*
         * Render the new name to the buffer.
         */
-       result = dns_name_totext(tname, ISC_TRUE, &client->recv_buffer);
+       result = dns_name_totext(tname, true, &client->recv_buffer);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -335,7 +335,7 @@ static void
 process_gabn_finddone(isc_task_t *task, isc_event_t *ev) {
        ns_lwdclient_t *client = ev->ev_arg;
        isc_eventtype_t evtype;
-       isc_boolean_t claimed;
+       bool claimed;
 
        ns_lwdclient_log(50, "find done for task %p, client %p", task, client);
 
@@ -346,15 +346,15 @@ process_gabn_finddone(isc_task_t *task, isc_event_t *ev) {
         * No more info to be had?  If so, we have all the good stuff
         * right now, so we can render things.
         */
-       claimed = ISC_FALSE;
+       claimed = false;
        if (evtype == DNS_EVENT_ADBNOMOREADDRESSES) {
                if (NEED_V4(client)) {
                        client->v4find = client->find;
-                       claimed = ISC_TRUE;
+                       claimed = true;
                }
                if (NEED_V6(client)) {
                        client->v6find = client->find;
-                       claimed = ISC_TRUE;
+                       claimed = true;
                }
                if (client->find != NULL) {
                        if (claimed)
@@ -399,7 +399,7 @@ static void
 restart_find(ns_lwdclient_t *client) {
        unsigned int options;
        isc_result_t result;
-       isc_boolean_t claimed;
+       bool claimed;
 
        ns_lwdclient_log(50, "starting find for client %p", client);
 
@@ -464,7 +464,7 @@ restart_find(ns_lwdclient_t *client) {
                return;
        }
 
-       claimed = ISC_FALSE;
+       claimed = false;
 
        /*
         * Did we get our answer to V4 addresses?
@@ -473,7 +473,7 @@ restart_find(ns_lwdclient_t *client) {
            && ((client->find->query_pending & DNS_ADBFIND_INET) == 0)) {
                ns_lwdclient_log(50, "client %p ipv4 satisfied by find %p",
                                 client, client->find);
-               claimed = ISC_TRUE;
+               claimed = true;
                client->v4find = client->find;
        }
 
@@ -484,7 +484,7 @@ restart_find(ns_lwdclient_t *client) {
            && ((client->find->query_pending & DNS_ADBFIND_INET6) == 0)) {
                ns_lwdclient_log(50, "client %p ipv6 satisfied by find %p",
                                 client, client->find);
-               claimed = ISC_TRUE;
+               claimed = true;
                client->v6find = client->find;
        }
 
index e0ceb8f70279be696556c4054b8dc53bd5f52f39..9e600f507f158a2e71716087746b58be2c46f721 100644 (file)
@@ -91,7 +91,7 @@ byaddr_done(isc_task_t *task, isc_event_t *event) {
        {
                b = client->recv_buffer;
 
-               result = dns_name_totext(name, ISC_TRUE, &client->recv_buffer);
+               result = dns_name_totext(name, true, &client->recv_buffer);
                if (result != ISC_R_SUCCESS)
                        goto out;
                ns_lwdclient_log(50, "found name '%.*s'",
index 662b302e7ba4242af7342398e79c84807e106240..91e8bb5a571a209dd463575c0b17ce4c4784db27 100644 (file)
@@ -254,7 +254,7 @@ lookup_done(isc_task_t *task, isc_event_t *event) {
        grbn->sigs = NULL;
        grbn->siglen = NULL;
 
-       result = dns_name_totext(name, ISC_TRUE, &client->recv_buffer);
+       result = dns_name_totext(name, true, &client->recv_buffer);
        if (result != ISC_R_SUCCESS)
                goto out;
        grbn->realname = (char *)isc_buffer_used(&b);
index 0cca0ed12b68dcbe6fbc1e5d16bf7d5d2a45cdc1..cdf11f5b68745ac124c5f9d7d8a065028291ab13 100644 (file)
@@ -307,7 +307,7 @@ ns_lwdmanager_create(isc_mem_t *mctx, const cfg_obj_t *lwres,
 
        RUNTIME_CHECK(isc_mutex_init(&lwresd->lock) == ISC_R_SUCCESS);
 
-       lwresd->shutting_down = ISC_FALSE;
+       lwresd->shutting_down = false;
 
        viewobj = NULL;
        (void)cfg_map_get(lwres, "view", &viewobj);
@@ -438,7 +438,7 @@ void
 ns_lwdmanager_detach(ns_lwresd_t **lwresdp) {
        ns_lwresd_t *lwresd;
        isc_mem_t *mctx;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 
        INSIST(lwresdp != NULL && *lwresdp != NULL);
        INSIST(VALID_LWRESD(*lwresdp));
@@ -450,7 +450,7 @@ ns_lwdmanager_detach(ns_lwresd_t **lwresdp) {
        INSIST(lwresd->refs > 0);
        lwresd->refs--;
        if (lwresd->refs == 0)
-               done = ISC_TRUE;
+               done = true;
        UNLOCK(&lwresd->lock);
 
        if (!done)
@@ -487,7 +487,7 @@ void
 ns_lwreslistener_detach(ns_lwreslistener_t **listenerp) {
        ns_lwreslistener_t *listener;
        isc_mem_t *mctx;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 
        INSIST(listenerp != NULL && *listenerp != NULL);
        INSIST(VALID_LWRESLISTENER(*listenerp));
@@ -498,7 +498,7 @@ ns_lwreslistener_detach(ns_lwreslistener_t **listenerp) {
        INSIST(listener->refs > 0);
        listener->refs--;
        if (listener->refs == 0)
-               done = ISC_TRUE;
+               done = true;
        UNLOCK(&listener->lock);
 
        if (!done)
index 0babd44140032dd8d123f71fa2a24f199d6532a9..cd068bdbe3fb94cb359d4a227105b5f081eabbf1 100644 (file)
@@ -131,8 +131,8 @@ ns_lwsearchctx_init(ns_lwsearchctx_t *sctx, ns_lwsearchlist_t *list,
        INSIST(sctx != NULL);
        sctx->relname = name;
        sctx->searchname = NULL;
-       sctx->doneexact = ISC_FALSE;
-       sctx->exactfirst = ISC_FALSE;
+       sctx->doneexact = false;
+       sctx->exactfirst = false;
        sctx->ndots = ndots;
        if (dns_name_isabsolute(name) || list == NULL) {
                sctx->list = NULL;
@@ -141,7 +141,7 @@ ns_lwsearchctx_init(ns_lwsearchctx_t *sctx, ns_lwsearchlist_t *list,
        sctx->list = list;
        sctx->searchname = ISC_LIST_HEAD(sctx->list->names);
        if (dns_name_countlabels(name) > ndots)
-               sctx->exactfirst = ISC_TRUE;
+               sctx->exactfirst = true;
 }
 
 void
@@ -160,10 +160,10 @@ ns_lwsearchctx_next(ns_lwsearchctx_t *sctx) {
        if (sctx->searchname == NULL) {
                if (sctx->exactfirst || sctx->doneexact)
                        return (ISC_R_NOMORE);
-               sctx->doneexact = ISC_TRUE;
+               sctx->doneexact = true;
        } else {
                if (sctx->exactfirst && !sctx->doneexact)
-                       sctx->doneexact = ISC_TRUE;
+                       sctx->doneexact = true;
                else {
                        sctx->searchname = ISC_LIST_NEXT(sctx->searchname,
                                                         link);
@@ -178,14 +178,14 @@ ns_lwsearchctx_next(ns_lwsearchctx_t *sctx) {
 isc_result_t
 ns_lwsearchctx_current(ns_lwsearchctx_t *sctx, dns_name_t *absname) {
        dns_name_t *tname;
-       isc_boolean_t useexact = ISC_FALSE;
+       bool useexact = false;
 
        REQUIRE(sctx != NULL);
 
        if (sctx->list == NULL ||
            sctx->searchname == NULL ||
            (sctx->exactfirst && !sctx->doneexact))
-               useexact = ISC_TRUE;
+               useexact = true;
 
        if (useexact) {
                if (dns_name_isabsolute(sctx->relname))
index 551c1ac0cf8ef533e3dfa151d939d69de7770165..8cec1ad1eee5ea75e55f8f090d070331f7c4a4ae 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -112,7 +113,7 @@ LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_hour;
 LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_day;
 LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month;
 
-static isc_boolean_t   want_stats = ISC_FALSE;
+static bool    want_stats = false;
 static char            program_name[ISC_DIR_NAMEMAX] = "named";
 static char            absolute_conffile[ISC_DIR_PATHMAX];
 static char            saved_command_line[512];
@@ -338,7 +339,7 @@ save_command_line(int argc, char *argv[]) {
        char *dst;
        char *eob;
        const char truncated[] = "...";
-       isc_boolean_t quoted = ISC_FALSE;
+       bool quoted = false;
 
        dst = saved_command_line;
        eob = saved_command_line + sizeof(saved_command_line);
@@ -358,10 +359,10 @@ save_command_line(int argc, char *argv[]) {
                            *src == '-' || *src == '_' ||
                            *src == '.' || *src == '/') {
                                *dst++ = *src++;
-                               quoted = ISC_FALSE;
+                               quoted = false;
                        } else {
                                *dst++ = '\\';
-                               quoted = ISC_TRUE;
+                               quoted = true;
                        }
                }
        }
@@ -404,7 +405,7 @@ static struct flag_def {
 
 static void
 set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) {
-       isc_boolean_t clear = ISC_FALSE;
+       bool clear = false;
 
        for (;;) {
                const struct flag_def *def;
@@ -417,7 +418,7 @@ set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) {
                        if (arglen == (int)strlen(def->name) &&
                            memcmp(arg, def->name, arglen) == 0) {
                                if (def->value == 0)
-                                       clear = ISC_TRUE;
+                                       clear = true;
                                *ret |= def->value;
                                goto found;
                        }
@@ -471,29 +472,29 @@ parse_T_opt(char *option) {
         *             expected and assert otherwise.
         */
        if (!strcmp(option, "clienttest")) {
-               ns_g_clienttest = ISC_TRUE;
+               ns_g_clienttest = true;
        } else if (!strncmp(option, "delay=", 6)) {
                ns_g_delay = atoi(option + 6);
        } else if (!strcmp(option, "dropedns")) {
-               ns_g_dropedns = ISC_TRUE;
+               ns_g_dropedns = true;
        } else if (!strncmp(option, "dscp=", 5)) {
                isc_dscp_check_value = atoi(option + 5);
        } else if (!strcmp(option, "fixedlocal")) {
-               ns_g_fixedlocal = ISC_TRUE;
+               ns_g_fixedlocal = true;
        } else if (!strcmp(option, "keepstderr")) {
-               ns_g_keepstderr = ISC_TRUE;
+               ns_g_keepstderr = true;
        } else if (!strcmp(option, "noaa")) {
-               ns_g_noaa = ISC_TRUE;
+               ns_g_noaa = true;
        } else if (!strcmp(option, "noedns")) {
-               ns_g_noedns = ISC_TRUE;
+               ns_g_noedns = true;
        } else if (!strcmp(option, "nonearest")) {
-               ns_g_nonearest = ISC_TRUE;
+               ns_g_nonearest = true;
        } else if (!strcmp(option, "nosoa")) {
-               ns_g_nosoa = ISC_TRUE;
+               ns_g_nosoa = true;
        } else if (!strcmp(option, "nosyslog")) {
-               ns_g_nosyslog = ISC_TRUE;
+               ns_g_nosyslog = true;
        } else if (!strcmp(option, "notcp")) {
-               ns_g_notcp = ISC_TRUE;
+               ns_g_notcp = true;
        } else if (!strcmp(option, "maxudp512")) {
                maxudp = 512;
        } else if (!strcmp(option, "maxudp1460")) {
@@ -533,7 +534,7 @@ parse_T_opt(char *option) {
                        ns_main_earlyfatal("bad mkeytimer");
                }
        } else if (!strcmp(option, "sigvalinsecs")) {
-               ns_g_sigvalinsecs = ISC_TRUE;
+               ns_g_sigvalinsecs = true;
        } else if (!strncmp(option, "tat=", 4)) {
                ns_g_tat_interval = atoi(option + 4);
        } else {
@@ -553,7 +554,7 @@ parse_command_line(int argc, char *argv[]) {
         * NS_MAIN_ARGS is defined in main.h, so that it can be used
         * both by named and by ntservice hooks.
         */
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
        while ((ch = isc_commandline_parse(argc, argv, NS_MAIN_ARGS)) != -1) {
                switch (ch) {
                case '4':
@@ -562,7 +563,7 @@ parse_command_line(int argc, char *argv[]) {
                        if (isc_net_probeipv4() != ISC_R_SUCCESS)
                                ns_main_earlyfatal("IPv4 not supported by OS");
                        isc_net_disableipv6();
-                       ns_g_disable6 = ISC_TRUE;
+                       ns_g_disable6 = true;
                        break;
                case '6':
                        if (ns_g_disable6)
@@ -570,7 +571,7 @@ parse_command_line(int argc, char *argv[]) {
                        if (isc_net_probeipv6() != ISC_R_SUCCESS)
                                ns_main_earlyfatal("IPv6 not supported by OS");
                        isc_net_disableipv4();
-                       ns_g_disable4 = ISC_TRUE;
+                       ns_g_disable4 = true;
                        break;
                case 'A':
                        parse_fuzz_arg();
@@ -580,13 +581,13 @@ parse_command_line(int argc, char *argv[]) {
                        lwresd_g_conffile = isc_commandline_argument;
                        if (lwresd_g_useresolvconf)
                                ns_main_earlyfatal("cannot specify -c and -C");
-                       ns_g_conffileset = ISC_TRUE;
+                       ns_g_conffileset = true;
                        break;
                case 'C':
                        lwresd_g_resolvconffile = isc_commandline_argument;
                        if (ns_g_conffileset)
                                ns_main_earlyfatal("cannot specify -c and -C");
-                       lwresd_g_useresolvconf = ISC_TRUE;
+                       lwresd_g_useresolvconf = true;
                        break;
                case 'd':
                        ns_g_debuglevel = parse_int(isc_commandline_argument,
@@ -599,18 +600,18 @@ parse_command_line(int argc, char *argv[]) {
                        ns_g_engine = isc_commandline_argument;
                        break;
                case 'f':
-                       ns_g_foreground = ISC_TRUE;
+                       ns_g_foreground = true;
                        break;
                case 'g':
-                       ns_g_foreground = ISC_TRUE;
-                       ns_g_logstderr = ISC_TRUE;
+                       ns_g_foreground = true;
+                       ns_g_logstderr = true;
                        break;
                /* XXXBEW -i should be removed */
                case 'i':
                        lwresd_g_defaultpidfile = isc_commandline_argument;
                        break;
                case 'l':
-                       ns_g_lwresdonly = ISC_TRUE;
+                       ns_g_lwresdonly = true;
                        break;
                case 'L':
                        ns_g_logfile = isc_commandline_argument;
@@ -647,7 +648,7 @@ parse_command_line(int argc, char *argv[]) {
                        break;
                case 's':
                        /* XXXRTH temporary syntax */
-                       want_stats = ISC_TRUE;
+                       want_stats = true;
                        break;
                case 'S':
                        maxsocks = parse_int(isc_commandline_argument,
@@ -739,7 +740,7 @@ parse_command_line(int argc, char *argv[]) {
                        /* Obsolete. No longer in use. Ignore. */
                        break;
                case 'X':
-                       ns_g_forcelock = ISC_TRUE;
+                       ns_g_forcelock = true;
                        if (strcasecmp(isc_commandline_argument, "none") != 0)
                                ns_g_defaultlockfile = isc_commandline_argument;
                        else
@@ -1038,7 +1039,7 @@ setup(void) {
         */
        ns_os_minprivs();
 
-       result = ns_log_init(ISC_TF(ns_g_username != NULL));
+       result = ns_log_init((ns_g_username != NULL));
        if (result != ISC_R_SUCCESS)
                ns_main_earlyfatal("ns_log_init() failed: %s",
                                   isc_result_totext(result));
@@ -1420,7 +1421,7 @@ main(int argc, char *argv[]) {
                ns_main_earlyfatal("program name too long");
 
        if (strcmp(program_name, "lwresd") == 0)
-               ns_g_lwresdonly = ISC_TRUE;
+               ns_g_lwresdonly = true;
 
        if (result != ISC_R_SUCCESS)
                ns_main_earlyfatal("failed to build internal symbol table");
index 7dce74bc5acd12554521c817bffd42eb9ecd6f83..0ad5abc7408bfd78f6ed5e2072d180171a6e4167 100644 (file)
@@ -51,9 +51,9 @@ respond(ns_client_t *client, isc_result_t result) {
        message = client->message;
        rcode = dns_result_torcode(result);
 
-       msg_result = dns_message_reply(message, ISC_TRUE);
+       msg_result = dns_message_reply(message, true);
        if (msg_result != ISC_R_SUCCESS)
-               msg_result = dns_message_reply(message, ISC_FALSE);
+               msg_result = dns_message_reply(message, false);
        if (msg_result != ISC_R_SUCCESS) {
                ns_client_next(client, msg_result);
                return;
index 1f9a41d516ed12d2fca589d9bba58edfb2638d58..5ab9ba13889ecd6223e9027c03a1653cd233f74b 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/hex.h>
@@ -194,7 +195,7 @@ typedef struct client_additionalctx {
 static isc_result_t
 query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype);
 
-static isc_boolean_t
+static bool
 validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
         dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 
@@ -202,7 +203,7 @@ static void
 query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
                       dns_dbversion_t *version, ns_client_t *client,
                       dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
-                      dns_name_t *fname, isc_boolean_t exact,
+                      dns_name_t *fname, bool exact,
                       dns_name_t *found);
 
 static inline void
@@ -211,7 +212,7 @@ log_queryerror(ns_client_t *client, isc_result_t result, int line, int level);
 static void
 rpz_st_clear(ns_client_t *client);
 
-static isc_boolean_t
+static bool
 rpz_ck_dnssec(ns_client_t *client, isc_result_t qresult,
              dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 
@@ -320,7 +321,7 @@ query_next(ns_client_t *client, isc_result_t result) {
 }
 
 static inline void
-query_freefreeversions(ns_client_t *client, isc_boolean_t everything) {
+query_freefreeversions(ns_client_t *client, bool everything) {
        ns_dbversion_t *dbversion, *dbversion_next;
        unsigned int i;
 
@@ -369,7 +370,7 @@ query_putrdataset(ns_client_t *client, dns_rdataset_t **rdatasetp) {
 }
 
 static inline void
-query_reset(ns_client_t *client, isc_boolean_t everything) {
+query_reset(ns_client_t *client, bool everything) {
        isc_buffer_t *dbuf, *dbuf_next;
        ns_dbversion_t *dbversion, *dbversion_next;
 
@@ -392,7 +393,7 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
             dbversion = dbversion_next) {
                dbversion_next = ISC_LIST_NEXT(dbversion, link);
                dns_db_closeversion(dbversion->db, &dbversion->version,
-                                   ISC_FALSE);
+                                   false);
                dns_db_detach(&dbversion->db);
                ISC_LIST_INITANDAPPEND(client->query.freeversions,
                                      dbversion, link);
@@ -411,7 +412,7 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
        if (client->query.dns64_aaaaok != NULL) {
                isc_mem_put(client->mctx, client->query.dns64_aaaaok,
                            client->query.dns64_aaaaoklen *
-                           sizeof(isc_boolean_t));
+                           sizeof(bool));
                client->query.dns64_aaaaok =  NULL;
                client->query.dns64_aaaaoklen =  0;
        }
@@ -451,7 +452,7 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
                                    NS_QUERYATTR_CACHEOK |
                                    NS_QUERYATTR_SECURE);
        client->query.restarts = 0;
-       client->query.timerset = ISC_FALSE;
+       client->query.timerset = false;
        if (client->query.rpz_st != NULL) {
                rpz_st_clear(client);
                if (everything) {
@@ -464,25 +465,25 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
        client->query.dboptions = 0;
        client->query.fetchoptions = 0;
        client->query.gluedb = NULL;
-       client->query.authdbset = ISC_FALSE;
-       client->query.isreferral = ISC_FALSE;
+       client->query.authdbset = false;
+       client->query.isreferral = false;
        client->query.dns64_options = 0;
        client->query.dns64_ttl = UINT32_MAX;
        client->query.root_key_sentinel_keyid = 0;
-       client->query.root_key_sentinel_is_ta = ISC_FALSE;
-       client->query.root_key_sentinel_not_ta = ISC_FALSE;
+       client->query.root_key_sentinel_is_ta = false;
+       client->query.root_key_sentinel_not_ta = false;
 }
 
 static void
 query_next_callback(ns_client_t *client) {
-       query_reset(client, ISC_FALSE);
+       query_reset(client, false);
 }
 
 void
 ns_query_free(ns_client_t *client) {
        REQUIRE(NS_CLIENT_VALID(client));
 
-       query_reset(client, ISC_TRUE);
+       query_reset(client, true);
 }
 
 static inline isc_result_t
@@ -687,7 +688,7 @@ ns_query_init(ns_client_t *client) {
        ISC_LIST_INIT(client->query.activeversions);
        ISC_LIST_INIT(client->query.freeversions);
        client->query.restarts = 0;
-       client->query.timerset = ISC_FALSE;
+       client->query.timerset = false;
        client->query.rpz_st = NULL;
        client->query.qname = NULL;
        /*
@@ -701,8 +702,8 @@ ns_query_init(ns_client_t *client) {
        client->query.prefetch = NULL;
        client->query.authdb = NULL;
        client->query.authzone = NULL;
-       client->query.authdbset = ISC_FALSE;
-       client->query.isreferral = ISC_FALSE;
+       client->query.authdbset = false;
+       client->query.isreferral = false;
        client->query.dns64_aaaa = NULL;
        client->query.dns64_sigaaaa = NULL;
        client->query.dns64_aaaaok = NULL;
@@ -714,11 +715,11 @@ ns_query_init(ns_client_t *client) {
        client->query.redirect.result = ISC_R_SUCCESS;
        client->query.redirect.rdataset = NULL;
        client->query.redirect.sigrdataset = NULL;
-       client->query.redirect.authoritative = ISC_FALSE;
-       client->query.redirect.is_zone  = ISC_FALSE;
+       client->query.redirect.authoritative = false;
+       client->query.redirect.is_zone  = false;
        client->query.redirect.fname =
                dns_fixedname_initname(&client->query.redirect.fixed);
-       query_reset(client, ISC_FALSE);
+       query_reset(client, false);
        result = query_newdbversion(client, 3);
        if (result != ISC_R_SUCCESS) {
                DESTROYLOCK(&client->query.fetchlock);
@@ -726,7 +727,7 @@ ns_query_init(ns_client_t *client) {
        }
        result = query_newnamebuf(client);
        if (result != ISC_R_SUCCESS) {
-               query_freefreeversions(client, ISC_TRUE);
+               query_freefreeversions(client, true);
                DESTROYLOCK(&client->query.fetchlock);
        }
 
@@ -759,8 +760,8 @@ query_findversion(ns_client_t *client, dns_db_t *db) {
                        return (NULL);
                dns_db_attach(db, &dbversion->db);
                dns_db_currentversion(db, &dbversion->version);
-               dbversion->acl_checked = ISC_FALSE;
-               dbversion->queryok = ISC_FALSE;
+               dbversion->acl_checked = false;
+               dbversion->queryok = false;
                ISC_LIST_APPEND(client->query.activeversions,
                                dbversion, link);
        }
@@ -838,18 +839,18 @@ query_validatezonedb(ns_client_t *client, dns_name_t *name,
                         * allowed to make queries, otherwise the query should
                         * be refused.
                         */
-                       dbversion->acl_checked = ISC_TRUE;
+                       dbversion->acl_checked = true;
                        if ((client->query.attributes &
                             NS_QUERYATTR_QUERYOK) == 0) {
-                               dbversion->queryok = ISC_FALSE;
+                               dbversion->queryok = false;
                                return (DNS_R_REFUSED);
                        }
-                       dbversion->queryok = ISC_TRUE;
+                       dbversion->queryok = true;
                        goto approved;
                }
        }
 
-       result = ns_client_checkaclsilent(client, NULL, queryacl, ISC_TRUE);
+       result = ns_client_checkaclsilent(client, NULL, queryacl, true);
        if ((options & DNS_GETDB_NOLOG) == 0) {
                char msg[NS_CLIENT_ACLMSGSIZE("query")];
                if (result == ISC_R_SUCCESS) {
@@ -896,7 +897,7 @@ query_validatezonedb(ns_client_t *client, dns_name_t *name,
                        queryonacl = client->view->queryonacl;
 
                result = ns_client_checkaclsilent(client, &client->destaddr,
-                                                 queryonacl, ISC_TRUE);
+                                                 queryonacl, true);
                if ((options & DNS_GETDB_NOLOG) == 0 &&
                    result != ISC_R_SUCCESS)
                        ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
@@ -904,12 +905,12 @@ query_validatezonedb(ns_client_t *client, dns_name_t *name,
                                      "query-on denied");
        }
 
-       dbversion->acl_checked = ISC_TRUE;
+       dbversion->acl_checked = true;
        if (result != ISC_R_SUCCESS) {
-               dbversion->queryok = ISC_FALSE;
+               dbversion->queryok = false;
                return (DNS_R_REFUSED);
        }
-       dbversion->queryok = ISC_TRUE;
+       dbversion->queryok = true;
 
  approved:
        /* Transfer ownership, if necessary. */
@@ -927,7 +928,7 @@ query_getzonedb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
        unsigned int ztoptions;
        dns_zone_t *zone = NULL;
        dns_db_t *db = NULL;
-       isc_boolean_t partial = ISC_FALSE;
+       bool partial = false;
 
        REQUIRE(zonep != NULL && *zonep == NULL);
        REQUIRE(dbp != NULL && *dbp == NULL);
@@ -942,7 +943,7 @@ query_getzonedb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
                             &zone);
 
        if (result == DNS_R_PARTIALMATCH)
-               partial = ISC_TRUE;
+               partial = true;
        if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
                result = dns_zone_getdb(zone, &db);
 
@@ -973,7 +974,7 @@ query_getzonedb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
 }
 
 static void
-rpz_log_rewrite(ns_client_t *client, isc_boolean_t disabled,
+rpz_log_rewrite(ns_client_t *client, bool disabled,
                dns_rpz_policy_t policy, dns_rpz_type_t type,
                dns_zone_t *p_zone, dns_name_t *p_name,
                dns_name_t *cname, dns_rpz_num_t rpz_num)
@@ -1130,7 +1131,7 @@ query_getcachedb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
                 dns_db_t **dbp, unsigned int options)
 {
        isc_result_t result;
-       isc_boolean_t check_acl;
+       bool check_acl;
        dns_db_t *db = NULL;
 
        REQUIRE(dbp != NULL && *dbp == NULL);
@@ -1152,23 +1153,23 @@ query_getcachedb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
                 * allowed to make queries, otherwise the query should
                 * be refused.
                 */
-               check_acl = ISC_FALSE;
+               check_acl = false;
                if ((client->query.attributes & NS_QUERYATTR_CACHEACLOK) == 0)
                        goto refuse;
        } else {
                /*
                 * We haven't evaluated the view's queryacl yet.
                 */
-               check_acl = ISC_TRUE;
+               check_acl = true;
        }
 
        if (check_acl) {
-               isc_boolean_t log = ISC_TF((options & DNS_GETDB_NOLOG) == 0);
+               bool log = !(options & DNS_GETDB_NOLOG);
                char msg[NS_CLIENT_ACLMSGSIZE("query (cache)")];
 
                result = ns_client_checkaclsilent(client, NULL,
                                                  client->view->cacheacl,
-                                                 ISC_TRUE);
+                                                 true);
                if (result == ISC_R_SUCCESS) {
                        /*
                         * We were allowed by the "allow-query-cache" ACL.
@@ -1225,7 +1226,7 @@ query_getcachedb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
 static inline 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, isc_boolean_t *is_zonep)
+           dns_dbversion_t **versionp, bool *is_zonep)
 {
        isc_result_t result;
 
@@ -1312,15 +1313,15 @@ query_getdb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
                /*
                 * If neither attempt above succeeded, return the cache instead
                 */
-               *is_zonep = ISC_TRUE;
+               *is_zonep = true;
        } else if (result == ISC_R_NOTFOUND) {
                result = query_getcachedb(client, name, qtype, dbp, options);
-               *is_zonep = ISC_FALSE;
+               *is_zonep = false;
        }
        return (result);
 }
 
-static inline isc_boolean_t
+static inline bool
 query_isduplicate(ns_client_t *client, dns_name_t *name,
                  dns_rdatatype_t type, dns_name_t **mnamep)
 {
@@ -1341,7 +1342,7 @@ query_isduplicate(ns_client_t *client, dns_name_t *name,
                         */
                        CTRACE(ISC_LOG_DEBUG(3),
                               "query_isduplicate: true: done");
-                       return (ISC_TRUE);
+                       return (true);
                } else if (result == DNS_R_NXRRSET) {
                        /*
                         * The name exists, but the rdataset does not.
@@ -1357,7 +1358,7 @@ query_isduplicate(ns_client_t *client, dns_name_t *name,
                *mnamep = mname;
 
        CTRACE(ISC_LOG_DEBUG(3), "query_isduplicate: false: done");
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -1371,7 +1372,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        isc_buffer_t *dbuf;
        isc_buffer_t b;
        dns_dbversion_t *version;
-       isc_boolean_t added_something, need_addname;
+       bool added_something, need_addname;
        dns_zone_t *zone;
        dns_rdatatype_t type;
        dns_clientinfomethods_t cm;
@@ -1397,8 +1398,8 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        db = NULL;
        version = NULL;
        node = NULL;
-       added_something = ISC_FALSE;
-       need_addname = ISC_FALSE;
+       added_something = false;
+       need_addname = false;
        zone = NULL;
        additionaltype = dns_rdatasetadditional_fromauth;
 
@@ -1564,11 +1565,11 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                        query_releasename(client, &fname);
                        fname = mname;
                } else
-                       need_addname = ISC_TRUE;
+                       need_addname = true;
                ISC_LIST_APPEND(fname->list, rdataset, link);
                trdataset = rdataset;
                rdataset = NULL;
-               added_something = ISC_TRUE;
+               added_something = true;
                /*
                 * Note: we only add SIGs if we've added the type they cover,
                 * so we do not need to check if the SIG rdataset is already
@@ -1584,7 +1585,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
 
        if (qtype == dns_rdatatype_a) {
 #ifdef ALLOW_FILTER_AAAA
-               isc_boolean_t have_a = ISC_FALSE;
+               bool have_a = false;
 #endif
 
                /*
@@ -1624,10 +1625,10 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                                dns_rdataset_disassociate(sigrdataset);
                }
                if (result == ISC_R_SUCCESS) {
-                       isc_boolean_t invalid = ISC_FALSE;
+                       bool invalid = false;
                        mname = NULL;
 #ifdef ALLOW_FILTER_AAAA
-                       have_a = ISC_TRUE;
+                       have_a = true;
 #endif
                        if (additionaltype ==
                            dns_rdatasetadditional_fromcache &&
@@ -1635,9 +1636,9 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                             DNS_TRUST_GLUE(rdataset->trust)))
                        {
                                /* validate() may change rdataset->trust */
-                               invalid = ISC_TF(!validate(client, db, fname,
-                                                          rdataset,
-                                                          sigrdataset));
+                               invalid = !validate(client, db, fname,
+                                                   rdataset,
+                                                   sigrdataset);
                        }
                        if (invalid && DNS_TRUST_PENDING(rdataset->trust)) {
                                dns_rdataset_disassociate(rdataset);
@@ -1653,10 +1654,10 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                                                                  &fname);
                                                fname = mname;
                                        } else
-                                               need_addname = ISC_TRUE;
+                                               need_addname = true;
                                }
                                ISC_LIST_APPEND(fname->list, rdataset, link);
-                               added_something = ISC_TRUE;
+                               added_something = true;
                                if (sigrdataset != NULL &&
                                    dns_rdataset_isassociated(sigrdataset))
                                {
@@ -1693,7 +1694,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                                dns_rdataset_disassociate(sigrdataset);
                }
                if (result == ISC_R_SUCCESS) {
-                       isc_boolean_t invalid = ISC_FALSE;
+                       bool invalid = false;
                        mname = NULL;
                        /*
                         * There's an A; check whether we're filtering AAAA
@@ -1712,9 +1713,9 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                             DNS_TRUST_GLUE(rdataset->trust)))
                        {
                                /* validate() may change rdataset->trust */
-                               invalid = ISC_TF(!validate(client, db, fname,
-                                                          rdataset,
-                                                          sigrdataset));
+                               invalid = !validate(client, db, fname,
+                                                   rdataset,
+                                                   sigrdataset);
                        }
                        if (invalid && DNS_TRUST_PENDING(rdataset->trust)) {
                                dns_rdataset_disassociate(rdataset);
@@ -1730,10 +1731,10 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                                                                  &fname);
                                                fname = mname;
                                        } else
-                                               need_addname = ISC_TRUE;
+                                               need_addname = true;
                                }
                                ISC_LIST_APPEND(fname->list, rdataset, link);
-                               added_something = ISC_TRUE;
+                               added_something = true;
                                if (sigrdataset != NULL &&
                                    dns_rdataset_isassociated(sigrdataset))
                                {
@@ -1756,7 +1757,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
 
        /*
         * We may have added our rdatasets to an existing name, if so, then
-        * need_addname will be ISC_FALSE.  Whether we used an existing name
+        * need_addname will be false.  Whether we used an existing name
         * or a new one, we must set fname to NULL to prevent cleanup.
         */
        if (need_addname)
@@ -1818,7 +1819,7 @@ query_discardcache(ns_client_t *client, dns_rdataset_t *rdataset_base,
                query_putrdataset(client, &rdataset);
        }
        if (*versionp != NULL)
-               dns_db_closeversion(*dbp, versionp, ISC_FALSE);
+               dns_db_closeversion(*dbp, versionp, false);
        if (*nodep != NULL)
                dns_db_detachnode(*dbp, nodep);
        if (*dbp != NULL)
@@ -1849,7 +1850,7 @@ query_iscachevalid(dns_zone_t *zone, dns_db_t *db, dns_db_t *db0,
        }
 
  cleanup:
-       dns_db_closeversion(db_current, &version_current, ISC_FALSE);
+       dns_db_closeversion(db_current, &version_current, false);
        if (db0 == NULL && db_current != NULL)
                dns_db_detach(&db_current);
 
@@ -1870,14 +1871,14 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        isc_buffer_t *dbuf;
        isc_buffer_t b;
        dns_dbversion_t *version, *cversion;
-       isc_boolean_t added_something, need_addname, needadditionalcache;
-       isc_boolean_t need_sigrrset;
+       bool added_something, need_addname, needadditionalcache;
+       bool need_sigrrset;
        dns_zone_t *zone;
        dns_rdatatype_t type;
        dns_rdatasetadditional_t additionaltype;
        dns_clientinfomethods_t cm;
        dns_clientinfo_t ci;
-       isc_boolean_t invalid;
+       bool invalid;
 
        /*
         * If we don't have an additional cache call query_addadditional.
@@ -1909,10 +1910,10 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        cversion = NULL;
        node = NULL;
        cnode = NULL;
-       added_something = ISC_FALSE;
-       need_addname = ISC_FALSE;
+       added_something = false;
+       need_addname = false;
        zone = NULL;
-       needadditionalcache = ISC_FALSE;
+       needadditionalcache = false;
        POST(needadditionalcache);
        additionaltype = dns_rdatasetadditional_fromauth;
        dns_name_init(&cfname, NULL);
@@ -1975,7 +1976,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                 */
                CTRACE(ISC_LOG_DEBUG(3),
                       "query_addadditional2: negative auth additional cache");
-               dns_db_closeversion(cdb, &cversion, ISC_FALSE);
+               dns_db_closeversion(cdb, &cversion, false);
                dns_db_detach(&cdb);
                dns_zone_detach(&zone);
                goto try_cache;
@@ -1993,7 +1994,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        /* We've got an active cache. */
        CTRACE(ISC_LOG_DEBUG(3),
               "query_addadditional2: auth additional cache");
-       dns_db_closeversion(cdb, &cversion, ISC_FALSE);
+       dns_db_closeversion(cdb, &cversion, false);
        db = cdb;
        node = cnode;
        dns_name_clone(&cfname, fname);
@@ -2113,14 +2114,14 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                /* We have a negative cache. */
                CTRACE(ISC_LOG_DEBUG(3),
                       "query_addadditional2: negative glue additional cache");
-               dns_db_closeversion(cdb, &cversion, ISC_FALSE);
+               dns_db_closeversion(cdb, &cversion, false);
                dns_db_detach(&cdb);
                goto cleanup;
        }
 
        /* Cache hit. */
        CTRACE(ISC_LOG_DEBUG(3), "query_addadditional2: glue additional cache");
-       dns_db_closeversion(cdb, &cversion, ISC_FALSE);
+       dns_db_closeversion(cdb, &cversion, false);
        db = cdb;
        node = cnode;
        dns_name_clone(&cfname, fname);
@@ -2153,7 +2154,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
         */
        dns_name_clone(fname, &cfname);
        query_keepname(client, fname, dbuf);
-       needadditionalcache = ISC_TRUE;
+       needadditionalcache = true;
 
        rdataset = query_newrdataset(client);
        if (rdataset == NULL)
@@ -2181,14 +2182,14 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
         * If unable to do so, drop it from the response unless
         * it's glue, in which case it may still be needed.
         */
-       invalid = ISC_FALSE;
+       invalid = false;
        if (result == ISC_R_SUCCESS &&
            additionaltype == dns_rdatasetadditional_fromcache &&
            (DNS_TRUST_PENDING(rdataset->trust) ||
             DNS_TRUST_GLUE(rdataset->trust)))
        {
-               invalid = ISC_TF(!validate(client, db, fname,
-                                          rdataset, sigrdataset));
+               invalid = !validate(client, db, fname,
+                                   rdataset, sigrdataset);
        }
        if (invalid && DNS_TRUST_PENDING(rdataset->trust)) {
                dns_rdataset_disassociate(rdataset);
@@ -2229,14 +2230,14 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
         * If unable to do so, drop it from the response unless
         * it's glue, in which case it may still be needed.
         */
-       invalid = ISC_FALSE;
+       invalid = false;
        if (result == ISC_R_SUCCESS &&
            additionaltype == dns_rdatasetadditional_fromcache &&
            (DNS_TRUST_PENDING(rdataset->trust) ||
             DNS_TRUST_GLUE(rdataset->trust)))
        {
-               invalid = ISC_TF(!validate(client, db, fname,
-                                          rdataset, sigrdataset));
+               invalid = !validate(client, db, fname,
+                                   rdataset, sigrdataset);
        }
        if (invalid && DNS_TRUST_PENDING(rdataset->trust)) {
                dns_rdataset_disassociate(rdataset);
@@ -2258,7 +2259,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
         * Set the new result in the cache if required.  We do not support
         * caching additional data from a cache DB.
         */
-       if (needadditionalcache == ISC_TRUE &&
+       if (needadditionalcache == true &&
            (additionaltype == dns_rdatasetadditional_fromauth ||
             additionaltype == dns_rdatasetadditional_fromglue)) {
                (void)dns_rdataset_setadditional(rdataset_base, additionaltype,
@@ -2268,7 +2269,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
        }
 
  foundcache:
-       need_sigrrset = ISC_FALSE;
+       need_sigrrset = false;
        mname0 = NULL;
        for (crdataset = ISC_LIST_HEAD(cfname.list);
             crdataset != NULL;
@@ -2298,20 +2299,20 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
                                                fname = mname;
                                                mname0 = mname;
                                        } else
-                                               need_addname = ISC_TRUE;
+                                               need_addname = true;
                                }
                                ISC_LIST_UNLINK(cfname.list, crdataset, link);
                                ISC_LIST_APPEND(fname->list, crdataset, link);
-                               added_something = ISC_TRUE;
-                               need_sigrrset = ISC_TRUE;
+                               added_something = true;
+                               need_sigrrset = true;
                        } else
-                               need_sigrrset = ISC_FALSE;
+                               need_sigrrset = false;
                } else if (crdataset->type == dns_rdatatype_rrsig &&
                           need_sigrrset && WANTDNSSEC(client)) {
                        ISC_LIST_UNLINK(cfname.list, crdataset, link);
                        ISC_LIST_APPEND(fname->list, crdataset, link);
-                       added_something = ISC_TRUE; /* just in case */
-                       need_sigrrset = ISC_FALSE;
+                       added_something = true; /* just in case */
+                       need_sigrrset = false;
                }
        }
 
@@ -2325,7 +2326,7 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
 
        /*
         * We may have added our rdatasets to an existing name, if so, then
-        * need_addname will be ISC_FALSE.  Whether we used an existing name
+        * need_addname will be false.  Whether we used an existing name
         * or a new one, we must set fname to NULL to prevent cleanup.
         */
        if (need_addname)
@@ -2793,7 +2794,7 @@ query_addrrset(ns_client_t *client, dns_name_t **namep,
 
 static inline isc_result_t
 query_addsoa(ns_client_t *client, dns_db_t *db, dns_dbversion_t *version,
-            unsigned int override_ttl, isc_boolean_t isassociated,
+            unsigned int override_ttl, bool isassociated,
             dns_section_t section)
 {
        dns_name_t *name;
@@ -3094,23 +3095,23 @@ query_add_cname(ns_client_t *client, dns_name_t *qname, dns_name_t *tname,
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 get_root_key_sentinel_id(ns_client_t *client, const char *ndata) {
        unsigned int v = 0;
        int i;
 
        for (i = 0; i < 5; i++) {
                if (ndata[i] < '0' || ndata[i] > '9') {
-                       return (ISC_FALSE);
+                       return (false);
                }
                v *= 10;
                v += ndata[i] - '0';
        }
        if (v > 65535U) {
-               return (ISC_FALSE);
+               return (false);
        }
        client->query.root_key_sentinel_keyid = v;
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*%
@@ -3129,7 +3130,7 @@ root_key_sentinel_detect(ns_client_t *client) {
                if (!get_root_key_sentinel_id(client, ndata + 25)) {
                        return;
                }
-               client->query.root_key_sentinel_is_ta = ISC_TRUE;
+               client->query.root_key_sentinel_is_ta = true;
                ns_client_log(client, NS_LOGCATEGORY_TAT,
                              NS_LOGMODULE_QUERY, ISC_LOG_INFO,
                              "root-key-sentinel-is-ta query label found");
@@ -3139,7 +3140,7 @@ root_key_sentinel_detect(ns_client_t *client) {
                if (!get_root_key_sentinel_id(client, ndata + 26)) {
                        return;
                }
-               client->query.root_key_sentinel_not_ta = ISC_TRUE;
+               client->query.root_key_sentinel_not_ta = true;
                ns_client_log(client, NS_LOGCATEGORY_TAT,
                              NS_LOGMODULE_QUERY, ISC_LOG_INFO,
                              "root-key-sentinel-not-ta query label found");
@@ -3169,7 +3170,7 @@ mark_secure(ns_client_t *client, dns_db_t *db, dns_name_t *name,
        /*
         * Save the updated secure state.  Ignore failures.
         */
-       result = dns_db_findnodeext(db, name, ISC_TRUE, &cm, &ci, &node);
+       result = dns_db_findnodeext(db, name, true, &cm, &ci, &node);
        if (result != ISC_R_SUCCESS)
                return;
 
@@ -3188,15 +3189,15 @@ mark_secure(ns_client_t *client, dns_db_t *db, dns_name_t *name,
  * Find the secure key that corresponds to rrsig.
  * Note: 'keyrdataset' maintains state between successive calls,
  * there may be multiple keys with the same keyid.
- * Return ISC_FALSE if we have exhausted all the possible keys.
+ * Return false if we have exhausted all the possible keys.
  */
-static isc_boolean_t
+static bool
 get_key(ns_client_t *client, dns_db_t *db, dns_rdata_rrsig_t *rrsig,
        dns_rdataset_t *keyrdataset, dst_key_t **keyp)
 {
        isc_result_t result;
        dns_dbnode_t *node = NULL;
-       isc_boolean_t secure = ISC_FALSE;
+       bool secure = false;
        dns_clientinfomethods_t cm;
        dns_clientinfo_t ci;
 
@@ -3204,20 +3205,20 @@ get_key(ns_client_t *client, dns_db_t *db, dns_rdata_rrsig_t *rrsig,
        dns_clientinfo_init(&ci, client, NULL);
 
        if (!dns_rdataset_isassociated(keyrdataset)) {
-               result = dns_db_findnodeext(db, &rrsig->signer, ISC_FALSE,
+               result = dns_db_findnodeext(db, &rrsig->signer, false,
                                            &cm, &ci, &node);
                if (result != ISC_R_SUCCESS)
-                       return (ISC_FALSE);
+                       return (false);
 
                result = dns_db_findrdataset(db, node, NULL,
                                             dns_rdatatype_dnskey, 0,
                                             client->now, keyrdataset, NULL);
                dns_db_detachnode(db, &node);
                if (result != ISC_R_SUCCESS)
-                       return (ISC_FALSE);
+                       return (false);
 
                if (keyrdataset->trust != dns_trust_secure)
-                       return (ISC_FALSE);
+                       return (false);
 
                result = dns_rdataset_first(keyrdataset);
        } else
@@ -3238,7 +3239,7 @@ get_key(ns_client_t *client, dns_db_t *db, dns_rdata_rrsig_t *rrsig,
                if (rrsig->algorithm == (dns_secalg_t)dst_key_alg(*keyp) &&
                    rrsig->keyid == (dns_keytag_t)dst_key_id(*keyp) &&
                    dst_key_iszonekey(*keyp)) {
-                       secure = ISC_TRUE;
+                       secure = true;
                        break;
                }
                dst_key_free(keyp);
@@ -3246,13 +3247,13 @@ get_key(ns_client_t *client, dns_db_t *db, dns_rdata_rrsig_t *rrsig,
        return (secure);
 }
 
-static isc_boolean_t
+static bool
 verify(dst_key_t *key, dns_name_t *name, dns_rdataset_t *rdataset,
        dns_rdata_t *rdata, ns_client_t *client)
 {
        isc_result_t result;
        dns_fixedname_t fixed;
-       isc_boolean_t ignore = ISC_FALSE;
+       bool ignore = false;
 
        dns_fixedname_init(&fixed);
 
@@ -3261,18 +3262,18 @@ again:
                                    client->view->maxbits, client->mctx,
                                    rdata, NULL);
        if (result == DNS_R_SIGEXPIRED && client->view->acceptexpired) {
-               ignore = ISC_TRUE;
+               ignore = true;
                goto again;
        }
        if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 /*
  * Validate the rdataset if possible with available records.
  */
-static isc_boolean_t
+static bool
 validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
         dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
@@ -3283,7 +3284,7 @@ validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
        dns_rdataset_t keyrdataset;
 
        if (sigrdataset == NULL || !dns_rdataset_isassociated(sigrdataset))
-               return (ISC_FALSE);
+               return (false);
 
        for (result = dns_rdataset_first(sigrdataset);
             result == ISC_R_SUCCESS;
@@ -3293,7 +3294,7 @@ validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
                dns_rdataset_current(sigrdataset, &rdata);
                result = dns_rdata_tostruct(&rdata, &rrsig, NULL);
                if (result != ISC_R_SUCCESS)
-                       return (ISC_FALSE);
+                       return (false);
                if (!dns_resolver_algorithm_supported(client->view->resolver,
                                                      name, rrsig.algorithm))
                        continue;
@@ -3308,14 +3309,14 @@ validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
                                dns_rdataset_disassociate(&keyrdataset);
                                mark_secure(client, db, name, &rrsig,
                                            rdataset, sigrdataset);
-                               return (ISC_TRUE);
+                               return (true);
                        }
                        dst_key_free(&key);
                } while (1);
                if (dns_rdataset_isassociated(&keyrdataset))
                        dns_rdataset_disassociate(&keyrdataset);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -3324,7 +3325,7 @@ query_addbestns(ns_client_t *client) {
        dns_dbnode_t *node;
        dns_name_t *fname, *zfname;
        dns_rdataset_t *rdataset, *sigrdataset, *zrdataset, *zsigrdataset;
-       isc_boolean_t is_zone, use_zone;
+       bool is_zone, use_zone;
        isc_buffer_t *dbuf;
        isc_result_t result;
        dns_dbversion_t *version;
@@ -3345,8 +3346,8 @@ query_addbestns(ns_client_t *client) {
        zdb = NULL;
        version = NULL;
        zone = NULL;
-       is_zone = ISC_FALSE;
-       use_zone = ISC_FALSE;
+       is_zone = false;
+       use_zone = false;
 
        dns_clientinfomethods_init(&cm, ns_client_sourceip);
        dns_clientinfo_init(&ci, client, NULL);
@@ -3400,7 +3401,7 @@ query_addbestns(ns_client_t *client) {
                        SAVE(zsigrdataset, sigrdataset);
                        version = NULL;
                        dns_db_attach(client->view->cachedb, &db);
-                       is_zone = ISC_FALSE;
+                       is_zone = false;
                        goto db_find;
                }
        } else {
@@ -3415,14 +3416,14 @@ query_addbestns(ns_client_t *client) {
                                 * We found a zonecut in the cache, but our
                                 * zone delegation is better.
                                 */
-                               use_zone = ISC_TRUE;
+                               use_zone = true;
                        }
                } else if (result == ISC_R_NOTFOUND && zfname != NULL) {
                        /*
                         * We didn't find anything in the cache, but we
                         * have a zone delegation, so use it.
                         */
-                       use_zone = ISC_TRUE;
+                       use_zone = true;
                } else
                        goto cleanup;
        }
@@ -3607,7 +3608,7 @@ query_addds(ns_client_t *client, dns_db_t *db, dns_dbnode_t *node,
        if (dns_rdataset_isassociated(sigrdataset))
                dns_rdataset_disassociate(sigrdataset);
        query_findclosestnsec3(name, db, version, client, rdataset,
-                              sigrdataset, fname, ISC_TRUE,
+                              sigrdataset, fname, true,
                               dns_fixedname_name(&fixed));
        if (!dns_rdataset_isassociated(rdataset))
                goto cleanup;
@@ -3629,7 +3630,7 @@ query_addds(ns_client_t *client, dns_db_t *db, dns_dbnode_t *node,
                                goto cleanup;
                query_findclosestnsec3(dns_fixedname_name(&fixed), db, version,
                                       client, rdataset, sigrdataset, fname,
-                                      ISC_FALSE, NULL);
+                                      false, NULL);
                if (!dns_rdataset_isassociated(rdataset))
                        goto cleanup;
                query_addrrset(client, &fname, &rdataset, &sigrdataset, dbuf,
@@ -3648,7 +3649,7 @@ query_addds(ns_client_t *client, dns_db_t *db, dns_dbnode_t *node,
 static void
 query_addwildcardproof(ns_client_t *client, dns_db_t *db,
                       dns_dbversion_t *version, dns_name_t *name,
-                      isc_boolean_t ispositive, isc_boolean_t nodata)
+                      bool ispositive, bool nodata)
 {
        isc_buffer_t *dbuf, b;
        dns_name_t *fname;
@@ -3661,7 +3662,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
        isc_result_t result;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdata_nsec_t nsec;
-       isc_boolean_t have_wname;
+       bool have_wname;
        int order;
        dns_fixedname_t cfixed;
        dns_name_t *cname;
@@ -3722,7 +3723,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
        options = client->query.dboptions | DNS_DBFIND_NOWILD;
        wname = dns_fixedname_initname(&wfixed);
  again:
-       have_wname = ISC_FALSE;
+       have_wname = false;
        /*
         * We'll need some resources...
         */
@@ -3767,7 +3768,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
                 * Add closest (provable) encloser NSEC3.
                 */
                query_findclosestnsec3(cname, db, version, client, rdataset,
-                                      sigrdataset, fname, ISC_TRUE, cname);
+                                      sigrdataset, fname, true, cname);
                if (!dns_rdataset_isassociated(rdataset))
                        goto cleanup;
                if (!ispositive)
@@ -3806,7 +3807,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
                        dns_name_split(name, labels, NULL, wname);
 
                query_findclosestnsec3(wname, db, version, client, rdataset,
-                                      sigrdataset, fname, ISC_FALSE, NULL);
+                                      sigrdataset, fname, false, NULL);
                if (!dns_rdataset_isassociated(rdataset))
                        goto cleanup;
                query_addrrset(client, &fname, &rdataset, &sigrdataset,
@@ -3879,7 +3880,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
                        result = dns_name_concatenate(dns_wildcardname,
                                                      wname, wname, NULL);
                        if (result == ISC_R_SUCCESS)
-                               have_wname = ISC_TRUE;
+                               have_wname = true;
                        dns_rdata_freestruct(&nsec);
                }
                query_addrrset(client, &fname, &rdataset, &sigrdataset,
@@ -3892,7 +3893,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
        if (fname != NULL)
                query_releasename(client, &fname);
        if (have_wname) {
-               ispositive = ISC_TRUE;  /* prevent loop */
+               ispositive = true;      /* prevent loop */
                if (!dns_name_equal(name, wname)) {
                        name = wname;
                        goto again;
@@ -3949,7 +3950,7 @@ query_addnxrrsetnsec(ns_client_t *client, dns_db_t *db,
 
        /* XXX */
        query_addwildcardproof(client, db, version, client->query.qname,
-                              ISC_TRUE, ISC_FALSE);
+                              true, false);
 
        /*
         * We'll need some resources...
@@ -3999,9 +4000,9 @@ free_devent(ns_client_t *client, isc_event_t **eventp,
  * Check the configured trust anchors for a root zone trust anchor
  * with a key id that matches client->query.root_key_sentinel_keyid.
  *
- * Return ISC_TRUE when found, otherwise return ISC_FALSE.
+ * Return true when found, otherwise return false.
  */
-static isc_boolean_t
+static bool
 has_ta(ns_client_t *client) {
        dns_keytable_t *keytable = NULL;
        dns_keynode_t *keynode = NULL;
@@ -4009,7 +4010,7 @@ has_ta(ns_client_t *client) {
 
        result = dns_view_getsecroots(client->view, &keytable);
        if (result != ISC_R_SUCCESS) {
-               return (ISC_FALSE);
+               return (false);
        }
 
        result = dns_keytable_find(keytable, dns_rootname, &keynode);
@@ -4019,7 +4020,7 @@ has_ta(ns_client_t *client) {
                if (keyid == client->query.root_key_sentinel_keyid) {
                        dns_keytable_detachkeynode(keytable, &keynode);
                        dns_keytable_detach(&keytable);
-                       return (ISC_TRUE);
+                       return (true);
                }
                result = dns_keytable_nextkeynode(keytable, keynode, &nextnode);
                dns_keytable_detachkeynode(keytable, &keynode);
@@ -4027,14 +4028,14 @@ has_ta(ns_client_t *client) {
        }
        dns_keytable_detach(&keytable);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%
  * Check if a root key sentinel SERVFAIL should be returned.
  */
-static isc_boolean_t
-root_key_sentinel_return_servfail(ns_client_t *client, isc_boolean_t is_zone,
+static bool
+root_key_sentinel_return_servfail(ns_client_t *client, bool is_zone,
                                  dns_rdataset_t *rdataset, isc_result_t result)
 {
        /*
@@ -4043,7 +4044,7 @@ root_key_sentinel_return_servfail(ns_client_t *client, isc_boolean_t is_zone,
        if (!client->query.root_key_sentinel_is_ta &&
            !client->query.root_key_sentinel_not_ta)
        {
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -4058,7 +4059,7 @@ root_key_sentinel_return_servfail(ns_client_t *client, isc_boolean_t is_zone,
        case DNS_R_NCACHENXRRSET:
                break;
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -4068,17 +4069,17 @@ root_key_sentinel_return_servfail(ns_client_t *client, isc_boolean_t is_zone,
            ((client->query.root_key_sentinel_is_ta && !has_ta(client)) ||
             (client->query.root_key_sentinel_not_ta && has_ta(client))))
        {
-               return (ISC_TRUE);
+               return (true);
        }
 
        /*
         * As special processing may only be triggered by the original QNAME,
         * disable it after following a CNAME/DNAME.
         */
-       client->query.root_key_sentinel_is_ta = ISC_FALSE;
-       client->query.root_key_sentinel_not_ta = ISC_FALSE;
+       client->query.root_key_sentinel_is_ta = false;
+       client->query.root_key_sentinel_not_ta = false;
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -4086,7 +4087,7 @@ query_resume(isc_task_t *task, isc_event_t *event) {
        dns_fetchevent_t *devent = (dns_fetchevent_t *)event;
        dns_fetch_t *fetch = NULL;
        ns_client_t *client;
-       isc_boolean_t fetch_canceled, client_shuttingdown;
+       bool fetch_canceled, client_shuttingdown;
        isc_result_t result;
        isc_logcategory_t *logcategory = NS_LOGCATEGORY_QUERY_ERRORS;
        int errorloglevel;
@@ -4110,7 +4111,7 @@ query_resume(isc_task_t *task, isc_event_t *event) {
                 */
                INSIST(devent->fetch == client->query.fetch);
                client->query.fetch = NULL;
-               fetch_canceled = ISC_FALSE;
+               fetch_canceled = false;
                /*
                 * Update client->now.
                 */
@@ -4120,7 +4121,7 @@ query_resume(isc_task_t *task, isc_event_t *event) {
                 * This is a fetch completion event for a canceled fetch.
                 * Clean up and don't resume the find.
                 */
-               fetch_canceled = ISC_TRUE;
+               fetch_canceled = true;
        }
        UNLOCK(&client->query.fetchlock);
        INSIST(client->query.fetch == NULL);
@@ -4155,7 +4156,7 @@ query_resume(isc_task_t *task, isc_event_t *event) {
                                dns_resolver_logfetch(fetch, ns_g_lctx,
                                                      logcategory,
                                                      NS_LOGMODULE_QUERY,
-                                                     errorloglevel, ISC_FALSE);
+                                                     errorloglevel, false);
                        }
                }
        }
@@ -4238,7 +4239,7 @@ query_prefetch(ns_client_t *client, dns_name_t *qname,
 static isc_result_t
 query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
              dns_name_t *qdomain, dns_rdataset_t *nameservers,
-             isc_boolean_t resuming)
+             bool resuming)
 {
        isc_result_t result;
        dns_rdataset_t *rdataset, *sigrdataset;
@@ -4337,7 +4338,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
        } else
                sigrdataset = NULL;
 
-       if (client->query.timerset == ISC_FALSE)
+       if (client->query.timerset == false)
                ns_client_settimeout(client, 60);
        if (!TCP(client))
                peeraddr = &client->peeraddr;
@@ -4555,10 +4556,10 @@ static isc_result_t
 rpz_rrset_find(ns_client_t *client, dns_name_t *name, dns_rdatatype_t type,
               dns_rpz_type_t rpz_type, dns_db_t **dbp,
               dns_dbversion_t *version, dns_rdataset_t **rdatasetp,
-              isc_boolean_t resuming)
+              bool resuming)
 {
        dns_rpz_st_t *st;
-       isc_boolean_t is_zone;
+       bool is_zone;
        dns_dbnode_t *node;
        dns_fixedname_t fixed;
        dns_name_t *found;
@@ -4596,7 +4597,7 @@ rpz_rrset_find(ns_client_t *client, dns_name_t *name, dns_rdatatype_t type,
                return (result);
        }
        if (*dbp != NULL) {
-               is_zone = ISC_FALSE;
+               is_zone = false;
        } else {
                dns_zone_t *zone;
 
@@ -5041,7 +5042,7 @@ rpz_rewrite_ip(ns_client_t *client, const isc_netaddr_t *netaddr,
                         * Log DNS_RPZ_POLICY_DISABLED zones
                         * and try the next eligible policy zone.
                         */
-                       rpz_log_rewrite(client, ISC_TRUE, policy, rpz_type,
+                       rpz_log_rewrite(client, true, policy, rpz_type,
                                        p_zone, p_name, NULL, rpz_num);
                }
        }
@@ -5060,7 +5061,7 @@ rpz_rewrite_ip_rrset(ns_client_t *client,
                     dns_rpz_type_t rpz_type, dns_rdatatype_t ip_type,
                     dns_db_t **ip_dbp, dns_dbversion_t *ip_version,
                     dns_rdataset_t **ip_rdatasetp,
-                    dns_rdataset_t **p_rdatasetp, isc_boolean_t resuming)
+                    dns_rdataset_t **p_rdatasetp, bool resuming)
 {
        dns_rpz_zbits_t zbits;
        isc_netaddr_t netaddr;
@@ -5153,7 +5154,7 @@ rpz_rewrite_ip_rrset(ns_client_t *client,
 static isc_result_t
 rpz_rewrite_ip_rrsets(ns_client_t *client, dns_name_t *name,
                      dns_rdatatype_t qtype, dns_rpz_type_t rpz_type,
-                     dns_rdataset_t **ip_rdatasetp, isc_boolean_t resuming)
+                     dns_rdataset_t **ip_rdatasetp, bool resuming)
 {
        dns_rpz_st_t *st;
        dns_dbversion_t *ip_version;
@@ -5375,7 +5376,7 @@ rpz_rewrite_name(ns_client_t *client, dns_name_t *trig_name,
                         * Log DNS_RPZ_POLICY_DISABLED zones
                         * and try the next eligible policy zone.
                         */
-                       rpz_log_rewrite(client, ISC_TRUE, policy, rpz_type,
+                       rpz_log_rewrite(client, true, policy, rpz_type,
                                        p_zone, p_name, NULL, rpz_num);
                        break;
                }
@@ -5420,7 +5421,7 @@ typedef enum {
  */
 static isc_result_t
 rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
-           isc_result_t qresult, isc_boolean_t resuming,
+           isc_result_t qresult, bool resuming,
            dns_rdataset_t *ordataset, dns_rdataset_t *osigset)
 {
        dns_rpz_zones_t *rpzs;
@@ -5788,7 +5789,7 @@ cleanup:
            st->m.policy == DNS_RPZ_POLICY_ERROR) {
                if (st->m.policy == DNS_RPZ_POLICY_PASSTHRU &&
                    result != DNS_R_DELEGATION)
-                       rpz_log_rewrite(client, ISC_FALSE, st->m.policy,
+                       rpz_log_rewrite(client, false, st->m.policy,
                                        st->m.type, st->m.zone, st->p_name,
                                        NULL, st->m.rpz->num);
                rpz_match_clear(st);
@@ -5809,7 +5810,7 @@ cleanup:
  * See if response policy zone rewriting is allowed by a lack of interest
  * by the client in DNSSEC or a lack of signatures.
  */
-static isc_boolean_t
+static bool
 rpz_ck_dnssec(ns_client_t *client, isc_result_t qresult,
              dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
@@ -5822,38 +5823,38 @@ rpz_ck_dnssec(ns_client_t *client, isc_result_t qresult,
        CTRACE(ISC_LOG_DEBUG(3), "rpz_ck_dnssec");
 
        if (client->view->rpzs->p.break_dnssec || !WANTDNSSEC(client))
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * We do not know if there are signatures if we have not recursed
         * for them.
         */
        if (qresult == DNS_R_DELEGATION || qresult == ISC_R_NOTFOUND)
-               return (ISC_FALSE);
+               return (false);
 
        if (sigrdataset == NULL)
-               return (ISC_TRUE);
+               return (true);
        if (dns_rdataset_isassociated(sigrdataset))
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * We are happy to rewrite nothing.
         */
        if (rdataset == NULL || !dns_rdataset_isassociated(rdataset))
-               return (ISC_TRUE);
+               return (true);
        /*
         * Do not rewrite if there is any sign of signatures.
         */
        if (rdataset->type == dns_rdatatype_nsec ||
            rdataset->type == dns_rdatatype_nsec3 ||
            rdataset->type == dns_rdatatype_rrsig)
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * Look for a signature in a negative cache rdataset.
         */
        if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) == 0)
-               return (ISC_TRUE);
+               return (true);
        found = dns_fixedname_initname(&fixed);
        dns_rdataset_init(&trdataset);
        for (result = dns_rdataset_first(rdataset);
@@ -5865,9 +5866,9 @@ rpz_ck_dnssec(ns_client_t *client, isc_result_t qresult,
                if (type == dns_rdatatype_nsec ||
                    type == dns_rdatatype_nsec3 ||
                    type == dns_rdatatype_rrsig)
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*
@@ -5910,7 +5911,7 @@ rpz_add_cname(ns_client_t *client, dns_rpz_st_t *st,
                                 fname, dns_trust_authanswer, st->m.ttl);
        if (result != ISC_R_SUCCESS)
                return (result);
-       rpz_log_rewrite(client, ISC_FALSE, st->m.policy,
+       rpz_log_rewrite(client, false, st->m.policy,
                        st->m.type, st->m.zone, st->p_name, fname,
                        st->m.rpz->num);
        ns_client_qnamereplace(client, fname);
@@ -5928,7 +5929,7 @@ rpz_add_cname(ns_client_t *client, dns_rpz_st_t *st,
 #define QUERY_ERROR(r) \
 do { \
        eresult = r; \
-       want_restart = ISC_FALSE; \
+       want_restart = false; \
        line = __LINE__; \
 } while (0)
 
@@ -6216,7 +6217,7 @@ static void
 query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
                       dns_dbversion_t *version, ns_client_t *client,
                       dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
-                      dns_name_t *fname, isc_boolean_t exact,
+                      dns_name_t *fname, bool exact,
                       dns_name_t *found)
 {
        unsigned char salt[256];
@@ -6230,7 +6231,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
        unsigned int skip = 0, labels;
        dns_rdata_nsec3_t nsec3;
        dns_rdata_t rdata = DNS_RDATA_INIT;
-       isc_boolean_t optout;
+       bool optout;
        dns_clientinfomethods_t cm;
        dns_clientinfo_t ci;
 
@@ -6274,7 +6275,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
                dns_rdataset_current(rdataset, &rdata);
                dns_rdata_tostruct(&rdata, &nsec3, NULL);
                dns_rdata_reset(&rdata);
-               optout = ISC_TF((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) != 0);
+               optout = (nsec3.flags & DNS_NSEC3FLAG_OPTOUT);
                if (found != NULL && optout &&
                    dns_name_issubdomain(&name, dns_db_origin(db)))
                {
@@ -6311,22 +6312,22 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
 }
 
 #ifdef ALLOW_FILTER_AAAA
-static isc_boolean_t
+static bool
 is_v4_client(ns_client_t *client) {
        if (isc_sockaddr_pf(&client->peeraddr) == AF_INET)
-               return (ISC_TRUE);
+               return (true);
        if (isc_sockaddr_pf(&client->peeraddr) == AF_INET6 &&
            IN6_IS_ADDR_V4MAPPED(&client->peeraddr.type.sin6.sin6_addr))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 is_v6_client(ns_client_t *client) {
        if (isc_sockaddr_pf(&client->peeraddr) == AF_INET6 &&
            !IN6_IS_ADDR_V4MAPPED(&client->peeraddr.type.sin6.sin6_addr))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 #endif
 
@@ -6366,7 +6367,7 @@ cleanup:
        return (ttl);
 }
 
-static isc_boolean_t
+static bool
 dns64_aaaaok(ns_client_t *client, dns_rdataset_t *rdataset,
             dns_rdataset_t *sigrdataset)
 {
@@ -6374,7 +6375,7 @@ dns64_aaaaok(ns_client_t *client, dns_rdataset_t *rdataset,
        dns_dns64_t *dns64 = ISC_LIST_HEAD(client->view->dns64);
        unsigned int flags = 0;
        unsigned int i, count;
-       isc_boolean_t *aaaaok;
+       bool *aaaaok;
 
        INSIST(client->query.dns64_aaaaok == NULL);
        INSIST(client->query.dns64_aaaaoklen == 0);
@@ -6382,7 +6383,7 @@ dns64_aaaaok(ns_client_t *client, dns_rdataset_t *rdataset,
        INSIST(client->query.dns64_sigaaaa == NULL);
 
        if (dns64 == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        if (RECURSIONOK(client))
                flags |= DNS_DNS64_RECURSIVE;
@@ -6391,7 +6392,7 @@ dns64_aaaaok(ns_client_t *client, dns_rdataset_t *rdataset,
                flags |= DNS_DNS64_DNSSEC;
 
        count = dns_rdataset_count(rdataset);
-       aaaaok = isc_mem_get(client->mctx, sizeof(isc_boolean_t) * count);
+       aaaaok = isc_mem_get(client->mctx, sizeof(bool) * count);
 
        isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
        if (dns_dns64_aaaaok(dns64, &netaddr, client->signer,
@@ -6406,18 +6407,18 @@ dns64_aaaaok(ns_client_t *client, dns_rdataset_t *rdataset,
                }
                if (aaaaok != NULL)
                        isc_mem_put(client->mctx, aaaaok,
-                                   sizeof(isc_boolean_t) * count);
-               return (ISC_TRUE);
+                                   sizeof(bool) * count);
+               return (true);
        }
        if (aaaaok != NULL)
                isc_mem_put(client->mctx, aaaaok,
-                           sizeof(isc_boolean_t) * count);
-       return (ISC_FALSE);
+                           sizeof(bool) * count);
+       return (false);
 }
 
 /*
  * Look for the name and type in the redirection zone.  If found update
- * the arguments as appropriate.  Return ISC_TRUE if a update was
+ * the arguments as appropriate.  Return true if a update was
  * performed.
  *
  * Only perform the update if the client is in the allow query acl and
@@ -6477,7 +6478,7 @@ redirect(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
 
        result = ns_client_checkaclsilent(client, NULL,
                                 dns_zone_getqueryacl(client->view->redirect),
-                                         ISC_TRUE);
+                                         true);
        if (result != ISC_R_SUCCESS)
                return (ISC_R_NOTFOUND);
 
@@ -6539,7 +6540,7 @@ redirect(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
 static isc_result_t
 redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
          dns_dbnode_t **nodep, dns_db_t **dbp, dns_dbversion_t **versionp,
-         dns_rdatatype_t qtype, isc_boolean_t *is_zonep)
+         dns_rdatatype_t qtype, bool *is_zonep)
 {
        dns_db_t *db = NULL;
        dns_dbnode_t *node = NULL;
@@ -6553,7 +6554,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
        dns_clientinfo_t ci;
        dns_dbversion_t *version = NULL;
        dns_zone_t *zone = NULL;
-       isc_boolean_t is_zone;
+       bool is_zone;
        unsigned int options;
 
        CTRACE(ISC_LOG_DEBUG(3), "redirect2");
@@ -6644,7 +6645,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
                 */
                if (!REDIRECT(client)) {
                        result = query_recurse(client, qtype, redirectname,
-                                              NULL, NULL, ISC_TRUE);
+                                              NULL, NULL, true);
                        if (result == ISC_R_SUCCESS) {
                                client->query.attributes |=
                                                NS_QUERYATTR_RECURSING;
@@ -6716,10 +6717,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        dns_rdataset_t **sigrdatasetp;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdatasetiter_t *rdsiter;
-       isc_boolean_t want_restart, is_zone, need_wildcardproof;
-       isc_boolean_t is_staticstub_zone;
-       isc_boolean_t authoritative = ISC_FALSE;
-       isc_boolean_t answer_has_ns = ISC_FALSE;
+       bool want_restart, is_zone, need_wildcardproof;
+       bool is_staticstub_zone;
+       bool authoritative = false;
+       bool answer_has_ns = false;
        unsigned int n, nlabels;
        dns_namereln_t namereln;
        int order;
@@ -6733,21 +6734,21 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        dns_rdata_cname_t cname;
        dns_rdata_dname_t dname;
        unsigned int options;
-       isc_boolean_t empty_wild;
+       bool empty_wild;
        dns_rdataset_t *noqname;
        dns_rpz_st_t *rpz_st;
-       isc_boolean_t resuming;
+       bool resuming;
        int line = -1;
-       isc_boolean_t dns64_exclude, dns64, rpz;
-       isc_boolean_t nxrewrite = ISC_FALSE;
-       isc_boolean_t redirected = ISC_FALSE;
+       bool dns64_exclude, dns64, rpz;
+       bool nxrewrite = false;
+       bool redirected = false;
        dns_clientinfomethods_t cm;
        dns_clientinfo_t ci;
        char errmsg[256];
-       isc_boolean_t associated;
+       bool associated;
        dns_section_t section;
        dns_ttl_t ttl;
-       isc_boolean_t failcache;
+       bool failcache;
        uint32_t flags;
 #ifdef WANT_QUERYTRACE
        char mbuf[BUFSIZ];
@@ -6778,13 +6779,13 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        zdb = NULL;
        version = NULL;
        zone = NULL;
-       need_wildcardproof = ISC_FALSE;
-       empty_wild = ISC_FALSE;
-       dns64_exclude = dns64 = rpz = ISC_FALSE;
+       need_wildcardproof = false;
+       empty_wild = false;
+       dns64_exclude = dns64 = rpz = false;
        options = 0;
-       resuming = ISC_FALSE;
-       is_zone = ISC_FALSE;
-       is_staticstub_zone = ISC_FALSE;
+       resuming = false;
+       is_zone = false;
+       is_staticstub_zone = false;
 
        dns_clientinfomethods_init(&cm, ns_client_sourceip);
        dns_clientinfo_init(&ci, client, NULL);
@@ -6813,7 +6814,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                 * We're returning from recursion.  Restore the query context
                 * and resume.
                 */
-               want_restart = ISC_FALSE;
+               want_restart = false;
 
                rpz_st = client->query.rpz_st;
                if (rpz_st != NULL &&
@@ -6899,7 +6900,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                } else {
                        CTRACE(ISC_LOG_DEBUG(3),
                               "resume from normal recursion");
-                       authoritative = ISC_FALSE;
+                       authoritative = false;
 
                        qtype = event->qtype;
                        SAVE(db, event->db);
@@ -6916,11 +6917,11 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
 
                if (DNS64(client)) {
                        client->query.attributes &= ~NS_QUERYATTR_DNS64;
-                       dns64 = ISC_TRUE;
+                       dns64 = true;
                }
                if (DNS64EXCLUDE(client)) {
                        client->query.attributes &= ~NS_QUERYATTR_DNS64EXCLUDE;
-                       dns64_exclude = ISC_TRUE;
+                       dns64_exclude = true;
                }
 
                if (rpz_st != NULL &&
@@ -6986,7 +6987,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                } else {
                        result = event->result;
                }
-               resuming = ISC_TRUE;
+               resuming = true;
                goto resume;
        }
 
@@ -7002,7 +7003,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                flags = 0;
 #ifdef ENABLE_AFL
                if (ns_g_fuzz_type == ns_fuzz_resolver) {
-                       failcache = ISC_FALSE;
+                       failcache = false;
                } else {
                        failcache = dns_badcache_find(client->view->failcache,
                                                      client->query.qname, qtype,
@@ -7050,17 +7051,17 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
 
  restart:
        CTRACE(ISC_LOG_DEBUG(3), "query_find: restart");
-       want_restart = ISC_FALSE;
-       authoritative = ISC_FALSE;
+       want_restart = false;
+       authoritative = false;
        version = NULL;
        zversion = NULL;
-       need_wildcardproof = ISC_FALSE;
-       rpz = ISC_FALSE;
+       need_wildcardproof = false;
+       rpz = false;
 
        if (client->view->checknames &&
            !dns_rdata_checkowner(client->query.qname,
                                  client->message->rdclass,
-                                 qtype, ISC_FALSE)) {
+                                 qtype, false)) {
                char namebuf[DNS_NAME_FORMATSIZE];
                char typename[DNS_RDATATYPE_FORMATSIZE];
                char classname[DNS_RDATACLASS_FORMATSIZE];
@@ -7125,7 +7126,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        RESTORE(version, tversion);
                        RESTORE(db, tdb);
                        RESTORE(zone, tzone);
-                       is_zone = ISC_TRUE;
+                       is_zone = true;
                        result = ISC_R_SUCCESS;
                } else {
                        if (tdb != NULL)
@@ -7151,12 +7152,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                goto cleanup;
        }
 
-       is_staticstub_zone = ISC_FALSE;
+       is_staticstub_zone = false;
        if (is_zone) {
-               authoritative = ISC_TRUE;
+               authoritative = true;
                if (zone != NULL &&
                    dns_zone_gettype(zone) == dns_zone_staticstub)
-                       is_staticstub_zone = ISC_TRUE;
+                       is_staticstub_zone = true;
        }
 
        if (event == NULL && client->query.restarts == 0) {
@@ -7170,7 +7171,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        }
                        dns_db_attach(db, &client->query.authdb);
                }
-               client->query.authdbset = ISC_TRUE;
+               client->query.authdbset = true;
 
                /* Track TCP vs UDP stats per zone */
                if (TCP(client))
@@ -7259,7 +7260,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
            (client->query.attributes & NS_QUERYATTR_RRL_CHECKED) == 0)
        {
                dns_rdataset_t nc_rdataset;
-               isc_boolean_t wouldlog;
+               bool wouldlog;
                char log_buf[DNS_RRL_LOG_BUF_LEN];
                isc_result_t nc_result, resp_result;
                dns_rrl_result_t rrl_result;
@@ -7453,7 +7454,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                    result == DNS_R_NCACHENXDOMAIN)
                                        client->message->rcode =
                                                    dns_rcode_nxdomain;
-                               rpz_log_rewrite(client, ISC_FALSE,
+                               rpz_log_rewrite(client, false,
                                                rpz_st->m.policy,
                                                rpz_st->m.type, zone,
                                                rpz_st->p_name, NULL,
@@ -7461,7 +7462,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                goto cleanup;
                        case DNS_RPZ_POLICY_DROP:
                                QUERY_ERROR(DNS_R_DROP);
-                               rpz_log_rewrite(client, ISC_FALSE,
+                               rpz_log_rewrite(client, false,
                                                rpz_st->m.policy,
                                                rpz_st->m.type, zone,
                                                rpz_st->p_name, NULL,
@@ -7469,13 +7470,13 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                goto cleanup;
                        case DNS_RPZ_POLICY_NXDOMAIN:
                                result = DNS_R_NXDOMAIN;
-                               nxrewrite = ISC_TRUE;
-                               rpz = ISC_TRUE;
+                               nxrewrite = true;
+                               rpz = true;
                                break;
                        case DNS_RPZ_POLICY_NODATA:
                                result = DNS_R_NXRRSET;
-                               nxrewrite = ISC_TRUE;
-                               rpz = ISC_TRUE;
+                               nxrewrite = true;
+                               rpz = true;
                                break;
                        case DNS_RPZ_POLICY_RECORD:
                                result = rpz_st->m.result;
@@ -7495,7 +7496,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                        rdataset->ttl = ISC_MIN(rdataset->ttl,
                                                                rpz_st->m.ttl);
                                }
-                               rpz = ISC_TRUE;
+                               rpz = true;
                                break;
                        case DNS_RPZ_POLICY_WILDCNAME:
                                result = dns_rdataset_first(rdataset);
@@ -7511,7 +7512,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                if (result != ISC_R_SUCCESS)
                                        goto cleanup;
                                fname = NULL;
-                               want_restart = ISC_TRUE;
+                               want_restart = true;
                                goto cleanup;
                        case DNS_RPZ_POLICY_CNAME:
                                /*
@@ -7524,7 +7525,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                if (result != ISC_R_SUCCESS)
                                        goto cleanup;
                                fname = NULL;
-                               want_restart = ISC_TRUE;
+                               want_restart = true;
                                goto cleanup;
                        default:
                                INSIST(0);
@@ -7538,8 +7539,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                                NS_CLIENTATTR_WANTAD);
                        client->message->flags &= ~DNS_MESSAGEFLAG_AD;
                        query_putrdataset(client, &sigrdataset);
-                       is_zone = ISC_TRUE;
-                       rpz_log_rewrite(client, ISC_FALSE, rpz_st->m.policy,
+                       is_zone = true;
+                       rpz_log_rewrite(client, false, rpz_st->m.policy,
                                        rpz_st->m.type, zone, rpz_st->p_name,
                                        NULL, rpz_st->m.rpz->num);
                }
@@ -7573,7 +7574,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                 * These cases are handled in the main line below.
                 */
                INSIST(is_zone);
-               authoritative = ISC_FALSE;
+               authoritative = false;
                break;
        case ISC_R_NOTFOUND:
                /*
@@ -7642,7 +7643,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                 */
                /* FALLTHROUGH */
        case DNS_R_DELEGATION:
-               authoritative = ISC_FALSE;
+               authoritative = false;
                if (is_zone) {
                        /*
                         * Look to see if we are authoritative for the
@@ -7679,7 +7680,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                        RESTORE(version, tversion);
                                        RESTORE(db, tdb);
                                        RESTORE(zone, tzone);
-                                       authoritative = ISC_TRUE;
+                                       authoritative = true;
                                        goto db_find;
                                }
                                if (tdb != NULL)
@@ -7691,7 +7692,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                         * We're authoritative for an ancestor of QNAME.
                         */
                        if (!USECACHE(client) || !RECURSIONOK(client)) {
-                               isc_boolean_t detach = ISC_FALSE;
+                               bool detach = false;
 
                                dns_fixedname_init(&fixed);
                                dns_name_copy(fname,
@@ -7716,9 +7717,9 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                    client->query.gluedb == NULL) {
                                        dns_db_attach(db,
                                                      &client->query.gluedb);
-                                       detach = ISC_TRUE;
+                                       detach = true;
                                }
-                               client->query.isreferral = ISC_TRUE;
+                               client->query.isreferral = true;
                                /*
                                 * We must ensure NOADDITIONAL is off,
                                 * because the generation of
@@ -7757,7 +7758,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                SAVE(zrdataset, rdataset);
                                SAVE(zsigrdataset, sigrdataset);
                                dns_db_attach(client->view->cachedb, &db);
-                               is_zone = ISC_FALSE;
+                               is_zone = false;
                                goto db_find;
                        }
                } else {
@@ -7839,7 +7840,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                else
                                        RECURSE_ERROR(result);
                        } else {
-                               isc_boolean_t detach = ISC_FALSE;
+                               bool detach = false;
 
                                dns_fixedname_init(&fixed);
                                dns_name_copy(fname,
@@ -7849,13 +7850,13 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                 */
                                client->query.attributes |=
                                        NS_QUERYATTR_CACHEGLUEOK;
-                               client->query.isreferral = ISC_TRUE;
+                               client->query.isreferral = true;
 
                                if (zdb != NULL &&
                                    client->query.gluedb == NULL) {
                                        dns_db_attach(zdb,
                                                      &client->query.gluedb);
-                                       detach = ISC_TRUE;
+                                       detach = true;
                                }
 
                                /*
@@ -7925,7 +7926,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                }
                        }
                        dns_name_copy(client->query.qname, fname, NULL);
-                       dns64 = ISC_FALSE;
+                       dns64 = false;
 #ifdef dns64_bis_return_excluded_addresses
                        /*
                         * Resume the diverted processing of the AAAA response?
@@ -7948,7 +7949,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        query_releasename(client, &fname);
                        dns_db_detachnode(db, &node);
                        type = qtype = dns_rdatatype_a;
-                       dns64 = ISC_TRUE;
+                       dns64 = true;
                        goto db_find;
                }
 
@@ -7970,7 +7971,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                query_findclosestnsec3(qname, db, version,
                                                       client, rdataset,
                                                       sigrdataset, fname,
-                                                      ISC_TRUE, found);
+                                                      true, found);
                                /*
                                 * Did we find the closest provable encloser
                                 * instead? If so add the nearest to the
@@ -8015,7 +8016,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                        }
                                        /*
                                         * 'nearest' doesn't exist so
-                                        * 'exist' is set to ISC_FALSE.
+                                        * 'exist' is set to false.
                                         */
                                        query_findclosestnsec3(found, db,
                                                               version,
@@ -8023,14 +8024,14 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                                               rdataset,
                                                               sigrdataset,
                                                               fname,
-                                                              ISC_FALSE,
+                                                              false,
                                                               NULL);
                                }
                        } else {
                                query_releasename(client, &fname);
                                query_addwildcardproof(client, db, version,
                                                       client->query.qname,
-                                                      ISC_FALSE, ISC_TRUE);
+                                                      false, true);
                        }
                }
                if (dns_rdataset_isassociated(rdataset)) {
@@ -8076,7 +8077,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                goto cleanup;
 
        case DNS_R_EMPTYWILD:
-               empty_wild = ISC_TRUE;
+               empty_wild = true;
                /* FALLTHROUGH */
 
        case DNS_R_NXDOMAIN:
@@ -8090,12 +8091,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                break;
                        }
                        if (tresult == DNS_R_NXRRSET) {
-                               redirected = ISC_TRUE;
+                               redirected = true;
                                goto iszone_nxrrset;
                        }
                        if (tresult == DNS_R_NCACHENXRRSET) {
-                               redirected = ISC_TRUE;
-                               is_zone = ISC_FALSE;
+                               redirected = true;
+                               is_zone = false;
                                goto ncache_nxrrset;
                        }
                        tresult = redirect2(client, fname, rdataset, &node,
@@ -8126,12 +8127,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                break;
                        }
                        if (tresult == DNS_R_NXRRSET) {
-                               redirected = ISC_TRUE;
+                               redirected = true;
                                goto iszone_nxrrset;
                        }
                        if (tresult == DNS_R_NCACHENXRRSET) {
-                               redirected = ISC_TRUE;
-                               is_zone = ISC_FALSE;
+                               redirected = true;
+                               is_zone = false;
                                goto ncache_nxrrset;
                        }
                }
@@ -8183,8 +8184,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                               &sigrdataset,
                                               NULL, DNS_SECTION_AUTHORITY);
                        query_addwildcardproof(client, db, version,
-                                              client->query.qname, ISC_FALSE,
-                                              ISC_FALSE);
+                                              client->query.qname, false,
+                                              false);
                }
 
                /*
@@ -8205,12 +8206,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        break;
                }
                if (tresult == DNS_R_NXRRSET) {
-                       redirected = ISC_TRUE;
-                       is_zone = ISC_TRUE;
+                       redirected = true;
+                       is_zone = true;
                        goto iszone_nxrrset;
                }
                if (tresult == DNS_R_NCACHENXRRSET) {
-                       redirected = ISC_TRUE;
+                       redirected = true;
                        result = tresult;
                        goto ncache_nxrrset;
                }
@@ -8239,12 +8240,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        break;
                }
                if (tresult == DNS_R_NXRRSET) {
-                       redirected = ISC_TRUE;
-                       is_zone = ISC_TRUE;
+                       redirected = true;
+                       is_zone = true;
                        goto iszone_nxrrset;
                }
                if (tresult == DNS_R_NCACHENXRRSET) {
-                       redirected = ISC_TRUE;
+                       redirected = true;
                        result = tresult;
                        goto ncache_nxrrset;
                }
@@ -8253,7 +8254,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        case DNS_R_NCACHENXRRSET:
        ncache_nxrrset:
                INSIST(!is_zone);
-               authoritative = ISC_FALSE;
+               authoritative = false;
                /*
                 * Set message rcode, if required.
                 */
@@ -8302,7 +8303,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                }
                        }
                        dns_name_copy(client->query.qname, fname, NULL);
-                       dns64 = ISC_FALSE;
+                       dns64 = false;
 #ifdef dns64_bis_return_excluded_addresses
                        if (dns64_excluded)
                                break;
@@ -8331,7 +8332,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        query_releasename(client, &fname);
                        dns_db_detachnode(db, &node);
                        type = qtype = dns_rdatatype_a;
-                       dns64 = ISC_TRUE;
+                       dns64 = true;
                        goto db_find;
                }
 
@@ -8401,7 +8402,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        dns_fixedname_init(&wildcardname);
                        dns_name_copy(fname, dns_fixedname_name(&wildcardname),
                                      NULL);
-                       need_wildcardproof = ISC_TRUE;
+                       need_wildcardproof = true;
                }
                if (NOQNAME(rdataset) && WANTDNSSEC(client))
                        noqname = rdataset;
@@ -8447,7 +8448,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                }
                dns_rdata_freestruct(&cname);
                ns_client_qnamereplace(client, tname);
-               want_restart = ISC_TRUE;
+               want_restart = true;
                if (!WANTRECURSION(client))
                        options |= DNS_GETDB_NOLOG;
                goto addauth;
@@ -8479,7 +8480,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        dns_fixedname_init(&wildcardname);
                        dns_name_copy(fname, dns_fixedname_name(&wildcardname),
                                      NULL);
-                       need_wildcardproof = ISC_TRUE;
+                       need_wildcardproof = true;
                }
                if (!is_zone && RECURSIONOK(client))
                        query_prefetch(client, fname, rdataset);
@@ -8565,7 +8566,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                 */
                ns_client_qnamereplace(client, fname);
                fname = NULL;
-               want_restart = ISC_TRUE;
+               want_restart = true;
                if (!WANTRECURSION(client))
                        options |= DNS_GETDB_NOLOG;
                goto addauth;
@@ -8586,7 +8587,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        {
                dns_fixedname_init(&wildcardname);
                dns_name_copy(fname, dns_fixedname_name(&wildcardname), NULL);
-               need_wildcardproof = ISC_TRUE;
+               need_wildcardproof = true;
        }
 
 #ifdef ALLOW_FILTER_AAAA
@@ -8601,7 +8602,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        {
                result = ns_client_checkaclsilent(client, NULL,
                                                  client->view->aaaa_acl,
-                                                 ISC_TRUE);
+                                                 true);
                if (result == ISC_R_SUCCESS &&
                    client->view->v4_aaaa != dns_aaaa_ok &&
                    is_v4_client(client))
@@ -8621,16 +8622,16 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                 */
                dns_rdatatype_t onetype = 0;
 #ifdef ALLOW_FILTER_AAAA
-               isc_boolean_t have_aaaa, have_a, have_sig;
+               bool have_aaaa, have_a, have_sig;
 
                /*
                 * If we are not authoritative, assume there is a A
                 * even in if it is not in our cache.  This assumption could
                 * be wrong but it is a good bet.
                 */
-               have_aaaa = ISC_FALSE;
+               have_aaaa = false;
                have_a = !authoritative;
-               have_sig = ISC_FALSE;
+               have_sig = false;
 #endif
                /*
                 * XXXRTH  Need to handle zonecuts with special case
@@ -8669,9 +8670,9 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                         */
                        if (client->filter_aaaa != dns_aaaa_ok) {
                                if (rdataset->type == dns_rdatatype_aaaa)
-                                       have_aaaa = ISC_TRUE;
+                                       have_aaaa = true;
                                else if (rdataset->type == dns_rdatatype_a)
-                                       have_a = ISC_TRUE;
+                                       have_a = true;
                        }
 #endif
                        /*
@@ -8680,7 +8681,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        if (qtype == dns_rdatatype_any &&
                            rdataset->type == dns_rdatatype_ns)
                        {
-                               answer_has_ns = ISC_TRUE;
+                               answer_has_ns = true;
                        }
 
                        if (is_zone && qtype == dns_rdatatype_any &&
@@ -8711,7 +8712,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                             rdataset->type == qtype) && rdataset->type != 0) {
 #ifdef ALLOW_FILTER_AAAA
                                if (dns_rdatatype_isdnssec(rdataset->type))
-                                       have_sig = ISC_TRUE;
+                                       have_sig = true;
 #endif
                                if (NOQNAME(rdataset) && WANTDNSSEC(client))
                                        noqname = rdataset;
@@ -8786,7 +8787,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                             qtype == dns_rdatatype_sig) &&
                            result == ISC_R_NOMORE) {
                                if (!is_zone) {
-                                       authoritative = ISC_FALSE;
+                                       authoritative = false;
                                        dns_rdatasetiter_destroy(&rdsiter);
                                        client->attributes &= ~NS_CLIENTATTR_RA;
                                        goto addauth;
@@ -8966,7 +8967,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        query_releasename(client, &fname);
                        dns_db_detachnode(db, &node);
                        type = qtype = dns_rdatatype_a;
-                       dns64_exclude = dns64 = ISC_TRUE;
+                       dns64_exclude = dns64 = true;
                        goto db_find;
                }
 
@@ -8989,7 +8990,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        if (dns_name_equal(client->query.qname,
                                           dns_db_origin(db)))
                        {
-                               answer_has_ns = ISC_TRUE;
+                               answer_has_ns = true;
                        }
 
                        /*
@@ -9055,7 +9056,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                                         * Add a fake SOA record.
                                         */
                                        (void)query_addsoa(client, db, version,
-                                                          600, ISC_FALSE,
+                                                          600, false,
                                                        DNS_SECTION_AUTHORITY);
                                        goto cleanup;
                                }
@@ -9114,7 +9115,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
        if (need_wildcardproof && dns_db_issecure(db))
                query_addwildcardproof(client, db, version,
                                       dns_fixedname_name(&wildcardname),
-                                      ISC_TRUE, ISC_FALSE);
+                                      true, false);
  cleanup:
        CTRACE(ISC_LOG_DEBUG(3), "query_find: cleanup");
        /*
@@ -9209,7 +9210,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        answer_in_glue(client, qtype);
 
                if (client->message->rcode == dns_rcode_nxdomain &&
-                   client->view->auth_nxdomain == ISC_TRUE)
+                   client->view->auth_nxdomain == true)
                        client->message->flags |= DNS_MESSAGEFLAG_AA;
 
                /*
@@ -9581,7 +9582,7 @@ ns_query_start(ns_client_t *client) {
        /*
         * This is an ordinary query.
         */
-       result = dns_message_reply(message, ISC_TRUE);
+       result = dns_message_reply(message, true);
        if (result != ISC_R_SUCCESS) {
                query_next(client, result);
                return;
index a4916b65506dc243d726d34c9796ee7e966f850b..9f88a4088a0eeff067a1e417a3a8d0d929bc3b20 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <limits.h>
@@ -223,19 +224,19 @@ struct ns_dispatch {
 struct ns_cache {
        dns_cache_t                     *cache;
        dns_view_t                      *primaryview;
-       isc_boolean_t                   needflush;
-       isc_boolean_t                   adbsizeadjusted;
+       bool                    needflush;
+       bool                    adbsizeadjusted;
        dns_rdataclass_t                rdclass;
        ISC_LINK(ns_cache_t)            link;
 };
 
 struct dumpcontext {
        isc_mem_t                       *mctx;
-       isc_boolean_t                   dumpcache;
-       isc_boolean_t                   dumpzones;
-       isc_boolean_t                   dumpadb;
-       isc_boolean_t                   dumpbad;
-       isc_boolean_t                   dumpfail;
+       bool                    dumpcache;
+       bool                    dumpzones;
+       bool                    dumpadb;
+       bool                    dumpbad;
+       bool                    dumpfail;
        FILE                            *fp;
        ISC_LIST(struct viewlistentry)  viewlist;
        struct viewlistentry            *view;
@@ -285,7 +286,7 @@ typedef isc_result_t (*nzfwriter_t)(const cfg_obj_t *config, dns_view_t *view);
  */
 typedef struct {
                ns_server_t *server;
-               isc_boolean_t reconfig;
+               bool reconfig;
                isc_refcount_t refs;
 } ns_zoneload_t;
 
@@ -299,7 +300,7 @@ typedef struct catz_chgzone_event {
        dns_catz_zone_t *origin;
        dns_view_t *view;
        catz_cb_data_t *cbd;
-       isc_boolean_t mod;
+       bool mod;
 } catz_chgzone_event_t;
 
 /*
@@ -450,8 +451,8 @@ static isc_result_t
 configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
               const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
               dns_viewlist_t *viewlist, cfg_aclconfctx_t *aclconf,
-              isc_boolean_t added, isc_boolean_t old_rpz_ok,
-              isc_boolean_t modify);
+              bool added, bool old_rpz_ok,
+              bool modify);
 
 static isc_result_t
 configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
@@ -461,7 +462,7 @@ static isc_result_t
 add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx);
 
 static void
-end_reserved_dispatches(ns_server_t *server, isc_boolean_t all);
+end_reserved_dispatches(ns_server_t *server, bool all);
 
 static void
 newzone_cfgctx_destroy(void **cfgp);
@@ -498,7 +499,7 @@ static void
 nzd_env_close(dns_view_t *view);
 
 static isc_result_t
-nzd_close(MDB_txn **txnp, isc_boolean_t commit);
+nzd_close(MDB_txn **txnp, bool commit);
 
 static isc_result_t
 nzd_count(dns_view_t *view, int *countp);
@@ -691,7 +692,7 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
 
 static isc_result_t
 dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
-                 isc_boolean_t managed, dst_key_t **target, isc_mem_t *mctx)
+                 bool managed, dst_key_t **target, isc_mem_t *mctx)
 {
        dns_rdataclass_t viewclass;
        dns_rdata_dnskey_t keystruct;
@@ -814,7 +815,7 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
 
 static isc_result_t
 load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
-              dns_view_t *view, isc_boolean_t managed,
+              dns_view_t *view, bool managed,
               dns_name_t *keyname, isc_mem_t *mctx)
 {
        const cfg_listelt_t *elt, *elt2;
@@ -870,7 +871,7 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
 /*%
  * Check whether a key has been successfully loaded.
  */
-static isc_boolean_t
+static bool
 keyloaded(dns_view_t *view, dns_name_t *name) {
        isc_result_t result;
        dns_keytable_t *secroots = NULL;
@@ -878,7 +879,7 @@ keyloaded(dns_view_t *view, dns_name_t *name) {
 
        result = dns_view_getsecroots(view, &secroots);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        result = dns_keytable_find(secroots, name, &keynode);
 
@@ -887,7 +888,7 @@ keyloaded(dns_view_t *view, dns_name_t *name) {
        if (secroots != NULL)
                dns_keytable_detach(&secroots);
 
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
 /*%
@@ -899,7 +900,7 @@ keyloaded(dns_view_t *view, dns_name_t *name) {
 static isc_result_t
 configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
                          const cfg_obj_t *config, const cfg_obj_t *bindkeys,
-                         isc_boolean_t auto_root, isc_mem_t *mctx)
+                         bool auto_root, isc_mem_t *mctx)
 {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_obj_t *view_keys = NULL;
@@ -911,7 +912,7 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
        const cfg_obj_t *options = NULL;
        const cfg_obj_t *obj = NULL;
        const char *directory;
-       isc_boolean_t need_mkey_dir = ISC_FALSE;
+       bool need_mkey_dir = false;
        int i = 0;
 
        /* We don't need trust anchors for the _bind view */
@@ -1006,10 +1007,10 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
 
                if (builtin_keys != NULL)
                        CHECK(load_view_keys(builtin_keys, vconfig, view,
-                                            ISC_FALSE, dns_rootname, mctx));
+                                            false, dns_rootname, mctx));
                if (builtin_managed_keys != NULL)
                        CHECK(load_view_keys(builtin_managed_keys, vconfig,
-                                            view, ISC_TRUE, dns_rootname,
+                                            view, true, dns_rootname,
                                             mctx));
 
                if (!keyloaded(view, dns_rootname)) {
@@ -1021,22 +1022,22 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
                }
        }
 
-       CHECK(load_view_keys(view_keys, vconfig, view, ISC_FALSE,
+       CHECK(load_view_keys(view_keys, vconfig, view, false,
                             NULL, mctx));
-       CHECK(load_view_keys(view_managed_keys, vconfig, view, ISC_TRUE,
+       CHECK(load_view_keys(view_managed_keys, vconfig, view, true,
                             NULL, mctx));
 
        if (view->rdclass == dns_rdataclass_in) {
-               CHECK(load_view_keys(global_keys, vconfig, view, ISC_FALSE,
+               CHECK(load_view_keys(global_keys, vconfig, view, false,
                                     NULL, mctx));
                CHECK(load_view_keys(global_managed_keys, vconfig, view,
-                                    ISC_TRUE, NULL, mctx));
+                                    true, NULL, mctx));
        }
 
        /*
         * Add key zone for managed-keys.
         */
-       need_mkey_dir = ISC_TF(auto_root || view_managed_keys != NULL);
+       need_mkey_dir = (auto_root || view_managed_keys != NULL);
 
        obj = NULL;
        (void)ns_config_get(maps, "managed-keys-directory", &obj);
@@ -1095,7 +1096,7 @@ mustbesecure(const cfg_obj_t *mbs, dns_resolver_t *resolver) {
        const char *str;
        dns_fixedname_t fixed;
        dns_name_t *name;
-       isc_boolean_t value;
+       bool value;
        isc_result_t result;
        isc_buffer_t b;
 
@@ -1125,7 +1126,7 @@ mustbesecure(const cfg_obj_t *mbs, dns_resolver_t *resolver) {
 static isc_result_t
 get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
                              dns_dispatch_t **dispatchp, isc_dscp_t *dscpp,
-                             isc_boolean_t is_firstview)
+                             bool is_firstview)
 {
        isc_result_t result = ISC_R_FAILURE;
        dns_dispatch_t *disp;
@@ -1245,7 +1246,7 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
        const char *str;
        isc_buffer_t b;
        isc_result_t result;
-       isc_boolean_t addroot;
+       bool addroot;
 
        result = ns_config_getclass(cfg_tuple_get(ent, "class"),
                                    dns_rdataclass_any, &rdclass);
@@ -1262,7 +1263,7 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
                str = cfg_obj_asstring(obj);
        else
                str = "*";
-       addroot = ISC_TF(strcmp(str, "*") == 0);
+       addroot = (strcmp(str, "*") == 0);
        isc_buffer_constinit(&b, str, strlen(str));
        isc_buffer_add(&b, strlen(str));
        dns_fixedname_init(&fixed);
@@ -1588,7 +1589,7 @@ disable_ds_digests(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
        return (result);
 }
 
-static isc_boolean_t
+static bool
 on_disable_list(const cfg_obj_t *disablelist, dns_name_t *zonename) {
        const cfg_listelt_t *element;
        dns_fixedname_t fixed;
@@ -1612,9 +1613,9 @@ on_disable_list(const cfg_obj_t *disablelist, dns_name_t *zonename) {
                                           0, NULL);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                if (dns_name_equal(name, zonename))
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -1683,9 +1684,9 @@ cachelist_find(ns_cachelist_t *cachelist, const char *cachename,
        return (NULL);
 }
 
-static isc_boolean_t
+static bool
 cache_reusable(dns_view_t *originview, dns_view_t *view,
-              isc_boolean_t new_zero_no_soattl)
+              bool new_zero_no_soattl)
 {
        if (originview->rdclass != view->rdclass ||
            originview->checknames != view->checknames ||
@@ -1695,15 +1696,15 @@ cache_reusable(dns_view_t *originview, dns_view_t *view,
            originview->enablevalidation != view->enablevalidation ||
            originview->maxcachettl != view->maxcachettl ||
            originview->maxncachettl != view->maxncachettl) {
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 cache_sharable(dns_view_t *originview, dns_view_t *view,
-              isc_boolean_t new_zero_no_soattl,
+              bool new_zero_no_soattl,
               unsigned int new_cleaning_interval,
               uint64_t new_max_cache_size)
 {
@@ -1712,7 +1713,7 @@ cache_sharable(dns_view_t *originview, dns_view_t *view,
         * shared with other views.
         */
        if (!cache_reusable(originview, view, new_zero_no_soattl))
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * Check other cache related parameters that must be consistent among
@@ -1721,10 +1722,10 @@ cache_sharable(dns_view_t *originview, dns_view_t *view,
        if (dns_cache_getcleaninginterval(originview->cache) !=
            new_cleaning_interval ||
            dns_cache_getcachesize(originview->cache) != new_max_cache_size) {
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*
@@ -1807,7 +1808,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
                dns_zone_setqueryonacl(zone, view->queryonacl);
        dns_zone_setdialup(zone, dns_dialuptype_no);
        dns_zone_setnotifytype(zone, dns_notifytype_no);
-       dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, ISC_TRUE);
+       dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
        CHECK(setquerystats(zone, mctx, dns_zonestat_none));    /* XXXMPA */
        CHECK(dns_view_addzone(view, zone));
        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
@@ -1849,8 +1850,8 @@ configure_rpz_name2(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
 
 static isc_result_t
 configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
-                  isc_boolean_t recursive_only_def, dns_ttl_t ttl_def,
-                  const dns_rpz_zone_t *old, isc_boolean_t *old_rpz_okp)
+                  bool recursive_only_def, dns_ttl_t ttl_def,
+                  const dns_rpz_zone_t *old, bool *old_rpz_okp)
 {
        const cfg_obj_t *rpz_obj, *obj;
        const char *str;
@@ -1915,7 +1916,7 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
                new->max_policy_ttl = ttl_def;
        }
        if (*old_rpz_okp && new->max_policy_ttl != old->max_policy_ttl)
-               *old_rpz_okp = ISC_FALSE;
+               *old_rpz_okp = false;
 
        str = cfg_obj_asstring(cfg_tuple_get(rpz_obj, "zone name"));
        result = configure_rpz_name(view, rpz_obj, &new->origin, str, "zone");
@@ -1936,7 +1937,7 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
                }
        }
        if (*old_rpz_okp && !dns_name_equal(&old->origin, &new->origin))
-               *old_rpz_okp = ISC_FALSE;
+               *old_rpz_okp = false;
 
        result = configure_rpz_name2(view, rpz_obj, &new->client_ip,
                                     DNS_RPZ_CLIENT_IP_ZONE, &new->origin);
@@ -1990,18 +1991,18 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
        }
        if (*old_rpz_okp && (new->policy != old->policy ||
                             !dns_name_equal(&old->cname, &new->cname)))
-               *old_rpz_okp = ISC_FALSE;
+               *old_rpz_okp = false;
 
        return (ISC_R_SUCCESS);
 }
 
 static isc_result_t
 configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
-             isc_boolean_t *old_rpz_okp)
+             bool *old_rpz_okp)
 {
        const cfg_listelt_t *zone_element;
        const cfg_obj_t *sub_obj;
-       isc_boolean_t recursive_only_def;
+       bool recursive_only_def;
        dns_ttl_t ttl_def;
        dns_rpz_zones_t *new;
        const dns_rpz_zones_t *old;
@@ -2010,7 +2011,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
        isc_result_t result;
        int i;
 
-       *old_rpz_okp = ISC_FALSE;
+       *old_rpz_okp = false;
 
        zone_element = cfg_list_first(cfg_tuple_get(rpz_obj, "zone list"));
        if (zone_element == NULL)
@@ -2024,16 +2025,16 @@ configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
        sub_obj = cfg_tuple_get(rpz_obj, "recursive-only");
        if (!cfg_obj_isvoid(sub_obj) &&
            !cfg_obj_asboolean(sub_obj))
-               recursive_only_def = ISC_FALSE;
+               recursive_only_def = false;
        else
-               recursive_only_def = ISC_TRUE;
+               recursive_only_def = true;
 
        sub_obj = cfg_tuple_get(rpz_obj, "break-dnssec");
        if (!cfg_obj_isvoid(sub_obj) &&
            cfg_obj_asboolean(sub_obj))
-               new->p.break_dnssec = ISC_TRUE;
+               new->p.break_dnssec = true;
        else
-               new->p.break_dnssec = ISC_FALSE;
+               new->p.break_dnssec = false;
 
        sub_obj = cfg_tuple_get(rpz_obj, "max-policy-ttl");
        if (cfg_obj_isuint32(sub_obj))
@@ -2049,15 +2050,15 @@ configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
 
        sub_obj = cfg_tuple_get(rpz_obj, "qname-wait-recurse");
        if (cfg_obj_isvoid(sub_obj) || cfg_obj_asboolean(sub_obj))
-               new->p.qname_wait_recurse = ISC_TRUE;
+               new->p.qname_wait_recurse = true;
        else
-               new->p.qname_wait_recurse = ISC_FALSE;
+               new->p.qname_wait_recurse = false;
 
        sub_obj = cfg_tuple_get(rpz_obj, "nsip-wait-recurse");
        if (cfg_obj_isvoid(sub_obj) || cfg_obj_asboolean(sub_obj))
-               new->p.nsip_wait_recurse = ISC_TRUE;
+               new->p.nsip_wait_recurse = true;
        else
-               new->p.nsip_wait_recurse = ISC_FALSE;
+               new->p.nsip_wait_recurse = false;
 
        pview = NULL;
        result = dns_viewlist_find(&ns_g_server->viewlist,
@@ -2068,9 +2069,9 @@ configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
                old = NULL;
        }
        if (old == NULL)
-               *old_rpz_okp = ISC_FALSE;
+               *old_rpz_okp = false;
        else
-               *old_rpz_okp = ISC_TRUE;
+               *old_rpz_okp = true;
 
        for (i = 0;
             zone_element != NULL;
@@ -2079,7 +2080,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
                if (*old_rpz_okp && i < old->p.num_zones) {
                        old_zone = old->zones[i];
                } else {
-                       *old_rpz_okp = ISC_FALSE;
+                       *old_rpz_okp = false;
                        old_zone = NULL;
                }
                result = configure_rpz_zone(view, zone_element,
@@ -2098,7 +2099,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t *rpz_obj,
         * Data for individual zones that must be reloaded will be merged.
         */
        if (old != NULL && memcmp(&old->p, &new->p, sizeof(new->p)) != 0)
-               *old_rpz_okp = ISC_FALSE;
+               *old_rpz_okp = false;
        if (*old_rpz_okp) {
                dns_rpz_detach_rpzs(&view->rpzs);
                dns_rpz_attach_rpzs(pview->rpzs, &view->rpzs);
@@ -2139,14 +2140,14 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
        }
 
        isc_buffer_init(&namebuf, nameb, DNS_NAME_FORMATSIZE);
-       dns_name_totext(dns_catz_entry_getname(ev->entry), ISC_TRUE, &namebuf);
+       dns_name_totext(dns_catz_entry_getname(ev->entry), true, &namebuf);
        isc_buffer_putuint8(&namebuf, 0);
 
        /* Zone shouldn't already exist */
        result = dns_zt_find(ev->view->zonetable,
                             dns_catz_entry_getname(ev->entry), 0, NULL, &zone);
 
-       if (ev->mod == ISC_TRUE) {
+       if (ev->mod == true) {
                if (result != ISC_R_SUCCESS) {
                        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                                      NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
@@ -2229,7 +2230,7 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
        result = configure_zone(cfg->config, zoneobj, cfg->vconfig,
                                ev->cbd->server->mctx, ev->view,
                                &ev->cbd->server->viewlist, cfg->actx,
-                               ISC_TRUE, ISC_FALSE, ev->mod);
+                               true, false, ev->mod);
        dns_view_freeze(ev->view);
        isc_task_endexclusive(task);
 
@@ -2270,7 +2271,7 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
        }
 
        /* Flag the zone as having been added at runtime */
-       dns_zone_setadded(zone, ISC_TRUE);
+       dns_zone_setadded(zone, true);
        dns_zone_set_parentcatz(zone, ev->origin);
 
  cleanup:
@@ -2383,7 +2384,7 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin,
        event->entry = NULL;
        event->origin = NULL;
        event->view = NULL;
-       event->mod = ISC_TF(type == DNS_EVENT_CATZMODZONE);
+       event->mod = (type == DNS_EVENT_CATZMODZONE);
        dns_catz_entry_attach(entry, &event->entry);
        dns_catz_zone_attach(origin, &event->origin);
        dns_view_attach(view, &event->view);
@@ -2539,7 +2540,7 @@ configure_catz_zone(dns_view_t *view, const cfg_obj_t *config,
                                    "catz: zone-directory '%s' "
                                    "not found; zone files will not be "
                                    "saved", opts->zonedir);
-                       opts->in_memory = ISC_TRUE;
+                       opts->in_memory = true;
                }
        }
 
@@ -2761,9 +2762,9 @@ configure_rrl(dns_view_t *view, const cfg_obj_t *config, const cfg_obj_t *map) {
        obj = NULL;
        result = cfg_map_get(map, "log-only", &obj);
        if (result == ISC_R_SUCCESS && cfg_obj_asboolean(obj))
-               rrl->log_only = ISC_TRUE;
+               rrl->log_only = true;
        else
-               rrl->log_only = ISC_FALSE;
+               rrl->log_only = false;
 
        return (ISC_R_SUCCESS);
 
@@ -2794,7 +2795,7 @@ add_soa(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
        dns_rdataset_init(&rdataset);
        CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
-       CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
+       CHECK(dns_db_findnode(db, name, true, &node));
        CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
 
  cleanup:
@@ -2834,7 +2835,7 @@ add_ns(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
        dns_rdataset_init(&rdataset);
        CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
-       CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
+       CHECK(dns_db_findnode(db, name, true, &node));
        CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
 
  cleanup:
@@ -2967,11 +2968,11 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
                dns_zone_setstats(zone, ns_g_server->zonestats);
        }
 
-       dns_zone_setoption(zone, ~DNS_ZONEOPT_NOCHECKNS, ISC_FALSE);
-       dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, ISC_TRUE);
+       dns_zone_setoption(zone, ~DNS_ZONEOPT_NOCHECKNS, false);
+       dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
        dns_zone_setnotifytype(zone, dns_notifytype_no);
        dns_zone_setdialup(zone, dns_dialuptype_no);
-       dns_zone_setautomatic(zone, ISC_TRUE);
+       dns_zone_setautomatic(zone, true);
        if (view->queryacl != NULL)
                dns_zone_setqueryacl(zone, view->queryacl);
        else
@@ -2988,10 +2989,10 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
 
        CHECK(setquerystats(zone, view->mctx, statlevel));
        if (db != NULL) {
-               dns_db_closeversion(db, &version, ISC_TRUE);
-               CHECK(dns_zone_replacedb(zone, db, ISC_FALSE));
+               dns_db_closeversion(db, &version, true);
+               CHECK(dns_zone_replacedb(zone, db, false));
        }
-       dns_zone_setoption2(zone, DNS_ZONEOPT2_AUTOEMPTY, ISC_TRUE);
+       dns_zone_setoption2(zone, DNS_ZONEOPT2_AUTOEMPTY, true);
        dns_zone_setview(zone, view);
        CHECK(dns_view_addzone(view, zone));
 
@@ -3008,7 +3009,7 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
        if (myzone != NULL)
                dns_zone_detach(&myzone);
        if (version != NULL)
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
        if (db != NULL)
                dns_db_detach(&db);
 
@@ -3179,7 +3180,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
        obj = NULL;
        result = ns_config_get(maps, "dnstap-identity", &obj);
        if (result == ISC_R_SUCCESS && cfg_obj_isboolean(obj)) {
-               /* "hostname" is interpreted as boolean ISC_TRUE */
+               /* "hostname" is interpreted as boolean true */
                char buf[256];
                result = ns_os_gethostname(buf, sizeof(buf));
                if (result == ISC_R_SUCCESS)
@@ -3216,7 +3217,7 @@ create_mapped_acl(void) {
                return (result);
 
        result = dns_iptable_addprefix2(acl->iptable, &addr, 96,
-                                       ISC_TRUE, ISC_FALSE);
+                                       true, false);
        if (result == ISC_R_SUCCESS)
                dns_acl_attach(acl, &ns_g_mapped);
        dns_acl_detach(&acl);
@@ -3235,7 +3236,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
               cfg_obj_t *config, cfg_obj_t *vconfig,
               ns_cachelist_t *cachelist, const cfg_obj_t *bindkeys,
               isc_mem_t *mctx, cfg_aclconfctx_t *actx,
-              isc_boolean_t need_hints)
+              bool need_hints)
 {
        const cfg_obj_t *maps[4];
        const cfg_obj_t *cfgmaps[3];
@@ -3269,8 +3270,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        isc_mem_t *cmctx = NULL, *hmctx = NULL;
        dns_dispatch_t *dispatch4 = NULL;
        dns_dispatch_t *dispatch6 = NULL;
-       isc_boolean_t reused_cache = ISC_FALSE;
-       isc_boolean_t shared_cache = ISC_FALSE;
+       bool reused_cache = false;
+       bool shared_cache = false;
        int i = 0, j = 0, k = 0;
        const char *str;
        const char *cachename = NULL;
@@ -3280,16 +3281,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        unsigned int resopts = 0;
        dns_zone_t *zone = NULL;
        uint32_t max_clients_per_query;
-       isc_boolean_t empty_zones_enable;
+       bool empty_zones_enable;
        const cfg_obj_t *disablelist = NULL;
        isc_stats_t *resstats = NULL;
        dns_stats_t *resquerystats = NULL;
-       isc_boolean_t auto_root = ISC_FALSE;
+       bool auto_root = false;
        ns_cache_t *nsc;
-       isc_boolean_t zero_no_soattl;
+       bool zero_no_soattl;
        dns_acl_t *clients = NULL, *mapped = NULL, *excluded = NULL;
        unsigned int query_timeout, ndisp;
-       isc_boolean_t old_rpz_ok = ISC_FALSE;
+       bool old_rpz_ok = false;
        isc_dscp_t dscp4 = -1, dscp6 = -1;
        dns_dyndbctx_t *dctx = NULL;
 
@@ -3408,8 +3409,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        {
                const cfg_obj_t *zconfig = cfg_listelt_value(element);
                CHECK(configure_zone(config, zconfig, vconfig, mctx, view,
-                                    viewlist, actx, ISC_FALSE, old_rpz_ok,
-                                    ISC_FALSE));
+                                    viewlist, actx, false, old_rpz_ok,
+                                    false));
        }
 
        /*
@@ -3470,7 +3471,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                         */
                        (void)cfg_map_get(dlz, "search", &search);
                        if (search == NULL || cfg_obj_asboolean(search)) {
-                               dlzdb->search = ISC_TRUE;
+                               dlzdb->search = true;
                                result = dns_dlzconfigure(view, dlzdb,
                                                        dlzconfigure_callback);
                                if (result != ISC_R_SUCCESS)
@@ -3478,7 +3479,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                                ISC_LIST_APPEND(view->dlz_searched,
                                                dlzdb, link);
                        } else {
-                               dlzdb->search = ISC_FALSE;
+                               dlzdb->search = false;
                                ISC_LIST_APPEND(view->dlz_unsearched,
                                                dlzdb, link);
                        }
@@ -3553,12 +3554,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        if (strcasecmp(str, "fail") == 0) {
                resopts |= DNS_RESOLVER_CHECKNAMES |
                        DNS_RESOLVER_CHECKNAMESFAIL;
-               view->checknames = ISC_TRUE;
+               view->checknames = true;
        } else if (strcasecmp(str, "warn") == 0) {
                resopts |= DNS_RESOLVER_CHECKNAMES;
-               view->checknames = ISC_FALSE;
+               view->checknames = false;
        } else if (strcasecmp(str, "ignore") == 0) {
-               view->checknames = ISC_FALSE;
+               view->checknames = false;
        } else
                INSIST(0);
 
@@ -3688,8 +3689,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                view->enablevalidation = cfg_obj_asboolean(obj);
        } else {
                /* If dnssec-validation is not boolean, it must be "auto" */
-               view->enablevalidation = ISC_TRUE;
-               auto_root = ISC_TRUE;
+               view->enablevalidation = true;
+               auto_root = true;
        }
 
        obj = NULL;
@@ -3747,7 +3748,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                        goto cleanup;
                }
                dns_cache_attach(nsc->cache, &cache);
-               shared_cache = ISC_TRUE;
+               shared_cache = true;
        } else {
                if (strcmp(cachename, view->name) == 0) {
                        result = dns_viewlist_find(&ns_g_server->viewlist,
@@ -3773,7 +3774,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                                                      NS_LOGMODULE_SERVER,
                                                      ISC_LOG_DEBUG(3),
                                                      "reusing existing cache");
-                                       reused_cache = ISC_TRUE;
+                                       reused_cache = true;
                                        dns_cache_attach(pview->cache, &cache);
                                }
                                dns_view_getresstats(pview, &resstats);
@@ -3814,8 +3815,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                nsc->cache = NULL;
                dns_cache_attach(cache, &nsc->cache);
                nsc->primaryview = view;
-               nsc->needflush = ISC_FALSE;
-               nsc->adbsizeadjusted = ISC_FALSE;
+               nsc->needflush = false;
+               nsc->adbsizeadjusted = false;
                nsc->rdclass = view->rdclass;
                ISC_LINK_INIT(nsc, link);
                ISC_LIST_APPEND(*cachelist, nsc, link);
@@ -3845,10 +3846,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
         * XXXRTH  Hardwired number of tasks.
         */
        CHECK(get_view_querysource_dispatch(maps, AF_INET, &dispatch4, &dscp4,
-                                           ISC_TF(ISC_LIST_PREV(view, link)
+                                           (ISC_LIST_PREV(view, link)
                                                   == NULL)));
        CHECK(get_view_querysource_dispatch(maps, AF_INET6, &dispatch6, &dscp6,
-                                           ISC_TF(ISC_LIST_PREV(view, link)
+                                           (ISC_LIST_PREV(view, link)
                                                   == NULL)));
        if (dispatch4 == NULL && dispatch6 == NULL) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -3897,7 +3898,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                        if (!nsc->adbsizeadjusted) {
                                dns_adb_setadbsize(nsc->primaryview->adb,
                                                   MAX_ADB_SIZE_FOR_CACHESHARE);
-                               nsc->adbsizeadjusted = ISC_TRUE;
+                               nsc->adbsizeadjusted = true;
                        }
                }
        }
@@ -4091,7 +4092,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                (void)dns_view_findzone(view, dns_rootname, &rootzone);
                if (rootzone != NULL) {
                        dns_zone_detach(&rootzone);
-                       need_hints = ISC_FALSE;
+                       need_hints = false;
                }
                if (need_hints)
                        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
@@ -4196,9 +4197,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        obj = NULL;
        (void)ns_config_get(maps, "match-recursive-only", &obj);
        if (obj != NULL && cfg_obj_asboolean(obj))
-               view->matchrecursiveonly = ISC_TRUE;
+               view->matchrecursiveonly = true;
        else
-               view->matchrecursiveonly = ISC_FALSE;
+               view->matchrecursiveonly = false;
 
        /*
         * Configure other configurable data.
@@ -4269,7 +4270,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                cfg_obj_log(obj, ns_g_lctx, ISC_LOG_WARNING,
                            "'additional-from-auth no' is only supported "
                            "with 'recursion no'");
-               view->additionalfromauth = ISC_TRUE;
+               view->additionalfromauth = true;
        }
 
        obj = NULL;
@@ -4280,7 +4281,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                cfg_obj_log(obj, ns_g_lctx, ISC_LOG_WARNING,
                            "'additional-from-cache no' is only supported "
                            "with 'recursion no'");
-               view->additionalfromcache = ISC_TRUE;
+               view->additionalfromcache = true;
        }
 
        CHECK(configure_view_acl(vconfig, config, ns_g_config,
@@ -4694,7 +4695,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        obj = NULL;
        result = ns_config_get(maps, "root-delegation-only", &obj);
        if (result == ISC_R_SUCCESS)
-               dns_view_setrootdelonly(view, ISC_TRUE);
+               dns_view_setrootdelonly(view, true);
        if (result == ISC_R_SUCCESS && ! cfg_obj_isvoid(obj)) {
                const cfg_obj_t *exclude;
                dns_fixedname_t fixed;
@@ -4712,7 +4713,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                        CHECK(dns_view_excludedelegationonly(view, name));
                }
        } else
-               dns_view_setrootdelonly(view, ISC_FALSE);
+               dns_view_setrootdelonly(view, false);
 
        /*
         * Load DynDB modules.
@@ -4759,7 +4760,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                else
                        empty_zones_enable = view->recursion;
        } else {
-               empty_zones_enable = ISC_FALSE;
+               empty_zones_enable = false;
        }
 
        if (empty_zones_enable && !lwresd_g_useresolvconf) {
@@ -4783,7 +4784,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                        CHECK(dns_name_fromstring(name, cfg_obj_asstring(obj),
                                                  0, NULL));
                        isc_buffer_init(&buffer, server, sizeof(server) - 1);
-                       CHECK(dns_name_totext(name, ISC_FALSE, &buffer));
+                       CHECK(dns_name_totext(name, false, &buffer));
                        server[isc_buffer_usedlength(&buffer)] = 0;
                        empty_dbtype[2] = server;
                } else
@@ -4795,7 +4796,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
                        CHECK(dns_name_fromstring(name, cfg_obj_asstring(obj),
                                                 0, NULL));
                        isc_buffer_init(&buffer, contact, sizeof(contact) - 1);
-                       CHECK(dns_name_totext(name, ISC_FALSE, &buffer));
+                       CHECK(dns_name_totext(name, false, &buffer));
                        contact[isc_buffer_usedlength(&buffer)] = 0;
                        empty_dbtype[3] = contact;
                } else
@@ -5291,8 +5292,8 @@ static isc_result_t
 configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
               const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
               dns_viewlist_t *viewlist, cfg_aclconfctx_t *aclconf,
-              isc_boolean_t added, isc_boolean_t old_rpz_ok,
-              isc_boolean_t modify)
+              bool added, bool old_rpz_ok,
+              bool modify)
 {
        dns_view_t *pview = NULL;       /* Production view */
        dns_zone_t *zone = NULL;        /* New or reused zone */
@@ -5315,7 +5316,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
        dns_rdataclass_t zclass;
        const char *ztypestr;
        dns_rpz_num_t rpz_num;
-       isc_boolean_t zone_is_catz = ISC_FALSE;
+       bool zone_is_catz = false;
 
        options = NULL;
        (void)cfg_map_get(config, "options", &options);
@@ -5545,7 +5546,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
 
        if (view->catzs != NULL &&
            dns_catz_get_zone(view->catzs, origin) != NULL)
-               zone_is_catz = ISC_TRUE;
+               zone_is_catz = true;
 
        /*
         * See if we can reuse an existing zone.  This is
@@ -5688,7 +5689,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
         * Ensure that zone keys are reloaded on reconfig
         */
        if ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN) != 0)
-               dns_zone_rekey(zone, ISC_FALSE);
+               dns_zone_rekey(zone, false);
 
  cleanup:
        if (zone != NULL)
@@ -5712,7 +5713,7 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
        dns_zone_t *zone = NULL;
        dns_acl_t *none = NULL;
        char filename[PATH_MAX];
-       isc_boolean_t defaultview;
+       bool defaultview;
 
        REQUIRE(view != NULL);
 
@@ -5736,7 +5737,7 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
        CHECK(dns_zonemgr_createzone(ns_g_server->zonemgr, &zone));
        CHECK(dns_zone_setorigin(zone, dns_rootname));
 
-       defaultview = ISC_TF(strcmp(view->name, "_default") == 0);
+       defaultview = (strcmp(view->name, "_default") == 0);
        CHECK(isc_file_sanitize(directory,
                                defaultview ? "managed-keys" : view->name,
                                defaultview ? "bind" : "mkeys",
@@ -5759,7 +5760,7 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
 
        dns_zone_setdialup(zone, dns_dialuptype_no);
        dns_zone_setnotifytype(zone, dns_notifytype_no);
-       dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, ISC_TRUE);
+       dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
        dns_zone_setjournalsize(zone, 0);
 
        dns_zone_setstats(zone, ns_g_server->zonestats);
@@ -5834,11 +5835,11 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
 }
 
 static isc_result_t
-scan_interfaces(ns_server_t *server, isc_boolean_t verbose) {
+scan_interfaces(ns_server_t *server, bool verbose) {
        isc_result_t result;
-       isc_boolean_t match_mapped = server->aclenv.match_mapped;
+       bool match_mapped = server->aclenv.match_mapped;
 #ifdef HAVE_GEOIP
-       isc_boolean_t use_ecs = server->aclenv.geoip_use_ecs;
+       bool use_ecs = server->aclenv.geoip_use_ecs;
 #endif
 
        result = ns_interfacemgr_scan(server->interfacemgr, verbose);
@@ -5859,7 +5860,7 @@ scan_interfaces(ns_server_t *server, isc_boolean_t verbose) {
 
 static isc_result_t
 add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr,
-             isc_dscp_t dscp, isc_boolean_t wcardport_ok)
+             isc_dscp_t dscp, bool wcardport_ok)
 {
        ns_listenelt_t *lelt = NULL;
        dns_acl_t *src_acl = NULL;
@@ -5879,7 +5880,7 @@ add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr,
                        return (result);
 
                result = dns_iptable_addprefix(src_acl->iptable,
-                                              &netaddr, 128, ISC_TRUE);
+                                              &netaddr, 128, true);
                if (result != ISC_R_SUCCESS)
                        goto clean;
 
@@ -5939,7 +5940,7 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) {
                 * wildcard IPv6 port.
                 */
                /* XXXMPA fix dscp */
-               result = add_listenelt(mctx, list, &addr, dscp, ISC_TRUE);
+               result = add_listenelt(mctx, list, &addr, dscp, true);
                if (result != ISC_R_SUCCESS)
                        goto fail;
        }
@@ -5970,18 +5971,18 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) {
 
                addrp = dns_zone_getnotifysrc6(zone);
                dscp = dns_zone_getnotifysrc6dscp(zone);
-               result = add_listenelt(mctx, list, addrp, dscp, ISC_FALSE);
+               result = add_listenelt(mctx, list, addrp, dscp, false);
                if (result != ISC_R_SUCCESS)
                        goto fail;
 
                addrp = dns_zone_getxfrsource6(zone);
                dscp = dns_zone_getxfrsource6dscp(zone);
-               result = add_listenelt(mctx, list, addrp, dscp, ISC_FALSE);
+               result = add_listenelt(mctx, list, addrp, dscp, false);
                if (result != ISC_R_SUCCESS)
                        goto fail;
        }
 
-       ns_interfacemgr_adjust(server->interfacemgr, list, ISC_TRUE);
+       ns_interfacemgr_adjust(server->interfacemgr, list, true);
 
  clean:
        ns_listenlist_detach(&list);
@@ -6020,7 +6021,7 @@ interface_timer_tick(isc_task_t *task, isc_event_t *event) {
         */
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       scan_interfaces(server, ISC_FALSE);
+       scan_interfaces(server, false);
        isc_task_endexclusive(server->task);
 }
 
@@ -6231,7 +6232,7 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
         */
        domain = dns_fixedname_initname(&fdomain);
        dns_rdataset_init(&nameservers);
-       result = dns_view_findzonecut(view, origin, domain, 0, 0, ISC_TRUE,
+       result = dns_view_findzonecut(view, origin, domain, 0, 0, true,
                                      &nameservers, NULL);
        if (result == ISC_R_SUCCESS) {
                result = dns_resolver_createfetch(view->resolver, tatname,
@@ -6394,7 +6395,7 @@ set_limits(const cfg_obj_t **maps) {
 
 static void
 portset_fromconf(isc_portset_t *portset, const cfg_obj_t *ports,
-                isc_boolean_t positive)
+                bool positive)
 {
        const cfg_listelt_t *element;
 
@@ -6525,11 +6526,11 @@ generate_session_key(const char *filename, const char *keynamestr,
        /* Store the key in tsigkey. */
        isc_stdtime_get(&now);
        CHECK(dns_tsigkey_createfromkey(dst_key_name(key), algname, key,
-                                       ISC_FALSE, NULL, now, now, mctx, NULL,
+                                       false, NULL, now, now, mctx, NULL,
                                        &tsigkey));
 
        /* Dump the key to the key file. */
-       fp = ns_os_openfile(filename, S_IRUSR|S_IWUSR, ISC_TRUE);
+       fp = ns_os_openfile(filename, S_IRUSR|S_IWUSR, true);
        if (fp == NULL) {
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
@@ -6584,8 +6585,8 @@ configure_session_key(const cfg_obj_t **maps, ns_server_t *server,
        isc_buffer_t buffer;
        uint16_t bits;
        const cfg_obj_t *obj;
-       isc_boolean_t need_deleteold = ISC_FALSE;
-       isc_boolean_t need_createnew = ISC_FALSE;
+       bool need_deleteold = false;
+       bool need_createnew = false;
        isc_result_t result;
 
        obj = NULL;
@@ -6628,15 +6629,15 @@ configure_session_key(const cfg_obj_t **maps, ns_server_t *server,
        /* See if we need to (re)generate a new key. */
        if (keyfile == NULL) {
                if (server->session_keyfile != NULL)
-                       need_deleteold = ISC_TRUE;
+                       need_deleteold = true;
        } else if (server->session_keyfile == NULL)
-               need_createnew = ISC_TRUE;
+               need_createnew = true;
        else if (strcmp(keyfile, server->session_keyfile) != 0 ||
                 !dns_name_equal(server->session_keyname, keyname) ||
                 server->session_keyalg != algtype ||
                 server->session_keybits != bits) {
-               need_deleteold = ISC_TRUE;
-               need_createnew = ISC_TRUE;
+               need_deleteold = true;
+               need_createnew = true;
        }
 
        if (need_deleteold) {
@@ -6767,7 +6768,7 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
               int *num_zones)
 {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t allow = ISC_FALSE;
+       bool allow = false;
        ns_cfgctx_t *nzcfg = NULL;
        const cfg_obj_t *maps[4];
        const cfg_obj_t *options = NULL, *voptions = NULL;
@@ -6828,12 +6829,12 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
                        const cfg_listelt_t *e =
                                cfg_list_first(cfg_tuple_get(cz, "zone list"));
                        if (e != NULL)
-                               allow = ISC_TRUE;
+                               allow = true;
                }
        }
 
        if (!allow) {
-               dns_view_setnewzones(view, ISC_FALSE, NULL, NULL, 0ULL);
+               dns_view_setnewzones(view, false, NULL, NULL, 0ULL);
                if (num_zones != NULL)
                        *num_zones = 0;
                return (ISC_R_SUCCESS);
@@ -6841,7 +6842,7 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
 
        nzcfg = isc_mem_get(view->mctx, sizeof(*nzcfg));
        if (nzcfg == NULL) {
-               dns_view_setnewzones(view, ISC_FALSE, NULL, NULL, 0ULL);
+               dns_view_setnewzones(view, false, NULL, NULL, 0ULL);
                return (ISC_R_NOMEMORY);
        }
 
@@ -6859,7 +6860,7 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
        result = dns_view_setnewzones(view, allow, nzcfg,
                                      newzone_cfgctx_destroy, mapsize);
        if (result != ISC_R_SUCCESS) {
-               dns_view_setnewzones(view, ISC_FALSE, NULL, NULL, 0ULL);
+               dns_view_setnewzones(view, false, NULL, NULL, 0ULL);
                return (result);
        }
 
@@ -6954,7 +6955,7 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
                const cfg_obj_t *zconfig = cfg_listelt_value(element);
                CHECK(configure_zone(config, zconfig, vconfig, mctx,
                                     view, &ns_g_server->viewlist, actx,
-                                    ISC_TRUE, ISC_FALSE, ISC_FALSE));
+                                    true, false, false));
        }
 
        result = ISC_R_SUCCESS;
@@ -7138,8 +7139,8 @@ configure_newzone(const cfg_obj_t *zconfig, cfg_obj_t *config,
                  cfg_aclconfctx_t *actx)
 {
        return (configure_zone(config, zconfig, vconfig, mctx, view,
-                              &ns_g_server->viewlist, actx, ISC_TRUE,
-                              ISC_FALSE, ISC_FALSE));
+                              &ns_g_server->viewlist, actx, true,
+                              false, false));
 }
 
 /*%
@@ -7199,7 +7200,7 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
                                            dbi);
        }
 
-       (void) nzd_close(&txn, ISC_FALSE);
+       (void) nzd_close(&txn, false);
        return (result);
 }
 
@@ -7252,7 +7253,7 @@ get_newzone_config(dns_view_t *view, const char *zonename,
        result = ISC_R_SUCCESS;
 
  cleanup:
-       (void) nzd_close(&txn, ISC_FALSE);
+       (void) nzd_close(&txn, false);
 
        if (zoneconf != NULL) {
                cfg_obj_destroy(ns_g_addparser, &zoneconf);
@@ -7285,7 +7286,7 @@ count_zones(const cfg_obj_t *conf) {
 
 static isc_result_t
 check_lockfile(ns_server_t *server, const cfg_obj_t *config,
-              isc_boolean_t first_time)
+              bool first_time)
 {
        isc_result_t result;
        const char *filename = NULL;
@@ -7364,7 +7365,7 @@ check_lockfile(ns_server_t *server, const cfg_obj_t *config,
 
 static isc_result_t
 load_configuration(const char *filename, ns_server_t *server,
-                  isc_boolean_t first_time)
+                  bool first_time)
 {
        cfg_obj_t *config = NULL, *bindkeys = NULL;
        cfg_parser_t *conf_parser = NULL, *bindkeys_parser = NULL;
@@ -7382,7 +7383,7 @@ load_configuration(const char *filename, ns_server_t *server,
        in_port_t listen_port, udpport_low, udpport_high;
        int i;
        int num_zones = 0;
-       isc_boolean_t exclusive = ISC_FALSE;
+       bool exclusive = false;
        isc_interval_t interval;
        isc_logconfig_t *logc = NULL;
        isc_portset_t *v4portset = NULL;
@@ -7415,7 +7416,7 @@ load_configuration(const char *filename, ns_server_t *server,
        /*
         * Shut down all dyndb instances.
         */
-       dns_dyndb_cleanup(ISC_FALSE);
+       dns_dyndb_cleanup(false);
 
        /*
         * Parse the global default pseudo-config file.
@@ -7522,7 +7523,7 @@ load_configuration(const char *filename, ns_server_t *server,
        if (!exclusive) {
                result = isc_task_beginexclusive(server->task);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
-               exclusive = ISC_TRUE;
+               exclusive = true;
        }
 
        /*
@@ -7673,7 +7674,7 @@ load_configuration(const char *filename, ns_server_t *server,
 
        (void)ns_config_get(maps, "use-v4-udp-ports", &usev4ports);
        if (usev4ports != NULL) {
-               portset_fromconf(v4portset, usev4ports, ISC_TRUE);
+               portset_fromconf(v4portset, usev4ports, true);
        } else {
                CHECKM(isc_net_getudpportrange(AF_INET, &udpport_low,
                                               &udpport_high),
@@ -7693,12 +7694,12 @@ load_configuration(const char *filename, ns_server_t *server,
        }
        (void)ns_config_get(maps, "avoid-v4-udp-ports", &avoidv4ports);
        if (avoidv4ports != NULL) {
-               portset_fromconf(v4portset, avoidv4ports, ISC_FALSE);
+               portset_fromconf(v4portset, avoidv4ports, false);
        }
 
        (void)ns_config_get(maps, "use-v6-udp-ports", &usev6ports);
        if (usev6ports != NULL) {
-               portset_fromconf(v6portset, usev6ports, ISC_TRUE);
+               portset_fromconf(v6portset, usev6ports, true);
        } else {
                CHECKM(isc_net_getudpportrange(AF_INET6, &udpport_low,
                                               &udpport_high),
@@ -7718,7 +7719,7 @@ load_configuration(const char *filename, ns_server_t *server,
        }
        (void)ns_config_get(maps, "avoid-v6-udp-ports", &avoidv6ports);
        if (avoidv6ports != NULL) {
-               portset_fromconf(v6portset, avoidv6ports, ISC_FALSE);
+               portset_fromconf(v6portset, avoidv6ports, false);
        }
 
        dns_dispatchmgr_setavailports(ns_g_dispatchmgr, v4portset, v6portset);
@@ -7831,7 +7832,7 @@ load_configuration(const char *filename, ns_server_t *server,
                         * Not specified, use default.
                         */
                        CHECK(ns_listenlist_default(ns_g_mctx, listen_port,
-                                                   -1, ISC_TRUE, &listenon));
+                                                   -1, true, &listenon));
                }
                if (listenon != NULL) {
                        ns_interfacemgr_setlistenon4(server->interfacemgr,
@@ -7860,7 +7861,7 @@ load_configuration(const char *filename, ns_server_t *server,
                         * Not specified, use default.
                         */
                        CHECK(ns_listenlist_default(ns_g_mctx, listen_port,
-                                                   -1, ISC_TRUE, &listenon));
+                                                   -1, true, &listenon));
                }
                if (listenon != NULL) {
                        ns_interfacemgr_setlistenon6(server->interfacemgr,
@@ -7875,7 +7876,7 @@ load_configuration(const char *filename, ns_server_t *server,
         * to configure the query source, since the dispatcher we use might
         * be shared with an interface.
         */
-       result = scan_interfaces(server, ISC_TRUE);
+       result = scan_interfaces(server, true);
 
        /*
         * Check that named is able to TCP listen on at least one
@@ -7901,12 +7902,12 @@ load_configuration(const char *filename, ns_server_t *server,
        if (interface_interval == 0) {
                CHECK(isc_timer_reset(server->interface_timer,
                                      isc_timertype_inactive,
-                                     NULL, NULL, ISC_TRUE));
+                                     NULL, NULL, true));
        } else if (server->interface_interval != interface_interval) {
                isc_interval_set(&interval, interface_interval, 0);
                CHECK(isc_timer_reset(server->interface_timer,
                                      isc_timertype_ticker,
-                                     NULL, &interval, ISC_FALSE));
+                                     NULL, &interval, false));
        }
        server->interface_interval = interface_interval;
 
@@ -7928,22 +7929,22 @@ load_configuration(const char *filename, ns_server_t *server,
        if (heartbeat_interval == 0) {
                CHECK(isc_timer_reset(server->heartbeat_timer,
                                      isc_timertype_inactive,
-                                     NULL, NULL, ISC_TRUE));
+                                     NULL, NULL, true));
        } else if (server->heartbeat_interval != heartbeat_interval) {
                isc_interval_set(&interval, heartbeat_interval, 0);
                CHECK(isc_timer_reset(server->heartbeat_timer,
                                      isc_timertype_ticker,
-                                     NULL, &interval, ISC_FALSE));
+                                     NULL, &interval, false));
        }
        server->heartbeat_interval = heartbeat_interval;
 
        isc_interval_set(&interval, 1200, 0);
        CHECK(isc_timer_reset(server->pps_timer, isc_timertype_ticker, NULL,
-                             &interval, ISC_FALSE));
+                             &interval, false));
 
        isc_interval_set(&interval, ns_g_tat_interval, 0);
        CHECK(isc_timer_reset(server->tat_timer, isc_timertype_ticker, NULL,
-                             &interval, ISC_FALSE));
+                             &interval, false));
 
        /*
         * Write the PID file.
@@ -8051,7 +8052,7 @@ load_configuration(const char *filename, ns_server_t *server,
                CHECK(find_view(vconfig, &viewlist, &view));
                CHECK(configure_view(view, &viewlist, config, vconfig,
                                     &cachelist, bindkeys, ns_g_mctx,
-                                    ns_g_aclconfctx, ISC_TRUE));
+                                    ns_g_aclconfctx, true));
                dns_view_freeze(view);
                dns_view_detach(&view);
        }
@@ -8065,7 +8066,7 @@ load_configuration(const char *filename, ns_server_t *server,
                CHECK(find_view(NULL, &viewlist, &view));
                CHECK(configure_view(view, &viewlist, config, NULL,
                                     &cachelist, bindkeys,
-                                    ns_g_mctx, ns_g_aclconfctx, ISC_TRUE));
+                                    ns_g_mctx, ns_g_aclconfctx, true));
                dns_view_freeze(view);
                dns_view_detach(&view);
        }
@@ -8085,7 +8086,7 @@ load_configuration(const char *filename, ns_server_t *server,
                CHECK(create_view(vconfig, &builtin_viewlist, &view));
                CHECK(configure_view(view, &viewlist, config, vconfig,
                                     &cachelist, bindkeys,
-                                    ns_g_mctx, ns_g_aclconfctx, ISC_FALSE));
+                                    ns_g_mctx, ns_g_aclconfctx, false));
                dns_view_freeze(view);
                dns_view_detach(&view);
                view = NULL;
@@ -8335,7 +8336,7 @@ load_configuration(const char *filename, ns_server_t *server,
                                        catobj = cfg_tuple_get(obj, "name");
                                        str = cfg_obj_asstring(catobj);
                                        if (strcasecmp(str, "queries") == 0)
-                                               server->log_queries = ISC_TRUE;
+                                               server->log_queries = true;
                                }
                        }
                }
@@ -8346,8 +8347,7 @@ load_configuration(const char *filename, ns_server_t *server,
            cfg_map_get(options, "memstatistics", &obj) == ISC_R_SUCCESS) {
                ns_g_memstatistics = cfg_obj_asboolean(obj);
        } else {
-               ns_g_memstatistics =
-                       ISC_TF((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0);
+               ns_g_memstatistics = (isc_mem_debugging & ISC_MEM_DEBUGRECORD);
        }
 
        obj = NULL;
@@ -8387,25 +8387,25 @@ load_configuration(const char *filename, ns_server_t *server,
        result = ns_config_get(maps, "version", &obj);
        if (result == ISC_R_SUCCESS) {
                CHECKM(setoptstring(server, &server->version, obj), "strdup");
-               server->version_set = ISC_TRUE;
+               server->version_set = true;
        } else {
-               server->version_set = ISC_FALSE;
+               server->version_set = false;
        }
 
        obj = NULL;
        result = ns_config_get(maps, "hostname", &obj);
        if (result == ISC_R_SUCCESS) {
                CHECKM(setoptstring(server, &server->hostname, obj), "strdup");
-               server->hostname_set = ISC_TRUE;
+               server->hostname_set = true;
        } else {
-               server->hostname_set = ISC_FALSE;
+               server->hostname_set = false;
        }
 
        obj = NULL;
        result = ns_config_get(maps, "server-id", &obj);
-       server->server_usehostname = ISC_FALSE;
+       server->server_usehostname = false;
        if (result == ISC_R_SUCCESS && cfg_obj_isboolean(obj)) {
-               /* The parser translates "hostname" to ISC_TRUE */
+               /* The parser translates "hostname" to true */
                server->server_usehostname = cfg_obj_asboolean(obj);
                result = setstring(server, &server->server_id, NULL);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
@@ -8422,7 +8422,7 @@ load_configuration(const char *filename, ns_server_t *server,
        if (result == ISC_R_SUCCESS) {
                server->flushonshutdown = cfg_obj_asboolean(obj);
        } else {
-               server->flushonshutdown = ISC_FALSE;
+               server->flushonshutdown = false;
        }
 
        obj = NULL;
@@ -8451,7 +8451,7 @@ load_configuration(const char *filename, ns_server_t *server,
        result = ns_config_get(maps, "cookie-secret", &obj);
        if (result == ISC_R_SUCCESS) {
                const char *str;
-               isc_boolean_t first = ISC_TRUE;
+               bool first = true;
                isc_buffer_t b;
                unsigned int usedlength;
 
@@ -8471,7 +8471,7 @@ load_configuration(const char *filename, ns_server_t *server,
                                if (result != ISC_R_SUCCESS &&
                                    result != ISC_R_NOSPACE)
                                        goto cleanup;
-                               first = ISC_FALSE;
+                               first = false;
                        } else {
                                altsecret = isc_mem_get(server->mctx,
                                                        sizeof(*altsecret));
@@ -8586,7 +8586,7 @@ load_configuration(const char *filename, ns_server_t *server,
                    strcmp(view->name, "_bind") != 0)
                {
                        dns_view_setviewrevert(view);
-                       (void)dns_zt_apply(view->zonetable, ISC_FALSE,
+                       (void)dns_zt_apply(view->zonetable, false,
                                           removed, view);
                }
                dns_view_detach(&view);
@@ -8639,7 +8639,7 @@ view_loaded(void *arg) {
        isc_result_t result;
        ns_zoneload_t *zl = (ns_zoneload_t *) arg;
        ns_server_t *server = zl->server;
-       isc_boolean_t reconfig = zl->reconfig;
+       bool reconfig = zl->reconfig;
        unsigned int refs;
 
 
@@ -8684,7 +8684,7 @@ view_loaded(void *arg) {
 }
 
 static isc_result_t
-load_zones(ns_server_t *server, isc_boolean_t init, isc_boolean_t reconfig) {
+load_zones(ns_server_t *server, bool init, bool reconfig) {
        isc_result_t result;
        dns_view_t *view;
        ns_zoneload_t *zl;
@@ -8802,22 +8802,22 @@ run_server(isc_task_t *task, isc_event_t *event) {
 
        if (ns_g_lwresdonly)
                CHECKFATAL(load_configuration(lwresd_g_conffile, server,
-                                             ISC_TRUE),
+                                             true),
                           "loading configuration");
        else
-               CHECKFATAL(load_configuration(ns_g_conffile, server, ISC_TRUE),
+               CHECKFATAL(load_configuration(ns_g_conffile, server, true),
                           "loading configuration");
 
        isc_hash_init();
 
-       CHECKFATAL(load_zones(server, ISC_TRUE, ISC_FALSE), "loading zones");
+       CHECKFATAL(load_zones(server, true, false), "loading zones");
 #ifdef ENABLE_AFL
-       ns_g_run_done = ISC_TRUE;
+       ns_g_run_done = true;
 #endif
 }
 
 void
-ns_server_flushonshutdown(ns_server_t *server, isc_boolean_t flush) {
+ns_server_flushonshutdown(ns_server_t *server, bool flush) {
 
        REQUIRE(NS_SERVER_VALID(server));
 
@@ -8829,7 +8829,7 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
        isc_result_t result;
        dns_view_t *view, *view_next;
        ns_server_t *server = (ns_server_t *)event->ev_arg;
-       isc_boolean_t flush = server->flushonshutdown;
+       bool flush = server->flushonshutdown;
        ns_cache_t *nsc;
        ns_altsecret_t *altsecret;
 
@@ -8845,7 +8845,7 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
 
        ns_statschannels_shutdown(server);
        ns_controls_shutdown(server->controls);
-       end_reserved_dispatches(server, ISC_TRUE);
+       end_reserved_dispatches(server, true);
        cleanup_session_key(server, server->mctx);
 
        if (ns_g_aclconfctx != NULL)
@@ -8868,7 +8868,7 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
                        dns_view_detach(&view);
        }
 
-       dns_dyndb_cleanup(ISC_TRUE);
+       dns_dyndb_cleanup(true);
 
        while ((nsc = ISC_LIST_HEAD(server->cachelist)) != NULL) {
                ISC_LIST_UNLINK(server->cachelist, nsc, link);
@@ -9051,11 +9051,11 @@ ns_server_create(isc_mem_t *mctx, ns_server_t **serverp) {
        CHECKFATAL(server->recfile == NULL ? ISC_R_NOMEMORY : ISC_R_SUCCESS,
                   "isc_mem_strdup");
 
-       server->hostname_set = ISC_FALSE;
+       server->hostname_set = false;
        server->hostname = NULL;
-       server->version_set = ISC_FALSE;
+       server->version_set = false;
        server->version = NULL;
-       server->server_usehostname = ISC_FALSE;
+       server->server_usehostname = false;
        server->server_id = NULL;
 
        CHECKFATAL(isc_stats_create(ns_g_mctx, &server->nsstats,
@@ -9112,8 +9112,8 @@ ns_server_create(isc_mem_t *mctx, ns_server_t **serverp) {
                                    dns_sizecounter_out_max),
                   "dns_stats_create (outbound TCP IPv6 traffic size)");
 
-       server->flushonshutdown = ISC_FALSE;
-       server->log_queries = ISC_FALSE;
+       server->flushonshutdown = false;
+       server->log_queries = false;
 
        server->controls = NULL;
        CHECKFATAL(ns_controls_create(server, &server->controls),
@@ -9136,7 +9136,7 @@ ns_server_create(isc_mem_t *mctx, ns_server_t **serverp) {
        server->lockfile = NULL;
 
        server->dtenv = NULL;
-       server->answercookie = ISC_TRUE;
+       server->answercookie = true;
 
        server->magic = NS_SERVER_MAGIC;
        *serverp = server;
@@ -9229,7 +9229,7 @@ start_reserved_dispatches(ns_server_t *server) {
 }
 
 static void
-end_reserved_dispatches(ns_server_t *server, isc_boolean_t all) {
+end_reserved_dispatches(ns_server_t *server, bool all) {
        ns_dispatch_t *dispatch, *nextdispatch;
 
        REQUIRE(NS_SERVER_VALID(server));
@@ -9328,9 +9328,9 @@ loadconfig(ns_server_t *server) {
        start_reserved_dispatches(server);
        result = load_configuration(ns_g_lwresdonly ?
                                    lwresd_g_conffile : ns_g_conffile,
-                                   server, ISC_FALSE);
+                                   server, false);
        if (result == ISC_R_SUCCESS) {
-               end_reserved_dispatches(server, ISC_FALSE);
+               end_reserved_dispatches(server, false);
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_SERVER, ISC_LOG_INFO,
                              "reloading configuration succeeded");
@@ -9349,7 +9349,7 @@ reload(ns_server_t *server) {
        isc_result_t result;
        CHECK(loadconfig(server));
 
-       result = load_zones(server, ISC_FALSE, ISC_FALSE);
+       result = load_zones(server, false, false);
        if (result == ISC_R_SUCCESS)
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_SERVER, ISC_LOG_INFO,
@@ -9371,7 +9371,7 @@ static void
 ns_server_reload(isc_task_t *task, isc_event_t *event) {
        ns_server_t *server = (ns_server_t *)event->ev_arg;
 
-       INSIST(task = server->task);
+       INSIST(task == server->task);
        UNUSED(task);
 
        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
@@ -9403,7 +9403,7 @@ ns_server_scan_interfaces(ns_server_t *server) {
 
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       scan_interfaces(server, ISC_TRUE);
+       scan_interfaces(server, true);
        isc_task_endexclusive(server->task);
 }
 
@@ -9469,7 +9469,7 @@ next_token(isc_lex_t *lex, isc_buffer_t **text) {
 static isc_result_t
 zone_from_args(ns_server_t *server, isc_lex_t *lex, const char *zonetxt,
               dns_zone_t **zonep, char *zonename,
-              isc_buffer_t **text, isc_boolean_t skip)
+              isc_buffer_t **text, bool skip)
 {
        char *ptr;
        char *classtxt;
@@ -9520,7 +9520,7 @@ zone_from_args(ns_server_t *server, isc_lex_t *lex, const char *zonetxt,
 
        if (viewtxt == NULL) {
                result = dns_viewlist_findzone(&server->viewlist, name,
-                                              ISC_TF(classtxt == NULL),
+                                              (classtxt == NULL),
                                               rdclass, zonep);
                if (result == ISC_R_NOTFOUND)
                        snprintf(problem, sizeof(problem),
@@ -9580,7 +9580,7 @@ ns_server_retransfercommand(ns_server_t *server, isc_lex_t *lex,
        dns_zonetype_t type;
 
        result = zone_from_args(server, lex, NULL, &zone, NULL,
-                               text, ISC_TRUE);
+                               text, true);
        if (result != ISC_R_SUCCESS)
                return (result);
        if (zone == NULL)
@@ -9613,7 +9613,7 @@ ns_server_reloadcommand(ns_server_t *server, isc_lex_t *lex,
        const char *msg = NULL;
 
        result = zone_from_args(server, lex, NULL, &zone, NULL,
-                               text, ISC_TRUE);
+                               text, true);
        if (result != ISC_R_SUCCESS)
                return (result);
        if (zone == NULL) {
@@ -9663,7 +9663,7 @@ ns_server_reconfigcommand(ns_server_t *server) {
 
        CHECK(loadconfig(server));
 
-       result = load_zones(server, ISC_FALSE, ISC_TRUE);
+       result = load_zones(server, false, true);
        if (result == ISC_R_SUCCESS)
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_SERVER, ISC_LOG_INFO,
@@ -9689,7 +9689,7 @@ ns_server_notifycommand(ns_server_t *server, isc_lex_t *lex,
        const char msg[] = "zone notify queued";
 
        result = zone_from_args(server, lex, NULL, &zone, NULL,
-                               text, ISC_TRUE);
+                               text, true);
        if (result != ISC_R_SUCCESS)
                return (result);
        if (zone == NULL)
@@ -9717,7 +9717,7 @@ ns_server_refreshcommand(ns_server_t *server, isc_lex_t *lex,
        dns_zonetype_t type;
 
        result = zone_from_args(server, lex, NULL, &zone, NULL,
-                               text, ISC_TRUE);
+                               text, true);
        if (result != ISC_R_SUCCESS)
                return (result);
        if (zone == NULL)
@@ -9747,7 +9747,7 @@ ns_server_refreshcommand(ns_server_t *server, isc_lex_t *lex,
 
 isc_result_t
 ns_server_togglequerylog(ns_server_t *server, isc_lex_t *lex) {
-       isc_boolean_t value;
+       bool value;
        char *ptr;
 
        /* Skip the command name. */
@@ -9757,13 +9757,13 @@ ns_server_togglequerylog(ns_server_t *server, isc_lex_t *lex) {
 
        ptr = next_token(lex, NULL);
        if (ptr == NULL) {
-               value = server->log_queries ? ISC_FALSE : ISC_TRUE;
+               value = server->log_queries ? false : true;
        } else if (!strcasecmp(ptr, "on") || !strcasecmp(ptr, "yes") ||
                   !strcasecmp(ptr, "enable") || !strcasecmp(ptr, "true")) {
-               value = ISC_TRUE;
+               value = true;
        } else if (!strcasecmp(ptr, "off") || !strcasecmp(ptr, "no") ||
                   !strcasecmp(ptr, "disable") || !strcasecmp(ptr, "false")) {
-               value = ISC_FALSE;
+               value = false;
        } else {
                return (DNS_R_SYNTAX);
        }
@@ -9941,7 +9941,7 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) {
        ISC_LIST_INIT(vle->zonelist);
        ISC_LIST_APPEND(dctx->viewlist, vle, link);
        if (dctx->dumpzones)
-               result = dns_zt_apply(view->zonetable, ISC_TRUE,
+               result = dns_zt_apply(view->zonetable, true,
                                      add_zone_tolist, dctx);
        return (result);
 }
@@ -9966,7 +9966,7 @@ dumpcontext_destroy(struct dumpcontext *dctx) {
                vle = ISC_LIST_HEAD(dctx->viewlist);
        }
        if (dctx->version != NULL)
-               dns_db_closeversion(dctx->db, &dctx->version, ISC_FALSE);
+               dns_db_closeversion(dctx->db, &dctx->version, false);
        if (dctx->db != NULL)
                dns_db_detach(&dctx->db);
        if (dctx->cache != NULL)
@@ -10053,7 +10053,7 @@ dumpdone(void *arg, isc_result_t result) {
  nextzone:
                if (dctx->version != NULL)
                        dns_db_closeversion(dctx->db, &dctx->version,
-                                           ISC_FALSE);
+                                           false);
                if (dctx->db != NULL)
                        dns_db_detach(&dctx->db);
                if (dctx->zone == NULL)
@@ -10117,7 +10117,7 @@ ns_server_dumpdb(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        isc_result_t result;
        char *ptr;
        const char *sep;
-       isc_boolean_t found;
+       bool found;
 
        /* Skip the command name. */
        ptr = next_token(lex, NULL);
@@ -10129,11 +10129,11 @@ ns_server_dumpdb(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                return (ISC_R_NOMEMORY);
 
        dctx->mctx = server->mctx;
-       dctx->dumpcache = ISC_TRUE;
-       dctx->dumpadb = ISC_TRUE;
-       dctx->dumpbad = ISC_TRUE;
-       dctx->dumpfail = ISC_TRUE;
-       dctx->dumpzones = ISC_FALSE;
+       dctx->dumpcache = true;
+       dctx->dumpadb = true;
+       dctx->dumpbad = true;
+       dctx->dumpfail = true;
+       dctx->dumpzones = false;
        dctx->fp = NULL;
        ISC_LIST_INIT(dctx->viewlist);
        dctx->view = NULL;
@@ -10157,48 +10157,48 @@ ns_server_dumpdb(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
 
        if (ptr != NULL && strcmp(ptr, "-all") == 0) {
                /* also dump zones */
-               dctx->dumpzones = ISC_TRUE;
+               dctx->dumpzones = true;
                ptr = next_token(lex, NULL);
        } else if (ptr != NULL && strcmp(ptr, "-cache") == 0) {
                /* this is the default */
                ptr = next_token(lex, NULL);
        } else if (ptr != NULL && strcmp(ptr, "-zones") == 0) {
                /* only dump zones, suppress caches */
-               dctx->dumpadb = ISC_FALSE;
-               dctx->dumpbad = ISC_FALSE;
-               dctx->dumpcache = ISC_FALSE;
-               dctx->dumpfail = ISC_FALSE;
-               dctx->dumpzones = ISC_TRUE;
+               dctx->dumpadb = false;
+               dctx->dumpbad = false;
+               dctx->dumpcache = false;
+               dctx->dumpfail = false;
+               dctx->dumpzones = true;
                ptr = next_token(lex, NULL);
        } else if (ptr != NULL && strcmp(ptr, "-adb") == 0) {
                /* only dump adb, suppress other caches */
-               dctx->dumpbad = ISC_FALSE;
-               dctx->dumpcache = ISC_FALSE;
-               dctx->dumpfail = ISC_FALSE;
+               dctx->dumpbad = false;
+               dctx->dumpcache = false;
+               dctx->dumpfail = false;
                ptr = next_token(lex, NULL);
        } else if (ptr != NULL && strcmp(ptr, "-bad") == 0) {
                /* only dump badcache, suppress other caches */
-               dctx->dumpadb = ISC_FALSE;
-               dctx->dumpcache = ISC_FALSE;
-               dctx->dumpfail = ISC_FALSE;
+               dctx->dumpadb = false;
+               dctx->dumpcache = false;
+               dctx->dumpfail = false;
                ptr = next_token(lex, NULL);
        } else if (ptr != NULL && strcmp(ptr, "-fail") == 0) {
                /* only dump servfail cache, suppress other caches */
-               dctx->dumpadb = ISC_FALSE;
-               dctx->dumpbad = ISC_FALSE;
-               dctx->dumpcache = ISC_FALSE;
+               dctx->dumpadb = false;
+               dctx->dumpbad = false;
+               dctx->dumpcache = false;
                ptr = next_token(lex, NULL);
        }
 
  nextview:
-       found = ISC_FALSE;
+       found = false;
        for (view = ISC_LIST_HEAD(server->viewlist);
             view != NULL;
             view = ISC_LIST_NEXT(view, link))
        {
                if (ptr != NULL && strcmp(view->name, ptr) != 0)
                        continue;
-               found = ISC_TRUE;
+               found = true;
                CHECK(add_view_tolist(dctx, view));
        }
        if (ptr != NULL) {
@@ -10399,9 +10399,9 @@ ns_server_validation(ns_server_t *server, isc_lex_t *lex,
 {
        char *ptr;
        dns_view_t *view;
-       isc_boolean_t changed = ISC_FALSE;
+       bool changed = false;
        isc_result_t result;
-       isc_boolean_t enable = ISC_TRUE, set = ISC_TRUE, first = ISC_TRUE;
+       bool enable = true, set = true, first = true;
 
        /* Skip the command name. */
        ptr = next_token(lex, text);
@@ -10415,12 +10415,12 @@ ns_server_validation(ns_server_t *server, isc_lex_t *lex,
 
        if (!strcasecmp(ptr, "on") || !strcasecmp(ptr, "yes") ||
            !strcasecmp(ptr, "enable") || !strcasecmp(ptr, "true")) {
-               enable = ISC_TRUE;
+               enable = true;
        } else if (!strcasecmp(ptr, "off") || !strcasecmp(ptr, "no") ||
                   !strcasecmp(ptr, "disable") || !strcasecmp(ptr, "false")) {
-               enable = ISC_FALSE;
+               enable = false;
        } else if (!strcasecmp(ptr, "check") || !strcasecmp(ptr, "status")) {
-               set = ISC_FALSE;
+               set = false;
        } else {
                return (DNS_R_SYNTAX);
        }
@@ -10440,7 +10440,7 @@ ns_server_validation(ns_server_t *server, isc_lex_t *lex,
 
                if (set) {
                        view->enablevalidation = enable;
-                       changed = ISC_TRUE;
+                       changed = true;
                } else {
                        if (!first)
                                CHECK(putstr(text, "\n"));
@@ -10451,7 +10451,7 @@ ns_server_validation(ns_server_t *server, isc_lex_t *lex,
                        CHECK(putstr(text, view->name));
                        CHECK(putstr(text, ")"));
                        CHECK(putnull(text));
-                       first = ISC_FALSE;
+                       first = false;
                }
        }
 
@@ -10470,8 +10470,8 @@ isc_result_t
 ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
        char *ptr;
        dns_view_t *view;
-       isc_boolean_t flushed;
-       isc_boolean_t found;
+       bool flushed;
+       bool found;
        isc_result_t result;
        ns_cache_t *nsc;
 
@@ -10485,8 +10485,8 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
 
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       flushed = ISC_TRUE;
-       found = ISC_FALSE;
+       flushed = true;
+       found = false;
 
        /*
         * Flushing a cache is tricky when caches are shared by multiple views.
@@ -10507,7 +10507,7 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
                {
                        if (strcasecmp(ptr, view->name) != 0)
                                continue;
-                       found = ISC_TRUE;
+                       found = true;
                        for (nsc = ISC_LIST_HEAD(server->cachelist);
                             nsc != NULL;
                             nsc = ISC_LIST_NEXT(nsc, link)) {
@@ -10515,10 +10515,10 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
                                        break;
                        }
                        INSIST(nsc != NULL);
-                       nsc->needflush = ISC_TRUE;
+                       nsc->needflush = true;
                }
        } else
-               found = ISC_TRUE;
+               found = true;
 
        /* Perform flush */
        for (nsc = ISC_LIST_HEAD(server->cachelist);
@@ -10526,10 +10526,10 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
             nsc = ISC_LIST_NEXT(nsc, link)) {
                if (ptr != NULL && !nsc->needflush)
                        continue;
-               nsc->needflush = ISC_TRUE;
-               result = dns_view_flushcache2(nsc->primaryview, ISC_FALSE);
+               nsc->needflush = true;
+               result = dns_view_flushcache2(nsc->primaryview, false);
                if (result != ISC_R_SUCCESS) {
-                       flushed = ISC_FALSE;
+                       flushed = false;
                        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                                      NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "flushing cache in view '%s' failed: %s",
@@ -10558,9 +10558,9 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
                     nsc = ISC_LIST_NEXT(nsc, link)) {
                        if (!nsc->needflush || nsc->cache != view->cache)
                                continue;
-                       result = dns_view_flushcache2(view, ISC_TRUE);
+                       result = dns_view_flushcache2(view, true);
                        if (result != ISC_R_SUCCESS) {
-                               flushed = ISC_FALSE;
+                               flushed = false;
                                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                                              NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                              "fixing cache in view '%s' "
@@ -10574,7 +10574,7 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
        for (nsc = ISC_LIST_HEAD(server->cachelist);
             nsc != NULL;
             nsc = ISC_LIST_NEXT(nsc, link)) {
-               nsc->needflush = ISC_FALSE;
+               nsc->needflush = false;
        }
 
        if (flushed && found) {
@@ -10603,12 +10603,12 @@ ns_server_flushcache(ns_server_t *server, isc_lex_t *lex) {
 }
 
 isc_result_t
-ns_server_flushnode(ns_server_t *server, isc_lex_t *lex, isc_boolean_t tree) {
+ns_server_flushnode(ns_server_t *server, isc_lex_t *lex, bool tree) {
        char *ptr, *viewname;
        char target[DNS_NAME_FORMATSIZE];
        dns_view_t *view;
-       isc_boolean_t flushed;
-       isc_boolean_t found;
+       bool flushed;
+       bool found;
        isc_result_t result;
        isc_buffer_t b;
        dns_fixedname_t fixed;
@@ -10637,15 +10637,15 @@ ns_server_flushnode(ns_server_t *server, isc_lex_t *lex, isc_boolean_t tree) {
 
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       flushed = ISC_TRUE;
-       found = ISC_FALSE;
+       flushed = true;
+       found = false;
        for (view = ISC_LIST_HEAD(server->viewlist);
             view != NULL;
             view = ISC_LIST_NEXT(view, link))
        {
                if (viewname != NULL && strcasecmp(viewname, view->name) != 0)
                        continue;
-               found = ISC_TRUE;
+               found = true;
                /*
                 * It's a little inefficient to try flushing name for all views
                 * if some of the views share a single cache.  But since the
@@ -10653,7 +10653,7 @@ ns_server_flushnode(ns_server_t *server, isc_lex_t *lex, isc_boolean_t tree) {
                 */
                result = dns_view_flushnode(view, name, tree);
                if (result != ISC_R_SUCCESS) {
-                       flushed = ISC_FALSE;
+                       flushed = false;
                        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                                      NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "flushing %s '%s' in cache view '%s' "
@@ -10880,7 +10880,7 @@ delete_keynames(dns_tsig_keyring_t *ring, char *target,
                                dns_rbtnodechain_invalidate(&chain);
                                (void)dns_rbt_deletename(ring->keys,
                                                         &tkey->name,
-                                                        ISC_FALSE);
+                                                        false);
                                goto again;
                        }
                }
@@ -11073,7 +11073,7 @@ ns_server_rekey(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        dns_zone_t *zone = NULL;
        dns_zonetype_t type;
        uint16_t keyopts;
-       isc_boolean_t fullsign = ISC_FALSE;
+       bool fullsign = false;
        char *ptr;
 
        ptr = next_token(lex, text);
@@ -11081,10 +11081,10 @@ ns_server_rekey(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                return (ISC_R_UNEXPECTEDEND);
 
        if (strcasecmp(ptr, NS_COMMAND_SIGN) == 0)
-               fullsign = ISC_TRUE;
+               fullsign = true;
 
        result = zone_from_args(server, lex, NULL, &zone, NULL,
-                               text, ISC_FALSE);
+                               text, false);
        if (result != ISC_R_SUCCESS)
                return (result);
        if (zone == NULL)
@@ -11115,7 +11115,7 @@ ns_server_rekey(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
 */
 static isc_result_t
 synczone(dns_zone_t *zone, void *uap) {
-       isc_boolean_t cleanup = *(isc_boolean_t *)uap;
+       bool cleanup = *(bool *)uap;
        isc_result_t result;
        dns_zone_t *raw = NULL;
        char *journal;
@@ -11128,7 +11128,7 @@ synczone(dns_zone_t *zone, void *uap) {
 
        result = dns_zone_flush(zone);
        if (result != ISC_R_SUCCESS)
-               cleanup = ISC_FALSE;
+               cleanup = false;
        if (cleanup) {
                journal = dns_zone_getjournal(zone);
                if (journal != NULL)
@@ -11146,19 +11146,19 @@ ns_server_sync(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        char classstr[DNS_RDATACLASS_FORMATSIZE];
        char zonename[DNS_NAME_FORMATSIZE];
        const char *vname, *sep, *arg;
-       isc_boolean_t cleanup = ISC_FALSE;
+       bool cleanup = false;
 
        (void) next_token(lex, text);
 
        arg = next_token(lex, text);
        if (arg != NULL &&
            (strcmp(arg, "-clean") == 0 || strcmp(arg, "-clear") == 0)) {
-               cleanup = ISC_TRUE;
+               cleanup = true;
                arg = next_token(lex, text);
        }
 
        result = zone_from_args(server, lex, arg, &zone, NULL,
-                               text, ISC_FALSE);
+                               text, false);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -11169,7 +11169,7 @@ ns_server_sync(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                for (view = ISC_LIST_HEAD(server->viewlist);
                     view != NULL;
                     view = ISC_LIST_NEXT(view, link)) {
-                       result = dns_zt_apply(view->zonetable, ISC_FALSE,
+                       result = dns_zt_apply(view->zonetable, false,
                                              synczone, &cleanup);
                        if (result != ISC_R_SUCCESS &&
                            tresult == ISC_R_SUCCESS)
@@ -11217,7 +11217,7 @@ ns_server_sync(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
  * Act on a "freeze" or "thaw" command from the command channel.
  */
 isc_result_t
-ns_server_freeze(ns_server_t *server, isc_boolean_t freeze,
+ns_server_freeze(ns_server_t *server, bool freeze,
                 isc_lex_t *lex, isc_buffer_t **text)
 {
        isc_result_t result, tresult;
@@ -11227,11 +11227,11 @@ ns_server_freeze(ns_server_t *server, isc_boolean_t freeze,
        char zonename[DNS_NAME_FORMATSIZE];
        dns_view_t *view;
        const char *vname, *sep;
-       isc_boolean_t frozen;
+       bool frozen;
        const char *msg = NULL;
 
        result = zone_from_args(server, lex, NULL, &mayberaw, NULL,
-                               text, ISC_TRUE);
+                               text, true);
        if (result != ISC_R_SUCCESS)
                return (result);
        if (mayberaw == NULL) {
@@ -11266,7 +11266,7 @@ ns_server_freeze(ns_server_t *server, isc_boolean_t freeze,
                return (DNS_R_NOTMASTER);
        }
 
-       if (freeze && !dns_zone_isdynamic(mayberaw, ISC_TRUE)) {
+       if (freeze && !dns_zone_isdynamic(mayberaw, true)) {
                dns_zone_detach(&mayberaw);
                return (DNS_R_NOTDYNAMIC);
        }
@@ -11380,7 +11380,7 @@ nzf_append(dns_view_t *view, const cfg_obj_t *zconfig) {
        isc_result_t result;
        off_t offset;
        FILE *fp = NULL;
-       isc_boolean_t offsetok = ISC_FALSE;
+       bool offsetok = false;
 
        LOCK(&view->new_zone_lock);
 
@@ -11388,7 +11388,7 @@ nzf_append(dns_view_t *view, const cfg_obj_t *zconfig) {
        CHECK(isc_stdio_seek(fp, 0, SEEK_END));
 
        CHECK(isc_stdio_tell(fp, &offset));
-       offsetok = ISC_TRUE;
+       offsetok = true;
        if (offset == 0)
                CHECK(add_comment(fp, view->name));
 
@@ -11502,7 +11502,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
        isc_result_t result;
        int status;
        dns_view_t *view;
-       isc_boolean_t commit = ISC_FALSE;
+       bool commit = false;
        isc_buffer_t *text = NULL;
        char namebuf[1024];
        MDB_val key, data;
@@ -11527,7 +11527,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
                        result = ISC_R_FAILURE;
                        goto cleanup;
                } else if (status != MDB_NOTFOUND) {
-                       commit = ISC_TRUE;
+                       commit = true;
                }
        } else {
                /* We're creating or overwriting the zone */
@@ -11575,7 +11575,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
                        goto cleanup;
                }
 
-               commit = ISC_TRUE;
+               commit = true;
        }
 
        result = ISC_R_SUCCESS;
@@ -11769,7 +11769,7 @@ nzd_env_reopen(dns_view_t *view) {
 }
 
 static isc_result_t
-nzd_close(MDB_txn **txnp, isc_boolean_t commit) {
+nzd_close(MDB_txn **txnp, bool commit) {
        isc_result_t result = ISC_R_SUCCESS;
        int status;
 
@@ -11818,7 +11818,7 @@ nzd_count(dns_view_t *view, int *countp) {
        *countp = statbuf.ms_entries;
 
  cleanup:
-       (void) nzd_close(&txn, ISC_FALSE);
+       (void) nzd_close(&txn, false);
 
        return (result);
 }
@@ -11829,7 +11829,7 @@ migrate_nzf(dns_view_t *view) {
        cfg_obj_t *nzf_config = NULL;
        int status, n;
        isc_buffer_t *text = NULL;
-       isc_boolean_t commit = ISC_FALSE;
+       bool commit = false;
        const cfg_obj_t *zonelist;
        const cfg_listelt_t *element;
        char tempname[PATH_MAX];
@@ -11943,7 +11943,7 @@ migrate_nzf(dns_view_t *view) {
                        goto cleanup;
                }
 
-               commit = ISC_TRUE;
+               commit = true;
        }
 
        result = ISC_R_SUCCESS;
@@ -11961,7 +11961,7 @@ migrate_nzf(dns_view_t *view) {
 
  cleanup:
        if (result != ISC_R_SUCCESS) {
-               (void) nzd_close(&txn, ISC_FALSE);
+               (void) nzd_close(&txn, false);
        } else {
                result = nzd_close(&txn, commit);
        }
@@ -12161,7 +12161,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
        dns_zone_t *zone = NULL;
 #ifndef HAVE_LMDB
        FILE *fp = NULL;
-       isc_boolean_t cleanup_config = ISC_FALSE;
+       bool cleanup_config = false;
 #else /* HAVE_LMDB */
        MDB_txn *txn = NULL;
        MDB_dbi dbi;
@@ -12215,7 +12215,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
        dns_view_thaw(view);
        result = configure_zone(cfg->config, zoneobj, cfg->vconfig,
                                server->mctx, view, &server->viewlist,
-                               cfg->actx, ISC_TRUE, ISC_FALSE, ISC_FALSE);
+                               cfg->actx, true, false, false);
        dns_view_freeze(view);
 
        isc_task_endexclusive(server->task);
@@ -12252,7 +12252,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
                CHECK(cfg_parser_mapadd(cfg->add_parser,
                                        cfg->nzf_config, z, "zone"));
        }
-       cleanup_config = ISC_TRUE;
+       cleanup_config = true;
 #endif /* HAVE_LMDB */
 
        /*
@@ -12282,7 +12282,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
        }
 
        /* Flag the zone as having been added at runtime */
-       dns_zone_setadded(zone, ISC_TRUE);
+       dns_zone_setadded(zone, true);
 
 #ifdef HAVE_LMDB
        /* Save the new zone configuration into the NZD */
@@ -12306,7 +12306,7 @@ do_addzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
        }
 #else /* HAVE_LMDB */
        if (txn != NULL)
-               (void) nzd_close(&txn, ISC_FALSE);
+               (void) nzd_close(&txn, false);
 #endif /* HAVE_LMDB */
 
        if (zone != NULL)
@@ -12322,8 +12322,8 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
 {
        isc_result_t result, tresult;
        dns_zone_t *zone = NULL;
-       isc_boolean_t added;
-       isc_boolean_t exclusive = ISC_FALSE;
+       bool added;
+       bool exclusive = false;
 #ifndef HAVE_LMDB
        FILE *fp = NULL;
        cfg_obj_t *z;
@@ -12350,7 +12350,7 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
 
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       exclusive = ISC_TRUE;
+       exclusive = true;
 
 #ifndef HAVE_LMDB
        /* Make sure we can open the configuration save file */
@@ -12380,10 +12380,10 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
        dns_view_thaw(view);
        result = configure_zone(cfg->config, zoneobj, cfg->vconfig,
                                server->mctx, view, &server->viewlist,
-                               cfg->actx, ISC_TRUE, ISC_FALSE, ISC_TRUE);
+                               cfg->actx, true, false, true);
        dns_view_freeze(view);
 
-       exclusive = ISC_FALSE;
+       exclusive = false;
        isc_task_endexclusive(server->task);
 
        if (result != ISC_R_SUCCESS) {
@@ -12508,7 +12508,7 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
                (void)isc_stdio_close(fp);
 #else /* HAVE_LMDB */
        if (txn != NULL)
-               (void) nzd_close(&txn, ISC_FALSE);
+               (void) nzd_close(&txn, false);
 #endif /* HAVE_LMDB */
 
        if (zone != NULL)
@@ -12523,7 +12523,7 @@ do_modzone(ns_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
 isc_result_t
 ns_server_changezone(ns_server_t *server, char *command, isc_buffer_t **text) {
        isc_result_t result;
-       isc_boolean_t addzone;
+       bool addzone;
        ns_cfgctx_t *cfg = NULL;
        cfg_obj_t *zoneconf = NULL;
        const cfg_obj_t *zoneobj = NULL;
@@ -12534,10 +12534,10 @@ ns_server_changezone(ns_server_t *server, char *command, isc_buffer_t **text) {
        dns_name_t *dnsname;
 
        if (strncasecmp(command, "add", 3) == 0)
-               addzone = ISC_TRUE;
+               addzone = true;
        else {
                INSIST(strncasecmp(command, "mod", 3) == 0);
-               addzone = ISC_FALSE;
+               addzone = false;
        }
 
        CHECK(newzone_parse(server, command, &view, &zoneconf,
@@ -12598,8 +12598,8 @@ ns_server_changezone(ns_server_t *server, char *command, isc_buffer_t **text) {
        return (result);
 }
 
-static isc_boolean_t
-inuse(const char* file, isc_boolean_t first, isc_buffer_t **text) {
+static bool
+inuse(const char* file, bool first, isc_buffer_t **text) {
        if (file != NULL && isc_file_exists(file)) {
                if (first)
                        (void) putstr(text,
@@ -12609,14 +12609,14 @@ inuse(const char* file, isc_boolean_t first, isc_buffer_t **text) {
                        (void) putstr(text, "\n");
                (void) putstr(text, file);
                (void) putnull(text);
-               return (ISC_FALSE);
+               return (false);
        }
        return (first);
 }
 
 typedef struct {
        dns_zone_t *zone;
-       isc_boolean_t cleanup;
+       bool cleanup;
 } ns_dzctx_t;
 
 /*
@@ -12630,7 +12630,7 @@ rmzone(isc_task_t *task, isc_event_t *event) {
        dns_view_t *view;
        ns_cfgctx_t *cfg;
        dns_db_t *dbp = NULL;
-       isc_boolean_t added;
+       bool added;
        isc_result_t result;
 #ifdef HAVE_LMDB
        MDB_txn *txn = NULL;
@@ -12770,7 +12770,7 @@ rmzone(isc_task_t *task, isc_event_t *event) {
 
 #ifdef HAVE_LMDB
        if (txn != NULL)
-               (void) nzd_close(&txn, ISC_FALSE);
+               (void) nzd_close(&txn, false);
 #endif
        if (raw != NULL)
                dns_zone_detach(&raw);
@@ -12790,9 +12790,9 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        dns_zone_t *mayberaw;
        dns_view_t *view = NULL;
        char zonename[DNS_NAME_FORMATSIZE];
-       isc_boolean_t cleanup = ISC_FALSE;
+       bool cleanup = false;
        const char *ptr;
-       isc_boolean_t added;
+       bool added;
        ns_dzctx_t *dz = NULL;
        isc_event_t *dzevent = NULL;
        isc_task_t *task = NULL;
@@ -12808,12 +12808,12 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                return (ISC_R_UNEXPECTEDEND);
 
        if (strcmp(ptr, "-clean") == 0 || strcmp(ptr, "-clear") == 0) {
-               cleanup = ISC_TRUE;
+               cleanup = true;
                ptr = next_token(lex, text);
        }
 
        CHECK(zone_from_args(server, lex, ptr, &zone, zonename,
-                            text, ISC_FALSE));
+                            text, false));
        if (zone == NULL) {
                result = ISC_R_UNEXPECTEDEND;
                goto cleanup;
@@ -12871,7 +12871,7 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        } else if (dns_zone_gettype(mayberaw) == dns_zone_slave ||
                   dns_zone_gettype(mayberaw) == dns_zone_stub)
        {
-               isc_boolean_t first;
+               bool first;
                const char *file;
 
                TCHECK(putstr(text, "zone '"));
@@ -12879,7 +12879,7 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                TCHECK(putstr(text, "' will be deleted."));
 
                file = dns_zone_getfile(mayberaw);
-               first = inuse(file, ISC_TRUE, text);
+               first = inuse(file, true, text);
 
                file = dns_zone_getjournal(mayberaw);
                first = inuse(file, first, text);
@@ -12983,14 +12983,14 @@ ns_server_showzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        dns_view_t *view = NULL;
        dns_zone_t *zone = NULL;
        ns_cfgctx_t *cfg = NULL;
-       isc_boolean_t exclusive = ISC_FALSE;
+       bool exclusive = false;
 #ifdef HAVE_LMDB
        cfg_obj_t *nzconfig = NULL;
 #endif /* HAVE_LMDB */
 
        /* Parse parameters */
        CHECK(zone_from_args(server, lex, NULL, &zone, zonename,
-                            text, ISC_TRUE));
+                            text, true));
        if (zone == NULL) {
                result = ISC_R_UNEXPECTEDEND;
                goto cleanup;
@@ -13007,7 +13007,7 @@ ns_server_showzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
 
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       exclusive = ISC_TRUE;
+       exclusive = true;
 
        /* Find the view statement */
        vconfig = find_name_in_list_from_map(cfg->config, "view", view->name);
@@ -13132,10 +13132,10 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        dns_dbversion_t *version = NULL;
        dns_rdatatype_t privatetype;
        dns_rdataset_t privset;
-       isc_boolean_t first = ISC_TRUE;
-       isc_boolean_t list = ISC_FALSE, clear = ISC_FALSE;
-       isc_boolean_t chain = ISC_FALSE;
-       isc_boolean_t setserial = ISC_FALSE;
+       bool first = true;
+       bool list = false, clear = false;
+       bool chain = false;
+       bool setserial = false;
        uint32_t serial = 0;
        char keystr[DNS_SECALG_FORMATSIZE + 7]; /* <5-digit keyid>/<alg> */
        unsigned short hash = 0, flags = 0, iter = 0, saltlen = 0;
@@ -13156,11 +13156,11 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                return (ISC_R_UNEXPECTEDEND);
 
        if (strcasecmp(ptr, "-list") == 0)
-               list = ISC_TRUE;
+               list = true;
        else if ((strcasecmp(ptr, "-clear") == 0)  ||
                 (strcasecmp(ptr, "-clean") == 0))
        {
-               clear = ISC_TRUE;
+               clear = true;
                ptr = next_token(lex, text);
                if (ptr == NULL)
                        return (ISC_R_UNEXPECTEDEND);
@@ -13169,7 +13169,7 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                char hashbuf[64], flagbuf[64], iterbuf[64];
                char nbuf[256];
 
-               chain = ISC_TRUE;
+               chain = true;
                ptr = next_token(lex, text);
                if (ptr == NULL)
                        return (ISC_R_UNEXPECTEDEND);
@@ -13225,12 +13225,12 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                if (ptr == NULL)
                        return (ISC_R_UNEXPECTEDEND);
                CHECK(isc_parse_uint32(&serial, ptr, 10));
-               setserial = ISC_TRUE;
+               setserial = true;
        } else
                CHECK(DNS_R_SYNTAX);
 
        CHECK(zone_from_args(server, lex, NULL, &zone, NULL,
-                            text, ISC_FALSE));
+                            text, false));
        if (zone == NULL)
                CHECK(ISC_R_UNEXPECTEDEND);
 
@@ -13242,7 +13242,7 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                CHECK(dns_zone_setnsec3param(zone, (uint8_t)hash,
                                             (uint8_t)flags, iter,
                                             (uint8_t)saltlen, salt,
-                                            ISC_TRUE));
+                                            true));
                (void) putstr(text, "nsec3param request queued");
                (void) putnull(text);
        } else if (setserial) {
@@ -13253,7 +13253,7 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                privatetype = dns_zone_getprivatetype(zone);
                origin = dns_zone_getorigin(zone);
                CHECK(dns_zone_getdb(zone, &db));
-               CHECK(dns_db_findnode(db, origin, ISC_FALSE, &node));
+               CHECK(dns_db_findnode(db, origin, false, &node));
                dns_db_currentversion(db, &version);
 
                result = dns_db_findrdataset(db, node, version, privatetype,
@@ -13281,7 +13281,7 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                        if (!first)
                                CHECK(putstr(text, "\n"));
                        CHECK(putstr(text, output));
-                       first = ISC_FALSE;
+                       first = false;
                }
                if (!first)
                        CHECK(putnull(text));
@@ -13296,7 +13296,7 @@ ns_server_signing(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        if (node != NULL)
                dns_db_detachnode(db, &node);
        if (version != NULL)
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
        if (db != NULL)
                dns_db_detach(&db);
        if (zone != NULL)
@@ -13358,9 +13358,9 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
        isc_time_t loadtime, expiretime, refreshtime;
        isc_time_t refreshkeytime, resigntime;
        dns_zonetype_t zonetype;
-       isc_boolean_t dynamic = ISC_FALSE, frozen = ISC_FALSE;
-       isc_boolean_t hasraw = ISC_FALSE;
-       isc_boolean_t secure, maintain, allow;
+       bool dynamic = false, frozen = false;
+       bool hasraw = false;
+       bool secure, maintain, allow;
        dns_db_t *db = NULL, *rawdb = NULL;
        char **incfiles = NULL;
        int nfiles = 0;
@@ -13372,7 +13372,7 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
        isc_time_settoepoch(&resigntime);
 
        CHECK(zone_from_args(server, lex, NULL, &zone, zonename,
-                            text, ISC_TRUE));
+                            text, true));
        if (zone == NULL) {
                result = ISC_R_UNEXPECTEDEND;
                goto cleanup;
@@ -13381,7 +13381,7 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
        /* Inline signing? */
        CHECK(dns_zone_getdb(zone, &db));
        dns_zone_getraw(zone, &raw);
-       hasraw = ISC_TF(raw != NULL);
+       hasraw = (raw != NULL);
        if (hasraw) {
                mayberaw = raw;
                zonetype = dns_zone_gettype(raw);
@@ -13431,9 +13431,8 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
 
        /* Security */
        secure = dns_db_issecure(db);
-       allow = ISC_TF((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW) != 0);
-       maintain = ISC_TF((dns_zone_getkeyopts(zone) &
-                          DNS_ZONEKEY_MAINTAIN) != 0);
+       allow = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW);
+       maintain = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN);
 
        /* Master files */
        file = dns_zone_getfile(mayberaw);
@@ -13465,8 +13464,8 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
 
        /* Dynamic? */
        if (zonetype == dns_zone_master) {
-               dynamic = dns_zone_isdynamic(mayberaw, ISC_TRUE);
-               frozen = dynamic && !dns_zone_isdynamic(mayberaw, ISC_FALSE);
+               dynamic = dns_zone_isdynamic(mayberaw, true);
+               frozen = dynamic && !dns_zone_isdynamic(mayberaw, false);
        }
 
        /* Next resign event */
@@ -13624,23 +13623,23 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
        return (result);
 }
 
-static inline isc_boolean_t
+static inline bool
 argcheck(char *cmd, const char *full) {
        size_t l;
 
        if (cmd == NULL || cmd[0] != '-')
-               return (ISC_FALSE);
+               return (false);
 
        cmd++;
        l = strlen(cmd);
        if (l > strlen(full) || strncasecmp(cmd, full, l) != 0)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 isc_result_t
-ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
+ns_server_nta(ns_server_t *server, isc_lex_t *lex, bool readonly,
              isc_buffer_t **text)
 {
        dns_view_t *view;
@@ -13652,11 +13651,11 @@ ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
        isc_time_t t;
        char tbuf[64];
        const char *msg = NULL;
-       isc_boolean_t dump = ISC_FALSE, force = ISC_FALSE;
+       bool dump = false, force = false;
        dns_fixedname_t fn;
        dns_name_t *ntaname;
        dns_ttl_t ntattl;
-       isc_boolean_t ttlset = ISC_FALSE, excl = ISC_FALSE;
+       bool ttlset = false, excl = false;
 
        UNUSED(force);
 
@@ -13674,12 +13673,12 @@ ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
                        return (ISC_R_UNEXPECTEDEND);
 
                if (argcheck(ptr, "dump"))
-                       dump = ISC_TRUE;
+                       dump = true;
                else if (argcheck(ptr, "remove")) {
                        ntattl = 0;
-                       ttlset = ISC_TRUE;
+                       ttlset = true;
                } else if (argcheck(ptr, "force")) {
-                       force = ISC_TRUE;
+                       force = true;
                        continue;
                } else if (argcheck(ptr, "lifetime")) {
                        isc_textregion_t tr;
@@ -13703,7 +13702,7 @@ ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
                                CHECK(ISC_R_RANGE);
                        }
 
-                       ttlset = ISC_TRUE;
+                       ttlset = true;
                        continue;
                } else
                        nametext = ptr;
@@ -13764,7 +13763,7 @@ ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
 
        result = isc_task_beginexclusive(server->task);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
-       excl = ISC_TRUE;
+       excl = true;
        for (view = ISC_LIST_HEAD(server->viewlist);
             view != NULL;
             view = ISC_LIST_NEXT(view, link))
@@ -13788,7 +13787,7 @@ ns_server_nta(ns_server_t *server, isc_lex_t *lex, isc_boolean_t readonly,
                        continue;
                }
 
-               result = dns_view_flushnode(view, ntaname, ISC_TRUE);
+               result = dns_view_flushnode(view, ntaname, true);
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_SERVER, ISC_LOG_INFO,
                              "flush tree '%s' in cache view '%s': %s",
@@ -13961,7 +13960,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
                        dns_keytag_t keyid;
                        isc_region_t r;
                        isc_time_t t;
-                       isc_boolean_t revoked;
+                       bool revoked;
 
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(kdset, &rdata);
@@ -13979,7 +13978,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
                        snprintf(buf, sizeof(buf), "\n\talgorithm: %s", alg);
                        CHECK(putstr(text, buf));
 
-                       revoked = ISC_TF((kd.flags & DNS_KEYFLAG_REVOKE) != 0);
+                       revoked = (kd.flags & DNS_KEYFLAG_REVOKE);
                        snprintf(buf, sizeof(buf), "\n\tflags:%s%s%s",
                                 revoked ? " REVOKE" : "",
                                 ((kd.flags & DNS_KEYFLAG_KSK) != 0)
@@ -14025,7 +14024,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
  cleanup:
        if (ver != NULL) {
                dns_rriterator_destroy(&rrit);
-               dns_db_closeversion(db, &ver, ISC_FALSE);
+               dns_db_closeversion(db, &ver, false);
        }
        if (db != NULL)
                dns_db_detach(&db);
@@ -14066,8 +14065,8 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        dns_rdataclass_t rdclass;
        char msg[DNS_NAME_FORMATSIZE + 500] = "";
        enum { NONE, STATUS, REFRESH, SYNC } opt = NONE;
-       isc_boolean_t found = ISC_FALSE;
-       isc_boolean_t first = ISC_TRUE;
+       bool found = false;
+       bool first = true;
 
        /* Skip rndc command name */
        cmd = next_token(lex, text);
@@ -14139,7 +14138,7 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                                continue;
                }
 
-               found = ISC_TRUE;
+               found = true;
 
                switch (opt) {
                case REFRESH:
@@ -14149,7 +14148,7 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                        if (!first)
                                CHECK(putstr(text, "\n\n"));
                        CHECK(mkey_status(view, text));
-                       first = ISC_FALSE;
+                       first = false;
                        break;
                case SYNC:
                        CHECK(dns_zone_flush(view->managed_keys));
@@ -14177,7 +14176,7 @@ ns_server_dnstap(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
 #ifdef HAVE_DNSTAP
        char *ptr;
        isc_result_t result;
-       isc_boolean_t reopen = ISC_FALSE;
+       bool reopen = false;
        int backups = 0;
 
        if (server->dtenv == NULL)
@@ -14190,7 +14189,7 @@ ns_server_dnstap(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
 
        /* "dnstap-reopen" was used in 9.11.0b1 */
        if (strcasecmp(ptr, "dnstap-reopen") == 0) {
-               reopen = ISC_TRUE;
+               reopen = true;
        } else {
                ptr = next_token(lex, text);
                if (ptr == NULL)
index 7758ea16a1d8ff3ca081faa81bcb481f478db4e6..b1559f86015c754d8d5d64464f3999fa68e8285d 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/httpd.h>
@@ -1200,8 +1201,8 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
        FILE *fp;
        char typebuf[64];
        const char *typestr;
-       isc_boolean_t nxrrset = ISC_FALSE;
-       isc_boolean_t stale = ISC_FALSE;
+       bool nxrrset = false;
+       bool stale = false;
 #ifdef HAVE_LIBXML2
        xmlTextWriterPtr writer;
        int xmlrc;
@@ -1225,11 +1226,11 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
 
        if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_NXRRSET)
            != 0)
-               nxrrset = ISC_TRUE;
+               nxrrset = true;
 
        if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_STALE)
            != 0)
-               stale = ISC_TRUE;
+               stale = true;
 
        switch (dumparg->type) {
        case isc_statsformat_file:
@@ -1827,7 +1828,7 @@ generatexml(ns_server_t *server, uint32_t flags,
                if ((flags & STATS_XML_ZONES) != 0) {
                        TRY0(xmlTextWriterStartElement(writer,
                                                       ISC_XMLCHAR "zones"));
-                       result = dns_zt_apply(view->zonetable, ISC_TRUE,
+                       result = dns_zt_apply(view->zonetable, true,
                                              zone_xmlrender, writer);
                        if (result != ISC_R_SUCCESS)
                                goto error;
@@ -2139,7 +2140,7 @@ wrap_jsonfree(isc_buffer_t *buffer, void *arg) {
 
 static json_object *
 addzone(char *name, char *classname, const char *ztype,
-       uint32_t serial, isc_boolean_t add_serial)
+       uint32_t serial, bool add_serial)
 {
        json_object *node = json_object_new_object();
 
@@ -2187,10 +2188,10 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
 
        if (dns_zone_getserial2(zone, &serial) != ISC_R_SUCCESS)
                zoneobj = addzone(zone_name_only, class_only,
-                                 user_zonetype(zone), 0, ISC_FALSE);
+                                 user_zonetype(zone), 0, false);
        else
                zoneobj = addzone(zone_name_only, class_only,
-                                 user_zonetype(zone), serial, ISC_TRUE);
+                                 user_zonetype(zone), serial, true);
 
        if (zoneobj == NULL)
                return (ISC_R_NOMEMORY);
@@ -2483,7 +2484,7 @@ generatejson(ns_server_t *server, size_t *msglen,
                        CHECKMEM(za);
 
                        if ((flags & STATS_JSON_ZONES) != 0) {
-                               result = dns_zt_apply(view->zonetable, ISC_TRUE,
+                               result = dns_zt_apply(view->zonetable, true,
                                                      zone_jsonrender, za);
                                if (result != ISC_R_SUCCESS) {
                                        goto error;
@@ -3036,7 +3037,7 @@ shutdown_listener(ns_statschannel_t *listener) {
        isc_httpdmgr_shutdown(&listener->httpdmgr);
 }
 
-static isc_boolean_t
+static bool
 client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
        ns_statschannel_t *listener = arg;
        isc_netaddr_t netaddr;
@@ -3051,7 +3052,7 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
        if (dns_acl_match(&netaddr, NULL, listener->acl, &ns_g_server->aclenv,
                          &match, NULL) == ISC_R_SUCCESS && match > 0) {
                UNLOCK(&listener->lock);
-               return (ISC_TRUE);
+               return (true);
        }
        UNLOCK(&listener->lock);
 
@@ -3060,7 +3061,7 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
                      NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
                      "rejected statistics connection from %s", socktext);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -3132,7 +3133,7 @@ add_listener(ns_server_t *server, ns_statschannel_t **listenerp,
        isc_socket_setname(sock, "statchannel", NULL);
 
 #ifndef ISC_ALLOW_MAPPED
-       isc_socket_ipv6only(sock, ISC_TRUE);
+       isc_socket_ipv6only(sock, true);
 #endif
 
        result = isc_socket_bind(sock, addr, ISC_SOCKET_REUSEADDRESS);
@@ -3187,7 +3188,7 @@ add_listener(ns_server_t *server, ns_statschannel_t **listenerp,
        isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/traffic",
                            render_json_traffic, server);
 #endif
-       isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.xsl", ISC_TRUE,
+       isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.xsl", true,
                             render_xsl, server);
 
        *listenerp = listener;
index 4da7a71fed89c9fb0f4697be4142d804cf875f46..6cbf132a88521caf00f90ac480c561889828980b 100644 (file)
@@ -103,7 +103,7 @@ ns_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
                isc_buffer_add(&b, strlen(s));
                name = dns_fixedname_initname(&fname);
                RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
-               RETERR(dst_gssapi_acquirecred(name, ISC_FALSE, &tctx->gsscred));
+               RETERR(dst_gssapi_acquirecred(name, false, &tctx->gsscred));
        }
 
        obj = NULL;
index f91e2d494250e30e597a9554033d64697b3b3966..3426f928678bf15c387dae733d5cc384e990c4c5 100644 (file)
@@ -110,7 +110,7 @@ add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
 
                isc_stdtime_get(&now);
                ret = dns_tsigkey_create(&keyname, alg, secret, secretlen,
-                                        ISC_FALSE, NULL, now, now,
+                                        false, NULL, now, now,
                                         mctx, ring, &tsigkey);
                isc_mem_put(mctx, secret, secretalloc);
                secret = NULL;
index 30c0a0a83d7e0b2474da14828fbe43f67569c37f..f4dc47ca217aec0d7cc664e8a71b5ad08ba5f3e7 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <stdio.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <dlfcn.h>
@@ -44,7 +45,7 @@ typedef struct dlopen_data {
        unsigned int flags;
        isc_mutex_t lock;
        int version;
-       isc_boolean_t in_configure;
+       bool in_configure;
 
        dlz_dlopen_version_t *dlz_version;
        dlz_dlopen_create_t *dlz_create;
@@ -67,14 +68,14 @@ typedef struct dlopen_data {
 #define MAYBE_LOCK(cd) \
        do { \
                if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
-                   cd->in_configure == ISC_FALSE) \
+                   cd->in_configure == false) \
                        LOCK(&cd->lock); \
        } while (0)
 
 #define MAYBE_UNLOCK(cd) \
        do { \
                if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
-                   cd->in_configure == ISC_FALSE) \
+                   cd->in_configure == false) \
                        UNLOCK(&cd->lock); \
        } while (0)
 
@@ -194,7 +195,7 @@ dlopen_dlz_lookup(const char *zone, const char *name, void *driverarg,
  * Load a symbol from the library
  */
 static void *
-dl_load_symbol(dlopen_data_t *cd, const char *symbol, isc_boolean_t mandatory) {
+dl_load_symbol(dlopen_data_t *cd, const char *symbol, bool mandatory) {
        void *ptr = dlsym(cd->dl_handle, symbol);
        if (ptr == NULL && mandatory) {
                dlopen_log(ISC_LOG_ERROR,
@@ -282,13 +283,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
 
        /* Find the symbols */
        cd->dlz_version = (dlz_dlopen_version_t *)
-               dl_load_symbol(cd, "dlz_version", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_version", true);
        cd->dlz_create = (dlz_dlopen_create_t *)
-               dl_load_symbol(cd, "dlz_create", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_create", true);
        cd->dlz_lookup = (dlz_dlopen_lookup_t *)
-               dl_load_symbol(cd, "dlz_lookup", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_lookup", true);
        cd->dlz_findzonedb = (dlz_dlopen_findzonedb_t *)
-               dl_load_symbol(cd, "dlz_findzonedb", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_findzonedb", true);
 
        if (cd->dlz_create == NULL ||
            cd->dlz_version == NULL ||
@@ -301,29 +302,29 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
        }
 
        cd->dlz_allowzonexfr = (dlz_dlopen_allowzonexfr_t *)
-               dl_load_symbol(cd, "dlz_allowzonexfr", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_allowzonexfr", false);
        cd->dlz_allnodes = (dlz_dlopen_allnodes_t *)
                dl_load_symbol(cd, "dlz_allnodes",
-                              ISC_TF(cd->dlz_allowzonexfr != NULL));
+                              (cd->dlz_allowzonexfr != NULL));
        cd->dlz_authority = (dlz_dlopen_authority_t *)
-               dl_load_symbol(cd, "dlz_authority", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_authority", false);
        cd->dlz_newversion = (dlz_dlopen_newversion_t *)
-               dl_load_symbol(cd, "dlz_newversion", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_newversion", false);
        cd->dlz_closeversion = (dlz_dlopen_closeversion_t *)
                dl_load_symbol(cd, "dlz_closeversion",
-                              ISC_TF(cd->dlz_newversion != NULL));
+                              (cd->dlz_newversion != NULL));
        cd->dlz_configure = (dlz_dlopen_configure_t *)
-               dl_load_symbol(cd, "dlz_configure", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_configure", false);
        cd->dlz_ssumatch = (dlz_dlopen_ssumatch_t *)
-               dl_load_symbol(cd, "dlz_ssumatch", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_ssumatch", false);
        cd->dlz_addrdataset = (dlz_dlopen_addrdataset_t *)
-               dl_load_symbol(cd, "dlz_addrdataset", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_addrdataset", false);
        cd->dlz_subrdataset = (dlz_dlopen_subrdataset_t *)
-               dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_subrdataset", false);
        cd->dlz_delrdataset = (dlz_dlopen_delrdataset_t *)
-               dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_delrdataset", false);
        cd->dlz_destroy = (dlz_dlopen_destroy_t *)
-               dl_load_symbol(cd, "dlz_destroy", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_destroy", false);
 
        /* Check the version of the API is the same */
        cd->version = cd->dlz_version(&cd->flags);
@@ -436,7 +437,7 @@ dlopen_dlz_newversion(const char *zone, void *driverarg, void *dbdata,
  * Called to end a transaction
  */
 static void
-dlopen_dlz_closeversion(const char *zone, isc_boolean_t commit,
+dlopen_dlz_closeversion(const char *zone, bool commit,
                        void *driverarg, void *dbdata, void **versionp)
 {
        dlopen_data_t *cd = (dlopen_data_t *) dbdata;
@@ -469,9 +470,9 @@ dlopen_dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
                return (ISC_R_SUCCESS);
 
        MAYBE_LOCK(cd);
-       cd->in_configure = ISC_TRUE;
+       cd->in_configure = true;
        result = cd->dlz_configure(view, dlzdb, cd->dbdata);
-       cd->in_configure = ISC_FALSE;
+       cd->in_configure = false;
        MAYBE_UNLOCK(cd);
 
        return (result);
@@ -481,18 +482,18 @@ dlopen_dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
 /*
  * Check for authority to change a name.
  */
-static isc_boolean_t
+static bool
 dlopen_dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
                    const char *type, const char *key, uint32_t keydatalen,
                    unsigned char *keydata, void *driverarg, void *dbdata)
 {
        dlopen_data_t *cd = (dlopen_data_t *) dbdata;
-       isc_boolean_t ret;
+       bool ret;
 
        UNUSED(driverarg);
 
        if (cd->dlz_ssumatch == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        MAYBE_LOCK(cd);
        ret = cd->dlz_ssumatch(signer, name, tcpaddr, type, key, keydatalen,
index be89b9992b9c04e6bdc6bf33ce50eb71b23d19ac..5415b83b051da0c4a8c3ba46d9d2b6ec8c21a8bb 100644 (file)
@@ -15,6 +15,7 @@
 /*! \file */
 
 #include <pwd.h>
+#include <stdbool.h>
 
 #include <isc/types.h>
 
@@ -49,12 +50,12 @@ void
 ns_os_minprivs(void);
 
 FILE *
-ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user);
+ns_os_openfile(const char *filename, mode_t mode, bool switch_user);
 
 void
-ns_os_writepidfile(const char *filename, isc_boolean_t first_time);
+ns_os_writepidfile(const char *filename, bool first_time);
 
-isc_boolean_t
+bool
 ns_os_issingleton(const char *filename);
 
 void
index 230dbaa1f6d71657739bf0b405b8710cedf18da6..809cede37546f820761ab580b2ff59086a0f491c 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 #include <stdarg.h>
+#include <stdbool.h>
 
 #include <sys/types.h> /* dev_t FreeBSD 2.1 */
 #include <sys/stat.h>
@@ -107,13 +108,13 @@ static pid_t mainpid = 0;
 #endif
 
 static struct passwd *runas_pw = NULL;
-static isc_boolean_t done_setuid = ISC_FALSE;
+static bool done_setuid = false;
 static int dfd[2] = { -1, -1 };
 
 #ifdef HAVE_LINUX_CAPABILITY_H
 
-static isc_boolean_t non_root = ISC_FALSE;
-static isc_boolean_t non_root_caps = ISC_FALSE;
+static bool non_root = false;
+static bool non_root_caps = false;
 
 #ifdef HAVE_SYS_CAPABILITY_H
 #include <sys/capability.h>
@@ -388,9 +389,9 @@ linux_keepcaps(void) {
                        ns_main_earlyfatal("prctl() failed: %s", strbuf);
                }
        } else {
-               non_root_caps = ISC_TRUE;
+               non_root_caps = true;
                if (getuid() != 0)
-                       non_root = ISC_TRUE;
+                       non_root = true;
        }
 }
 #endif
@@ -526,16 +527,16 @@ ns_os_closedevnull(void) {
        }
 }
 
-static isc_boolean_t
+static bool
 all_digits(const char *s) {
        if (*s == '\0')
-               return (ISC_FALSE);
+               return (false);
        while (*s != '\0') {
                if (!isdigit((*s)&0xff))
-                       return (ISC_FALSE);
+                       return (false);
                s++;
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 void
@@ -594,7 +595,7 @@ ns_os_changeuser(void) {
        if (runas_pw == NULL || done_setuid)
                return;
 
-       done_setuid = ISC_TRUE;
+       done_setuid = true;
 
 #ifdef HAVE_LINUXTHREADS
 #ifdef HAVE_LINUX_CAPABILITY_H
@@ -676,7 +677,7 @@ ns_os_minprivs(void) {
 }
 
 static int
-safe_open(const char *filename, mode_t mode, isc_boolean_t append) {
+safe_open(const char *filename, mode_t mode, bool append) {
        int fd;
        struct stat sb;
 
@@ -830,7 +831,7 @@ setperms(uid_t uid, gid_t gid) {
 }
 
 FILE *
-ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
+ns_os_openfile(const char *filename, mode_t mode, bool switch_user) {
        char strbuf[ISC_STRERRORSIZE], *f;
        FILE *fp;
        int fd;
@@ -858,7 +859,7 @@ ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
                /* Set UID/GID to the one we'll be running with eventually */
                setperms(runas_pw->pw_uid, runas_pw->pw_gid);
 
-               fd = safe_open(filename, mode, ISC_FALSE);
+               fd = safe_open(filename, mode, false);
 
 #ifndef HAVE_LINUXTHREADS
                /* Restore UID/GID to root */
@@ -867,7 +868,7 @@ ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
 
                if (fd == -1) {
 #ifndef HAVE_LINUXTHREADS
-                       fd = safe_open(filename, mode, ISC_FALSE);
+                       fd = safe_open(filename, mode, false);
                        if (fd != -1) {
                                ns_main_earlywarning("Required root "
                                                     "permissions to open "
@@ -888,7 +889,7 @@ ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
 #endif /* HAVE_LINUXTHREADS */
                }
        } else {
-               fd = safe_open(filename, mode, ISC_FALSE);
+               fd = safe_open(filename, mode, false);
        }
 
        if (fd < 0) {
@@ -909,7 +910,7 @@ ns_os_openfile(const char *filename, mode_t mode, isc_boolean_t switch_user) {
 }
 
 void
-ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
+ns_os_writepidfile(const char *filename, bool first_time) {
        FILE *fh;
        pid_t pid;
        char strbuf[ISC_STRERRORSIZE];
@@ -959,16 +960,16 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
        (void)fclose(fh);
 }
 
-isc_boolean_t
+bool
 ns_os_issingleton(const char *filename) {
        char strbuf[ISC_STRERRORSIZE];
        struct flock lock;
 
        if (singletonfd != -1)
-               return (ISC_TRUE);
+               return (true);
 
        if (strcasecmp(filename, "none") == 0)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Make the containing directory if it doesn't exist.
@@ -983,7 +984,7 @@ ns_os_issingleton(const char *filename) {
                if (ret == -1) {
                        ns_main_earlywarning("couldn't create '%s'", filename);
                        cleanup_lockfile();
-                       return (ISC_FALSE);
+                       return (false);
                }
        }
 
@@ -995,7 +996,7 @@ ns_os_issingleton(const char *filename) {
                           S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
        if (singletonfd == -1) {
                cleanup_lockfile();
-               return (ISC_FALSE);
+               return (false);
        }
 
        memset(&lock, 0, sizeof(lock));
@@ -1008,10 +1009,10 @@ ns_os_issingleton(const char *filename) {
        if (fcntl(singletonfd, F_SETLK, &lock) == -1) {
                close(singletonfd);
                singletonfd = -1;
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 void
index fba51b6112d48f8a75538efef98c17ef282eed2f..973dda52c6886c1cf652c633c6f22378f22fdacb 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/netaddr.h>
 #include <isc/print.h>
@@ -235,7 +236,7 @@ typedef struct {
        dns_name_t *oldname;
        dns_rdata_t *update_rr;
        dns_ttl_t update_rr_ttl;
-       isc_boolean_t ignore_add;
+       bool ignore_add;
        dns_diff_t del_diff;
        dns_diff_t add_diff;
 } add_rr_prepare_ctx_t;
@@ -269,7 +270,7 @@ update_log(ns_client_t *client, dns_zone_t *zone,
        if (client == NULL || zone == NULL)
                return;
 
-       if (isc_log_wouldlog(ns_g_lctx, level) == ISC_FALSE)
+       if (isc_log_wouldlog(ns_g_lctx, level) == false)
                return;
 
        dns_name_format(dns_zone_getorigin(zone), namebuf,
@@ -320,7 +321,7 @@ checkqueryacl(ns_client_t *client, dns_acl_t *queryacl, dns_name_t *zonename,
        int level;
        isc_result_t result;
 
-       result = ns_client_checkaclsilent(client, NULL, queryacl, ISC_TRUE);
+       result = ns_client_checkaclsilent(client, NULL, queryacl, true);
        if (result != ISC_R_SUCCESS) {
                dns_name_format(zonename, namebuf, sizeof(namebuf));
                dns_rdataclass_format(client->view->rdclass, classbuf,
@@ -362,8 +363,8 @@ checkqueryacl(ns_client_t *client, dns_acl_t *queryacl, dns_name_t *zonename,
  */
 static isc_result_t
 checkupdateacl(ns_client_t *client, dns_acl_t *acl, const char *message,
-              dns_name_t *zonename, isc_boolean_t slave,
-              isc_boolean_t has_ssutable)
+              dns_name_t *zonename, bool slave,
+              bool has_ssutable)
 {
        char namebuf[DNS_NAME_FORMATSIZE];
        char classbuf[DNS_RDATACLASS_FORMATSIZE];
@@ -376,7 +377,7 @@ checkupdateacl(ns_client_t *client, dns_acl_t *acl, const char *message,
                level = ISC_LOG_DEBUG(3);
                msg = "disabled";
        } else {
-               result = ns_client_checkaclsilent(client, NULL, acl, ISC_FALSE);
+               result = ns_client_checkaclsilent(client, NULL, acl, false);
                if (result == ISC_R_SUCCESS) {
                        level = ISC_LOG_DEBUG(3);
                        msg = "approved";
@@ -570,10 +571,10 @@ foreach_rrset(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
         */
        dns_db_currentversion(db, &oldver);
        dns_clientinfo_init(&ci, NULL, (ver != oldver) ? ver : NULL);
-       dns_db_closeversion(db, &oldver, ISC_FALSE);
+       dns_db_closeversion(db, &oldver, false);
 
        node = NULL;
-       result = dns_db_findnodeext(db, name, ISC_FALSE, &cm, &ci, &node);
+       result = dns_db_findnodeext(db, name, false, &cm, &ci, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -663,7 +664,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
         */
        dns_db_currentversion(db, &oldver);
        dns_clientinfo_init(&ci, NULL, (ver != oldver) ? ver : NULL);
-       dns_db_closeversion(db, &oldver, ISC_FALSE);
+       dns_db_closeversion(db, &oldver, false);
 
        if (type == dns_rdatatype_any)
                return (foreach_node_rr(db, ver, name,
@@ -672,9 +673,9 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        node = NULL;
        if (type == dns_rdatatype_nsec3 ||
            (type == dns_rdatatype_rrsig && covers == dns_rdatatype_nsec3))
-               result = dns_db_findnsec3node(db, name, ISC_FALSE, &node);
+               result = dns_db_findnsec3node(db, name, false, &node);
        else
-               result = dns_db_findnodeext(db, name, ISC_FALSE,
+               result = dns_db_findnodeext(db, name, false,
                                            &cm, &ci, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
@@ -731,7 +732,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
  * Function type for predicate functions that compare a database RR 'db_rr'
  * against an update RR 'update_rr'.
  */
-typedef isc_boolean_t rr_predicate(dns_rdata_t *update_rr, dns_rdata_t *db_rr);
+typedef bool rr_predicate(dns_rdata_t *update_rr, dns_rdata_t *db_rr);
 
 /*%
  * Helper function for rrset_exists().
@@ -747,7 +748,7 @@ rrset_exists_action(void *data, rr_t *rr) {
  * Utility macro for RR existence checking functions.
  *
  * If the variable 'result' has the value ISC_R_EXISTS or
- * ISC_R_SUCCESS, set *exists to ISC_TRUE or ISC_FALSE,
+ * ISC_R_SUCCESS, set *exists to true or false,
  * respectively, and return success.
  *
  * If 'result' has any other value, there was a failure.
@@ -758,9 +759,9 @@ rrset_exists_action(void *data, rr_t *rr) {
  */
 #define RETURN_EXISTENCE_FLAG                          \
        return ((result == ISC_R_EXISTS) ?              \
-               (*exists = ISC_TRUE, ISC_R_SUCCESS) :   \
+               (*exists = true, ISC_R_SUCCESS) :       \
                ((result == ISC_R_SUCCESS) ?            \
-                (*exists = ISC_FALSE, ISC_R_SUCCESS) : \
+                (*exists = false, ISC_R_SUCCESS) :     \
                 result))
 
 /*%
@@ -770,7 +771,7 @@ rrset_exists_action(void *data, rr_t *rr) {
 static isc_result_t
 rrset_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
             dns_rdatatype_t type, dns_rdatatype_t covers,
-            isc_boolean_t *exists)
+            bool *exists)
 {
        isc_result_t result;
        result = foreach_rr(db, ver, name, type, covers,
@@ -795,12 +796,12 @@ cname_compatibility_action(void *data, dns_rdataset_t *rrset) {
  * i.e., anything but another CNAME (which can be replaced) or a
  * DNSSEC RR (which can coexist).
  *
- * If such an incompatible rrset exists, set '*exists' to ISC_TRUE.
- * Otherwise, set it to ISC_FALSE.
+ * If such an incompatible rrset exists, set '*exists' to true.
+ * Otherwise, set it to false.
  */
 static isc_result_t
 cname_incompatible_rrset_exists(dns_db_t *db, dns_dbversion_t *ver,
-                               dns_name_t *name, isc_boolean_t *exists) {
+                               dns_name_t *name, bool *exists) {
        isc_result_t result;
        result = foreach_rrset(db, ver, name,
                               cname_compatibility_action, NULL);
@@ -846,7 +847,7 @@ name_exists_action(void *data, dns_rdataset_t *rrset) {
  */
 static isc_result_t
 name_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-           isc_boolean_t *exists)
+           bool *exists)
 {
        isc_result_t result;
        result = foreach_rrset(db, ver, name,
@@ -870,7 +871,7 @@ typedef struct {
        isc_netaddr_t *addr;
 
        /* Whether the request was sent via TCP. */
-       isc_boolean_t tcp;
+       bool tcp;
 
        /* The ssu table to check against. */
        dns_ssutable_t *table;
@@ -882,7 +883,7 @@ typedef struct {
 static isc_result_t
 ssu_checkrule(void *data, dns_rdataset_t *rrset) {
        ssu_check_t *ssuinfo = data;
-       isc_boolean_t result;
+       bool result;
 
        /*
         * If we're deleting all records, it's ok to delete RRSIG and NSEC even
@@ -895,13 +896,13 @@ ssu_checkrule(void *data, dns_rdataset_t *rrset) {
                                          ssuinfo->name, ssuinfo->addr,
                                          ssuinfo->tcp, &ns_g_server->aclenv,
                                          rrset->type, ssuinfo->key);
-       return (result == ISC_TRUE ? ISC_R_SUCCESS : ISC_R_FAILURE);
+       return (result == true ? ISC_R_SUCCESS : ISC_R_FAILURE);
 }
 
-static isc_boolean_t
+static bool
 ssu_checkall(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
             dns_ssutable_t *ssutable, dns_name_t *signer,
-            isc_netaddr_t *addr, isc_boolean_t tcp, dst_key_t *key)
+            isc_netaddr_t *addr, bool tcp, dst_key_t *key)
 {
        isc_result_t result;
        ssu_check_t ssuinfo;
@@ -913,7 +914,7 @@ ssu_checkall(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        ssuinfo.tcp = tcp;
        ssuinfo.key = key;
        result = foreach_rrset(db, ver, name, ssu_checkrule, &ssuinfo);
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
 /**************************************************************************/
@@ -1027,7 +1028,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
 
                /* A new unique name begins here. */
                node = NULL;
-               result = dns_db_findnode(db, name, ISC_FALSE, &node);
+               result = dns_db_findnode(db, name, false, &node);
                if (result == ISC_R_NOTFOUND) {
                        dns_diff_clear(&trash);
                        return (DNS_R_NXRRSET);
@@ -1165,7 +1166,7 @@ typedef struct {
  * Return true iff 'db_rr' is neither a SOA nor an NS RR nor
  * an RRSIG nor an NSEC3PARAM nor a NSEC.
  */
-static isc_boolean_t
+static bool
 type_not_soa_nor_ns_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        UNUSED(update_rr);
        return ((db_rr->type != dns_rdatatype_soa &&
@@ -1173,34 +1174,34 @@ type_not_soa_nor_ns_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
                 db_rr->type != dns_rdatatype_nsec3param &&
                 db_rr->type != dns_rdatatype_rrsig &&
                 db_rr->type != dns_rdatatype_nsec) ?
-               ISC_TRUE : ISC_FALSE);
+               true : false);
 }
 
 /*%
  * Return true iff 'db_rr' is neither a RRSIG nor a NSEC.
  */
-static isc_boolean_t
+static bool
 type_not_dnssec(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        UNUSED(update_rr);
        return ((db_rr->type != dns_rdatatype_rrsig &&
                 db_rr->type != dns_rdatatype_nsec) ?
-               ISC_TRUE : ISC_FALSE);
+               true : false);
 }
 
 /*%
  * Return true always.
  */
-static isc_boolean_t
+static bool
 true_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        UNUSED(update_rr);
        UNUSED(db_rr);
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*%
  * Return true iff the two RRs have identical rdata.
  */
-static isc_boolean_t
+static bool
 rr_equal_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        /*
         * XXXRTH  This is not a problem, but we should consider creating
@@ -1208,7 +1209,7 @@ rr_equal_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
         *         would be faster.  Not a priority.
         */
        return (dns_rdata_casecompare(update_rr, db_rr) == 0 ?
-               ISC_TRUE : ISC_FALSE);
+               true : false);
 }
 
 /*%
@@ -1223,21 +1224,21 @@ rr_equal_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
  * requiring that the old RRSIG be deleted.  It also simplifies key
  * rollover by only requiring that the new RRSIG be added.
  */
-static isc_boolean_t
+static bool
 replaces_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        dns_rdata_rrsig_t updatesig, dbsig;
        isc_result_t result;
 
        if (db_rr->type != update_rr->type)
-               return (ISC_FALSE);
+               return (false);
        if (db_rr->type == dns_rdatatype_cname)
-               return (ISC_TRUE);
+               return (true);
        if (db_rr->type == dns_rdatatype_dname)
-               return (ISC_TRUE);
+               return (true);
        if (db_rr->type == dns_rdatatype_soa)
-               return (ISC_TRUE);
+               return (true);
        if (db_rr->type == dns_rdatatype_nsec)
-               return (ISC_TRUE);
+               return (true);
        if (db_rr->type == dns_rdatatype_rrsig) {
                /*
                 * Replace existing RRSIG with the same keyid,
@@ -1250,7 +1251,7 @@ replaces_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
                if (dbsig.keyid == updatesig.keyid &&
                    dbsig.covered == updatesig.covered &&
                    dbsig.algorithm == updatesig.algorithm)
-                       return (ISC_TRUE);
+                       return (true);
        }
        if (db_rr->type == dns_rdatatype_wks) {
                /*
@@ -1261,12 +1262,12 @@ replaces_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
                 */
                INSIST(db_rr->length >= 5 && update_rr->length >= 5);
                return (memcmp(db_rr->data, update_rr->data, 5) == 0 ?
-                       ISC_TRUE : ISC_FALSE);
+                       true : false);
        }
 
        if (db_rr->type == dns_rdatatype_nsec3param) {
                if (db_rr->length != update_rr->length)
-                       return (ISC_FALSE);
+                       return (false);
                INSIST(db_rr->length >= 4 && update_rr->length >= 4);
                /*
                 * Replace NSEC3PARAM records that only differ by the
@@ -1275,9 +1276,9 @@ replaces_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
                if (db_rr->data[0] == update_rr->data[0] &&
                    memcmp(db_rr->data+2, update_rr->data+2,
                           update_rr->length - 2) == 0)
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%
@@ -1327,7 +1328,7 @@ add_rr_prepare_action(void *data, rr_t *rr) {
        isc_result_t result = ISC_R_SUCCESS;
        add_rr_prepare_ctx_t *ctx = data;
        dns_difftuple_t *tuple = NULL;
-       isc_boolean_t equal, case_equal, ttl_equal;
+       bool equal, case_equal, ttl_equal;
 
        /*
         * Are the new and old cases equal?
@@ -1343,9 +1344,9 @@ add_rr_prepare_action(void *data, rr_t *rr) {
         * If the update RR is a "duplicate" of a existing RR,
         * the update should be silently ignored.
         */
-       equal = ISC_TF(dns_rdata_casecompare(&rr->rdata, ctx->update_rr) == 0);
+       equal = !dns_rdata_casecompare(&rr->rdata, ctx->update_rr);
        if (equal && case_equal && ttl_equal) {
-               ctx->ignore_add = ISC_TRUE;
+               ctx->ignore_add = true;
                return (ISC_R_SUCCESS);
        }
 
@@ -1461,7 +1462,7 @@ update_soa_serial(dns_db_t *db, dns_dbversion_t *ver, dns_diff_t *diff,
  * illegally cause the SOA serial number to decrease or stay
  * unchanged relative to the existing SOA in 'db'.
  *
- * Sets '*ok' to ISC_TRUE if the update is legal, ISC_FALSE if not.
+ * Sets '*ok' to true if the update is legal, false if not.
  *
  * William King points out that RFC2136 is inconsistent about
  * the case where the serial number stays unchanged:
@@ -1478,7 +1479,7 @@ update_soa_serial(dns_db_t *db, dns_dbversion_t *ver, dns_diff_t *diff,
  */
 static isc_result_t
 check_soa_increment(dns_db_t *db, dns_dbversion_t *ver,
-                   dns_rdata_t *update_rdata, isc_boolean_t *ok)
+                   dns_rdata_t *update_rdata, bool *ok)
 {
        uint32_t db_serial;
        uint32_t update_serial;
@@ -1491,9 +1492,9 @@ check_soa_increment(dns_db_t *db, dns_dbversion_t *ver,
                return (result);
 
        if (DNS_SERIAL_GE(db_serial, update_serial)) {
-               *ok = ISC_FALSE;
+               *ok = false;
        } else {
-               *ok = ISC_TRUE;
+               *ok = true;
        }
 
        return (ISC_R_SUCCESS);
@@ -1540,7 +1541,7 @@ static void
 respond(ns_client_t *client, isc_result_t result) {
        isc_result_t msg_result;
 
-       msg_result = dns_message_reply(client->message, ISC_TRUE);
+       msg_result = dns_message_reply(client->message, true);
        if (msg_result != ISC_R_SUCCESS)
                goto msg_failure;
        client->message->rcode = dns_result_torcode(result);
@@ -1620,8 +1621,8 @@ ns_update_start(ns_client_t *client, isc_result_t sigresult) {
                break;
        case dns_zone_slave:
                CHECK(checkupdateacl(client, dns_zone_getforwardacl(zone),
-                                    "update forwarding", zonename, ISC_TRUE,
-                                    ISC_FALSE));
+                                    "update forwarding", zonename, true,
+                                    false));
                CHECK(send_forward_event(client, zone));
                break;
        default:
@@ -1653,7 +1654,7 @@ ns_update_start(ns_client_t *client, isc_result_t sigresult) {
 static isc_result_t
 remove_orphaned_ds(dns_db_t *db, dns_dbversion_t *newver, dns_diff_t *diff) {
        isc_result_t result;
-       isc_boolean_t ns_exists;
+       bool ns_exists;
        dns_difftuple_t *tupple;
        dns_diff_t temp_diff;
 
@@ -1703,8 +1704,8 @@ check_mx(ns_client_t *client, dns_zone_t *zone,
        dns_name_t *foundname;
        dns_rdata_mx_t mx;
        dns_rdata_t rdata;
-       isc_boolean_t ok = ISC_TRUE;
-       isc_boolean_t isaddress;
+       bool ok = true;
+       bool isaddress;
        isc_result_t result;
        struct in6_addr addr6;
        struct in_addr addr;
@@ -1729,14 +1730,14 @@ check_mx(ns_client_t *client, dns_zone_t *zone,
                 */
                dns_name_format(&mx.mx, namebuf, sizeof(namebuf));
                dns_name_format(&t->name, ownerbuf, sizeof(ownerbuf));
-               isaddress = ISC_FALSE;
+               isaddress = false;
                if ((options & DNS_ZONEOPT_CHECKMX) != 0 &&
                    strlcpy(tmp, namebuf, sizeof(tmp)) < sizeof(tmp)) {
                        if (tmp[strlen(tmp) - 1] == '.')
                                tmp[strlen(tmp) - 1] = '\0';
                        if (inet_aton(tmp, &addr) == 1 ||
                            inet_pton(AF_INET6, tmp, &addr6) == 1)
-                               isaddress = ISC_TRUE;
+                               isaddress = true;
                }
 
                if (isaddress && (options & DNS_ZONEOPT_CHECKMXFAIL) != 0) {
@@ -1744,7 +1745,7 @@ check_mx(ns_client_t *client, dns_zone_t *zone,
                                   "%s/MX: '%s': %s",
                                   ownerbuf, namebuf,
                                   dns_result_totext(DNS_R_MXISADDRESS));
-                       ok = ISC_FALSE;
+                       ok = false;
                } else if (isaddress) {
                        update_log(client, zone, ISC_LOG_WARNING,
                                   "%s/MX: warning: '%s': %s",
@@ -1775,18 +1776,18 @@ check_mx(ns_client_t *client, dns_zone_t *zone,
                        update_log(client, zone, ISC_LOG_ERROR,
                                   "%s/MX '%s' has no address records "
                                   "(A or AAAA)", ownerbuf, namebuf);
-                       ok = ISC_FALSE;
+                       ok = false;
                } else if (result == DNS_R_CNAME) {
                        update_log(client, zone, ISC_LOG_ERROR,
                                   "%s/MX '%s' is a CNAME (illegal)",
                                   ownerbuf, namebuf);
-                       ok = ISC_FALSE;
+                       ok = false;
                } else if (result == DNS_R_DNAME) {
                        dns_name_format(foundname, altbuf, sizeof altbuf);
                        update_log(client, zone, ISC_LOG_ERROR,
                                   "%s/MX '%s' is below a DNAME '%s' (illegal)",
                                   ownerbuf, namebuf, altbuf);
-                       ok = ISC_FALSE;
+                       ok = false;
                }
        }
        return (ok ? ISC_R_SUCCESS : DNS_R_REFUSED);
@@ -1794,7 +1795,7 @@ check_mx(ns_client_t *client, dns_zone_t *zone,
 
 static isc_result_t
 rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-         const dns_rdata_t *rdata, isc_boolean_t *flag)
+         const dns_rdata_t *rdata, bool *flag)
 {
        dns_rdataset_t rdataset;
        dns_dbnode_t *node = NULL;
@@ -1802,13 +1803,13 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
 
        dns_rdataset_init(&rdataset);
        if (rdata->type == dns_rdatatype_nsec3)
-               CHECK(dns_db_findnsec3node(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnsec3node(db, name, false, &node));
        else
-               CHECK(dns_db_findnode(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnode(db, name, false, &node));
        result = dns_db_findrdataset(db, node, ver, rdata->type, 0,
                                     (isc_stdtime_t) 0, &rdataset, NULL);
        if (result == ISC_R_NOTFOUND) {
-               *flag = ISC_FALSE;
+               *flag = false;
                result = ISC_R_SUCCESS;
                goto failure;
        }
@@ -1823,9 +1824,9 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        }
        dns_rdataset_disassociate(&rdataset);
        if (result == ISC_R_SUCCESS) {
-               *flag = ISC_TRUE;
+               *flag = true;
        } else if (result == ISC_R_NOMORE) {
-               *flag = ISC_FALSE;
+               *flag = false;
                result = ISC_R_SUCCESS;
        }
 
@@ -1925,7 +1926,7 @@ check_dnssec(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
             dns_dbversion_t *ver, dns_diff_t *diff)
 {
        dns_difftuple_t *tuple;
-       isc_boolean_t nseconly = ISC_FALSE, nsec3 = ISC_FALSE;
+       bool nseconly = false, nsec3 = false;
        isc_result_t result;
        unsigned int iterations = 0, max;
        dns_rdatatype_t privatetype = dns_zone_getprivatetype(zone);
@@ -1942,11 +1943,11 @@ check_dnssec(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
                        alg = tuple->rdata.data[3];
                        if (alg == DST_ALG_RSAMD5 || alg == DST_ALG_RSASHA1 ||
                            alg == DST_ALG_DSA || alg == DST_ALG_ECC) {
-                               nseconly = ISC_TRUE;
+                               nseconly = true;
                                break;
                        }
                } else if (tuple->rdata.type == dns_rdatatype_nsec3param) {
-                       nsec3 = ISC_TRUE;
+                       nsec3 = true;
                        break;
                }
        }
@@ -1968,7 +1969,7 @@ check_dnssec(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
 
        /* Check existing DB for NSEC3 */
        if (!nsec3)
-               CHECK(dns_nsec3_activex(db, ver, ISC_FALSE,
+               CHECK(dns_nsec3_activex(db, ver, false,
                                        privatetype, &nsec3));
 
        /* Refuse to allow NSEC3 with NSEC-only keys */
@@ -2007,11 +2008,11 @@ add_nsec3param_records(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
        unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE + 1];
        dns_diff_t temp_diff;
        dns_diffop_t op;
-       isc_boolean_t flag;
+       bool flag;
        dns_name_t *name = dns_zone_getorigin(zone);
        dns_rdatatype_t privatetype = dns_zone_getprivatetype(zone);
        uint32_t ttl = 0;
-       isc_boolean_t ttl_good = ISC_FALSE;
+       bool ttl_good = false;
 
        update_log(client, zone, ISC_LOG_DEBUG(3),
                    "checking for NSEC3PARAM changes");
@@ -2047,7 +2048,7 @@ add_nsec3param_records(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
                                 * NSEC3PARAM RRset TTL.
                                 */
                                ttl = tuple->ttl;
-                               ttl_good = ISC_TRUE;
+                               ttl_good = true;
                        }
                        /*
                         * Walk the temp_diff list looking for the
@@ -2106,7 +2107,7 @@ add_nsec3param_records(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
                         */
                        if (!ttl_good) {
                                ttl = tuple->ttl;
-                               ttl_good = ISC_TRUE;
+                               ttl_good = true;
                        }
                        op = (tuple->op == DNS_DIFFOP_DEL) ?
                             DNS_DIFFOP_ADD : DNS_DIFFOP_DEL;
@@ -2132,10 +2133,10 @@ add_nsec3param_records(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
                 */
                if (!ttl_good) {
                        ttl = tuple->ttl;
-                       ttl_good = ISC_TRUE;
+                       ttl_good = true;
                }
                if (tuple->op == DNS_DIFFOP_ADD) {
-                       isc_boolean_t nseconly = ISC_FALSE;
+                       bool nseconly = false;
 
                        /*
                         * Look for any deletes which match this ADD ignoring
@@ -2334,7 +2335,7 @@ add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype,
        dns_difftuple_t *tuple, *newtuple = NULL, *next;
        dns_rdata_dnskey_t dnskey;
        dns_rdata_t rdata = DNS_RDATA_INIT;
-       isc_boolean_t flag;
+       bool flag;
        isc_region_t r;
        isc_result_t result = ISC_R_SUCCESS;
        uint16_t keyid;
@@ -2462,13 +2463,13 @@ add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 isdnssec(dns_db_t *db, dns_dbversion_t *ver, dns_rdatatype_t privatetype) {
        isc_result_t result;
-       isc_boolean_t build_nsec, build_nsec3;
+       bool build_nsec, build_nsec3;
 
        if (dns_db_issecure(db))
-               return (ISC_TRUE);
+               return (true);
 
        result = dns_private_chains(db, ver, privatetype,
                                    &build_nsec, &build_nsec3);
@@ -2487,7 +2488,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
        dns_dbversion_t *ver = NULL;
        dns_diff_t diff;        /* Pending updates. */
        dns_diff_t temp;        /* Pending RR existence assertions. */
-       isc_boolean_t soa_serial_changed = ISC_FALSE;
+       bool soa_serial_changed = false;
        isc_mem_t *mctx = client->mctx;
        dns_rdatatype_t covers;
        dns_message_t *request = client->message;
@@ -2499,7 +2500,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
        unsigned int options, options2;
        dns_difftuple_t *tuple;
        dns_rdata_dnskey_t dnskey;
-       isc_boolean_t had_dnskey;
+       bool had_dnskey;
        dns_rdatatype_t privatetype = dns_zone_getprivatetype(zone);
        dns_ttl_t maxttl = 0;
        uint32_t maxrecords;
@@ -2541,7 +2542,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                dns_rdata_t rdata = DNS_RDATA_INIT;
                dns_ttl_t ttl;
                dns_rdataclass_t update_class;
-               isc_boolean_t flag;
+               bool flag;
 
                get_current_rr(request, DNS_SECTION_PREREQUISITE, zoneclass,
                               &name, &rdata, &covers, &ttl, &update_class);
@@ -2651,10 +2652,10 @@ update_action(isc_task_t *task, isc_event_t *event) {
         */
        if (ssutable == NULL)
                CHECK(checkupdateacl(client, dns_zone_getupdateacl(zone),
-                                    "update", zonename, ISC_FALSE, ISC_FALSE));
+                                    "update", zonename, false, false));
        else if (client->signer == NULL && !TCPCLIENT(client))
                CHECK(checkupdateacl(client, NULL, "update", zonename,
-                                    ISC_FALSE, ISC_TRUE));
+                                    false, true));
 
        if (dns_zone_getupdatedisabled(zone))
                FAILC(DNS_R_REFUSED, "dynamic update temporarily disabled "
@@ -2742,7 +2743,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                        if (rdata.type != dns_rdatatype_any) {
                                if (!dns_ssutable_checkrules2
                                    (ssutable, client->signer, name, &netaddr,
-                                    ISC_TF(TCPCLIENT(client)),
+                                    TCPCLIENT(client),
                                     &ns_g_server->aclenv,
                                     rdata.type, tsigkey))
                                {
@@ -2753,7 +2754,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                                if (!ssu_checkall(db, ver, name, ssutable,
                                                  client->signer,
                                                  &netaddr,
-                                                 ISC_TF(TCPCLIENT(client)),
+                                                 TCPCLIENT(client),
                                                  tsigkey))
                                {
                                        FAILC(DNS_R_REFUSED,
@@ -2782,7 +2783,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                dns_rdata_t rdata = DNS_RDATA_INIT;
                dns_ttl_t ttl;
                dns_rdataclass_t update_class;
-               isc_boolean_t flag;
+               bool flag;
 
                get_current_rr(request, DNS_SECTION_UPDATE, zoneclass,
                               &name, &rdata, &covers, &ttl, &update_class);
@@ -2843,7 +2844,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                                }
                        }
                        if (rdata.type == dns_rdatatype_soa) {
-                               isc_boolean_t ok;
+                               bool ok;
                                CHECK(rrset_exists(db, ver, name,
                                                   dns_rdatatype_soa, 0,
                                                   &flag));
@@ -2864,7 +2865,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                                                   "ignoring it");
                                        continue;
                                }
-                               soa_serial_changed = ISC_TRUE;
+                               soa_serial_changed = true;
                        }
 
                        if (rdata.type == privatetype) {
@@ -2953,7 +2954,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                                ctx.oldname = name;
                                ctx.update_rr = &rdata;
                                ctx.update_rr_ttl = ttl;
-                               ctx.ignore_add = ISC_FALSE;
+                               ctx.ignore_add = false;
                                dns_diff_init(mctx, &ctx.del_diff);
                                dns_diff_init(mctx, &ctx.add_diff);
                                CHECK(foreach_rr(db, ver, name, rdata.type,
@@ -3116,7 +3117,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
        if (! ISC_LIST_EMPTY(diff.tuples)) {
                char *journalfile;
                dns_journal_t *journal;
-               isc_boolean_t has_dnskey;
+               bool has_dnskey;
 
                /*
                 * Increment the SOA serial, but only if it was not
@@ -3165,7 +3166,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                         * remove any NSEC chain present will also be removed.
                         */
                         CHECK(dns_nsec3param_deletechains(db, ver, zone,
-                                                          ISC_TRUE, &diff));
+                                                          true, &diff));
                } else if (has_dnskey && isdnssec(db, ver, privatetype)) {
                        uint32_t interval;
                        dns_update_log_t log;
@@ -3227,7 +3228,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                update_log(client, zone, LOGLEVEL_DEBUG,
                           "committing update transaction");
 
-               dns_db_closeversion(db, &ver, ISC_TRUE);
+               dns_db_closeversion(db, &ver, true);
 
                /*
                 * Mark the zone as dirty so that it will be written to disk.
@@ -3267,7 +3268,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                        keyid = dst_region_computeid(&r, algorithm);
 
                        result = dns_zone_signwithkey(zone, algorithm, keyid,
-                                       ISC_TF(tuple->op == DNS_DIFFOP_DEL));
+                                                     (tuple->op == DNS_DIFFOP_DEL));
                        if (result != ISC_R_SUCCESS) {
                                update_log(client, zone, ISC_LOG_ERROR,
                                           "dns_zone_signwithkey failed: %s",
@@ -3308,7 +3309,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
                }
        } else {
                update_log(client, zone, LOGLEVEL_DEBUG, "redundant request");
-               dns_db_closeversion(db, &ver, ISC_TRUE);
+               dns_db_closeversion(db, &ver, true);
        }
        result = ISC_R_SUCCESS;
        goto common;
@@ -3320,7 +3321,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
        if (ver != NULL) {
                update_log(client, zone, LOGLEVEL_DEBUG,
                           "rolling back");
-               dns_db_closeversion(db, &ver, ISC_FALSE);
+               dns_db_closeversion(db, &ver, false);
        }
 
  common:
@@ -3328,7 +3329,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
        dns_diff_clear(&diff);
 
        if (oldver != NULL)
-               dns_db_closeversion(db, &oldver, ISC_FALSE);
+               dns_db_closeversion(db, &oldver, false);
 
        if (db != NULL)
                dns_db_detach(&db);
index 9ff1de218e557738f8678aea405885a6ebefe65e..bb0eeddc340f65798d842e52d70464810ce936e8 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <windows.h>
 
 #include <stdio.h>
@@ -45,7 +46,7 @@ typedef struct dlopen_data {
        unsigned int flags;
        isc_mutex_t lock;
        int version;
-       isc_boolean_t in_configure;
+       bool in_configure;
 
        dlz_dlopen_version_t *dlz_version;
        dlz_dlopen_create_t *dlz_create;
@@ -68,14 +69,14 @@ typedef struct dlopen_data {
 #define MAYBE_LOCK(cd) \
        do { \
                if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
-                   cd->in_configure == ISC_FALSE) \
+                   cd->in_configure == false) \
                        LOCK(&cd->lock); \
        } while (0)
 
 #define MAYBE_UNLOCK(cd) \
        do { \
                if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
-                   cd->in_configure == ISC_FALSE) \
+                   cd->in_configure == false) \
                        UNLOCK(&cd->lock); \
        } while (0)
 
@@ -195,7 +196,7 @@ dlopen_dlz_lookup(const char *zone, const char *name, void *driverarg,
  * Load a symbol from the library
  */
 static void *
-dl_load_symbol(dlopen_data_t *cd, const char *symbol, isc_boolean_t mandatory) {
+dl_load_symbol(dlopen_data_t *cd, const char *symbol, bool mandatory) {
        void *ptr = GetProcAddress(cd->dl_handle, symbol);
        if (ptr == NULL && mandatory) {
                dlopen_log(ISC_LOG_ERROR,
@@ -215,7 +216,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
        dlopen_data_t *cd;
        isc_mem_t *mctx = NULL;
        isc_result_t result = ISC_R_FAILURE;
-       isc_boolean_t triedload = ISC_FALSE;
+       bool triedload = false;
 
        UNUSED(driverarg);
 
@@ -249,7 +250,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
                goto failed;
        }
 
-       triedload = ISC_TRUE;
+       triedload = true;
 
        /* Initialize the lock */
        result = isc_mutex_init(&cd->lock);
@@ -270,13 +271,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
 
        /* Find the symbols */
        cd->dlz_version = (dlz_dlopen_version_t *)
-               dl_load_symbol(cd, "dlz_version", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_version", true);
        cd->dlz_create = (dlz_dlopen_create_t *)
-               dl_load_symbol(cd, "dlz_create", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_create", true);
        cd->dlz_lookup = (dlz_dlopen_lookup_t *)
-               dl_load_symbol(cd, "dlz_lookup", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_lookup", true);
        cd->dlz_findzonedb = (dlz_dlopen_findzonedb_t *)
-               dl_load_symbol(cd, "dlz_findzonedb", ISC_TRUE);
+               dl_load_symbol(cd, "dlz_findzonedb", true);
 
        if (cd->dlz_create == NULL ||
            cd->dlz_version == NULL ||
@@ -289,27 +290,27 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
        }
 
        cd->dlz_allowzonexfr = (dlz_dlopen_allowzonexfr_t *)
-               dl_load_symbol(cd, "dlz_allowzonexfr", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_allowzonexfr", false);
        cd->dlz_allnodes = (dlz_dlopen_allnodes_t *)
                dl_load_symbol(cd, "dlz_allnodes",
-                              ISC_TF(cd->dlz_allowzonexfr != NULL));
+                              (cd->dlz_allowzonexfr != NULL));
        cd->dlz_authority = (dlz_dlopen_authority_t *)
-               dl_load_symbol(cd, "dlz_authority", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_authority", false);
        cd->dlz_newversion = (dlz_dlopen_newversion_t *)
-               dl_load_symbol(cd, "dlz_newversion", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_newversion", false);
        cd->dlz_closeversion = (dlz_dlopen_closeversion_t *)
                dl_load_symbol(cd, "dlz_closeversion",
-                              ISC_TF(cd->dlz_newversion != NULL));
+                              (cd->dlz_newversion != NULL));
        cd->dlz_configure = (dlz_dlopen_configure_t *)
-               dl_load_symbol(cd, "dlz_configure", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_configure", false);
        cd->dlz_ssumatch = (dlz_dlopen_ssumatch_t *)
-               dl_load_symbol(cd, "dlz_ssumatch", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_ssumatch", false);
        cd->dlz_addrdataset = (dlz_dlopen_addrdataset_t *)
-               dl_load_symbol(cd, "dlz_addrdataset", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_addrdataset", false);
        cd->dlz_subrdataset = (dlz_dlopen_subrdataset_t *)
-               dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_subrdataset", false);
        cd->dlz_delrdataset = (dlz_dlopen_delrdataset_t *)
-               dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
+               dl_load_symbol(cd, "dlz_delrdataset", false);
 
        /* Check the version of the API is the same */
        cd->version = cd->dlz_version(&cd->flags);
@@ -421,7 +422,7 @@ dlopen_dlz_newversion(const char *zone, void *driverarg, void *dbdata,
  * Called to end a transaction
  */
 static void
-dlopen_dlz_closeversion(const char *zone, isc_boolean_t commit,
+dlopen_dlz_closeversion(const char *zone, bool commit,
                        void *driverarg, void *dbdata, void **versionp)
 {
        dlopen_data_t *cd = (dlopen_data_t *) dbdata;
@@ -454,9 +455,9 @@ dlopen_dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
                return (ISC_R_SUCCESS);
 
        MAYBE_LOCK(cd);
-       cd->in_configure = ISC_TRUE;
+       cd->in_configure = true;
        result = cd->dlz_configure(view, dlzdb, cd->dbdata);
-       cd->in_configure = ISC_FALSE;
+       cd->in_configure = false;
        MAYBE_UNLOCK(cd);
 
        return (result);
@@ -466,18 +467,18 @@ dlopen_dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
 /*
  * Check for authority to change a name
  */
-static isc_boolean_t
+static bool
 dlopen_dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
                    const char *type, const char *key, uint32_t keydatalen,
                    unsigned char *keydata, void *driverarg, void *dbdata)
 {
        dlopen_data_t *cd = (dlopen_data_t *) dbdata;
-       isc_boolean_t ret;
+       bool ret;
 
        UNUSED(driverarg);
 
        if (cd->dlz_ssumatch == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        MAYBE_LOCK(cd);
        ret = cd->dlz_ssumatch(signer, name, tcpaddr, type, key, keydatalen,
index 2d2a018b8c9c4114c89502e5c4d417bd91b8a9e8..cac89a48b29c18b2ca88468c7cd450af326c856a 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef NS_OS_H
 #define NS_OS_H 1
 
+#include <stdbool.h>
+
 #include <isc/types.h>
 
 void
@@ -45,12 +47,12 @@ void
 ns_os_minprivs(void);
 
 FILE *
-ns_os_openfile(const char *filename, int mode, isc_boolean_t switch_user);
+ns_os_openfile(const char *filename, int mode, bool switch_user);
 
 void
-ns_os_writepidfile(const char *filename, isc_boolean_t first_time);
+ns_os_writepidfile(const char *filename, bool first_time);
 
-isc_boolean_t
+bool
 ns_os_issingleton(const char *filename);
 
 void
index 4df5029aa8fe50bf07e15d593307710d9fb406a9..23a5dc4b40c9eaa2d80e0f70ca1ee6f64b62cc16 100644 (file)
@@ -80,7 +80,7 @@ ServiceControl(DWORD dwCtrlCode) {
 
        case SERVICE_CONTROL_SHUTDOWN:
        case SERVICE_CONTROL_STOP:
-               ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
+               ns_server_flushonshutdown(ns_g_server, true);
                isc_app_shutdown();
                UpdateSCM(SERVICE_STOPPED);
                break;
@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
        int rc, ch;
 
        /* Command line users should put -f in the options. */
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
        while ((ch = isc_commandline_parse(argc, argv, NS_MAIN_ARGS)) != -1) {
                switch (ch) {
                case 'f':
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
                        break;
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
 
        if (foreground) {
                /* run in console window */
index 0b02aef22363a5928da9e83be4f9cfeda4af6920..f89c50da4127a056956717b8a7e76aa746c1abcf 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 #include <stdarg.h>
+#include <stdbool.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -179,7 +180,7 @@ ns_os_minprivs(void) {
 }
 
 static int
-safe_open(const char *filename, int mode, isc_boolean_t append) {
+safe_open(const char *filename, int mode, bool append) {
        int fd;
        struct stat sb;
 
@@ -224,13 +225,13 @@ cleanup_lockfile(void) {
 }
 
 FILE *
-ns_os_openfile(const char *filename, int mode, isc_boolean_t switch_user) {
+ns_os_openfile(const char *filename, int mode, bool switch_user) {
        char strbuf[ISC_STRERRORSIZE];
        FILE *fp;
        int fd;
 
        UNUSED(switch_user);
-       fd = safe_open(filename, mode, ISC_FALSE);
+       fd = safe_open(filename, mode, false);
        if (fd < 0) {
                isc__strerror(errno, strbuf, sizeof(strbuf));
                ns_main_earlywarning("could not open file '%s': %s",
@@ -250,7 +251,7 @@ ns_os_openfile(const char *filename, int mode, isc_boolean_t switch_user) {
 }
 
 void
-ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
+ns_os_writepidfile(const char *filename, bool first_time) {
        FILE *pidlockfile;
        pid_t pid;
        char strbuf[ISC_STRERRORSIZE];
@@ -275,7 +276,7 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
        }
 
        pidlockfile = ns_os_openfile(filename, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH,
-                                    ISC_FALSE);
+                                    false);
        if (pidlockfile == NULL) {
                free(pidfile);
                pidfile = NULL;
@@ -299,16 +300,16 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
        (void)fclose(pidlockfile);
 }
 
-isc_boolean_t
+bool
 ns_os_issingleton(const char *filename) {
        char strbuf[ISC_STRERRORSIZE];
        OVERLAPPED o;
 
        if (lockfilefd != -1)
-               return (ISC_TRUE);
+               return (true);
 
        if (strcasecmp(filename, "none") == 0)
-               return (ISC_TRUE);
+               return (true);
 
        lockfile = strdup(filename);
        if (lockfile == NULL) {
@@ -325,7 +326,7 @@ ns_os_issingleton(const char *filename) {
                          S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
        if (lockfilefd == -1) {
                cleanup_lockfile();
-               return (ISC_FALSE);
+               return (false);
        }
 
        memset(&o, 0, sizeof(o));
@@ -334,10 +335,10 @@ ns_os_issingleton(const char *filename) {
                        LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY,
                        0, 0, 1, &o)) {
                cleanup_lockfile();
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 
index 21bdb8f59b025859f5c1ed6a839626d7bb7215d6..86ab0c1b03d92b6b4d448f16f8b40f39c023a06a 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/formatcheck.h>
 #include <isc/mem.h>
@@ -148,7 +149,7 @@ log_rr(dns_name_t *name, dns_rdata_t *rdata, uint32_t ttl) {
 
        isc_buffer_init(&buf, mem, sizeof(mem));
        result = dns_rdataset_totext(&rds, name,
-                                    ISC_FALSE, ISC_FALSE, &buf);
+                                    false, false, &buf);
 
        /*
         * We could use xfrout_log(), but that would produce
@@ -308,7 +309,7 @@ static rrstream_methods_t ixfr_rrstream_methods = {
 typedef struct axfr_rrstream {
        rrstream_t              common;
        dns_rriterator_t        it;
-       isc_boolean_t           it_valid;
+       bool            it_valid;
 } axfr_rrstream_t;
 
 /*
@@ -334,10 +335,10 @@ axfr_rrstream_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *ver,
        s->common.mctx = NULL;
        isc_mem_attach(mctx, &s->common.mctx);
        s->common.methods = &axfr_rrstream_methods;
-       s->it_valid = ISC_FALSE;
+       s->it_valid = false;
 
        CHECK(dns_rriterator_init(&s->it, db, ver, 0));
-       s->it_valid = ISC_TRUE;
+       s->it_valid = true;
 
        *sp = (rrstream_t *) s;
        return (ISC_R_SUCCESS);
@@ -662,7 +663,7 @@ typedef struct {
        dns_dbversion_t         *ver;
        isc_quota_t             *quota;
        rrstream_t              *stream;        /* The XFR RR stream */
-       isc_boolean_t           end_of_stream;  /* EOS has been reached */
+       bool            end_of_stream;  /* EOS has been reached */
        isc_buffer_t            buf;            /* Buffer for message owner
                                                   names and rdatas */
        isc_buffer_t            txlenbuf;       /* Transmit length buffer */
@@ -672,10 +673,10 @@ typedef struct {
        unsigned int            nmsg;           /* Number of messages sent */
        dns_tsigkey_t           *tsigkey;       /* Key used to create TSIG */
        isc_buffer_t            *lasttsig;      /* the last TSIG */
-       isc_boolean_t           verified_tsig;  /* verified request MAC */
-       isc_boolean_t           many_answers;
+       bool            verified_tsig;  /* verified request MAC */
+       bool            many_answers;
        int                     sends;          /* Send in progress */
-       isc_boolean_t           shuttingdown;
+       bool            shuttingdown;
        const char              *mnemonic;      /* Style of transfer */
 } xfrout_ctx_t;
 
@@ -686,10 +687,10 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client,
                  dns_db_t *db, dns_dbversion_t *ver, isc_quota_t *quota,
                  rrstream_t *stream, dns_tsigkey_t *tsigkey,
                  isc_buffer_t *lasttsig,
-                 isc_boolean_t verified_tsig,
+                 bool verified_tsig,
                  unsigned int maxtime,
                  unsigned int idletime,
-                 isc_boolean_t many_answers,
+                 bool many_answers,
                  xfrout_ctx_t **xfrp);
 
 static void
@@ -737,7 +738,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
        dns_name_t *soa_name;
        dns_rdataset_t *soa_rdataset;
        dns_rdata_t soa_rdata = DNS_RDATA_INIT;
-       isc_boolean_t have_soa = ISC_FALSE;
+       bool have_soa = false;
        const char *mnemonic = NULL;
        isc_mem_t *mctx = client->mctx;
        dns_message_t *request = client->message;
@@ -750,9 +751,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
        char *journalfile;
        char msg[NS_CLIENT_ACLMSGSIZE("zone transfer")];
        char keyname[DNS_NAME_FORMATSIZE];
-       isc_boolean_t is_poll = ISC_FALSE;
-       isc_boolean_t is_dlz = ISC_FALSE;
-       isc_boolean_t is_ixfr = ISC_FALSE;
+       bool is_poll = false;
+       bool is_dlz = false;
+       bool is_ixfr = false;
        uint32_t begin_serial = 0, current_serial;
 
        switch (reqtype) {
@@ -836,7 +837,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                        if (result != ISC_R_SUCCESS)
                                FAILQ(DNS_R_NOTAUTH, "non-authoritative zone",
                                      question_name, question_class);
-                       is_dlz = ISC_TRUE;
+                       is_dlz = true;
                } else {
                        /*
                         * not DLZ and not in normal zone table, we are
@@ -901,7 +902,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                                FAILC(DNS_R_FORMERR,
                                      "IXFR authority section "
                                      "has multiple SOAs");
-                       have_soa = ISC_TRUE;
+                       have_soa = true;
                        goto got_soa;
                }
        }
@@ -920,7 +921,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                                 client->view->rdclass, msg, sizeof(msg));
                CHECK(ns_client_checkacl(client, NULL, msg,
                                         dns_zone_getxfracl(zone),
-                                        ISC_TRUE, ISC_LOG_ERROR));
+                                        true, ISC_LOG_ERROR));
        }
 
        /*
@@ -953,7 +954,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
 
        current_serial = dns_soa_getserial(&current_soa_tuple->rdata);
        if (reqtype == dns_rdatatype_ixfr) {
-               isc_boolean_t provide_ixfr;
+               bool provide_ixfr;
 
                /*
                 * Outgoing IXFR may have been disabled for this peer
@@ -962,7 +963,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                provide_ixfr = client->view->provideixfr;
                if (peer != NULL)
                        (void) dns_peer_getprovideixfr(peer, &provide_ixfr);
-               if (provide_ixfr == ISC_FALSE)
+               if (provide_ixfr == false)
                        goto axfr_fallback;
 
                if (! have_soa)
@@ -986,7 +987,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                    (client->attributes & NS_CLIENTATTR_TCP) == 0)
                {
                        CHECK(soa_rrstream_create(mctx, db, ver, &stream));
-                       is_poll = ISC_TRUE;
+                       is_poll = true;
                        goto have_stream;
                }
                journalfile = is_dlz ? NULL : dns_zone_getjournal(zone);
@@ -1008,7 +1009,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                        goto axfr_fallback;
                }
                CHECK(result);
-               is_ixfr = ISC_TRUE;
+               is_ixfr = true;
        } else {
        axfr_fallback:
                CHECK(axfr_rrstream_create(mctx, db, ver, &data_stream));
@@ -1042,7 +1043,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                                        3600,
                                        3600,
                                        (format == dns_many_answers) ?
-                                       ISC_TRUE : ISC_FALSE,
+                                       true : false,
                                        &xfr));
        else
                CHECK(xfrout_ctx_create(mctx, client, request->id,
@@ -1054,7 +1055,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
                                        dns_zone_getmaxxfrout(zone),
                                        dns_zone_getidleout(zone),
                                        (format == dns_many_answers) ?
-                                       ISC_TRUE : ISC_FALSE,
+                                       true : false,
                                        &xfr));
 
        xfr->mnemonic = mnemonic;
@@ -1125,7 +1126,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
        if (data_stream != NULL)
                data_stream->methods->destroy(&data_stream);
        if (ver != NULL)
-               dns_db_closeversion(db, &ver, ISC_FALSE);
+               dns_db_closeversion(db, &ver, false);
        if (db != NULL)
                dns_db_detach(&db);
        if (zone != NULL)
@@ -1147,9 +1148,9 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
                  dns_rdataclass_t qclass, dns_zone_t *zone,
                  dns_db_t *db, dns_dbversion_t *ver, isc_quota_t *quota,
                  rrstream_t *stream, dns_tsigkey_t *tsigkey,
-                 isc_buffer_t *lasttsig, isc_boolean_t verified_tsig,
+                 isc_buffer_t *lasttsig, bool verified_tsig,
                  unsigned int maxtime, unsigned int idletime,
-                 isc_boolean_t many_answers, xfrout_ctx_t **xfrp)
+                 bool many_answers, xfrout_ctx_t **xfrp)
 {
        xfrout_ctx_t *xfr;
        isc_result_t result;
@@ -1175,14 +1176,14 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
                dns_zone_attach(zone, &xfr->zone);
        dns_db_attach(db, &xfr->db);
        dns_db_attachversion(db, ver, &xfr->ver);
-       xfr->end_of_stream = ISC_FALSE;
+       xfr->end_of_stream = false;
        xfr->tsigkey = tsigkey;
        xfr->lasttsig = lasttsig;
        xfr->verified_tsig = verified_tsig;
        xfr->nmsg = 0;
        xfr->many_answers = many_answers;
        xfr->sends = 0;
-       xfr->shuttingdown = ISC_FALSE;
+       xfr->shuttingdown = false;
        xfr->mnemonic = NULL;
        xfr->buf.base = NULL;
        xfr->buf.length = 0;
@@ -1225,7 +1226,7 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
        xfr->txmemlen = len;
 
        CHECK(dns_timer_setidle(xfr->client->timer,
-                               maxtime, idletime, ISC_FALSE));
+                               maxtime, idletime, false));
 
        /*
         * Register a shutdown callback with the client, so that we
@@ -1271,8 +1272,8 @@ sendstream(xfrout_ctx_t *xfr) {
        dns_rdatalist_t *msgrdl = NULL;
        dns_rdataset_t *msgrds = NULL;
        dns_compress_t cctx;
-       isc_boolean_t cleanup_cctx = ISC_FALSE;
-       isc_boolean_t is_tcp;
+       bool cleanup_cctx = false;
+       bool is_tcp;
 
        int n_rrs;
 
@@ -1280,14 +1281,14 @@ sendstream(xfrout_ctx_t *xfr) {
        isc_buffer_clear(&xfr->txlenbuf);
        isc_buffer_clear(&xfr->txbuf);
 
-       is_tcp = ISC_TF((xfr->client->attributes & NS_CLIENTATTR_TCP) != 0);
+       is_tcp = (xfr->client->attributes & NS_CLIENTATTR_TCP);
        if (!is_tcp) {
                /*
                 * In the UDP case, we put the response data directly into
                 * the client message.
                 */
                msg = xfr->client->message;
-               CHECK(dns_message_reply(msg, ISC_TRUE));
+               CHECK(dns_message_reply(msg, true));
        } else {
                /*
                 * TCP. Build a response dns_message_t, temporarily storing
@@ -1477,7 +1478,7 @@ sendstream(xfrout_ctx_t *xfr) {
 
                result = xfr->stream->methods->next(xfr->stream);
                if (result == ISC_R_NOMORE) {
-                       xfr->end_of_stream = ISC_TRUE;
+                       xfr->end_of_stream = true;
                        break;
                }
                CHECK(result);
@@ -1496,14 +1497,14 @@ sendstream(xfrout_ctx_t *xfr) {
 
        if (is_tcp) {
                CHECK(dns_compress_init(&cctx, -1, xfr->mctx));
-               dns_compress_setsensitive(&cctx, ISC_TRUE);
-               cleanup_cctx = ISC_TRUE;
+               dns_compress_setsensitive(&cctx, true);
+               cleanup_cctx = true;
                CHECK(dns_message_renderbegin(msg, &cctx, &xfr->txbuf));
                CHECK(dns_message_rendersection(msg, DNS_SECTION_QUESTION, 0));
                CHECK(dns_message_rendersection(msg, DNS_SECTION_ANSWER, 0));
                CHECK(dns_message_renderend(msg));
                dns_compress_invalidate(&cctx);
-               cleanup_cctx = ISC_FALSE;
+               cleanup_cctx = false;
 
                isc_buffer_usedregion(&xfr->txbuf, &used);
                isc_buffer_putuint16(&xfr->txlenbuf,
@@ -1585,7 +1586,7 @@ xfrout_ctx_destroy(xfrout_ctx_t **xfrp) {
        if (xfr->quota != NULL)
                isc_quota_detach(&xfr->quota);
        if (xfr->ver != NULL)
-               dns_db_closeversion(xfr->db, &xfr->ver, ISC_FALSE);
+               dns_db_closeversion(xfr->db, &xfr->ver, false);
        if (xfr->zone != NULL)
                dns_zone_detach(&xfr->zone);
        if (xfr->db != NULL)
@@ -1618,11 +1619,11 @@ xfrout_senddone(isc_task_t *task, isc_event_t *event) {
        INSIST(xfr->sends == 0);
 
        (void)isc_timer_touch(xfr->client->timer);
-       if (xfr->shuttingdown == ISC_TRUE) {
+       if (xfr->shuttingdown == true) {
                xfrout_maybe_destroy(xfr);
        } else if (evresult != ISC_R_SUCCESS) {
                xfrout_fail(xfr, evresult, "send");
-       } else if (xfr->end_of_stream == ISC_FALSE) {
+       } else if (xfr->end_of_stream == false) {
                sendstream(xfr);
        } else {
                /* End of zone transfer stream. */
@@ -1635,7 +1636,7 @@ xfrout_senddone(isc_task_t *task, isc_event_t *event) {
 
 static void
 xfrout_fail(xfrout_ctx_t *xfr, isc_result_t result, const char *msg) {
-       xfr->shuttingdown = ISC_TRUE;
+       xfr->shuttingdown = true;
        xfrout_log(xfr, ISC_LOG_ERROR, "%s: %s",
                   msg, isc_result_totext(result));
        xfrout_maybe_destroy(xfr);
@@ -1643,7 +1644,7 @@ xfrout_fail(xfrout_ctx_t *xfr, isc_result_t result, const char *msg) {
 
 static void
 xfrout_maybe_destroy(xfrout_ctx_t *xfr) {
-       INSIST(xfr->shuttingdown == ISC_TRUE);
+       INSIST(xfr->shuttingdown == true);
        if (xfr->sends > 0) {
                /*
                 * If we are currently sending, cancel it and wait for
index 2a4a569d6b2ae67e6ec9cd8f7946a91d167c5390..e237bdbedf855d35437c8d51eb92c3e582e79c4b 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/file.h>
@@ -187,7 +188,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
        const cfg_listelt_t *element, *element2;
        dns_ssutable_t *table = NULL;
        isc_mem_t *mctx = dns_zone_getmctx(zone);
-       isc_boolean_t autoddns = ISC_FALSE;
+       bool autoddns = false;
        isc_result_t result;
 
        (void)cfg_map_get(zconfig, "update-policy", &updatepolicy);
@@ -199,7 +200,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
 
        if (cfg_obj_isstring(updatepolicy) &&
            strcmp("local", cfg_obj_asstring(updatepolicy)) == 0) {
-               autoddns = ISC_TRUE;
+               autoddns = true;
                updatepolicy = NULL;
        }
 
@@ -218,8 +219,8 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
                const cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
                const cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
                const char *str;
-               isc_boolean_t grant = ISC_FALSE;
-               isc_boolean_t usezone = ISC_FALSE;
+               bool grant = false;
+               bool usezone = false;
                dns_ssumatchtype_t mtype = DNS_SSUMATCHTYPE_NAME;
                dns_fixedname_t fname, fident;
                isc_buffer_t b;
@@ -228,16 +229,16 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
 
                str = cfg_obj_asstring(mode);
                if (strcasecmp(str, "grant") == 0)
-                       grant = ISC_TRUE;
+                       grant = true;
                else if (strcasecmp(str, "deny") == 0)
-                       grant = ISC_FALSE;
+                       grant = false;
                else
                        INSIST(0);
 
                str = cfg_obj_asstring(matchtype);
                CHECK(dns_ssu_mtypefromstring(str, &mtype));
                if (mtype == dns_ssumatchtype_subdomain) {
-                       usezone = ISC_TRUE;
+                       usezone = true;
                }
 
                dns_fixedname_init(&fident);
@@ -343,7 +344,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
                        goto cleanup;
                }
 
-               result = dns_ssutable_addrule(table, ISC_TRUE,
+               result = dns_ssutable_addrule(table, true,
                                              ns_g_server->session_keyname,
                                              DNS_SSUMATCHTYPE_LOCAL,
                                              dns_zone_getorigin(zone),
@@ -621,7 +622,7 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
                goto cleanup;
        dns_name_init(&apexname, NULL);
        dns_name_clone(dns_zone_getorigin(zone), &apexname);
-       result = dns_db_findnode(db, &apexname, ISC_FALSE, &apexnode);
+       result = dns_db_findnode(db, &apexname, false, &apexnode);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -664,7 +665,7 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
        if (apexnode != NULL)
                dns_db_detachnode(db, &apexnode);
        if (dbversion != NULL)
-               dns_db_closeversion(db, &dbversion, ISC_TRUE);
+               dns_db_closeversion(db, &dbversion, true);
        if (db != NULL)
                dns_db_detach(&db);
        for (i = 0; rdatalists[i] != NULL; i++) {
@@ -785,12 +786,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
        dns_zonetype_t ztype;
        int i;
        int32_t journal_size;
-       isc_boolean_t multi;
-       isc_boolean_t alt;
+       bool multi;
+       bool alt;
        dns_view_t *view;
-       isc_boolean_t check = ISC_FALSE, fail = ISC_FALSE;
-       isc_boolean_t warn = ISC_FALSE, ignore = ISC_FALSE;
-       isc_boolean_t ixfrdiff;
+       bool check = false, fail = false;
+       bool warn = false, ignore = false;
+       bool ixfrdiff;
        dns_masterformat_t masterformat;
        const dns_master_style_t *masterstyle = &dns_master_style_default;
        isc_stats_t *zoneqrystats;
@@ -1215,17 +1216,17 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        ixfrdiff = cfg_obj_asboolean(obj);
                else if (!strcasecmp(cfg_obj_asstring(obj), "master") &&
                         ztype == dns_zone_master)
-                       ixfrdiff = ISC_TRUE;
+                       ixfrdiff = true;
                else if (!strcasecmp(cfg_obj_asstring(obj), "slave") &&
                        ztype == dns_zone_slave)
-                       ixfrdiff = ISC_TRUE;
+                       ixfrdiff = true;
                else
-                       ixfrdiff = ISC_FALSE;
+                       ixfrdiff = false;
                if (raw != NULL) {
                        dns_zone_setoption(raw, DNS_ZONEOPT_IXFRFROMDIFFS,
-                                          ISC_TRUE);
+                                          true);
                        dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
-                                          ISC_FALSE);
+                                          false);
                } else
                        dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
                                           ixfrdiff);
@@ -1243,12 +1244,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                checknames(ztype, maps, &obj);
                INSIST(obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
-                       fail = ISC_FALSE;
-                       check = ISC_TRUE;
+                       fail = false;
+                       check = true;
                } else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
-                       fail = check = ISC_TRUE;
+                       fail = check = true;
                } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
-                       fail = check = ISC_FALSE;
+                       fail = check = false;
                } else
                        INSIST(0);
                if (raw != NULL) {
@@ -1257,9 +1258,9 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMESFAIL,
                                           fail);
                        dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMES,
-                                          ISC_FALSE);
+                                          false);
                        dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMESFAIL,
-                                          ISC_FALSE);
+                                          false);
                } else {
                        dns_zone_setoption(zone, DNS_ZONEOPT_CHECKNAMES,
                                           check);
@@ -1282,9 +1283,9 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                result = ns_config_get(maps, "check-spf", &obj);
                INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
-                       check = ISC_TRUE;
+                       check = true;
                } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
-                       check = ISC_FALSE;
+                       check = false;
                } else
                        INSIST(0);
                dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
@@ -1352,7 +1353,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
        if (ztype == dns_zone_master || raw != NULL) {
                const cfg_obj_t *validity, *resign;
-               isc_boolean_t allow = ISC_FALSE, maint = ISC_FALSE;
+               bool allow = false, maint = false;
 
                obj = NULL;
                result = ns_config_get(maps, "sig-validity-interval", &obj);
@@ -1424,9 +1425,9 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                if (result == ISC_R_SUCCESS) {
                        const char *arg = cfg_obj_asstring(obj);
                        if (strcasecmp(arg, "allow") == 0)
-                               allow = ISC_TRUE;
+                               allow = true;
                        else if (strcasecmp(arg, "maintain") == 0)
-                               allow = maint = ISC_TRUE;
+                               allow = maint = true;
                        else if (strcasecmp(arg, "off") == 0)
                                ;
                        else
@@ -1452,7 +1453,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                if (result == ISC_R_SUCCESS)
                        check = cfg_obj_asboolean(obj);
                else
-                       check = ISC_FALSE;
+                       check = false;
                dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKWILDCARD, check);
 
                /*
@@ -1475,12 +1476,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                }
                if (strcasecmp(dupcheck, "warn") == 0) {
-                       fail = ISC_FALSE;
-                       check = ISC_TRUE;
+                       fail = false;
+                       check = true;
                } else if (strcasecmp(dupcheck, "fail") == 0) {
-                       fail = check = ISC_TRUE;
+                       fail = check = true;
                } else if (strcasecmp(dupcheck, "ignore") == 0) {
-                       fail = check = ISC_FALSE;
+                       fail = check = false;
                } else
                        INSIST(0);
                dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check);
@@ -1490,12 +1491,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                result = ns_config_get(maps, "check-mx", &obj);
                INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
-                       fail = ISC_FALSE;
-                       check = ISC_TRUE;
+                       fail = false;
+                       check = true;
                } else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
-                       fail = check = ISC_TRUE;
+                       fail = check = true;
                } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
-                       fail = check = ISC_FALSE;
+                       fail = check = false;
                } else
                        INSIST(0);
                dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check);
@@ -1513,7 +1514,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKINTEGRITY,
                                           cfg_obj_asboolean(obj));
                } else {
-                       check = ISC_FALSE;
+                       check = false;
                        result = ns_config_get(nodefault, "check-integrity",
                                               &obj);
                        if (result == ISC_R_SUCCESS)
@@ -1526,12 +1527,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                result = ns_config_get(maps, "check-mx-cname", &obj);
                INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
-                       warn = ISC_TRUE;
-                       ignore = ISC_FALSE;
+                       warn = true;
+                       ignore = false;
                } else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
-                       warn = ignore = ISC_FALSE;
+                       warn = ignore = false;
                } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
-                       warn = ignore = ISC_TRUE;
+                       warn = ignore = true;
                } else
                        INSIST(0);
                dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn);
@@ -1541,12 +1542,12 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                result = ns_config_get(maps, "check-srv-cname", &obj);
                INSIST(result == ISC_R_SUCCESS && obj != NULL);
                if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
-                       warn = ISC_TRUE;
-                       ignore = ISC_FALSE;
+                       warn = true;
+                       ignore = false;
                } else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
-                       warn = ignore = ISC_FALSE;
+                       warn = ignore = false;
                } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
-                       warn = ignore = ISC_TRUE;
+                       warn = ignore = true;
                } else
                        INSIST(0);
                dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn);
@@ -1565,7 +1566,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        const char *arg = cfg_obj_asstring(obj);
                        if (strcasecmp(arg, "no-resign") == 0)
                                dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
-                                                  ISC_TRUE);
+                                                  true);
                        else if (strcasecmp(arg, "maintain") == 0)
                                ;
                        else
@@ -1613,7 +1614,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                        result = dns_zone_setmasters(mayberaw, NULL, 0);
                RETERR(result);
 
-               multi = ISC_FALSE;
+               multi = false;
                if (count > 1) {
                        obj = NULL;
                        result = ns_config_get(maps, "multi-master", &obj);
@@ -1703,9 +1704,9 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                         */
                        view = dns_zone_getview(zone);
                        if (view != NULL && strcmp(view->name, "_default") == 0)
-                               alt = ISC_TRUE;
+                               alt = true;
                        else
-                               alt = ISC_FALSE;
+                               alt = false;
                } else
                        alt = cfg_obj_asboolean(obj);
                dns_zone_setoption(mayberaw, DNS_ZONEOPT_USEALTXFRSRC, alt);
@@ -1751,14 +1752,14 @@ ns_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase, dns_zone_t *zone,
        return (result);
 }
 
-isc_boolean_t
+bool
 ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
        const cfg_obj_t *zoptions = NULL;
        const cfg_obj_t *obj = NULL;
        const char *cfilename;
        const char *zfilename;
        dns_zone_t *raw = NULL;
-       isc_boolean_t has_raw;
+       bool has_raw;
        dns_zonetype_t ztype;
 
        zoptions = cfg_tuple_get(zconfig, "options");
@@ -1770,7 +1771,7 @@ ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
        if (zonetype_fromconfig(zoptions) == dns_zone_staticstub) {
                dns_zone_log(zone, ISC_LOG_DEBUG(1),
                             "not reusable: staticstub");
-               return (ISC_FALSE);
+               return (false);
        }
 
        /* If there's a raw zone, use that for filename and type comparison */
@@ -1779,11 +1780,11 @@ ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
                zfilename = dns_zone_getfile(raw);
                ztype = dns_zone_gettype(raw);
                dns_zone_detach(&raw);
-               has_raw = ISC_TRUE;
+               has_raw = true;
        } else {
                zfilename = dns_zone_getfile(zone);
                ztype = dns_zone_gettype(zone);
-               has_raw = ISC_FALSE;
+               has_raw = false;
        }
 
        obj = NULL;
@@ -1791,17 +1792,17 @@ ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
        if ((obj == NULL || !cfg_obj_asboolean(obj)) && has_raw) {
                dns_zone_log(zone, ISC_LOG_DEBUG(1),
                             "not reusable: old zone was inline-signing");
-               return (ISC_FALSE);
+               return (false);
        } else if ((obj != NULL && cfg_obj_asboolean(obj)) && !has_raw) {
                dns_zone_log(zone, ISC_LOG_DEBUG(1),
                             "not reusable: old zone was not inline-signing");
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (zonetype_fromconfig(zoptions) != ztype) {
                dns_zone_log(zone, ISC_LOG_DEBUG(1),
                             "not reusable: type mismatch");
-               return (ISC_FALSE);
+               return (false);
        }
 
        obj = NULL;
@@ -1816,8 +1817,8 @@ ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
        {
                dns_zone_log(zone, ISC_LOG_DEBUG(1),
                             "not reusable: filename mismatch");
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
index f460e6a2b726ce1343dc92bed9d450442b505079..8d1da3b38086823141022b1e7a6c99e91038ceb9 100644 (file)
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -131,16 +132,16 @@ static uint16_t dnsport = DNSDEFAULTPORT;
 #define RESOLV_CONF "/etc/resolv.conf"
 #endif
 
-static isc_boolean_t debugging = ISC_FALSE, ddebugging = ISC_FALSE;
-static isc_boolean_t memdebugging = ISC_FALSE;
-static isc_boolean_t have_ipv4 = ISC_FALSE;
-static isc_boolean_t have_ipv6 = ISC_FALSE;
-static isc_boolean_t is_dst_up = ISC_FALSE;
-static isc_boolean_t usevc = ISC_FALSE;
-static isc_boolean_t usegsstsig = ISC_FALSE;
-static isc_boolean_t use_win2k_gsstsig = ISC_FALSE;
-static isc_boolean_t tried_other_gsstsig = ISC_FALSE;
-static isc_boolean_t local_only = ISC_FALSE;
+static bool debugging = false, ddebugging = false;
+static bool memdebugging = false;
+static bool have_ipv4 = false;
+static bool have_ipv6 = false;
+static bool is_dst_up = false;
+static bool usevc = false;
+static bool usegsstsig = false;
+static bool use_win2k_gsstsig = false;
+static bool tried_other_gsstsig = false;
+static bool local_only = false;
 static isc_taskmgr_t *taskmgr = NULL;
 static isc_task_t *global_task = NULL;
 static isc_event_t *global_event = NULL;
@@ -166,7 +167,7 @@ static lwres_context_t *lwctx = NULL;
 static lwres_conf_t *lwconf;
 static isc_sockaddr_t *servers = NULL;
 static isc_sockaddr_t *master_servers = NULL;
-static isc_boolean_t default_servers = ISC_TRUE;
+static bool default_servers = true;
 static int ns_inuse = 0;
 static int master_inuse = 0;
 static int ns_total = 0;
@@ -178,10 +179,10 @@ static isc_sockaddr_t *localaddr6 = NULL;
 static const char *keyfile = NULL;
 static char *keystr = NULL;
 static isc_entropy_t *entropy = NULL;
-static isc_boolean_t shuttingdown = ISC_FALSE;
+static bool shuttingdown = false;
 static FILE *input;
-static isc_boolean_t interactive = ISC_TRUE;
-static isc_boolean_t seenerror = ISC_FALSE;
+static bool interactive = true;
+static bool seenerror = false;
 static const dns_master_style_t *style;
 static int requests = 0;
 static unsigned int logdebuglevel = 0;
@@ -192,8 +193,8 @@ static dns_rdataclass_t defaultclass = dns_rdataclass_in;
 static dns_rdataclass_t zoneclass = dns_rdataclass_none;
 static dns_message_t *answer = NULL;
 static uint32_t default_ttl = 0;
-static isc_boolean_t default_ttl_set = ISC_FALSE;
-static isc_boolean_t checknames = ISC_TRUE;
+static bool default_ttl_set = false;
+static bool checknames = true;
 
 typedef struct nsu_requestinfo {
        dns_message_t *msg;
@@ -327,14 +328,14 @@ getzoneclass(void) {
        return (zoneclass);
 }
 
-static isc_boolean_t
+static bool
 setzoneclass(dns_rdataclass_t rdclass) {
        if (zoneclass == dns_rdataclass_none ||
            rdclass == dns_rdataclass_none)
                zoneclass = rdclass;
        if (zoneclass != rdclass)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 static void
@@ -451,11 +452,11 @@ reset_system(void) {
                        dns_tsigkey_detach(&tsigkey);
                if (gssring != NULL)
                        dns_tsigkeyring_detach(&gssring);
-               tried_other_gsstsig = ISC_FALSE;
+               tried_other_gsstsig = false;
        }
 }
 
-static isc_boolean_t
+static bool
 parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
           uint16_t *digestbitsp)
 {
@@ -468,7 +469,7 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
 
        if (len >= sizeof(buf)) {
                error("unknown key type '%.*s'", (int)(len), hmacstr);
-               return (ISC_FALSE);
+               return (false);
        }
 
        /* Copy len bytes and NUL terminate. */
@@ -482,7 +483,7 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
                result = isc_parse_uint16(&digestbits, &buf[9], 10);
                if (result != ISC_R_SUCCESS || digestbits > 128) {
                        error("digest-bits out of range [0..128]");
-                       return (ISC_FALSE);
+                       return (false);
                }
                *digestbitsp = (digestbits + 7) & ~0x7U;
        } else
@@ -494,7 +495,7 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
                result = isc_parse_uint16(&digestbits, &buf[10], 10);
                if (result != ISC_R_SUCCESS || digestbits > 160) {
                        error("digest-bits out of range [0..160]");
-                       return (ISC_FALSE);
+                       return (false);
                }
                *digestbitsp = (digestbits + 7) & ~0x7U;
        } else if (strcasecmp(buf, "hmac-sha224") == 0) {
@@ -504,7 +505,7 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
                result = isc_parse_uint16(&digestbits, &buf[12], 10);
                if (result != ISC_R_SUCCESS || digestbits > 224) {
                        error("digest-bits out of range [0..224]");
-                       return (ISC_FALSE);
+                       return (false);
                }
                *digestbitsp = (digestbits + 7) & ~0x7U;
        } else if (strcasecmp(buf, "hmac-sha256") == 0) {
@@ -514,7 +515,7 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
                result = isc_parse_uint16(&digestbits, &buf[12], 10);
                if (result != ISC_R_SUCCESS || digestbits > 256) {
                        error("digest-bits out of range [0..256]");
-                       return (ISC_FALSE);
+                       return (false);
                }
                *digestbitsp = (digestbits + 7) & ~0x7U;
        } else if (strcasecmp(buf, "hmac-sha384") == 0) {
@@ -524,7 +525,7 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
                result = isc_parse_uint16(&digestbits, &buf[12], 10);
                if (result != ISC_R_SUCCESS || digestbits > 384) {
                        error("digest-bits out of range [0..384]");
-                       return (ISC_FALSE);
+                       return (false);
                }
                *digestbitsp = (digestbits + 7) & ~0x7U;
        } else if (strcasecmp(buf, "hmac-sha512") == 0) {
@@ -534,14 +535,14 @@ parse_hmac(dns_name_t **hmac, const char *hmacstr, size_t len,
                result = isc_parse_uint16(&digestbits, &buf[12], 10);
                if (result != ISC_R_SUCCESS || digestbits > 512) {
                        error("digest-bits out of range [0..512]");
-                       return (ISC_FALSE);
+                       return (false);
                }
                *digestbitsp = (digestbits + 7) & ~0x7U;
        } else {
                error("unknown key type '%s'", buf);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static int
@@ -624,7 +625,7 @@ setup_keystr(void) {
 
        debug("keycreate");
        result = dns_tsigkey_create(mykeyname, hmacname, secret, secretlen,
-                                   ISC_FALSE, NULL, 0, 0, gmctx, NULL,
+                                   false, NULL, 0, 0, gmctx, NULL,
                                    &tsigkey);
        if (result != ISC_R_SUCCESS)
                fprintf(stderr, "could not create key from %s: %s\n",
@@ -751,7 +752,7 @@ setup_keyfile(isc_mem_t *mctx, isc_log_t *lctx) {
        }
        if (hmacname != NULL) {
                result = dns_tsigkey_createfromkey(dst_key_name(dstkey),
-                                                  hmacname, dstkey, ISC_FALSE,
+                                                  hmacname, dstkey, false,
                                                   NULL, 0, 0, mctx, NULL,
                                                   &tsigkey);
                dst_key_free(&dstkey);
@@ -804,7 +805,7 @@ doshutdown(void) {
        if (is_dst_up) {
                ddebug("Destroy DST lib");
                dst_lib_destroy();
-               is_dst_up = ISC_FALSE;
+               is_dst_up = false;
        }
 
        cleanup_entropy(&entropy);
@@ -845,7 +846,7 @@ shutdown_program(isc_task_t *task, isc_event_t *event) {
        ddebug("shutdown_program()");
        isc_event_free(&event);
 
-       shuttingdown = ISC_TRUE;
+       shuttingdown = true;
        maybeshutdown();
 }
 
@@ -864,11 +865,11 @@ setup_system(void) {
 
        result = isc_net_probeipv4();
        if (result == ISC_R_SUCCESS)
-               have_ipv4 = ISC_TRUE;
+               have_ipv4 = true;
 
        result = isc_net_probeipv6();
        if (result == ISC_R_SUCCESS)
-               have_ipv6 = ISC_TRUE;
+               have_ipv6 = true;
 
        if (!have_ipv4 && !have_ipv6)
                fatal("could not find either IPv4 or IPv6");
@@ -972,7 +973,7 @@ setup_system(void) {
 
        result = dst_lib_init(gmctx, entropy, 0);
        check_result(result, "dst_lib_init");
-       is_dst_up = ISC_TRUE;
+       is_dst_up = true;
 
        attrmask = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP;
        attrmask |= DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6;
@@ -1045,14 +1046,14 @@ pre_parse_args(int argc, char **argv) {
        dns_rdatatype_t t;
        int ch;
        char buf[100];
-       isc_boolean_t doexit = ISC_FALSE;
+       bool doexit = false;
 
        while ((ch = isc_commandline_parse(argc, argv, PARSE_ARGS_FMT)) != -1) {
                switch (ch) {
                case 'M': /* was -dm */
-                       debugging = ISC_TRUE;
-                       ddebugging = ISC_TRUE;
-                       memdebugging = ISC_TRUE;
+                       debugging = true;
+                       ddebugging = true;
+                       memdebugging = true;
                        isc_mem_debugging = ISC_MEM_DEBUGTRACE |
                                            ISC_MEM_DEBUGRECORD;
                        break;
@@ -1075,7 +1076,7 @@ pre_parse_args(int argc, char **argv) {
                                if (strncmp(buf, "TYPE", 4) != 0)
                                        fprintf(stdout, "%s\n", buf);
                        }
-                       doexit = ISC_TRUE;
+                       doexit = true;
                        break;
 
                case 'T':
@@ -1086,12 +1087,12 @@ pre_parse_args(int argc, char **argv) {
                                if (strncmp(buf, "TYPE", 4) != 0)
                                        fprintf(stdout, "%s\n", buf);
                        }
-                       doexit = ISC_TRUE;
+                       doexit = true;
                        break;
 
                case 'V':
                        version();
-                       doexit = ISC_TRUE;
+                       doexit = true;
                        break;
 
                default:
@@ -1100,7 +1101,7 @@ pre_parse_args(int argc, char **argv) {
        }
        if (doexit)
                exit(0);
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
        isc_commandline_index = 1;
 }
 
@@ -1109,26 +1110,26 @@ parse_args(int argc, char **argv, isc_mem_t *mctx, isc_entropy_t **ectx) {
        int ch;
        uint32_t i;
        isc_result_t result;
-       isc_boolean_t force_interactive = ISC_FALSE;
+       bool force_interactive = false;
 
        debug("parse_args");
        while ((ch = isc_commandline_parse(argc, argv, PARSE_ARGS_FMT)) != -1) {
                switch (ch) {
                case 'd':
-                       debugging = ISC_TRUE;
+                       debugging = true;
                        break;
                case 'D': /* was -dd */
-                       debugging = ISC_TRUE;
-                       ddebugging = ISC_TRUE;
+                       debugging = true;
+                       ddebugging = true;
                        break;
                case 'M':
                        break;
                case 'i':
-                       force_interactive = ISC_TRUE;
-                       interactive = ISC_TRUE;
+                       force_interactive = true;
+                       interactive = true;
                        break;
                case 'l':
-                       local_only = ISC_TRUE;
+                       local_only = true;
                        break;
                case 'L':
                        result = isc_parse_uint32(&i, isc_commandline_argument,
@@ -1144,18 +1145,18 @@ parse_args(int argc, char **argv, isc_mem_t *mctx, isc_entropy_t **ectx) {
                        keystr = isc_commandline_argument;
                        break;
                case 'v':
-                       usevc = ISC_TRUE;
+                       usevc = true;
                        break;
                case 'k':
                        keyfile = isc_commandline_argument;
                        break;
                case 'g':
-                       usegsstsig = ISC_TRUE;
-                       use_win2k_gsstsig = ISC_FALSE;
+                       usegsstsig = true;
+                       use_win2k_gsstsig = false;
                        break;
                case 'o':
-                       usegsstsig = ISC_TRUE;
-                       use_win2k_gsstsig = ISC_TRUE;
+                       usegsstsig = true;
+                       use_win2k_gsstsig = true;
                        break;
                case 'p':
                        result = isc_parse_uint16(&dnsport,
@@ -1240,7 +1241,7 @@ parse_args(int argc, char **argv, isc_mem_t *mctx, isc_entropy_t **ectx) {
                        }
                }
                if (!force_interactive) {
-                       interactive = ISC_FALSE;
+                       interactive = false;
                }
        }
 }
@@ -1335,7 +1336,7 @@ parse_rdata(char **cmdlinep, dns_rdataclass_t rdataclass,
 }
 
 static uint16_t
-make_prereq(char *cmdline, isc_boolean_t ispositive, isc_boolean_t isrrset) {
+make_prereq(char *cmdline, bool ispositive, bool isrrset) {
        isc_result_t result;
        char *word;
        dns_name_t *name = NULL;
@@ -1442,7 +1443,7 @@ make_prereq(char *cmdline, isc_boolean_t ispositive, isc_boolean_t isrrset) {
 static uint16_t
 evaluate_prereq(char *cmdline) {
        char *word;
-       isc_boolean_t ispositive, isrrset;
+       bool ispositive, isrrset;
 
        ddebug("evaluate_prereq()");
        word = nsu_strsep(&cmdline, " \t\r\n");
@@ -1451,17 +1452,17 @@ evaluate_prereq(char *cmdline) {
                return (STATUS_SYNTAX);
        }
        if (strcasecmp(word, "nxdomain") == 0) {
-               ispositive = ISC_FALSE;
-               isrrset = ISC_FALSE;
+               ispositive = false;
+               isrrset = false;
        } else if (strcasecmp(word, "yxdomain") == 0) {
-               ispositive = ISC_TRUE;
-               isrrset = ISC_FALSE;
+               ispositive = true;
+               isrrset = false;
        } else if (strcasecmp(word, "nxrrset") == 0) {
-               ispositive = ISC_FALSE;
-               isrrset = ISC_TRUE;
+               ispositive = false;
+               isrrset = true;
        } else if (strcasecmp(word, "yxrrset") == 0) {
-               ispositive = ISC_TRUE;
-               isrrset = ISC_TRUE;
+               ispositive = true;
+               isrrset = true;
        } else {
                fprintf(stderr, "incorrect operation code: %s\n", word);
                return (STATUS_SYNTAX);
@@ -1508,7 +1509,7 @@ evaluate_server(char *cmdline) {
                isc_mem_put(gmctx, servers, ns_alloc * sizeof(isc_sockaddr_t));
        }
 
-       default_servers = ISC_FALSE;
+       default_servers = false;
 
        ns_alloc = MAX_SERVERADDRS;
        ns_inuse = 0;
@@ -1643,7 +1644,7 @@ evaluate_key(char *cmdline) {
        if (tsigkey != NULL)
                dns_tsigkey_detach(&tsigkey);
        result = dns_tsigkey_create(mykeyname, hmacname, secret, secretlen,
-                                   ISC_FALSE, NULL, 0, 0, gmctx, NULL,
+                                   false, NULL, 0, 0, gmctx, NULL,
                                    &tsigkey);
        isc_mem_free(gmctx, secret);
        if (result != ISC_R_SUCCESS) {
@@ -1725,7 +1726,7 @@ evaluate_ttl(char *cmdline) {
 
        if (!strcasecmp(word, "none")) {
                default_ttl = 0;
-               default_ttl_set = ISC_FALSE;
+               default_ttl_set = false;
                return (STATUS_MORE);
        }
 
@@ -1739,7 +1740,7 @@ evaluate_ttl(char *cmdline) {
                return (STATUS_SYNTAX);
        }
        default_ttl = ttl;
-       default_ttl_set = ISC_TRUE;
+       default_ttl_set = true;
 
        return (STATUS_MORE);
 }
@@ -1778,7 +1779,7 @@ evaluate_class(char *cmdline) {
 }
 
 static uint16_t
-update_addordelete(char *cmdline, isc_boolean_t isdelete) {
+update_addordelete(char *cmdline, bool isdelete) {
        isc_result_t result;
        dns_name_t *name = NULL;
        uint32_t ttl;
@@ -1926,7 +1927,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
                dns_name_t *bad;
 
                if (!dns_rdata_checkowner(name, rdata->rdclass, rdata->type,
-                                         ISC_TRUE))
+                                         true))
                {
                        char namebuf[DNS_NAME_FORMATSIZE];
 
@@ -1974,7 +1975,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
 static uint16_t
 evaluate_update(char *cmdline) {
        char *word;
-       isc_boolean_t isdelete;
+       bool isdelete;
 
        ddebug("evaluate_update()");
        word = nsu_strsep(&cmdline, " \t\r\n");
@@ -1983,11 +1984,11 @@ evaluate_update(char *cmdline) {
                return (STATUS_SYNTAX);
        }
        if (strcasecmp(word, "delete") == 0)
-               isdelete = ISC_TRUE;
+               isdelete = true;
        else if (strcasecmp(word, "del") == 0)
-               isdelete = ISC_TRUE;
+               isdelete = true;
        else if (strcasecmp(word, "add") == 0)
-               isdelete = ISC_FALSE;
+               isdelete = false;
        else {
                fprintf(stderr, "incorrect operation code: %s\n", word);
                return (STATUS_SYNTAX);
@@ -2008,11 +2009,11 @@ evaluate_checknames(char *cmdline) {
        if (strcasecmp(word, "yes") == 0 ||
            strcasecmp(word, "true") == 0 ||
            strcasecmp(word, "on") == 0) {
-               checknames = ISC_TRUE;
+               checknames = true;
        } else if (strcasecmp(word, "no") == 0 ||
                 strcasecmp(word, "false") == 0 ||
                 strcasecmp(word, "off") == 0) {
-               checknames = ISC_FALSE;
+               checknames = false;
        } else {
                fprintf(stderr, "incorrect check-names directive: %s\n", word);
                return (STATUS_SYNTAX);
@@ -2106,21 +2107,21 @@ do_next_command(char *cmdline) {
        if (strcasecmp(word, "prereq") == 0)
                return (evaluate_prereq(cmdline));
        if (strcasecmp(word, "nxdomain") == 0)
-               return (make_prereq(cmdline, ISC_FALSE, ISC_FALSE));
+               return (make_prereq(cmdline, false, false));
        if (strcasecmp(word, "yxdomain") == 0)
-               return (make_prereq(cmdline, ISC_TRUE, ISC_FALSE));
+               return (make_prereq(cmdline, true, false));
        if (strcasecmp(word, "nxrrset") == 0)
-               return (make_prereq(cmdline, ISC_FALSE, ISC_TRUE));
+               return (make_prereq(cmdline, false, true));
        if (strcasecmp(word, "yxrrset") == 0)
-               return (make_prereq(cmdline, ISC_TRUE, ISC_TRUE));
+               return (make_prereq(cmdline, true, true));
        if (strcasecmp(word, "update") == 0)
                return (evaluate_update(cmdline));
        if (strcasecmp(word, "delete") == 0)
-               return (update_addordelete(cmdline, ISC_TRUE));
+               return (update_addordelete(cmdline, true));
        if (strcasecmp(word, "del") == 0)
-               return (update_addordelete(cmdline, ISC_TRUE));
+               return (update_addordelete(cmdline, true));
        if (strcasecmp(word, "add") == 0)
-               return (update_addordelete(cmdline, ISC_FALSE));
+               return (update_addordelete(cmdline, false));
        if (strcasecmp(word, "server") == 0)
                return (evaluate_server(cmdline));
        if (strcasecmp(word, "local") == 0)
@@ -2133,9 +2134,9 @@ do_next_command(char *cmdline) {
                return (STATUS_SEND);
        if (strcasecmp(word, "debug") == 0) {
                if (debugging)
-                       ddebugging = ISC_TRUE;
+                       ddebugging = true;
                else
-                       debugging = ISC_TRUE;
+                       debugging = true;
                return (STATUS_MORE);
        }
        if (strcasecmp(word, "ttl") == 0)
@@ -2150,7 +2151,7 @@ do_next_command(char *cmdline) {
                return (STATUS_MORE);
        }
        if (strcasecmp(word, "key") == 0) {
-               usegsstsig = ISC_FALSE;
+               usegsstsig = false;
                return (evaluate_key(cmdline));
        }
        if (strcasecmp(word, "realm") == 0)
@@ -2160,8 +2161,8 @@ do_next_command(char *cmdline) {
                return (evaluate_checknames(cmdline));
        if (strcasecmp(word, "gsstsig") == 0) {
 #ifdef GSSAPI
-               usegsstsig = ISC_TRUE;
-               use_win2k_gsstsig = ISC_FALSE;
+               usegsstsig = true;
+               use_win2k_gsstsig = false;
 #else
                fprintf(stderr, "gsstsig not supported\n");
 #endif
@@ -2169,8 +2170,8 @@ do_next_command(char *cmdline) {
        }
        if (strcasecmp(word, "oldgsstsig") == 0) {
 #ifdef GSSAPI
-               usegsstsig = ISC_TRUE;
-               use_win2k_gsstsig = ISC_TRUE;
+               usegsstsig = true;
+               use_win2k_gsstsig = true;
 #else
                fprintf(stderr, "gsstsig not supported\n");
 #endif
@@ -2246,7 +2247,7 @@ get_next_command(void) {
        return (result);
 }
 
-static isc_boolean_t
+static bool
 user_interaction(void) {
        uint16_t result = STATUS_MORE;
 
@@ -2257,8 +2258,8 @@ user_interaction(void) {
                        fatal("syntax error");
        }
        if (result == STATUS_SEND)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 
 }
 
@@ -2292,7 +2293,7 @@ check_tsig_error(dns_rdataset_t *rdataset, isc_buffer_t *b) {
        }
 }
 
-static isc_boolean_t
+static bool
 next_master(const char *caller, isc_sockaddr_t *addr, isc_result_t eresult) {
        char addrbuf[ISC_SOCKADDR_FORMATSIZE];
 
@@ -2300,9 +2301,9 @@ next_master(const char *caller, isc_sockaddr_t *addr, isc_result_t eresult) {
        fprintf(stderr, "; Communication with %s failed: %s\n",
                addrbuf, isc_result_totext(eresult));
        if (++master_inuse >= master_total)
-               return (ISC_FALSE);
+               return (false);
        ddebug("%s: trying next server", caller);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -2333,7 +2334,7 @@ update_completed(isc_task_t *task, isc_event_t *event) {
                                 &master_servers[master_inuse],
                                 reqev->result))
                {
-                       seenerror = ISC_TRUE;
+                       seenerror = true;
                        goto done;
                }
 
@@ -2371,14 +2372,14 @@ update_completed(isc_task_t *task, isc_event_t *event) {
 #endif
                fprintf(stderr, "; TSIG error with server: %s\n",
                        isc_result_totext(result));
-               seenerror = ISC_TRUE;
+               seenerror = true;
                break;
        default:
                check_result(result, "dns_request_getresponse");
        }
 
        if (answer->rcode != dns_rcode_noerror) {
-               seenerror = ISC_TRUE;
+               seenerror = true;
                if (!debugging) {
                        char buf[64];
                        isc_buffer_t b;
@@ -2482,7 +2483,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
        dns_message_t *soaquery = NULL;
        isc_sockaddr_t *addr;
        isc_sockaddr_t *srcaddr;
-       isc_boolean_t seencname = ISC_FALSE;
+       bool seencname = false;
        dns_name_t tname;
        unsigned int nlabels;
 
@@ -2579,7 +2580,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
                dns_message_destroy(&soaquery);
                ddebug("Out of recvsoa");
                done_update();
-               seenerror = ISC_TRUE;
+               seenerror = true;
                return;
        }
 
@@ -2610,7 +2611,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
                                                 &tset) == ISC_R_SUCCESS ||
                            dns_message_findtype(name, dns_rdatatype_dname, 0,
                                                 &tset) == ISC_R_SUCCESS ) {
-                               seencname = ISC_TRUE;
+                               seencname = true;
                                break;
                        }
                }
@@ -2666,7 +2667,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
                size_t size;
 
                isc_buffer_init(&buf, serverstr, sizeof(serverstr));
-               result = dns_name_totext(&master, ISC_TRUE, &buf);
+               result = dns_name_totext(&master, true, &buf);
                check_result(result, "dns_name_totext");
                serverstr[isc_buffer_usedlength(&buf)] = 0;
 
@@ -2813,7 +2814,7 @@ get_ticket_realm(isc_mem_t *mctx) {
 
 static void
 failed_gssrequest() {
-       seenerror = ISC_TRUE;
+       seenerror = true;
 
        dns_name_free(&tmpzonename, gmctx);
        dns_name_free(&restart_master, gmctx);
@@ -2836,7 +2837,7 @@ start_gssrequest(dns_name_t *master) {
        char *err_message = NULL;
 
        debug("start_gssrequest");
-       usevc = ISC_TRUE;
+       usevc = true;
 
        if (gssring != NULL)
                dns_tsigkeyring_detach(&gssring);
@@ -3033,10 +3034,10 @@ recvgss(isc_task_t *task, isc_event_t *event) {
                ddebug("recvgss trying %s GSS-TSIG",
                       use_win2k_gsstsig ? "Standard" : "Win2k");
                if (use_win2k_gsstsig)
-                       use_win2k_gsstsig = ISC_FALSE;
+                       use_win2k_gsstsig = false;
                else
-                       use_win2k_gsstsig = ISC_TRUE;
-               tried_other_gsstsig = ISC_TRUE;
+                       use_win2k_gsstsig = true;
+               tried_other_gsstsig = true;
                start_gssrequest(&restart_master);
                goto done;
        }
@@ -3259,7 +3260,7 @@ cleanup(void) {
 
 static void
 getinput(isc_task_t *task, isc_event_t *event) {
-       isc_boolean_t more;
+       bool more;
 
        UNUSED(task);
 
@@ -3288,7 +3289,7 @@ main(int argc, char **argv) {
 
        input = stdin;
 
-       interactive = ISC_TF(isatty(0));
+       interactive = isatty(0);
 
        isc_app_start();
 
index 2e2bf4c94537e1b0d3ecb1fb78c8972913da949a..ae9f7d107354a6245d90bfeb4be9f8b61e3b3bfb 100644 (file)
@@ -152,8 +152,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, OP_ANY, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, OP_ANY, false, true,
+                                 true, (const char *) pin, slot);
        if (result == PK11_R_NORANDOMSERVICE ||
            result == PK11_R_NODIGESTSERVICE ||
            result == PK11_R_NOAESSERVICE) {
index 9631c0ebf2252a6848da21c6dc50f1a9b1caf0aa..560b4e99b9e7597b44652324e561fc8849afb942 100644 (file)
@@ -565,8 +565,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, true,
+                                 true, (const char *) pin, slot);
        if (result == PK11_R_NORANDOMSERVICE ||
            result == PK11_R_NODIGESTSERVICE ||
            result == PK11_R_NOAESSERVICE) {
index 2f62a4593d149ab05d97c56b68d5c3caf5cb4c2d..891252112b7bd9486e96e16a57af6cda69382417 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -71,7 +72,7 @@ main(int argc, char *argv[]) {
        char *lib_name = NULL;
        char *label = NULL;
        char *pin = NULL;
-       isc_boolean_t error = ISC_FALSE, logon = ISC_TRUE, all = ISC_FALSE;
+       bool error = false, logon = true, all = false;
        unsigned int i = 0, id = 0;
        int c, errflg = 0;
        CK_ULONG ulObjectCount;
@@ -82,7 +83,7 @@ main(int argc, char *argv[]) {
        while ((c = isc_commandline_parse(argc, argv, ":m:s:i:l:p:P")) != -1) {
                switch (c) {
                case 'P':
-                       logon = ISC_FALSE;
+                       logon = false;
                        break;
                case 'm':
                        lib_name = isc_commandline_argument;
@@ -121,7 +122,7 @@ main(int argc, char *argv[]) {
        }
 
        if (!id && (label == NULL))
-               all = ISC_TRUE;
+               all = true;
 
        if (slot)
                printf("slot %lu\n", slot);
@@ -146,7 +147,7 @@ main(int argc, char *argv[]) {
        if (logon && pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, OP_ANY, ISC_FALSE, ISC_FALSE,
+       result = pk11_get_session(&pctx, OP_ANY, false, false,
                                  logon, pin, slot);
        if (result == PK11_R_NORANDOMSERVICE ||
            result == PK11_R_NODIGESTSERVICE ||
index bea4d02919e98354775c959818c58677023bf467..564710ac480b8f5e330a5be83494e0439355c50b 100644 (file)
@@ -46,7 +46,7 @@ main(int argc, char *argv[]) {
                        lib_name = isc_commandline_argument;
                        break;
                case 'v':
-                       pk11_verbose_init = ISC_TRUE;
+                       pk11_verbose_init = true;
                        break;
                case ':':
                        fprintf(stderr, "Option -%c requires an operand\n",
@@ -78,8 +78,8 @@ main(int argc, char *argv[]) {
        if (lib_name != NULL)
                pk11_set_lib_name(lib_name);
 
-       result = pk11_get_session(&pctx, OP_ANY, ISC_TRUE, ISC_FALSE,
-                                 ISC_FALSE, NULL, 0);
+       result = pk11_get_session(&pctx, OP_ANY, true, false,
+                                 false, NULL, 0);
        if (result == PK11_R_NORANDOMSERVICE ||
            result == PK11_R_NODIGESTSERVICE ||
            result == PK11_R_NOAESSERVICE) {
index 4addf06a59e7e4a4f32723111cd7c970c822b8bf..9eb0ce0c7b8c0219ec71dbabad55134238d3e5d0 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/app.h>
@@ -54,7 +55,7 @@
 #define SERVERADDRS 10
 
 const char *progname;
-isc_boolean_t verbose;
+bool verbose;
 
 static const char *admin_conffile;
 static const char *admin_keyfile;
@@ -62,7 +63,7 @@ static const char *version = VERSION;
 static const char *servername = NULL;
 static isc_sockaddr_t serveraddrs[SERVERADDRS];
 static isc_sockaddr_t local4, local6;
-static isc_boolean_t local4set = ISC_FALSE, local6set = ISC_FALSE;
+static bool local4set = false, local6set = false;
 static int nserveraddrs;
 static int currentaddr = 0;
 static unsigned int remoteport = 0;
@@ -71,8 +72,8 @@ static isc_buffer_t *databuf;
 static isccc_ccmsg_t ccmsg;
 static uint32_t algorithm;
 static isccc_region_t secret;
-static isc_boolean_t failed = ISC_FALSE;
-static isc_boolean_t c_flag = ISC_FALSE;
+static bool failed = false;
+static bool c_flag = false;
 static isc_mem_t *rndc_mctx;
 static int sends, recvs, connects;
 static char *command;
@@ -80,8 +81,8 @@ static char *args;
 static char program[256];
 static isc_socket_t *sock = NULL;
 static uint32_t serial;
-static isc_boolean_t quiet = ISC_FALSE;
-static isc_boolean_t showresult = ISC_FALSE;
+static bool quiet = false;
+static bool showresult = false;
 
 static void rndc_startconnect(isc_sockaddr_t *addr, isc_task_t *task);
 
@@ -282,7 +283,7 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
                fatal("bad or missing data section in response");
        result = isccc_cc_lookupstring(data, "err", &errormsg);
        if (result == ISC_R_SUCCESS) {
-               failed = ISC_TRUE;
+               failed = true;
                fprintf(stderr, "%s: '%s' failed: %s\n",
                        progname, command, errormsg);
        }
@@ -531,7 +532,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
        const char *algorithmstr;
        static char secretarray[1024];
        const cfg_type_t *conftype = &cfg_type_rndcconf;
-       isc_boolean_t key_only = ISC_FALSE;
+       bool key_only = false;
        const cfg_listelt_t *element;
 
        if (! isc_file_exists(conffile)) {
@@ -544,7 +545,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
                if (! isc_file_exists(conffile))
                        fatal("neither %s nor %s was found",
                              admin_conffile, admin_keyfile);
-               key_only = ISC_TRUE;
+               key_only = true;
        } else if (! c_flag && isc_file_exists(admin_keyfile)) {
                fprintf(stderr, "WARNING: key file (%s) exists, but using "
                        "default configuration file (%s)\n",
@@ -733,7 +734,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
                cfg_map_get(server, "source-address", &address);
                if (address != NULL) {
                        local4 = *cfg_obj_assockaddr(address);
-                       local4set = ISC_TRUE;
+                       local4set = true;
                }
        }
        if (!local4set && options != NULL) {
@@ -741,7 +742,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
                cfg_map_get(options, "default-source-address", &address);
                if (address != NULL) {
                        local4 = *cfg_obj_assockaddr(address);
-                       local4set = ISC_TRUE;
+                       local4set = true;
                }
        }
 
@@ -750,7 +751,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
                cfg_map_get(server, "source-address-v6", &address);
                if (address != NULL) {
                        local6 = *cfg_obj_assockaddr(address);
-                       local6set = ISC_TRUE;
+                       local6set = true;
                }
        }
        if (!local6set && options != NULL) {
@@ -758,7 +759,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
                cfg_map_get(options, "default-source-address-v6", &address);
                if (address != NULL) {
                        local6 = *cfg_obj_assockaddr(address);
-                       local6set = ISC_TRUE;
+                       local6set = true;
                }
        }
 
@@ -768,7 +769,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
 int
 main(int argc, char **argv) {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t show_final_mem = ISC_FALSE;
+       bool show_final_mem = false;
        isc_taskmgr_t *taskmgr = NULL;
        isc_task_t *task = NULL;
        isc_log_t *log = NULL;
@@ -799,7 +800,7 @@ main(int argc, char **argv) {
        if (result != ISC_R_SUCCESS)
                fatal("isc_app_start() failed: %s", isc_result_totext(result));
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((ch = isc_commandline_parse(argc, argv, "b:c:hk:Mmp:qrs:Vy:"))
               != -1) {
@@ -808,17 +809,17 @@ main(int argc, char **argv) {
                        if (inet_pton(AF_INET, isc_commandline_argument,
                                      &in) == 1) {
                                isc_sockaddr_fromin(&local4, &in, 0);
-                               local4set = ISC_TRUE;
+                               local4set = true;
                        } else if (inet_pton(AF_INET6, isc_commandline_argument,
                                             &in6) == 1) {
                                isc_sockaddr_fromin6(&local6, &in6, 0);
-                               local6set = ISC_TRUE;
+                               local6set = true;
                        }
                        break;
 
                case 'c':
                        admin_conffile = isc_commandline_argument;
-                       c_flag = ISC_TRUE;
+                       c_flag = true;
                        break;
 
                case 'k':
@@ -830,7 +831,7 @@ main(int argc, char **argv) {
                        break;
 
                case 'm':
-                       show_final_mem = ISC_TRUE;
+                       show_final_mem = true;
                        break;
 
                case 'p':
@@ -841,11 +842,11 @@ main(int argc, char **argv) {
                        break;
 
                case 'q':
-                       quiet = ISC_TRUE;
+                       quiet = true;
                        break;
 
                case 'r':
-                       showresult = ISC_TRUE;
+                       showresult = true;
                        break;
 
                case 's':
@@ -853,7 +854,7 @@ main(int argc, char **argv) {
                        break;
 
                case 'V':
-                       verbose = ISC_TRUE;
+                       verbose = true;
                        break;
 
                case 'y':
index b5543a3be4d54be86bd221550caa1139ffc2d68a..0066e7cbfdd5b4f431b1f4803508c9677acbec9d 100644 (file)
 #include <config.h>
 
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <isc/boolean.h>
 #include <isc/print.h>
 
 #include "util.h"
 
-extern isc_boolean_t verbose;
+extern bool verbose;
 extern const char *progname;
 
 void
index 588c11e57e49cf3ed41e4fb9cc40e9a4216befb1..4d63c3b4289c83a9c31c16ed454ac1eca6ca0201 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <errno.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/mem.h>
@@ -63,8 +64,8 @@ main(int argc, char **argv) {
        cfg_parser_t *pctx = NULL;
        cfg_obj_t *cfg = NULL;
        cfg_type_t *type = NULL;
-       isc_boolean_t grammar = ISC_FALSE;
-       isc_boolean_t memstats = ISC_FALSE;
+       bool grammar = false;
+       bool memstats = false;
        char *filename = NULL;
        unsigned int zonetype = 0;
 
@@ -99,7 +100,7 @@ main(int argc, char **argv) {
 
        while (argc > 1) {
                if (strcmp(argv[1], "--grammar") == 0) {
-                       grammar = ISC_TRUE;
+                       grammar = true;
                } else if (strcmp(argv[1], "--zonegrammar") == 0) {
                        argv++, argc--;
                        if (argc <= 1)  {
@@ -131,7 +132,7 @@ main(int argc, char **argv) {
                                usage();
                        }
                } else if (strcmp(argv[1], "--memstats") == 0) {
-                       memstats = ISC_TRUE;
+                       memstats = true;
                } else if (strcmp(argv[1], "--named") == 0) {
                        type = &cfg_type_namedconf;
                } else if (strcmp(argv[1], "--rndc") == 0) {
index fed59be00d6096aef186bc681f68c9aa23dc5093..61a41b0edc6fdb89a8773f3037ee48d508c3df11 100644 (file)
@@ -12,6 +12,8 @@
 /*! \file */
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/hash.h>
 #include <isc/log.h>
@@ -40,7 +42,7 @@ isc_mem_t *mctx = NULL;
 isc_log_t *lctx = NULL;
 isc_entropy_t *ectx = NULL;
 
-static isc_boolean_t hash_active = ISC_FALSE, dst_active = ISC_FALSE;
+static bool hash_active = false, dst_active = false;
 
 /*
  * Logging categories: this needs to match the list in bin/named/log.c.
@@ -101,10 +103,10 @@ main(int argc, char **argv) {
        CHECK(isc_entropy_create(mctx, &ectx));
 
        CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE));
-       hash_active = ISC_TRUE;
+       hash_active = true;
 
        CHECK(dst_lib_init(mctx, ectx, ISC_ENTROPY_BLOCKING));
-       dst_active = ISC_TRUE;
+       dst_active = true;
 
        CHECK(isc_log_create(mctx, &lctx, &logconfig));
        isc_log_registercategories(lctx, categories);
@@ -150,11 +152,11 @@ main(int argc, char **argv) {
                isc_log_destroy(&lctx);
        if (dst_active) {
                dst_lib_destroy();
-               dst_active = ISC_FALSE;
+               dst_active = false;
        }
        if (hash_active) {
                isc_hash_destroy();
-               hash_active = ISC_FALSE;
+               hash_active = false;
        }
        if (ectx != NULL)
                isc_entropy_detach(&ectx);
@@ -163,4 +165,3 @@ main(int argc, char **argv) {
 
        return(result != ISC_R_SUCCESS ? 1 : 0);
 }
-
index 49e15df4ed6f1049b992f0ed63b4376727fd0152..b1c1a7f7860dd353f1d31fd7025bb6655ba17db2 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/app.h>
@@ -68,7 +69,7 @@ done(isc_task_t *task, isc_event_t *event) {
 int
 main(int argc, char *argv[]) {
        isc_mem_t *mctx;
-       isc_boolean_t verbose = ISC_FALSE;
+       bool verbose = false;
        unsigned int workers = 2;
        isc_taskmgr_t *taskmgr;
        isc_task_t *task;
@@ -98,7 +99,7 @@ main(int argc, char *argv[]) {
                         */
                        break;
                case 'v':
-                       verbose = ISC_TRUE;
+                       verbose = true;
                        break;
                case 'w':
                        workers = (unsigned int)atoi(isc_commandline_argument);
index f86fd5e0b6d2b79875830d9bd76709bec7ce3a89..4b255baad1d80920520120f5f9485a776fb326a3 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -105,9 +106,9 @@ print_name(dns_name_t *name) {
 }
 
 static void
-do_find(isc_boolean_t want_event) {
+do_find(bool want_event) {
        isc_result_t result;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
        unsigned int options;
 
        options = DNS_ADBFIND_INET | DNS_ADBFIND_INET6;
@@ -127,7 +128,7 @@ do_find(isc_boolean_t want_event) {
                         */
                        INSIST((find->options & DNS_ADBFIND_WANTEVENT) == 0);
                        print_addresses(find);
-                       done = ISC_TRUE;
+                       done = true;
                } else {
                        /*
                         * We don't know any of the addresses for this
@@ -138,7 +139,7 @@ do_find(isc_boolean_t want_event) {
                                 * And ADB isn't going to send us any events
                                 * either.  This query loses.
                                 */
-                               done = ISC_TRUE;
+                               done = true;
                        }
                        /*
                         * If the DNS_ADBFIND_WANTEVENT flag was set, we'll
@@ -147,11 +148,11 @@ do_find(isc_boolean_t want_event) {
                }
        } else if (result == DNS_R_ALIAS) {
                print_name(dns_fixedname_name(&target));
-               done = ISC_TRUE;
+               done = true;
        } else {
                printf("dns_adb_createfind() returned %s\n",
                       isc_result_totext(result));
-               done = ISC_TRUE;
+               done = true;
        }
 
        if (done) {
@@ -171,7 +172,7 @@ adb_callback(isc_task_t *etask, isc_event_t *event) {
        dns_adb_destroyfind(&find);
 
        if (type == DNS_EVENT_ADBMOREADDRESSES)
-               do_find(ISC_FALSE);
+               do_find(false);
        else if (type == DNS_EVENT_ADBNOMOREADDRESSES) {
                printf("no more addresses\n");
                isc_app_shutdown();
@@ -184,13 +185,13 @@ adb_callback(isc_task_t *etask, isc_event_t *event) {
 static void
 run(isc_task_t *xtask, isc_event_t *event) {
        UNUSED(xtask);
-       do_find(ISC_TRUE);
+       do_find(true);
        isc_event_free(&event);
 }
 
 int
 main(int argc, char *argv[]) {
-       isc_boolean_t verbose = ISC_FALSE;
+       bool verbose = false;
        unsigned int workers = 2;
        isc_timermgr_t *timermgr;
        int ch;
@@ -216,7 +217,7 @@ main(int argc, char *argv[]) {
                        level = (unsigned int)atoi(isc_commandline_argument);
                        break;
                case 'v':
-                       verbose = ISC_TRUE;
+                       verbose = true;
                        break;
                case 'w':
                        workers = (unsigned int)atoi(isc_commandline_argument);
index a5ec54bf85c72f62119562bcb1c5c9b7fe69ccd1..c69af6603cbb96439445bef33f5b4c7f1cedf6f7 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/commandline.h>
@@ -48,7 +49,7 @@ typedef struct dbinfo {
        dns_dbiterator_t *      dbiterator;
        dns_dbversion_t *       iversion;
        int                     pause_every;
-       isc_boolean_t           ascending;
+       bool            ascending;
        ISC_LINK(struct dbinfo) link;
 } dbinfo;
 
@@ -58,7 +59,7 @@ static dns_dbtable_t *                dbtable;
 static ISC_LIST(dbinfo)                dbs;
 static dbinfo *                        cache_dbi = NULL;
 static int                     pause_every = 0;
-static isc_boolean_t           ascending = ISC_TRUE;
+static bool            ascending = true;
 
 static void
 print_result(const char *message, isc_result_t result) {
@@ -77,7 +78,7 @@ print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) {
        isc_region_t r;
 
        isc_buffer_init(&text, t, sizeof(t));
-       result = dns_rdataset_totext(rdataset, name, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(rdataset, name, false, false,
                                     &text);
        isc_buffer_usedregion(&text, &r);
        if (result == ISC_R_SUCCESS)
@@ -218,11 +219,11 @@ list(dbinfo *dbi, char *seektext) {
 
        dns_dbiterator_destroy(&dbi->dbiterator);
        if (dbi->iversion != NULL)
-               dns_db_closeversion(dbi->db, &dbi->iversion, ISC_FALSE);
+               dns_db_closeversion(dbi->db, &dbi->iversion, false);
 }
 
 static isc_result_t
-load(const char *filename, const char *origintext, isc_boolean_t cache) {
+load(const char *filename, const char *origintext, bool cache) {
        dns_fixedname_t forigin;
        dns_name_t *origin;
        isc_result_t result;
@@ -333,17 +334,17 @@ main(int argc, char *argv[]) {
        dns_rdataset_t rdataset, sigrdataset;
        int ch;
        dns_rdatatype_t type = 1;
-       isc_boolean_t printnode = ISC_FALSE;
-       isc_boolean_t addmode = ISC_FALSE;
-       isc_boolean_t delmode = ISC_FALSE;
-       isc_boolean_t holdmode = ISC_FALSE;
-       isc_boolean_t verbose = ISC_FALSE;
-       isc_boolean_t done = ISC_FALSE;
-       isc_boolean_t quiet = ISC_FALSE;
-       isc_boolean_t time_lookups = ISC_FALSE;
-       isc_boolean_t found_as;
-       isc_boolean_t find_zonecut = ISC_FALSE;
-       isc_boolean_t noexact_zonecut = ISC_FALSE;
+       bool printnode = false;
+       bool addmode = false;
+       bool delmode = false;
+       bool holdmode = false;
+       bool verbose = false;
+       bool done = false;
+       bool quiet = false;
+       bool time_lookups = false;
+       bool found_as;
+       bool find_zonecut = false;
+       bool noexact_zonecut = false;
        int i, v;
        dns_rdatasetiter_t *rdsiter;
        char t1[256];
@@ -375,7 +376,7 @@ main(int argc, char *argv[]) {
               != -1) {
                switch (ch) {
                case 'c':
-                       result = load(isc_commandline_argument, ".", ISC_TRUE);
+                       result = load(isc_commandline_argument, ".", true);
                        if (result != ISC_R_SUCCESS)
                                printf("cache load(%s) %08x: %s\n",
                                       isc_commandline_argument, result,
@@ -401,11 +402,11 @@ main(int argc, char *argv[]) {
                        dns_log_setcontext(lctx);
                        break;
                case 'q':
-                       quiet = ISC_TRUE;
-                       verbose = ISC_FALSE;
+                       quiet = true;
+                       verbose = false;
                        break;
                case 'p':
-                       printnode = ISC_TRUE;
+                       printnode = true;
                        break;
                case 'P':
                        pause_every = atoi(isc_commandline_argument);
@@ -418,10 +419,10 @@ main(int argc, char *argv[]) {
                        type = atoi(isc_commandline_argument);
                        break;
                case 'T':
-                       time_lookups = ISC_TRUE;
+                       time_lookups = true;
                        break;
                case 'v':
-                       verbose = ISC_TRUE;
+                       verbose = true;
                        break;
                case 'z':
                        origintext = strrchr(isc_commandline_argument, '/');
@@ -430,7 +431,7 @@ main(int argc, char *argv[]) {
                        else
                                origintext++;   /* Skip '/'. */
                        result = load(isc_commandline_argument, origintext,
-                                     ISC_FALSE);
+                                     false);
                        if (result != ISC_R_SUCCESS)
                                printf("zone load(%s) %08x: %s\n",
                                       isc_commandline_argument, result,
@@ -462,7 +463,7 @@ main(int argc, char *argv[]) {
                if (!quiet)
                        printf("\n");
                if (fgets(s, sizeof(s), stdin) == NULL) {
-                       done = ISC_TRUE;
+                       done = true;
                        continue;
                }
                len = strlen(s);
@@ -510,8 +511,8 @@ main(int argc, char *argv[]) {
                        continue;
                } else if (strcmp(s, "!C") == 0) {
                        DBI_CHECK(dbi);
-                       addmode = ISC_FALSE;
-                       delmode = ISC_FALSE;
+                       addmode = false;
+                       delmode = false;
                        if (dbi->version == NULL)
                                continue;
                        if (dbi->version == dbi->wversion) {
@@ -528,13 +529,13 @@ main(int argc, char *argv[]) {
                                        }
                                }
                        }
-                       dns_db_closeversion(dbi->db, &dbi->version, ISC_TRUE);
+                       dns_db_closeversion(dbi->db, &dbi->version, true);
                        version = NULL;
                        continue;
                } else if (strcmp(s, "!X") == 0) {
                        DBI_CHECK(dbi);
-                       addmode = ISC_FALSE;
-                       delmode = ISC_FALSE;
+                       addmode = false;
+                       delmode = false;
                        if (dbi->version == NULL)
                                continue;
                        if (dbi->version == dbi->wversion) {
@@ -551,33 +552,33 @@ main(int argc, char *argv[]) {
                                        }
                                }
                        }
-                       dns_db_closeversion(dbi->db, &dbi->version, ISC_FALSE);
+                       dns_db_closeversion(dbi->db, &dbi->version, false);
                        version = NULL;
                        continue;
                } else if (strcmp(s, "!A") == 0) {
                        DBI_CHECK(dbi);
-                       delmode = ISC_FALSE;
+                       delmode = false;
                        if (addmode)
-                               addmode = ISC_FALSE;
+                               addmode = false;
                        else
-                               addmode = ISC_TRUE;
+                               addmode = true;
                        printf("addmode = %s\n", addmode ? "TRUE" : "FALSE");
                        continue;
                } else if (strcmp(s, "!D") == 0) {
                        DBI_CHECK(dbi);
-                       addmode = ISC_FALSE;
+                       addmode = false;
                        if (delmode)
-                               delmode = ISC_FALSE;
+                               delmode = false;
                        else
-                               delmode = ISC_TRUE;
+                               delmode = true;
                        printf("delmode = %s\n", delmode ? "TRUE" : "FALSE");
                        continue;
                } else if (strcmp(s, "!H") == 0) {
                        DBI_CHECK(dbi);
                        if (holdmode)
-                               holdmode = ISC_FALSE;
+                               holdmode = false;
                        else
-                               holdmode = ISC_TRUE;
+                               holdmode = true;
                        printf("holdmode = %s\n", holdmode ? "TRUE" : "FALSE");
                        continue;
                } else if (strcmp(s, "!HR") == 0) {
@@ -586,7 +587,7 @@ main(int argc, char *argv[]) {
                                dns_db_detachnode(dbi->db,
                                                  &dbi->hold_nodes[i]);
                        dbi->hold_count = 0;
-                       holdmode = ISC_FALSE;
+                       holdmode = false;
                        printf("held nodes have been detached\n");
                        continue;
                } else if (strcmp(s, "!VC") == 0) {
@@ -663,9 +664,9 @@ main(int argc, char *argv[]) {
                        continue;
                } else if (strcmp(s, "!PN") == 0) {
                        if (printnode)
-                               printnode = ISC_FALSE;
+                               printnode = false;
                        else
-                               printnode = ISC_TRUE;
+                               printnode = true;
                        printf("printnode = %s\n",
                               printnode ? "TRUE" : "FALSE");
                        continue;
@@ -676,11 +677,11 @@ main(int argc, char *argv[]) {
                        continue;
                } else if (strcmp(s, "!+") == 0) {
                        DBI_CHECK(dbi);
-                       dbi->ascending = ISC_TRUE;
+                       dbi->ascending = true;
                        continue;
                } else if (strcmp(s, "!-") == 0) {
                        DBI_CHECK(dbi);
-                       dbi->ascending = ISC_FALSE;
+                       dbi->ascending = false;
                        continue;
                } else if (strcmp(s, "!DB") == 0) {
                        dbi = NULL;
@@ -694,9 +695,9 @@ main(int argc, char *argv[]) {
                                db = dbi->db;
                                origin = dns_db_origin(dbi->db);
                                version = dbi->version;
-                               addmode = ISC_FALSE;
-                               delmode = ISC_FALSE;
-                               holdmode = ISC_FALSE;
+                               addmode = false;
+                               delmode = false;
+                               holdmode = false;
                        } else {
                                db = NULL;
                                version = NULL;
@@ -707,17 +708,17 @@ main(int argc, char *argv[]) {
                        continue;
                } else if (strcmp(s, "!ZC") == 0) {
                        if (find_zonecut)
-                               find_zonecut = ISC_FALSE;
+                               find_zonecut = false;
                        else
-                               find_zonecut = ISC_TRUE;
+                               find_zonecut = true;
                        printf("find_zonecut = %s\n",
                               find_zonecut ? "TRUE" : "FALSE");
                        continue;
                } else if (strcmp(s, "!NZ") == 0) {
                        if (noexact_zonecut)
-                               noexact_zonecut = ISC_FALSE;
+                               noexact_zonecut = false;
                        else
-                               noexact_zonecut = ISC_TRUE;
+                               noexact_zonecut = true;
                        printf("noexact_zonecut = %s\n",
                               noexact_zonecut ? "TRUE" : "FALSE");
                        continue;
@@ -748,7 +749,7 @@ main(int argc, char *argv[]) {
                                continue;
                        }
                        isc_buffer_init(&tb1, t1, sizeof(t1));
-                       result = dns_name_totext(dns_db_origin(db), ISC_FALSE,
+                       result = dns_name_totext(dns_db_origin(db), false,
                                                 &tb1);
                        if (result != ISC_R_SUCCESS) {
                                printf("\n");
@@ -784,7 +785,7 @@ main(int argc, char *argv[]) {
                        print_result("", result);
                }
 
-               found_as = ISC_FALSE;
+               found_as = false;
                switch (result) {
                case ISC_R_SUCCESS:
                case DNS_R_GLUE:
@@ -793,7 +794,7 @@ main(int argc, char *argv[]) {
                        break;
                case DNS_R_DNAME:
                case DNS_R_DELEGATION:
-                       found_as = ISC_TRUE;
+                       found_as = true;
                        break;
                case DNS_R_NXRRSET:
                        if (dns_rdataset_isassociated(&rdataset))
@@ -826,7 +827,7 @@ main(int argc, char *argv[]) {
                if (found_as && !quiet) {
                        isc_buffer_init(&tb1, t1, sizeof(t1));
                        isc_buffer_init(&tb2, t2, sizeof(t2));
-                       result = dns_name_totext(&name, ISC_FALSE, &tb1);
+                       result = dns_name_totext(&name, false, &tb1);
                        if (result != ISC_R_SUCCESS) {
                                print_result("", result);
                                dns_db_detachnode(db, &node);
@@ -834,7 +835,7 @@ main(int argc, char *argv[]) {
                                        dns_db_detach(&db);
                                continue;
                        }
-                       result = dns_name_totext(fname, ISC_FALSE, &tb2);
+                       result = dns_name_totext(fname, false, &tb2);
                        if (result != ISC_R_SUCCESS) {
                                print_result("", result);
                                dns_db_detachnode(db, &node);
index cf7ca1cbd7d72dff9f9c4832a6ec5d97ec64d8f1..405a292a17e62a80e0e3a12052bc71b4b40fb9a9 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <unistd.h>            /* XXX */
@@ -53,7 +54,7 @@ use(dst_key_t *key, isc_mem_t *mctx) {
        isc_buffer_usedregion(&databuf, &datareg);
 
        ret = dst_context_create3(key, mctx,
-                                 DNS_LOGCATEGORY_GENERAL, ISC_TRUE, &ctx);
+                                 DNS_LOGCATEGORY_GENERAL, true, &ctx);
        if (ret != ISC_R_SUCCESS) {
                printf("contextcreate(%u) returned: %s\n", dst_key_alg(key),
                       isc_result_totext(ret));
@@ -74,7 +75,7 @@ use(dst_key_t *key, isc_mem_t *mctx) {
        isc_buffer_forward(&sigbuf, 1);
        isc_buffer_remainingregion(&sigbuf, &sigreg);
        ret = dst_context_create3(key, mctx,
-                                 DNS_LOGCATEGORY_GENERAL, ISC_FALSE, &ctx);
+                                 DNS_LOGCATEGORY_GENERAL, false, &ctx);
        if (ret != ISC_R_SUCCESS) {
                printf("contextcreate(%u) returned: %s\n", dst_key_alg(key),
                       isc_result_totext(ret));
@@ -101,7 +102,7 @@ dns(dst_key_t *key, isc_mem_t *mctx) {
        isc_region_t r1, r2;
        dst_key_t *newkey = NULL;
        isc_result_t ret;
-       isc_boolean_t match;
+       bool match;
 
        isc_buffer_init(&buf1, buffer1, sizeof(buffer1));
        ret = dst_key_todns(key, &buf1);
@@ -123,8 +124,8 @@ dns(dst_key_t *key, isc_mem_t *mctx) {
                return;
        isc_buffer_usedregion(&buf1, &r1);
        isc_buffer_usedregion(&buf2, &r2);
-       match = ISC_TF(r1.length == r2.length &&
-                      memcmp(r1.base, r2.base, r1.length) == 0);
+       match = (r1.length == r2.length &&
+                memcmp(r1.base, r2.base, r1.length) == 0);
        printf("compare(%u): %s\n", dst_key_alg(key),
               match ? "true" : "false");
        dst_key_free(&newkey);
index 3eeed9cbd8e70953d50d3b8cdfa9605209a01c04..b7b2b7081cfadc46010288871e155551f5283674 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -28,7 +29,7 @@ static void
 hex_dump(const char *msg, void *data, unsigned int length) {
        unsigned int len;
        unsigned char *base;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
 
        base = data;
 
@@ -37,7 +38,7 @@ hex_dump(const char *msg, void *data, unsigned int length) {
                if (len % 16 == 0 && !first)
                        printf("\n\t");
                printf("%02x ", base[len]);
-               first = ISC_FALSE;
+               first = false;
        }
        printf("\n");
 }
@@ -51,7 +52,7 @@ CHECK(const char *msg, isc_result_t result) {
 }
 
 static isc_result_t
-start(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
+start(isc_entropysource_t *source, void *arg, bool blocking) {
        isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
 
        UNUSED(source);
@@ -77,7 +78,7 @@ stop(isc_entropysource_t *source, void *arg) {
 }
 
 static isc_result_t
-get(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
+get(isc_entropysource_t *source, void *arg, bool blocking) {
        isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
        isc_result_t result;
        isc_time_t t;
index ffe2a47b1873c7f84960444d9f4068938f28d193..67ec640a342421633dac6651d05638383ebe5ee5 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -26,7 +27,7 @@ static void
 hex_dump(const char *msg, void *data, unsigned int length) {
        unsigned int len;
        unsigned char *base;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
 
        base = data;
 
@@ -35,7 +36,7 @@ hex_dump(const char *msg, void *data, unsigned int length) {
                if (len % 16 == 0 && !first)
                        printf("\n\t");
                printf("%02x ", base[len]);
-               first = ISC_FALSE;
+               first = false;
        }
        printf("\n");
 }
index 7b4ddddf6b6237a2bddbfd8ccee6ed9a858301a4..90059d2a6d8f1b91e0abfd4ff4534cfa00e20ae5 100644 (file)
@@ -383,7 +383,7 @@ initctx1(isc_task_t *task, isc_event_t *event) {
        gssctx = GSS_C_NO_CONTEXT;
        result = dns_tkey_buildgssquery(query, dns_fixedname_name(&servername),
                                        dns_fixedname_name(&gssname),
-                                       NULL, 36000, &gssctx, ISC_TRUE,
+                                       NULL, 36000, &gssctx, true,
                                        mctx, NULL);
        CHECK("dns_tkey_buildgssquery", result);
 
index c4a2caf050f484b89769eefe3a9d6422a4a874f2..112075372227f07ff4f865f5c02b32c0aa70bdba 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -38,7 +39,7 @@ int
 main(int argc, char **argv) {
        const char *progname, *syslog_file, *message;
        int ch, i, file_versions, stderr_line;
-       isc_boolean_t show_final_mem = ISC_FALSE;
+       bool show_final_mem = false;
        isc_log_t *lctx;
        isc_logconfig_t *lcfg;
        isc_mem_t *mctx;
@@ -59,7 +60,7 @@ main(int argc, char **argv) {
        while ((ch = isc_commandline_parse(argc, argv, "ms:r:")) != -1) {
                switch (ch) {
                case 'm':
-                       show_final_mem = ISC_TRUE;
+                       show_final_mem = true;
                        break;
                case 's':
                        syslog_file = isc_commandline_argument;
index 16b96c6ddf469e65de5c87db834d9b4ba2a4504b..9c1a059d5ff458ce2483308225c016864541df3d 100644 (file)
@@ -36,7 +36,7 @@ print_dataset(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
        UNUSED(arg);
 
        isc_buffer_init(&target, buf, 64*1024);
-       result = dns_rdataset_totext(dataset, owner, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(dataset, owner, false, false,
                                     &target);
        if (result == ISC_R_SUCCESS)
                fprintf(stdout, "%.*s\n", (int)target.used,
index d389a96406af7869caf287bc353af2ad083bcc72..4ab0dfc896cd072d2fdd6cb5433d03120dfb182e 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/commandline.h>
@@ -45,7 +46,7 @@ print_name(dns_name_t *name) {
 
        isc_buffer_init(&source, s, sizeof(s));
        if (dns_name_countlabels(name) > 0)
-               result = dns_name_totext(name, ISC_FALSE, &source);
+               result = dns_name_totext(name, false, &source);
        else
                result = ISC_R_SUCCESS;
        if (result == ISC_R_SUCCESS) {
@@ -68,14 +69,14 @@ main(int argc, char *argv[]) {
        dns_name_t *name, *origin, *comp, *down;
        unsigned int downcase = 0;
        size_t len;
-       isc_boolean_t quiet = ISC_FALSE;
-       isc_boolean_t concatenate = ISC_FALSE;
-       isc_boolean_t got_name = ISC_FALSE;
-       isc_boolean_t check_absolute = ISC_FALSE;
-       isc_boolean_t check_wildcard = ISC_FALSE;
-       isc_boolean_t test_downcase = ISC_FALSE;
-       isc_boolean_t inplace = ISC_FALSE;
-       isc_boolean_t want_split = ISC_FALSE;
+       bool quiet = false;
+       bool concatenate = false;
+       bool got_name = false;
+       bool check_absolute = false;
+       bool check_wildcard = false;
+       bool test_downcase = false;
+       bool inplace = false;
+       bool want_split = false;
        unsigned int labels, split_label = 0;
        dns_fixedname_t fprefix, fsuffix;
        dns_name_t *prefix, *suffix;
@@ -84,26 +85,26 @@ main(int argc, char *argv[]) {
        while ((ch = isc_commandline_parse(argc, argv, "acdiqs:w")) != -1) {
                switch (ch) {
                case 'a':
-                       check_absolute = ISC_TRUE;
+                       check_absolute = true;
                        break;
                case 'c':
-                       concatenate = ISC_TRUE;
+                       concatenate = true;
                        break;
                case 'd':
-                       test_downcase = ISC_TRUE;
+                       test_downcase = true;
                        break;
                case 'i':
-                       inplace = ISC_TRUE;
+                       inplace = true;
                        break;
                case 'q':
-                       quiet = ISC_TRUE;
+                       quiet = true;
                        break;
                case 's':
-                       want_split = ISC_TRUE;
+                       want_split = true;
                        split_label = atoi(isc_commandline_argument);
                        break;
                case 'w':
-                       check_wildcard = ISC_TRUE;
+                       check_wildcard = true;
                        break;
                }
        }
@@ -239,13 +240,13 @@ main(int argc, char *argv[]) {
                                } else
                                        printf("%s\n",
                                               dns_result_totext(result));
-                               got_name = ISC_FALSE;
+                               got_name = false;
                        } else
-                               got_name = ISC_TRUE;
+                               got_name = true;
                }
                isc_buffer_init(&source, s, sizeof(s));
                if (dns_name_countlabels(name) > 0)
-                       result = dns_name_totext(name, ISC_FALSE, &source);
+                       result = dns_name_totext(name, false, &source);
                else
                        result = ISC_R_SUCCESS;
                if (result == ISC_R_SUCCESS) {
index 6455249e8f9fa50f36b70877116674380fc31a2c..ac3a3063a44a0df3b0fb84569356aa3dd0ca412e 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/mem.h>
@@ -42,10 +43,10 @@ check_result(isc_result_t result, const char *message) {
        }
 }
 
-static inline isc_boolean_t
+static inline bool
 active_node(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
        dns_rdatasetiter_t *rdsiter;
-       isc_boolean_t active = ISC_FALSE;
+       bool active = false;
        isc_result_t result;
        dns_rdataset_t rdataset;
 
@@ -57,7 +58,7 @@ active_node(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
        while (result == ISC_R_SUCCESS) {
                dns_rdatasetiter_current(rdsiter, &rdataset);
                if (rdataset.type != dns_rdatatype_nsec)
-                       active = ISC_TRUE;
+                       active = true;
                dns_rdataset_disassociate(&rdataset);
                if (!active)
                        result = dns_rdatasetiter_next(rdsiter);
@@ -87,10 +88,10 @@ next_active(dns_db_t *db, dns_dbversion_t *version, dns_dbiterator_t *dbiter,
            dns_name_t *name, dns_dbnode_t **nodep)
 {
        isc_result_t result;
-       isc_boolean_t active;
+       bool active;
 
        do {
-               active = ISC_FALSE;
+               active = false;
                result = dns_dbiterator_current(dbiter, nodep, name);
                if (result == ISC_R_SUCCESS) {
                        active = active_node(db, version, *nodep);
@@ -174,7 +175,7 @@ nsecify(char *filename) {
        /*
         * XXXRTH  For now, we don't increment the SOA serial.
         */
-       dns_db_closeversion(db, &wversion, ISC_TRUE);
+       dns_db_closeversion(db, &wversion, true);
        len = strlen(filename);
        if (len + 4 + 1 > sizeof(newfilename))
                fatal("filename too long");
index d5e7d502bb7084af22dbe0676084161052e31dcd..0d41dc2f39eb8f9e582c06e4194135cbc72b5cf4 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/commandline.h>
@@ -92,9 +93,9 @@ print_name(dns_name_t *name) {
        isc_buffer_init(&target, buffer, sizeof(buffer));
 
        /*
-        * ISC_FALSE means absolute names have the final dot added.
+        * false means absolute names have the final dot added.
         */
-       dns_name_totext(name, ISC_FALSE, &target);
+       dns_name_totext(name, false, &target);
 
        printf("%.*s", (int)target.used, (char *)target.base);
 }
@@ -106,7 +107,7 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
        dns_rbtnode_t *node1, *node2;
        dns_rbtnodechain_t chain;
        isc_result_t result;
-       isc_boolean_t nodes_should_match = ISC_FALSE;
+       bool nodes_should_match = false;
 
        dns_rbtnodechain_init(&chain, mctx);
 
@@ -126,7 +127,7 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
        switch (result) {
        case ISC_R_SUCCESS:
                printf("  found exact.");
-               nodes_should_match = ISC_TRUE;
+               nodes_should_match = true;
                break;
        case DNS_R_PARTIALMATCH:
                printf("  found parent.");
@@ -179,7 +180,7 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
 }
 
 static void
-iterate(dns_rbt_t *rbt, isc_boolean_t forward) {
+iterate(dns_rbt_t *rbt, bool forward) {
        dns_name_t foundname, *origin;
        dns_rbtnodechain_t chain;
        dns_fixedname_t fixedorigin;
@@ -248,7 +249,7 @@ main(int argc, char **argv) {
        dns_fixedname_t fixedname;
        dns_rbt_t *rbt = NULL;
        int length, ch;
-       isc_boolean_t show_final_mem = ISC_FALSE;
+       bool show_final_mem = false;
        isc_result_t result;
        void *data;
 
@@ -261,7 +262,7 @@ main(int argc, char **argv) {
        while ((ch = isc_commandline_parse(argc, argv, "m")) != -1) {
                switch (ch) {
                case 'm':
-                       show_final_mem = ISC_TRUE;
+                       show_final_mem = true;
                        break;
                }
        }
@@ -336,7 +337,7 @@ main(int argc, char **argv) {
                                if (name != NULL) {
                                        printf("deleting name %s\n", arg);
                                        result = dns_rbt_deletename(rbt, name,
-                                                                   ISC_FALSE);
+                                                                   false);
                                        PRINTERR(result);
                                        delete_name(name, NULL);
                                }
@@ -347,7 +348,7 @@ main(int argc, char **argv) {
                                        printf("nuking name %s "
                                               "and its descendants\n", arg);
                                        result = dns_rbt_deletename(rbt, name,
-                                                                   ISC_TRUE);
+                                                                   true);
                                        PRINTERR(result);
                                        delete_name(name, NULL);
                                }
@@ -410,10 +411,10 @@ main(int argc, char **argv) {
                                }
 
                        } else if (CMDCHECK("forward")) {
-                               iterate(rbt, ISC_TRUE);
+                               iterate(rbt, true);
 
                        } else if (CMDCHECK("backward")) {
-                               iterate(rbt, ISC_FALSE);
+                               iterate(rbt, false);
 
                        } else if (CMDCHECK("print")) {
                                if (arg == NULL || *arg == '\0')
index 3e98b2de7f15148bc80df72d9116dd3f666b9265..1eeaf07ea77c10d7fa34275f647476987aec625f 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -29,7 +30,7 @@ typedef struct {
        isc_timer_t *   timer;
        unsigned int    ticks;
        char            name[16];
-       isc_boolean_t   exiting;
+       bool    exiting;
        isc_task_t *    peer;
 } t_info;
 
@@ -57,7 +58,7 @@ t2_shutdown(isc_task_t *task, isc_event_t *event) {
        t_info *info = event->ev_arg;
 
        printf("task %s (%p) t2_shutdown\n", info->name, task);
-       info->exiting = ISC_TRUE;
+       info->exiting = true;
        isc_event_free(&event);
 }
 
@@ -75,7 +76,7 @@ shutdown_action(isc_task_t *task, isc_event_t *event) {
                                            t2_shutdown, &tasks[1],
                                            sizeof(*event));
                RUNTIME_CHECK(nevent != NULL);
-               info->exiting = ISC_TRUE;
+               info->exiting = true;
                isc_task_sendanddetach(&info->peer, &nevent);
        }
        isc_event_free(&event);
index 961d5aad864f5eb2182de79c95e5b9cb2ab27828..dcf64ba34d9b0fcc956cbc7c7427125fcdb41f23 100644 (file)
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include <isc/app.h>
-#include <isc/boolean.h>
 #include <isc/assertions.h>
 #include <isc/commandline.h>
 #include <isc/entropy.h>
@@ -195,7 +195,7 @@ buildquery(void) {
 
 int
 main(int argc, char *argv[]) {
-       isc_boolean_t verbose = ISC_FALSE;
+       bool verbose = false;
        isc_socketmgr_t *socketmgr;
        isc_timermgr_t *timermgr;
        struct in_addr inaddr;
@@ -216,7 +216,7 @@ main(int argc, char *argv[]) {
        while ((ch = isc_commandline_parse(argc, argv, "vp:")) != -1) {
                switch (ch) {
                case 'v':
-                       verbose = ISC_TRUE;
+                       verbose = true;
                        break;
                case 'p':
                        port = (unsigned int)atoi(isc_commandline_argument);
index 1191d2ae6324d9e3edc75e9c1a5c6d3e75f5560b..4eeac182a61aee810018133dcda33502f43bf5b5 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/commandline.h>
@@ -41,7 +42,7 @@ main(int argc, char *argv[]) {
        int trace = 0;
        int c;
        isc_symexists_t exists_policy = isc_symexists_reject;
-       isc_boolean_t case_sensitive = ISC_FALSE;
+       bool case_sensitive = false;
 
        while ((c = isc_commandline_parse(argc, argv, "tarc")) != -1) {
                switch (c) {
@@ -55,7 +56,7 @@ main(int argc, char *argv[]) {
                        exists_policy = isc_symexists_replace;
                        break;
                case 'c':
-                       case_sensitive = ISC_TRUE;
+                       case_sensitive = true;
                        break;
                }
        }
index 6fa112417c92b856bbf51ef8f9620d406e052fc2..53d3b35ca22e301a099a121ac079960a0a13b958 100644 (file)
@@ -56,7 +56,7 @@ tick(isc_task_t *task, isc_event_t *event) {
                isc_interval_set(&interval, 4, 0);
                printf("*** resetting ti3 ***\n");
                RUNTIME_CHECK(isc_timer_reset(ti3, isc_timertype_once,
-                                             &expires, &interval, ISC_TRUE) ==
+                                             &expires, &interval, true) ==
                              ISC_R_SUCCESS);
        }
 
index c7af967431c32d0620b757ba91b651637dd211eb..5ab46f1ec2d1ce251f3499276909d93cf13efe73 100644 (file)
@@ -136,7 +136,7 @@ print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) {
        isc_region_t r;
 
        isc_buffer_init(&text, t, sizeof(t));
-       result = dns_rdataset_totext(rdataset, name, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(rdataset, name, false, false,
                                     &text);
        isc_buffer_usedregion(&text, &r);
        if (result == ISC_R_SUCCESS)
index c50ade951e456e09b14da161a88fce321945a8ae..683aa40c5fdfca2cf2d0564095cebbdc02c41145 100644 (file)
@@ -177,8 +177,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, OP_ANY, ISC_TRUE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, OP_ANY, true, true,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index e666a572b1ff7d66f9d8fa258f5f405d7fb95359..08d065a6b326103c63eada0c71fc5918aa24b3a3 100644 (file)
@@ -156,8 +156,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, false,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index d800bd694d396965f3aa2b676e40b1ebd5879637..c642586d95515b942cf4163e6694ef6a26ce6953 100644 (file)
@@ -204,8 +204,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, true,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index a70ed66d1610bde4be85ea725508215d400a972c..791a9a03dce31b2f1c8420f2e3ce66789156d362 100644 (file)
@@ -282,8 +282,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, true,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index de2ff17c566d1a96149451e43e8cde0569025598..9a40b533c9d84d54ded0a9ced952f166fad22bc3 100644 (file)
@@ -203,8 +203,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, true,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index f1a58abf0620c86c4d4e3c6bde159d3ab19a7786..144cfa863feff499e9cf1d26385b149c86b06eb0 100644 (file)
@@ -139,8 +139,8 @@ main(int argc, char *argv[]) {
        if (lib_name != NULL)
                pk11_set_lib_name(lib_name);
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE,
-                                 ISC_FALSE, NULL, slot);
+       result = pk11_get_session(&pctx, op_type, false, false,
+                                 false, NULL, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NODIGESTSERVICE) &&
            (result != PK11_R_NOAESSERVICE)) {
index 18690169739fbae144f3ee5644ab11a608ec2fd7..cc8ca45c98a1b30c389a7bdd49a512b67a75fe96 100644 (file)
@@ -141,8 +141,8 @@ main(int argc, char *argv[]) {
        if (lib_name != NULL)
                pk11_set_lib_name(lib_name);
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE,
-                                 ISC_FALSE, NULL, slot);
+       result = pk11_get_session(&pctx, op_type, false, false,
+                                 false, NULL, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NOAESSERVICE)) {
index fa25c74aead45e13d4faa572d6ba2ed6fb178211..e9cdd6b13cc142b68093fc50a00d23d050123aa8 100644 (file)
@@ -275,8 +275,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, true,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index 72b6e5f0bc1b8715bf4532e53b47fbd1b45deff6..b04b777a0631bbb1f65d7b6cd258a258a7bdb0ba 100644 (file)
@@ -196,8 +196,8 @@ main(int argc, char *argv[]) {
        if (pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
-                                 ISC_TRUE, (const char *) pin, slot);
+       result = pk11_get_session(&pctx, op_type, false, true,
+                                 true, (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
            (result != PK11_R_NODIGESTSERVICE) &&
index f4f29ee83366206da2007bcfbcef34c5606ef004..ba4adb1bb585e79035f197df5f8dfb9bd01c9e32 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -106,7 +107,7 @@ main(int argc, char *argv[]) {
        char *lib_name = NULL;
        char *pin = NULL;
        int error = 0;
-       isc_boolean_t logon = ISC_TRUE;
+       bool logon = true;
        int c, errflg = 0;
        char *key = NULL;
        size_t sum = 0;
@@ -122,7 +123,7 @@ main(int argc, char *argv[]) {
                        op_type = OP_ANY;
                        break;
                case 'n':
-                       logon = ISC_FALSE;
+                       logon = false;
                        break;
                case 'p':
                        pin = isc_commandline_argument;
@@ -217,7 +218,7 @@ main(int argc, char *argv[]) {
        if (logon && pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE, logon,
+       result = pk11_get_session(&pctx, op_type, false, false, logon,
                                  (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
index 53cf6d01666d13af122603e1744d15af495397fb..56f3a61bc0a3b748944dc9054b620a42f5e7c095 100644 (file)
@@ -52,6 +52,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -89,7 +90,7 @@ main(int argc, char *argv[]) {
        char *lib_name = NULL;
        char *pin = NULL;
        int error = 0;
-       isc_boolean_t logon = ISC_TRUE;
+       bool logon = true;
        int c, errflg = 0;
        size_t sum = 0;
        unsigned int i;
@@ -104,7 +105,7 @@ main(int argc, char *argv[]) {
                        op_type = OP_ANY;
                        break;
                case 'n':
-                       logon = ISC_FALSE;
+                       logon = false;
                        break;
                case 'p':
                        pin = isc_commandline_argument;
@@ -139,7 +140,7 @@ main(int argc, char *argv[]) {
        if (logon && pin == NULL)
                pin = getpassphrase("Enter Pin: ");
 
-       result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE, logon,
+       result = pk11_get_session(&pctx, op_type, false, false, logon,
                                  (const char *) pin, slot);
        if ((result != ISC_R_SUCCESS) &&
            (result != PK11_R_NORANDOMSERVICE) &&
index d1ef7b0e81a1ef9dcb805fc8c709897d718bf4cc..8f954e743c04542e4ff8b94c18bdacb8436969c8 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <stdlib.h>
@@ -67,7 +68,7 @@ struct dlz_example_data {
        struct record adds[MAX_RECORDS];
        struct record deletes[MAX_RECORDS];
 
-       isc_boolean_t transaction_started;
+       bool transaction_started;
 
        /* Helper functions from the dlz_dlopen driver */
        log_t *log;
@@ -76,17 +77,17 @@ struct dlz_example_data {
        dns_dlz_writeablezone_t *writeable_zone;
 };
 
-static isc_boolean_t
+static bool
 single_valued(const char *type) {
        const char *single[] = { "soa", "cname", NULL };
        int i;
 
        for (i = 0; single[i]; i++) {
                if (strcasecmp(single[i], type) == 0) {
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -97,7 +98,7 @@ add_name(struct dlz_example_data *state, struct record *list,
         const char *name, const char *type, dns_ttl_t ttl, const char *data)
 {
        int i;
-       isc_boolean_t single = single_valued(type);
+       bool single = single_valued(type);
        int first_empty = -1;
 
        for (i = 0; i < MAX_RECORDS; i++) {
@@ -401,7 +402,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
 {
        isc_result_t result;
        struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
        void *dbversion = NULL;
        isc_sockaddr_t *src;
        char full_name[256];
@@ -463,7 +464,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
        if (clientinfo != NULL &&
            clientinfo->version >= DNS_CLIENTINFO_VERSION) {
                dbversion = clientinfo->dbversion;
-               if (dbversion != NULL && *(isc_boolean_t *)dbversion)
+               if (dbversion != NULL && *(bool *)dbversion)
                        state->log(ISC_LOG_INFO,
                                   "dlz_example: lookup against live "
                                   "transaction");
@@ -484,7 +485,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
                state->log(ISC_LOG_INFO,
                           "dlz_example: lookup connection from %s", buf);
 
-               found = ISC_TRUE;
+               found = true;
                result = state->putrr(lookup, "TXT", 0, buf);
                if (result != ISC_R_SUCCESS)
                        return (result);
@@ -496,7 +497,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
                for (i = 0; i < 511; i++)
                        buf[i] = 'x';
                buf[i] = '\0';
-               found = ISC_TRUE;
+               found = true;
                result = state->putrr(lookup, "TXT", 0, buf);
                if (result != ISC_R_SUCCESS)
                        return (result);
@@ -505,7 +506,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
        /* Tests for DLZ redirection zones */
        if (strcmp(name, "*") == 0 && strcmp(zone, ".") == 0) {
                result = state->putrr(lookup, "A", 0, "100.100.100.2");
-               found = ISC_TRUE;
+               found = true;
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
@@ -514,7 +515,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
            strcmp(zone, ".") == 0)
        {
                result = state->putrr(lookup, "A", 0, "100.100.100.3");
-               found = ISC_TRUE;
+               found = true;
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
@@ -522,7 +523,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
        /* Answer from current records */
        for (i = 0; i < MAX_RECORDS; i++) {
                if (strcasecmp(state->current[i].name, full_name) == 0) {
-                       found = ISC_TRUE;
+                       found = true;
                        result = state->putrr(lookup, state->current[i].type,
                                              state->current[i].ttl,
                                              state->current[i].data);
@@ -594,7 +595,7 @@ dlz_newversion(const char *zone, void *dbdata, void **versionp) {
                return (ISC_R_FAILURE);
        }
 
-       state->transaction_started = ISC_TRUE;
+       state->transaction_started = true;
        *versionp = (void *) &state->transaction_started;
 
        return (ISC_R_SUCCESS);
@@ -604,7 +605,7 @@ dlz_newversion(const char *zone, void *dbdata, void **versionp) {
  * End a transaction
  */
 void
-dlz_closeversion(const char *zone, isc_boolean_t commit,
+dlz_closeversion(const char *zone, bool commit,
                 void *dbdata, void **versionp)
 {
        struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
@@ -617,7 +618,7 @@ dlz_closeversion(const char *zone, isc_boolean_t commit,
                return;
        }
 
-       state->transaction_started = ISC_FALSE;
+       state->transaction_started = false;
 
        *versionp = NULL;
 
@@ -689,7 +690,7 @@ dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb, void *dbdata) {
 /*
  * Authorize a zone update
  */
-isc_boolean_t
+bool
 dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
             const char *type, const char *key, uint32_t keydatalen,
             unsigned char *keydata, void *dbdata)
@@ -706,12 +707,12 @@ dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
                if (state->log != NULL)
                        state->log(ISC_LOG_INFO, "dlz_example: denying update "
                                   "of name=%s by %s", name, signer);
-               return (ISC_FALSE);
+               return (false);
        }
        if (state->log != NULL)
                state->log(ISC_LOG_INFO, "dlz_example: allowing update of "
                           "name=%s by %s", name, signer);
-       return (ISC_TRUE);
+       return (true);
 }
 
 
index f27dc895bfe9cae10bf4d4cf4065ccdb0042acdd..02aa6ab2efe2cdb89839c6d88ee05058e39f9136 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/string.h>
 #include <isc/util.h>
@@ -184,7 +185,7 @@ attachversion(dns_db_t *db, dns_dbversion_t *source,
 }
 
 static void
-closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
+closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
        sampledb_t *sampledb = (sampledb_t *)db;
 
        REQUIRE(VALID_SAMPLEDB(sampledb));
@@ -193,7 +194,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
 }
 
 static isc_result_t
-findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnode(dns_db_t *db, dns_name_t *name, bool create,
         dns_dbnode_t **nodep)
 {
        sampledb_t *sampledb = (sampledb_t *) db;
@@ -374,7 +375,7 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                                      type, covers));
 }
 
-static isc_boolean_t
+static bool
 issecure(dns_db_t *db) {
        sampledb_t *sampledb = (sampledb_t *) db;
 
@@ -394,17 +395,17 @@ nodecount(dns_db_t *db) {
 
 /*
  * The database does not need to be loaded from disk or written to disk.
- * Always return ISC_TRUE.
+ * Always return true.
  */
-static isc_boolean_t
+static bool
 ispersistent(dns_db_t *db) {
        UNUSED(db);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
-overmem(dns_db_t *db, isc_boolean_t over) {
+overmem(dns_db_t *db, bool over) {
        sampledb_t *sampledb = (sampledb_t *) db;
 
        REQUIRE(VALID_SAMPLEDB(sampledb));
@@ -457,7 +458,7 @@ getnsec3parameters(dns_db_t *db, dns_dbversion_t *version,
 }
 
 static isc_result_t
-findnsec3node(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnsec3node(dns_db_t *db, dns_name_t *name, bool create,
              dns_dbnode_t **nodep)
 {
        sampledb_t *sampledb = (sampledb_t *) db;
@@ -494,7 +495,7 @@ resigned(dns_db_t *db, dns_rdataset_t *rdataset, dns_dbversion_t *version) {
        dns_db_resigned(sampledb->rbtdb, rdataset, version);
 }
 
-static isc_boolean_t
+static bool
 isdnssec(dns_db_t *db) {
        sampledb_t *sampledb = (sampledb_t *) db;
 
@@ -533,7 +534,7 @@ rpz_ready(dns_db_t *db) {
 
 static isc_result_t
 findnodeext(dns_db_t *db, dns_name_t *name,
-           isc_boolean_t create, dns_clientinfomethods_t *methods,
+           bool create, dns_clientinfomethods_t *methods,
            dns_clientinfo_t *clientinfo, dns_dbnode_t **nodep)
 {
        sampledb_t *sampledb = (sampledb_t *) db;
@@ -662,7 +663,7 @@ add_soa(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        rdatalist.ttl = 86400;
        ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
        CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
-       CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
+       CHECK(dns_db_findnode(db, name, true, &node));
        CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
  cleanup:
        if (node != NULL)
@@ -701,7 +702,7 @@ add_ns(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        rdatalist.ttl = 86400;
        ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
        CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
-       CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
+       CHECK(dns_db_findnode(db, name, true, &node));
        CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
  cleanup:
        if (node != NULL)
@@ -737,7 +738,7 @@ add_a(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        rdatalist.ttl = 86400;
        ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
        CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
-       CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
+       CHECK(dns_db_findnode(db, name, true, &node));
        CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
  cleanup:
        if (node != NULL)
@@ -802,7 +803,7 @@ create_db(isc_mem_t *mctx, dns_name_t *origin, dns_dbtype_t type,
        CHECK(add_soa(sampledb->rbtdb, version, origin, origin, origin));
        CHECK(add_ns(sampledb->rbtdb, version, origin, origin));
        CHECK(add_a(sampledb->rbtdb, version, origin, a_addr));
-       dns_db_closeversion(sampledb->rbtdb, &version, ISC_TRUE);
+       dns_db_closeversion(sampledb->rbtdb, &version, true);
 
        *dbp = (dns_db_t *)sampledb;
 
index ff0f5c39f8ea0ee0a0d3493a278c07eba0e927ca..6658cbbcdc7c485fba6b7babe64752dc20d5486b 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef _LD_INSTANCE_H_
 #define _LD_INSTANCE_H_
 
+#include <stdbool.h>
+
 #include <dns/fixedname.h>
 #include <dns/name.h>
 #include <dns/types.h>
@@ -20,7 +22,7 @@ struct sample_instance {
        dns_view_t              *view;
        dns_zonemgr_t           *zmgr;
        isc_task_t              *task;
-       isc_boolean_t           exiting;
+       bool            exiting;
 
        dns_zone_t              *zone1;
        dns_fixedname_t         zone1_fn;
index 7ca2d3f2794b32d16bad6f8d93d39bc569f86e15..e184fd2697326601469c400ec5396e31f28e4744 100644 (file)
@@ -64,7 +64,7 @@ syncptr_write(isc_task_t *task, isc_event_t *event) {
 cleanup:
        if (db != NULL) {
                if (version != NULL)
-                       dns_db_closeversion(db, &version, ISC_TRUE);
+                       dns_db_closeversion(db, &version, true);
                dns_db_detach(&db);
        }
        dns_zone_detach(&pevent->zone);
index 73ba48707972417c204700b8390e88aea20f9025..47e4c15543a903b8e709f40275b997c6edab9311 100644 (file)
@@ -7,6 +7,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/util.h>
 
@@ -81,7 +82,7 @@ cleanup:
 static isc_result_t
 publish_zone(sample_instance_t *inst, dns_zone_t *zone) {
        isc_result_t result;
-       isc_boolean_t freeze = ISC_FALSE;
+       bool freeze = false;
        dns_zone_t *zone_in_view = NULL;
        dns_view_t *view_in_zone = NULL;
        isc_result_t lock_state = ISC_R_IGNORE;
@@ -123,7 +124,7 @@ publish_zone(sample_instance_t *inst, dns_zone_t *zone) {
 
        run_exclusive_enter(inst, &lock_state);
        if (inst->view->frozen) {
-               freeze = ISC_TRUE;
+               freeze = true;
                dns_view_thaw(inst->view);
        }
 
@@ -147,7 +148,7 @@ cleanup:
 static isc_result_t
 load_zone(dns_zone_t *zone) {
        isc_result_t result;
-       isc_boolean_t zone_dynamic;
+       bool zone_dynamic;
        uint32_t serial;
 
        result = dns_zone_load(zone);
index 4f62c7414de9679bcd6a3778401362a0bc734e90..2fcc0648e2c3ddc8273792dcac55177ddd2fff79 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -62,7 +63,7 @@
 
 static isc_mem_t *mctx;
 static dns_requestmgr_t *requestmgr;
-static isc_boolean_t have_src = ISC_FALSE;
+static bool have_src = false;
 static isc_sockaddr_t srcaddr;
 static isc_sockaddr_t dstaddr;
 static int onfly;
@@ -222,7 +223,7 @@ main(int argc, char *argv[]) {
 
        UNUSED(argv);
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
        while ((c = isc_commandline_parse(argc, argv, "p:")) != -1) {
                switch (c) {
                case 'p':
@@ -247,7 +248,7 @@ main(int argc, char *argv[]) {
        argv += isc_commandline_index;
 
        if (argc > 0) {
-               have_src = ISC_TRUE;
+               have_src = true;
        }
 
        RUNCHECK(isc_app_start());
@@ -343,4 +344,3 @@ main(int argc, char *argv[]) {
 
        return (0);
 }
-
index 2a0ee948885aa3e6cd82da2e0bca8f4d0be0e166..5a00f8660363c963721bafdb12a192cfeb4c8c53 100644 (file)
@@ -173,7 +173,7 @@ sendquery(isc_task_t *task, isc_event_t *event) {
                                    DNS_TSIG_HMACMD5_NAME,
                                    isc_buffer_base(&keybuf),
                                    isc_buffer_usedlength(&keybuf),
-                                   ISC_FALSE, NULL, 0, 0, mctx, ring,
+                                   false, NULL, 0, 0, mctx, ring,
                                    &initialkey);
        CHECK("dns_tsigkey_create", result);
 
index 7057c318e47f8f94408c6d2204badf2700197a59..bde66a4571e56d3ec508f15c39e51242bf161c9c 100644 (file)
@@ -227,7 +227,7 @@ main(int argc, char **argv) {
 #ifndef PK11_MD5_DISABLE
        result = dns_tsigkey_createfromkey(dst_key_name(dstkey),
                                           DNS_TSIG_HMACMD5_NAME,
-                                          dstkey, ISC_TRUE, NULL, 0, 0,
+                                          dstkey, true, NULL, 0, 0,
                                           mctx, ring, &tsigkey);
        dst_key_free(&dstkey);
        CHECK("dns_tsigkey_createfromkey", result);
index 89b13519b6026ab59bb4ee67ef731a14dec7138b..f95d2ccb5f205b4dbca3c00bc6ff4cd4e963d4e7 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -27,8 +28,8 @@
 
 int parseflags = 0;
 isc_mem_t *mctx = NULL;
-isc_boolean_t printmemstats = ISC_FALSE;
-isc_boolean_t dorender = ISC_FALSE;
+bool printmemstats = false;
+bool dorender = false;
 
 static void
 process_message(isc_buffer_t *source);
@@ -105,9 +106,9 @@ printmessage(dns_message_t *msg) {
 int
 main(int argc, char *argv[]) {
        isc_buffer_t *input = NULL;
-       isc_boolean_t need_close = ISC_FALSE;
-       isc_boolean_t tcp = ISC_FALSE;
-       isc_boolean_t rawdata = ISC_FALSE;
+       bool need_close = false;
+       bool tcp = false;
+       bool rawdata = false;
        isc_result_t result;
        uint8_t c;
        FILE *f;
@@ -135,7 +136,7 @@ main(int argc, char *argv[]) {
                        break;
                }
        }
-       isc_commandline_reset = ISC_TRUE;
+       isc_commandline_reset = true;
 
        RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
 
@@ -145,7 +146,7 @@ main(int argc, char *argv[]) {
                                parseflags |= DNS_MESSAGEPARSE_BESTEFFORT;
                                break;
                        case 'd':
-                               rawdata = ISC_TRUE;
+                               rawdata = true;
                                break;
                        case 'm':
                                break;
@@ -153,13 +154,13 @@ main(int argc, char *argv[]) {
                                parseflags |= DNS_MESSAGEPARSE_PRESERVEORDER;
                                break;
                        case 'r':
-                               dorender = ISC_TRUE;
+                               dorender = true;
                                break;
                        case 's':
-                               printmemstats = ISC_TRUE;
+                               printmemstats = true;
                                break;
                        case 't':
-                               tcp = ISC_TRUE;
+                               tcp = true;
                                break;
                        default:
                                usage();
@@ -176,7 +177,7 @@ main(int argc, char *argv[]) {
                        fprintf(stderr, "%s: fopen failed\n", argv[0]);
                        exit(1);
                }
-               need_close = ISC_TRUE;
+               need_close = true;
        } else
                f = stdin;
 
index 34f05f2d4143715b73a7d7c4e0ac2042059f3a18..4cafdb4bb20d886613618328ff2bdea2ef77d6d9 100644 (file)
@@ -30,6 +30,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -47,9 +48,9 @@
 #include <dns/result.h>
 
 isc_mem_t *mctx = NULL;
-isc_boolean_t memrecord = ISC_FALSE;
-isc_boolean_t printmessage = ISC_FALSE;
-isc_boolean_t yaml = ISC_FALSE;
+bool memrecord = false;
+bool printmessage = false;
+bool yaml = false;
 
 const char *program = "dnstap-read";
 
@@ -148,7 +149,7 @@ print_yaml(dns_dtdata_t *dt) {
        Dnstap__Dnstap *frame = dt->frame;
        Dnstap__Message *m = frame->message;
        const ProtobufCEnumValue *ftype, *mtype;
-       static isc_boolean_t first = ISC_TRUE;
+       static bool first = true;
 
        ftype = protobuf_c_enum_descriptor_get_value(
                                     &dnstap__dnstap__type__descriptor,
@@ -159,7 +160,7 @@ print_yaml(dns_dtdata_t *dt) {
        if (!first)
                printf("---\n");
        else
-               first = ISC_FALSE;
+               first = false;
 
        printf("type: %s\n", ftype->name);
 
@@ -284,13 +285,13 @@ main(int argc, char *argv[]) {
                switch (ch) {
                        case 'm':
                                isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
-                               memrecord = ISC_TRUE;
+                               memrecord = true;
                                break;
                        case 'p':
-                               printmessage = ISC_TRUE;
+                               printmessage = true;
                                break;
                        case 'y':
-                               yaml = ISC_TRUE;
+                               yaml = true;
                                dns_master_indentstr = "  ";
                                dns_master_indent = 2;
                                break;
index 40dadbe646f43e78b019a689f9806b19b2f10ad4..cedd13df012b05289763cf93f7d02aa2416a9c3b 100644 (file)
@@ -72,7 +72,7 @@ main(int argc, char **argv) {
        size_t len;
        char *name;
 
-       isc_commandline_errprint = ISC_FALSE;
+       isc_commandline_errprint = false;
 
        while ((c = isc_commandline_parse(argc, argv, "hn:")) != EOF) {
                switch (c) {
index 8a159abddd6e3a864721129842e0c79fce201bb6..4bd5a643127ebd24283d7c2950d3123813cc2e55 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -85,26 +86,26 @@ static isc_mem_t *mctx;
 static dns_requestmgr_t *requestmgr;
 static const char *batchname;
 static FILE *batchfp;
-static isc_boolean_t have_ipv4 = ISC_FALSE;
-static isc_boolean_t have_ipv6 = ISC_FALSE;
-static isc_boolean_t have_src = ISC_FALSE;
-static isc_boolean_t tcp_mode = ISC_FALSE;
-static isc_boolean_t besteffort = ISC_TRUE;
-static isc_boolean_t display_short_form = ISC_FALSE;
-static isc_boolean_t display_headers = ISC_TRUE;
-static isc_boolean_t display_comments = ISC_TRUE;
-static isc_boolean_t display_rrcomments = ISC_TRUE;
-static isc_boolean_t display_ttlunits = ISC_TRUE;
-static isc_boolean_t display_ttl = ISC_TRUE;
-static isc_boolean_t display_class = ISC_TRUE;
-static isc_boolean_t display_crypto = ISC_TRUE;
-static isc_boolean_t display_multiline = ISC_FALSE;
-static isc_boolean_t display_question = ISC_TRUE;
-static isc_boolean_t display_answer  = ISC_TRUE;
-static isc_boolean_t display_authority = ISC_TRUE;
-static isc_boolean_t display_additional = ISC_TRUE;
-static isc_boolean_t display_unknown_format = ISC_FALSE;
-static isc_boolean_t continue_on_error = ISC_FALSE;
+static bool have_ipv4 = false;
+static bool have_ipv6 = false;
+static bool have_src = false;
+static bool tcp_mode = false;
+static bool besteffort = true;
+static bool display_short_form = false;
+static bool display_headers = true;
+static bool display_comments = true;
+static bool display_rrcomments = true;
+static bool display_ttlunits = true;
+static bool display_ttl = true;
+static bool display_class = true;
+static bool display_crypto = true;
+static bool display_multiline = false;
+static bool display_question = true;
+static bool display_answer  = true;
+static bool display_authority = true;
+static bool display_additional = true;
+static bool display_unknown_format = false;
+static bool continue_on_error = false;
 static uint32_t display_splitwidth = 0xffffffff;
 static isc_sockaddr_t srcaddr;
 static char *server;
@@ -117,17 +118,17 @@ static char hexcookie[81];
 
 struct query {
        char textname[MXNAME]; /*% Name we're going to be looking up */
-       isc_boolean_t ip6_int;
-       isc_boolean_t recurse;
-       isc_boolean_t have_aaonly;
-       isc_boolean_t have_adflag;
-       isc_boolean_t have_cdflag;
-       isc_boolean_t have_zflag;
-       isc_boolean_t dnssec;
-       isc_boolean_t expire;
-       isc_boolean_t send_cookie;
+       bool ip6_int;
+       bool recurse;
+       bool have_aaonly;
+       bool have_adflag;
+       bool have_cdflag;
+       bool have_zflag;
+       bool dnssec;
+       bool expire;
+       bool send_cookie;
        char *cookie;
-       isc_boolean_t nsid;
+       bool nsid;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
        uint16_t udpsize;
@@ -917,7 +918,7 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
        struct in6_addr in6;
        uint32_t netmask = 0xffffffff;
        char *slash = NULL;
-       isc_boolean_t parsed = ISC_FALSE;
+       bool parsed = false;
        char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX/128")];
 
        if (strlcpy(buf, value, sizeof(buf)) >= sizeof(buf))
@@ -939,12 +940,12 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
        if (sa == NULL)
                fatal("out of memory");
        if (inet_pton(AF_INET6, buf, &in6) == 1) {
-               parsed = ISC_TRUE;
+               parsed = true;
                isc_sockaddr_fromin6(sa, &in6, 0);
                if (netmask > 128)
                        netmask = 128;
        } else if (inet_pton(AF_INET, buf, &in4) == 1) {
-               parsed = ISC_TRUE;
+               parsed = true;
                isc_sockaddr_fromin(sa, &in4, 0);
                if (netmask > 32)
                        netmask = 32;
@@ -954,7 +955,7 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
                for (i = 0; i < 3 && strlen(buf) < sizeof(buf) - 2; i++) {
                        strlcat(buf, ".0", sizeof(buf));
                        if (inet_pton(AF_INET, buf, &in4) == 1) {
-                               parsed = ISC_TRUE;
+                               parsed = true;
                                isc_sockaddr_fromin(sa, &in4, 0);
                                break;
                        }
@@ -1005,7 +1006,7 @@ reverse_octets(const char *in, char **p, char *end) {
 
 static void
 get_reverse(char *reverse, size_t len, const char *value,
-           isc_boolean_t ip6_int)
+           bool ip6_int)
 {
        int r;
        isc_result_t result;
@@ -1053,13 +1054,13 @@ get_reverse(char *reverse, size_t len, const char *value,
  */
 
 static void
-plus_option(char *option, struct query *query, isc_boolean_t global)
+plus_option(char *option, struct query *query, bool global)
 {
        isc_result_t result;
        char option_store[256];
        char *cmd, *value, *ptr, *code;
        uint32_t num;
-       isc_boolean_t state = ISC_TRUE;
+       bool state = true;
        size_t n;
 
        strlcpy(option_store, option, sizeof(option_store));
@@ -1072,7 +1073,7 @@ plus_option(char *option, struct query *query, isc_boolean_t global)
        value = ptr;
        if (strncasecmp(cmd, "no", 2) == 0) {
                cmd += 2;
-               state = ISC_FALSE;
+               state = false;
        }
 
 #define FULLCHECK(A) \
@@ -1379,12 +1380,12 @@ plus_option(char *option, struct query *query, isc_boolean_t global)
                        GLOBAL();
                        display_short_form = state;
                        if (state) {
-                               display_question = ISC_FALSE;
-                               display_answer = ISC_TRUE;
-                               display_authority = ISC_FALSE;
-                               display_additional = ISC_FALSE;
-                               display_comments = ISC_FALSE;
-                               display_rrcomments = ISC_FALSE;
+                               display_question = false;
+                               display_answer = true;
+                               display_authority = false;
+                               display_additional = false;
+                               display_comments = false;
+                               display_rrcomments = false;
                        }
                        break;
                case 'p': /* split */
@@ -1483,7 +1484,7 @@ plus_option(char *option, struct query *query, isc_boolean_t global)
                                case 'u': /* ttlunits */
                                        FULLCHECK("ttlunits");
                                        GLOBAL();
-                                       display_ttl = ISC_TRUE;
+                                       display_ttl = true;
                                        display_ttlunits = state;
                                        break;
                                default:
@@ -1540,18 +1541,18 @@ plus_option(char *option, struct query *query, isc_boolean_t global)
 }
 
 /*%
- * #ISC_TRUE returned if value was used
+ * #true returned if value was used
  */
 static const char *single_dash_opts = "46himv";
 /*static const char *dash_opts = "46bcfhiptvx";*/
-static isc_boolean_t
+static bool
 dash_option(const char *option, char *next, struct query *query,
-           isc_boolean_t global, isc_boolean_t *setname)
+           bool global, bool *setname)
 {
        char opt;
        const char *value;
        isc_result_t result;
-       isc_boolean_t value_from_next;
+       bool value_from_next;
        isc_consttextregion_t tr;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
@@ -1574,22 +1575,22 @@ dash_option(const char *option, char *next, struct query *query,
                        GLOBAL();
                        if (have_ipv4) {
                                isc_net_disableipv6();
-                               have_ipv6 = ISC_FALSE;
+                               have_ipv6 = false;
                        } else {
                                fatal("can't find IPv4 networking");
                                /* NOTREACHED */
-                               return (ISC_FALSE);
+                               return (false);
                        }
                        break;
                case '6':
                        GLOBAL();
                        if (have_ipv6) {
                                isc_net_disableipv4();
-                               have_ipv4 = ISC_FALSE;
+                               have_ipv4 = false;
                        } else {
                                fatal("can't find IPv6 networking");
                                /* NOTREACHED */
-                               return (ISC_FALSE);
+                               return (false);
                        }
                        break;
                case 'h':
@@ -1597,7 +1598,7 @@ dash_option(const char *option, char *next, struct query *query,
                        exit(0);
                        break;
                case 'i':
-                       query->ip6_int = ISC_TRUE;
+                       query->ip6_int = true;
                        break;
                case 'm':
                        /*
@@ -1612,14 +1613,14 @@ dash_option(const char *option, char *next, struct query *query,
                if (strlen(option) > 1U)
                        option = &option[1];
                else
-                       return (ISC_FALSE);
+                       return (false);
        }
        opt = option[0];
        if (strlen(option) > 1U) {
-               value_from_next = ISC_FALSE;
+               value_from_next = false;
                value = &option[1];
        } else {
-               value_from_next = ISC_TRUE;
+               value_from_next = true;
                value = next;
        }
        if (value == NULL)
@@ -1649,7 +1650,7 @@ dash_option(const char *option, char *next, struct query *query,
                }
                if (hash != NULL)
                        *hash = '#';
-               have_src = ISC_TRUE;
+               have_src = true;
                return (value_from_next);
        case 'c':
                tr.base = value;
@@ -1681,7 +1682,7 @@ dash_option(const char *option, char *next, struct query *query,
                strlcpy(query->textname, textname, sizeof(query->textname));
                query->rdtype = dns_rdatatype_ptr;
                query->rdclass = dns_rdataclass_in;
-               *setname = ISC_TRUE;
+               *setname = true;
                return (value_from_next);
        global_option:
                fprintf(stderr, "Ignored late global option: -%s\n", option);
@@ -1692,7 +1693,7 @@ dash_option(const char *option, char *next, struct query *query,
                usage();
        }
        /* NOTREACHED */
-       return (ISC_FALSE);
+       return (false);
 }
 
 static struct query *
@@ -1734,7 +1735,7 @@ preparse_args(int argc, char **argv) {
        int rc;
        char **rv;
        char *option;
-       isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
+       bool ipv4only = false, ipv6only = false;
 
        rc = argc;
        rv = argv;
@@ -1752,13 +1753,13 @@ preparse_args(int argc, char **argv) {
                                if (ipv6only) {
                                        fatal("only one of -4 and -6 allowed");
                                }
-                               ipv4only = ISC_TRUE;
+                               ipv4only = true;
                                break;
                        case '6':
                                if (ipv4only) {
                                        fatal("only one of -4 and -6 allowed");
                                }
-                               ipv6only = ISC_TRUE;
+                               ipv6only = true;
                                break;
                        }
                        option = &option[1];
@@ -1767,7 +1768,7 @@ preparse_args(int argc, char **argv) {
 }
 
 static void
-parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
+parse_args(bool is_batchfile, int argc, char **argv)
 {
        struct query *query = NULL;
        char batchline[MXNAME];
@@ -1776,7 +1777,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
        int rc;
        char **rv;
        char *input;
-       isc_boolean_t global = ISC_TRUE;
+       bool global = true;
 
        /*
         * The semantics for parsing the args is a bit complex; if
@@ -1791,17 +1792,17 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
 
        if (!is_batchfile) {
                default_query.textname[0] = 0;
-               default_query.ip6_int = ISC_FALSE;
-               default_query.recurse = ISC_TRUE;
-               default_query.have_aaonly = ISC_FALSE;
-               default_query.have_adflag = ISC_TRUE; /*XXX*/
-               default_query.have_cdflag = ISC_FALSE;
-               default_query.have_zflag = ISC_FALSE;
-               default_query.dnssec = ISC_FALSE;
-               default_query.expire = ISC_FALSE;
-               default_query.send_cookie = ISC_FALSE;
+               default_query.ip6_int = false;
+               default_query.recurse = true;
+               default_query.have_aaonly = false;
+               default_query.have_adflag = true; /*XXX*/
+               default_query.have_cdflag = false;
+               default_query.have_zflag = false;
+               default_query.dnssec = false;
+               default_query.expire = false;
+               default_query.send_cookie = false;
                default_query.cookie = NULL;
-               default_query.nsid = ISC_FALSE;
+               default_query.nsid = false;
                default_query.rdtype = dns_rdatatype_a;
                default_query.rdclass = dns_rdataclass_in;
                default_query.udpsize = 0;
@@ -1819,7 +1820,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
        if (is_batchfile) {
                /* Processing '-f batchfile'. */
                query = clone_default_query();
-               global = ISC_FALSE;
+               global = false;
        } else
                query = &default_query;
 
@@ -1835,7 +1836,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
                } else if (rv[0][0] == '+') {
                        plus_option(&rv[0][1], query, global);
                } else if (rv[0][0] == '-') {
-                       isc_boolean_t setname = ISC_FALSE;
+                       bool setname = false;
 
                        if (rc <= 1) {
                                if (dash_option(&rv[0][1], NULL, query,
@@ -1857,7 +1858,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
 
                                default_query.textname[0] = 0;
                                query = clone_default_query();
-                               global = ISC_FALSE;
+                               global = false;
                        }
                } else {
                        /*
@@ -1870,7 +1871,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
                        ISC_LIST_APPEND(queries, query, link);
 
                        query = clone_default_query();
-                       global = ISC_FALSE;
+                       global = false;
                        /* XXX Error message */
                }
        }
@@ -1900,7 +1901,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv)
                        }
 
                        bargv[0] = argv[0];
-                       parse_args(ISC_TRUE, bargc, (char **)bargv);
+                       parse_args(true, bargc, (char **)bargv);
                }
                if (batchfp != stdin)
                        fclose(batchfp);
@@ -1937,9 +1938,9 @@ main(int argc, char *argv[]) {
        dns_result_register();
 
        if (isc_net_probeipv4() == ISC_R_SUCCESS)
-               have_ipv4 = ISC_TRUE;
+               have_ipv4 = true;
        if (isc_net_probeipv6() == ISC_R_SUCCESS)
-               have_ipv6 = ISC_TRUE;
+               have_ipv6 = true;
        if (!have_ipv4 && !have_ipv6)
                fatal("could not find either IPv4 or IPv6");
 
@@ -1961,7 +1962,7 @@ main(int argc, char *argv[]) {
        RUNCHECK(dst_lib_init(mctx, ectx, ISC_ENTROPY_GOODONLY));
 
        ISC_LIST_INIT(queries);
-       parse_args(ISC_FALSE, argc, argv);
+       parse_args(false, argc, argv);
        if (server == NULL)
                fatal("a server '@xxx' is required");
 
@@ -1974,10 +1975,10 @@ main(int argc, char *argv[]) {
 
        if (isc_sockaddr_pf(&dstaddr) == PF_INET && have_ipv6) {
                isc_net_disableipv6();
-               have_ipv6 = ISC_FALSE;
+               have_ipv6 = false;
        } else if (isc_sockaddr_pf(&dstaddr) == PF_INET6 && have_ipv4) {
                isc_net_disableipv4();
-               have_ipv4 = ISC_FALSE;
+               have_ipv4 = false;
        }
        if (have_ipv4 && have_ipv6)
                fatal("can't choose between IPv4 and IPv6");
index 2313b39eee8232a42f40bc9ffcd454e0da000d03..5c1d36d6b78f73ca2ff04aefd7a0fcf2f1c8a1d3 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -78,10 +79,10 @@ main(int argc, char *argv[]) {
        isc_buffer_t tbuf;
        isc_buffer_t dbuf;
        dns_rdata_t rdata = DNS_RDATA_INIT;
-       isc_boolean_t doexit = ISC_FALSE;
-       isc_boolean_t once = ISC_FALSE;
-       isc_boolean_t print = ISC_FALSE;
-       isc_boolean_t unknown = ISC_FALSE;
+       bool doexit = false;
+       bool once = false;
+       bool print = false;
+       bool unknown = false;
        unsigned int t;
        char *origin = NULL;
        dns_fixedname_t fixed;
@@ -94,11 +95,11 @@ main(int argc, char *argv[]) {
                        break;
 
                case 'p':
-                       print = ISC_TRUE;
+                       print = true;
                        break;
 
                case 'u':
-                       unknown = ISC_TRUE;
+                       unknown = true;
                        break;
 
                case 'C':
@@ -119,7 +120,7 @@ main(int argc, char *argv[]) {
                                if (strncmp(text, "TYPE", 4) != 0)
                                        fprintf(stdout, "%s\n", text);
                        }
-                       doexit = ISC_TRUE;
+                       doexit = true;
                        break;
 
                case 'T':
@@ -130,7 +131,7 @@ main(int argc, char *argv[]) {
                                if (strncmp(text, "TYPE", 4) != 0)
                                        fprintf(stdout, "%s\n", text);
                        }
-                       doexit = ISC_TRUE;
+                       doexit = true;
                        break;
 
                case '?':
@@ -255,7 +256,7 @@ main(int argc, char *argv[]) {
                        fatal("dns_rdata_fromtext: %s",
                              dns_result_totext(result));
                }
-               once = ISC_TRUE;
+               once = true;
        }
        if (result != ISC_R_EOF) {
                fatal("eof not found");
index f16088ba886c7c8d7eabce316faad16e83535dce..1e1092141e00cad79b120ef3b68b2743aa78db0a 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <stdarg.h>
 
index f4aba743e4f0137d5ca43a6ba752de6ba00673ca..634d0f9ea37c7b23eb54f9d38bdd6aa2cbff79f3 100644 (file)
@@ -87,7 +87,7 @@ isc_result_t
 bdb_opendb(DBTYPE db_type, DB **db_out, const char *db_name, int flags);
 
 void
-put_data(isc_boolean_t dns_data, char *input_key, char *input_data);
+put_data(bool dns_data, char *input_key, char *input_data);
 
 void
 insert_data(void);
@@ -111,7 +111,7 @@ void
 operation_bulk(void);
 
 void
-operation_listOrDelete(isc_boolean_t dlt);
+operation_listOrDelete(bool dlt);
 
                                              
 /*%
@@ -214,11 +214,11 @@ typedef struct bdb_instance {
 
 int operation = 0;             /*%< operation to perform. */
 /*% allow new lock files or DB to be created. */
-isc_boolean_t create_allowed = isc_boolean_false;
+bool create_allowed = false;
 char *key = NULL;              /*%< key to use in list & del operations */
 
 /*% dump DB in DLZBDB bulk format */
-isc_boolean_t list_everything = isc_boolean_false;     
+bool list_everything = false;  
 unsigned int key_val; /*%< key as unsigned int used in list & del operations */
 char *zone = NULL;             /*%< zone to use in list operations */
 char *host = NULL;             /*%< host to use in list operations */
@@ -464,7 +464,7 @@ bdb_opendb(DBTYPE db_type, DB **db_out, const char *db_name, int flags) {
                return ISC_R_FAILURE;
        }
 
-       if (create_allowed == isc_boolean_true) {
+       if (create_allowed == true) {
                createFlag = DB_CREATE;
        }
        /* open the database. */
@@ -486,7 +486,7 @@ bdb_opendb(DBTYPE db_type, DB **db_out, const char *db_name, int flags) {
  */
 
 void
-put_data(isc_boolean_t dns_data, char *input_key, char *input_data) {
+put_data(bool dns_data, char *input_key, char *input_data) {
 
        int bdbres;
        DBT key, data;
@@ -531,8 +531,8 @@ insert_data(void) {
 
        isc_result_t result;
        isc_token_t token;      /* token from lexer */
-       isc_boolean_t loop = isc_boolean_true;
-       isc_boolean_t have_czone = isc_boolean_false;
+       bool loop = true;
+       bool have_czone = false;
        char data_arr[max_data_len];
        isc_buffer_t buf;
        char data_arr2[max_data_len];
@@ -561,7 +561,7 @@ insert_data(void) {
                                        data_type = 'b';
                                }
                        } else if (data_type == 'c' || data_type == 'C') {
-                               if (have_czone == isc_boolean_true) {
+                               if (have_czone == true) {
                                        isc_buffer_putstr(&buf2, token.value.as_pointer);
                                        /* add string terminator to buffer */
                                        isc_buffer_putmem(&buf2, "\0", 1);
@@ -569,7 +569,7 @@ insert_data(void) {
                                        isc_buffer_putstr(&buf, token.value.as_pointer);
                                        /* add string terminator to buffer */
                                        isc_buffer_putmem(&buf, "\0", 1);
-                                       have_czone = isc_boolean_true;
+                                       have_czone = true;
                                }
                        } else {
                                isc_buffer_putstr(&buf, token.value.as_pointer);
@@ -589,9 +589,9 @@ insert_data(void) {
                                if (data_type == 'd' || data_type == 'D') {
                                        /* add string terminator to buffer */
                                        isc_buffer_putmem(&buf, "\0", 1);
-                                       put_data(isc_boolean_true, NULL, (char *) &data_arr);
+                                       put_data(true, NULL, (char *) &data_arr);
                                } else if (data_type == 'c' || data_type == 'C') {
-                                       put_data(isc_boolean_false, (char *) &data_arr, 
+                                       put_data(false, (char *) &data_arr, 
                                                 (char *) &data_arr2);
                                } else if (data_type == 'b') {
                                        fprintf(stderr, "Bad / unknown token encountered on line %lu."\
@@ -603,13 +603,13 @@ insert_data(void) {
                        }
 
                        if (token.type == isc_tokentype_eof) {
-                               loop = isc_boolean_false;
+                               loop = false;
                        }       
 
                        /* reset buffer for next insert */
                        isc_buffer_clear(&buf);
                        isc_buffer_clear(&buf2);
-                       have_czone = isc_boolean_false;
+                       have_czone = false;
                        data_type ='u';
                        break;
                default:
@@ -645,7 +645,7 @@ openBDB(void) {
        }
 
        /* open BDB environment */
-       if (create_allowed == isc_boolean_true) {
+       if (create_allowed == true) {
                /* allowed to create new files */
                bdbres = db.dbenv->open(db.dbenv, db_envdir, 
                                        DB_INIT_CDB | DB_INIT_MPOOL | DB_CREATE, 0);
@@ -765,7 +765,7 @@ operation_add(void) {
        checkInvalidParam(host, "h", "for add operation");
        checkInvalidParam(c_zone, "c", "for add operation");
        checkInvalidParam(c_ip, "i", "for add operation");
-       checkInvalidOption(list_everything, isc_boolean_true, "e",
+       checkInvalidOption(list_everything, true, "e",
                           "for add operation");
 
        /* if open lexer fails it alread prints error messages. */
@@ -796,7 +796,7 @@ operation_bulk(void) {
        checkInvalidParam(host, "h", "for bulk load operation");
        checkInvalidParam(c_zone, "c", "for bulk load operation");
        checkInvalidParam(c_ip, "i", "for bulk load operation");
-       checkInvalidOption(list_everything, isc_boolean_true, "e",
+       checkInvalidOption(list_everything, true, "e",
                           "for bulk load operation");
 
        /* if open lexer fails it already prints error messages. */
@@ -896,7 +896,7 @@ bulk_write(char type, DB *database, DBC *dbcursor, DBT *bdbkey, DBT *bdbdata) {
  */
 
 void
-operation_listOrDelete(isc_boolean_t dlt) {
+operation_listOrDelete(bool dlt) {
 
        int bdbres = 0;
        DBC *curList[3];
@@ -906,24 +906,24 @@ operation_listOrDelete(isc_boolean_t dlt) {
 
 
        /* verify that only allowed parameters were passed. */
-       if (dlt == isc_boolean_true) {
+       if (dlt == true) {
                checkInvalidParam(zone, "z", "for delete operation");
                checkInvalidParam(host, "h", "for delete operation");
-               checkInvalidOption(list_everything, isc_boolean_true, "e",
+               checkInvalidOption(list_everything, true, "e",
                                   "for delete operation");
-               checkInvalidOption(create_allowed, isc_boolean_true, "n",
+               checkInvalidOption(create_allowed, true, "n",
                                   "for delete operation");
        } else if (key != NULL || zone != NULL || host != NULL) {
                checkInvalidParam(c_zone, "c", "for list when k, z or h are specified");
                checkInvalidParam(c_ip, "i", "for list when k, z, or h are specified");
-               checkInvalidOption(list_everything, isc_boolean_true, "e",
+               checkInvalidOption(list_everything, true, "e",
                                   "for list when k, z, or h are specified");
-               checkInvalidOption(create_allowed, isc_boolean_true, "n",
+               checkInvalidOption(create_allowed, true, "n",
                                   "for list operation");
        } else if (c_ip != NULL || c_zone != NULL) {
-               checkInvalidOption(list_everything, isc_boolean_true, "e",
+               checkInvalidOption(list_everything, true, "e",
                                   "for list when c or i are specified");
-               checkInvalidOption(create_allowed, isc_boolean_true, "n",
+               checkInvalidOption(create_allowed, true, "n",
                                   "for list operation");
        }
 
@@ -931,7 +931,7 @@ operation_listOrDelete(isc_boolean_t dlt) {
        memset(&bdbdata, 0, sizeof(bdbdata));
 
        /* Dump database in "dlzbdb" bulk format */
-       if (list_everything == isc_boolean_true) {
+       if (list_everything == true) {
                if (bulk_write('c', db.client, db.cursor, &bdbkey, &bdbdata)
                    != ISC_R_SUCCESS)
                        return;
@@ -955,7 +955,7 @@ operation_listOrDelete(isc_boolean_t dlt) {
                bdbkey.data = &recno;
                bdbkey.size = sizeof(recno);
 
-               if (dlt == isc_boolean_true) {
+               if (dlt == true) {
                        bdbres = db.data->del(db.data, NULL, &bdbkey, 0);
                } else {
                        bdbdata.flags = DB_DBT_REALLOC;
@@ -966,7 +966,7 @@ operation_listOrDelete(isc_boolean_t dlt) {
                                printf("%lu | %.*s\n", *(u_long *) bdbkey.data,
                                       (int)bdbdata.size, (char *)bdbdata.data);
                        }
-               } /* closes else of if (dlt == isc_boolean_true) */
+               } /* closes else of if (dlt == true) */
                if (bdbres == DB_NOTFOUND) {
                        printf("Key not found in database");
                }
@@ -1065,7 +1065,7 @@ operation_listOrDelete(isc_boolean_t dlt) {
        if (c_zone != NULL) {
 
                /* create a cursor and make sure it worked. */
-               if (dlt == isc_boolean_true) {
+               if (dlt == true) {
                        /* open read-write cursor */
                        bdbres = db.client->cursor(db.client, NULL, &db.cursor,
                                                   DB_WRITECURSOR);
@@ -1095,7 +1095,7 @@ operation_listOrDelete(isc_boolean_t dlt) {
                }
 
                while (bdbres == 0) {
-                       if (dlt == isc_boolean_false) {
+                       if (dlt == false) {
                                printf("%.*s | %.*s\n", (int)bdbkey.size, (char *) bdbkey.data,
                                       (int)bdbdata.size, (char *) bdbdata.data);
                        } else {
@@ -1146,7 +1146,7 @@ main(int argc, char **argv) {
        while ((ch= isc_commandline_parse(argc, argv, "ldesna:f:k:z:h:c:i:")) != -1) {
                switch (ch) {
                case 'n':
-                       create_allowed = isc_boolean_true;
+                       create_allowed = true;
                        break;
                case 'l':
                        checkOp(operation);
@@ -1197,7 +1197,7 @@ main(int argc, char **argv) {
                case 'e':
                        checkOp(operation);
                        operation = list;
-                       list_everything = isc_boolean_true;
+                       list_everything = true;
                        break;
                case '?':
                        show_usage();
@@ -1240,10 +1240,10 @@ main(int argc, char **argv) {
 
        switch(operation) {
        case list:
-               operation_listOrDelete(isc_boolean_false);
+               operation_listOrDelete(false);
                break;
        case dele:
-               operation_listOrDelete(isc_boolean_true);
+               operation_listOrDelete(true);
                break;
        case add:
                operation_add();
index e8fbe5b80dc4a4670b38eec0f7c2f717ccf7a232..c460d984747461f8f0c603e462a198af97114156 100644 (file)
@@ -98,7 +98,7 @@ fs_destroy(void *driverarg, void *dbdata);
  * Private methods
  */
 
-static isc_boolean_t
+static bool
 is_safe(const char *input) {
        unsigned int i;
        unsigned int len = strlen(input);
@@ -109,13 +109,13 @@ is_safe(const char *input) {
                if (input[i] == '.') {
                        /* '.' is not allowed as first char */
                        if (i == 0)
-                               return (ISC_FALSE);
+                               return (false);
                        /* '..', two dots together is not allowed. */
                        else if (input[i-1] == '.')
-                               return (ISC_FALSE);
+                               return (false);
                        /* '.' is not allowed as last char */
                        if (i == len)
-                               return (ISC_FALSE);
+                               return (false);
                        /* only 1 dot in ok location, continue at next char */
                        continue;
                }
@@ -151,10 +151,10 @@ is_safe(const char *input) {
                 * if we reach this point we have encountered a
                 * disallowed char!
                 */
-               return (ISC_FALSE);
+               return (false);
        }
         /* everything ok. */
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -226,7 +226,7 @@ create_path(const char *zone, const char *host, const char *client,
        int pathsize;
        int len;
        isc_result_t result;
-       isc_boolean_t isroot = ISC_FALSE;
+       bool isroot = false;
 
        /* we require a zone & cd parameter */
        REQUIRE(zone != NULL);
@@ -243,7 +243,7 @@ create_path(const char *zone, const char *host, const char *client,
 
        /* special case for root zone */
        if (strcmp(zone, ".") == 0)
-               isroot = ISC_TRUE;
+               isroot = true;
 
        /* if the requested zone is "unsafe", return error */
        if (!isroot && !is_safe(zone))
@@ -375,11 +375,11 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
        int i;
        int len;
        dir_entry_t *direntry;
-       isc_boolean_t foundHost;
+       bool foundHost;
 
        tmp[0] = '\0'; /* set 1st byte to '\0' so strcpy works right. */
        host[0] = '\0';
-       foundHost = ISC_FALSE;
+       foundHost = false;
 
        /* copy base directory name to tmp. */
        strcpy(tmp, dir->dirname);
@@ -419,7 +419,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
                                                strcat(host, tmpString);
                                }
 
-                               foundHost = ISC_TRUE;
+                               foundHost = true;
                                /* set tmp again for use later */
                                strcpy(tmp, dir->dirname);
                        }
@@ -444,7 +444,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
                                                   sizeof(host) - 1);
                                                host[255] = '\0';
                                        }
-                                       foundHost = ISC_TRUE;
+                                       foundHost = true;
                                        break;
                                }
                        }
@@ -507,7 +507,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
                                 */
 
                        } else if (dir_list != NULL &&
-                                  foundHost == ISC_FALSE) {
+                                  foundHost == false) {
                                continue;
                        }
                } else /* if we cannot stat entry, skip it. */
index 2b2dcf85efe214cbb34c9155922d1de5025c2c0c..cf153a977ad46d602d22437ca923ca50906215b8 100644 (file)
@@ -319,7 +319,7 @@ ldap_find_avail_conn(db_list_t *dblist) {
 
 static isc_result_t
 ldap_process_results(LDAP *dbc, LDAPMessage *msg, char ** attrs,
-                    void *ptr, isc_boolean_t allnodes)
+                    void *ptr, bool allnodes)
 {
        isc_result_t result = ISC_R_SUCCESS;
        int i = 0;
@@ -789,13 +789,13 @@ ldap_get_results(const char *zone, const char *record,
        case ALLNODES:
                result = ldap_process_results((LDAP *) dbi->dbconn, ldap_msg,
                                              ldap_url->lud_attrs,
-                                             ptr, isc_boolean_true);
+                                             ptr, true);
                break;
        case AUTHORITY:
        case LOOKUP:
                result = ldap_process_results((LDAP *) dbi->dbconn, ldap_msg,
                                              ldap_url->lud_attrs,
-                                             ptr, isc_boolean_false);
+                                             ptr, false);
                break;
        case ALLOWXFR:
                entries = ldap_count_entries((LDAP *) dbi->dbconn, ldap_msg);
index 764a05af7cf030b5f4495b18cc3990189847dee1..66ed11838d4b61cc0896a401af40d73be77fb7f3 100644 (file)
@@ -57,7 +57,7 @@ typedef struct driverinstance driverinstance_t;
 struct query_segment {
        void                            *sql;
        unsigned int                    strlen;
-       isc_boolean_t                   direct;
+       bool                    direct;
        ISC_LINK(query_segment_t)       link;
 };
 
index 67f364e90153fa53b02f9f6da96ce3bb7aa85f24..979488acfc006eeed6a263eb048bf65a868017b7 100644 (file)
@@ -83,7 +83,7 @@ destroy_querylist(isc_mem_t *mctx, query_list_t **querylist)
                 * was really a query segment, and not a pointer to
                 * %zone%, or %record%, or %client%
                */
-               if (tseg->sql != NULL && tseg->direct == isc_boolean_true)
+               if (tseg->sql != NULL && tseg->direct == true)
                        isc_mem_free(mctx, tseg->sql);
                /* get the next query segment, before we destroy this one. */
                nseg = ISC_LIST_NEXT(nseg, link);
@@ -101,9 +101,9 @@ build_querylist(isc_mem_t *mctx, const char *query_str, char **zone,
                unsigned int flags)
 {
        isc_result_t result;
-       isc_boolean_t foundzone = isc_boolean_false;
-       isc_boolean_t foundrecord = isc_boolean_false;
-       isc_boolean_t foundclient = isc_boolean_false;
+       bool foundzone = false;
+       bool foundrecord = false;
+       bool foundclient = false;
        char *temp_str = NULL;
        char *right_str = NULL;
        query_list_t *tql;
@@ -148,7 +148,7 @@ build_querylist(isc_mem_t *mctx, const char *query_str, char **zone,
                        goto cleanup;
                }
                tseg->sql = NULL;
-               tseg->direct = isc_boolean_false;
+               tseg->direct = false;
                /* initialize the query segment link */
                ISC_LINK_INIT(tseg, link);
                /* append the query segment to the list */
@@ -167,7 +167,7 @@ build_querylist(isc_mem_t *mctx, const char *query_str, char **zone,
                        goto cleanup;
                }
                /* tseg->sql points directly to a string. */
-               tseg->direct = isc_boolean_true;
+               tseg->direct = true;
                tseg->strlen = strlen(tseg->sql);
 
                /* check if we encountered "$zone$" token */
@@ -181,8 +181,8 @@ build_querylist(isc_mem_t *mctx, const char *query_str, char **zone,
                        tseg->sql = (char**) zone;
                        tseg->strlen = 0;
                        /* tseg->sql points in-directly to a string */
-                       tseg->direct = isc_boolean_false;
-                       foundzone = isc_boolean_true;
+                       tseg->direct = false;
+                       foundzone = true;
                        /* check if we encountered "$record$" token */
                } else if (strcasecmp(tseg->sql, "record") == 0) {
                        /*
@@ -194,8 +194,8 @@ build_querylist(isc_mem_t *mctx, const char *query_str, char **zone,
                        tseg->sql = (char**) record;
                        tseg->strlen = 0;
                        /* tseg->sql points in-directly poinsts to a string */
-                       tseg->direct = isc_boolean_false;
-                       foundrecord = isc_boolean_true;
+                       tseg->direct = false;
+                       foundrecord = true;
                        /* check if we encountered "$client$" token */
                } else if (strcasecmp(tseg->sql, "client") == 0) {
                        /*
@@ -207,8 +207,8 @@ build_querylist(isc_mem_t *mctx, const char *query_str, char **zone,
                        tseg->sql = (char**) client;
                        tseg->strlen = 0;
                        /* tseg->sql points in-directly poinsts to a string */
-                       tseg->direct = isc_boolean_false;
-                       foundclient = isc_boolean_true;
+                       tseg->direct = false;
+                       foundclient = true;
                }
        }
 
@@ -289,7 +289,7 @@ sdlzh_build_querystring(isc_mem_t *mctx, query_list_t *querylist)
                 * if this is a query segment, use the
                 * precalculated string length
                 */
-               if (tseg->direct == isc_boolean_true)
+               if (tseg->direct == true)
                        length += tseg->strlen;
                else    /* calculate string length for dynamic segments. */
                        length += strlen(* (char**) tseg->sql);
@@ -307,7 +307,7 @@ sdlzh_build_querystring(isc_mem_t *mctx, query_list_t *querylist)
        /* start at the top of the list again */
        tseg = ISC_LIST_HEAD(*querylist);
        while (tseg != NULL) {
-               if (tseg->direct == isc_boolean_true)
+               if (tseg->direct == true)
                        /* query segments */
                        strcat(qs, tseg->sql);
                else
index d5d96a3e49815a22129c14db843ba645a41c4f86..3c6ba8cfad1b72a58bc3af45f20052bb4a50f09e 100644 (file)
@@ -205,7 +205,7 @@ are mandatory, others optional).
     updates.  This function starts a transaction in the database.
 
 
-  - void dlz_closeversion(const char *zone, isc_boolean_t commit,
+  - void dlz_closeversion(const char *zone, bool commit,
                           void *dbdata, void **versionp);
 
     Optional, but must be supplied if dlz_newversion() is.  This function
@@ -216,7 +216,7 @@ are mandatory, others optional).
 
     Optional, but must be supplied in order to support DDNS updates.
 
-  - isc_boolean_t dlz_ssumatch(const char *signer, const char *name,
+  - bool dlz_ssumatch(const char *signer, const char *name,
                                const char *tcpaddr, const char *type,
                                const char *key, uint32_t keydatalen,
                                uint8_t *keydata, void *dbdata);
index aafc505d60a708fce42e36143703347abeb34b8b..345f7761d619c1d2ad6b2b782f739c31bb9f61a2 100644 (file)
@@ -60,7 +60,7 @@ struct dlz_example_data {
        struct record adds[MAX_RECORDS];
        struct record deletes[MAX_RECORDS];
 
-       isc_boolean_t transaction_started;
+       bool transaction_started;
 
        /* Helper functions from the dlz_dlopen driver */
        log_t *log;
@@ -69,17 +69,17 @@ struct dlz_example_data {
        dns_dlz_writeablezone_t *writeable_zone;
 };
 
-static isc_boolean_t
+static bool
 single_valued(const char *type) {
        const char *single[] = { "soa", "cname", NULL };
        int i;
 
        for (i = 0; single[i]; i++) {
                if (strcasecmp(single[i], type) == 0) {
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -90,7 +90,7 @@ add_name(struct dlz_example_data *state, struct record *list,
         const char *name, const char *type, dns_ttl_t ttl, const char *data)
 {
        int i;
-       isc_boolean_t single = single_valued(type);
+       bool single = single_valued(type);
        int first_empty = -1;
 
        for (i = 0; i < MAX_RECORDS; i++) {
@@ -384,7 +384,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
 {
        isc_result_t result;
        struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
        void *dbversion = NULL;
        isc_sockaddr_t *src;
        char full_name[256];
@@ -420,7 +420,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
        if (clientinfo != NULL &&
            clientinfo->version >= DNS_CLIENTINFO_VERSION) {
                dbversion = clientinfo->dbversion;
-               if (dbversion != NULL && *(isc_boolean_t *)dbversion)
+               if (dbversion != NULL && *(bool *)dbversion)
                        state->log(ISC_LOG_INFO,
                                   "dlz_example: lookup against live "
                                   "transaction\n");
@@ -441,7 +441,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
                state->log(ISC_LOG_INFO,
                           "dlz_example: lookup connection from: %s", buf);
 
-               found = ISC_TRUE;
+               found = true;
                result = state->putrr(lookup, "TXT", 0, buf);
                if (result != ISC_R_SUCCESS)
                        return (result);
@@ -451,7 +451,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
                for (i = 0; i < 511; i++)
                        buf[i] = 'x';
                buf[i] = '\0';
-               found = ISC_TRUE;
+               found = true;
                result = state->putrr(lookup, "TXT", 0, buf);
                if (result != ISC_R_SUCCESS)
                        return (result);
@@ -459,7 +459,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
 
        for (i = 0; i < MAX_RECORDS; i++) {
                if (strcasecmp(state->current[i].name, full_name) == 0) {
-                       found = ISC_TRUE;
+                       found = true;
                        result = state->putrr(lookup, state->current[i].type,
                                              state->current[i].ttl,
                                              state->current[i].data);
@@ -531,7 +531,7 @@ dlz_newversion(const char *zone, void *dbdata, void **versionp) {
                return (ISC_R_FAILURE);
        }
 
-       state->transaction_started = ISC_TRUE;
+       state->transaction_started = true;
        *versionp = (void *) &state->transaction_started;
 
        return (ISC_R_SUCCESS);
@@ -541,7 +541,7 @@ dlz_newversion(const char *zone, void *dbdata, void **versionp) {
  * End a transaction
  */
 void
-dlz_closeversion(const char *zone, isc_boolean_t commit,
+dlz_closeversion(const char *zone, bool commit,
                 void *dbdata, void **versionp)
 {
        struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
@@ -554,7 +554,7 @@ dlz_closeversion(const char *zone, isc_boolean_t commit,
                return;
        }
 
-       state->transaction_started = ISC_FALSE;
+       state->transaction_started = false;
 
        *versionp = NULL;
 
@@ -626,7 +626,7 @@ dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb, void *dbdata) {
 /*
  * Authorize a zone update
  */
-isc_boolean_t
+bool
 dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
             const char *type, const char *key, uint32_t keydatalen,
             unsigned char *keydata, void *dbdata)
@@ -643,12 +643,12 @@ dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
                if (state->log != NULL)
                        state->log(ISC_LOG_INFO, "dlz_example: denying update "
                                   "of name=%s by %s", name, signer);
-               return (ISC_FALSE);
+               return (false);
        }
        if (state->log != NULL)
                state->log(ISC_LOG_INFO, "dlz_example: allowing update of "
                           "name=%s by %s", name, signer);
-       return (ISC_TRUE);
+       return (true);
 }
 
 
index 3f6c91eec48392dd68b0daba7f2b6250d404ba18..0c742b59c382d7ce91bfa8933e7f7a308cbbd248 100644 (file)
@@ -77,7 +77,7 @@ destroy_querylist(query_list_t **querylist) {
                 * was really a query segment, and not a pointer to
                 * %zone%, or %record%, or %client%
                */
-               if (tseg->cmd != NULL && tseg->direct == ISC_TRUE)
+               if (tseg->cmd != NULL && tseg->direct == true)
                        free(tseg->cmd);
                /* get the next query segment, before we destroy this one. */
                nseg = DLZ_LIST_NEXT(nseg, link);
@@ -95,9 +95,9 @@ build_querylist(const char *query_str, char **zone, char **record,
                log_t log)
 {
        isc_result_t result;
-       isc_boolean_t foundzone = ISC_FALSE;
-       isc_boolean_t foundrecord = ISC_FALSE;
-       isc_boolean_t foundclient = ISC_FALSE;
+       bool foundzone = false;
+       bool foundrecord = false;
+       bool foundclient = false;
        char *temp_str = NULL;
        char *right_str = NULL;
        query_list_t *tql;
@@ -139,7 +139,7 @@ build_querylist(const char *query_str, char **zone, char **record,
                        goto cleanup;
                }
                tseg->cmd = NULL;
-               tseg->direct = ISC_FALSE;
+               tseg->direct = false;
                /* initialize the query segment link */
                DLZ_LINK_INIT(tseg, link);
                /* append the query segment to the list */
@@ -156,7 +156,7 @@ build_querylist(const char *query_str, char **zone, char **record,
                        goto cleanup;
                }
                /* tseg->cmd points directly to a string. */
-               tseg->direct = ISC_TRUE;
+               tseg->direct = true;
                tseg->strlen = strlen(tseg->cmd);
 
                /* check if we encountered "$zone$" token */
@@ -170,8 +170,8 @@ build_querylist(const char *query_str, char **zone, char **record,
                        tseg->cmd = (char**) zone;
                        tseg->strlen = 0;
                        /* tseg->cmd points in-directly to a string */
-                       tseg->direct = ISC_FALSE;
-                       foundzone = ISC_TRUE;
+                       tseg->direct = false;
+                       foundzone = true;
                        /* check if we encountered "$record$" token */
                } else if (strcasecmp(tseg->cmd, "record") == 0) {
                        /*
@@ -183,8 +183,8 @@ build_querylist(const char *query_str, char **zone, char **record,
                        tseg->cmd = (char**) record;
                        tseg->strlen = 0;
                        /* tseg->cmd points in-directly poinsts to a string */
-                       tseg->direct = ISC_FALSE;
-                       foundrecord = ISC_TRUE;
+                       tseg->direct = false;
+                       foundrecord = true;
                        /* check if we encountered "$client$" token */
                } else if (strcasecmp(tseg->cmd, "client") == 0) {
                        /*
@@ -196,8 +196,8 @@ build_querylist(const char *query_str, char **zone, char **record,
                        tseg->cmd = (char**) client;
                        tseg->strlen = 0;
                        /* tseg->cmd points in-directly poinsts to a string */
-                       tseg->direct = ISC_FALSE;
-                       foundclient = ISC_TRUE;
+                       tseg->direct = false;
+                       foundclient = true;
                }
        }
 
@@ -273,7 +273,7 @@ build_querystring(query_list_t *querylist) {
                 * if this is a query segment, use the
                 * precalculated string length
                 */
-               if (tseg->direct == ISC_TRUE)
+               if (tseg->direct == true)
                        length += tseg->strlen;
                else    /* calculate string length for dynamic segments. */
                        length += strlen(* (char**) tseg->cmd);
@@ -289,7 +289,7 @@ build_querystring(query_list_t *querylist) {
        /* start at the top of the list again */
        tseg = DLZ_LIST_HEAD(*querylist);
        while (tseg != NULL) {
-               if (tseg->direct == ISC_TRUE)
+               if (tseg->direct == true)
                        /* query segments */
                        strcat(qs, tseg->cmd);
                else
index 1a013f4647be895b608dff1bfa82807a39e9ef44..d164f530c845b1643711bdb544cf3f0021540898 100644 (file)
@@ -92,7 +92,7 @@ b9_add_helper(struct config_data *cd, const char *helper_name, void *ptr);
 /*
  * Private methods
  */
-static isc_boolean_t
+static bool
 is_safe(const char *input) {
        unsigned int i;
        unsigned int len = strlen(input);
@@ -103,13 +103,13 @@ is_safe(const char *input) {
                if (input[i] == '.') {
                        /* '.' is not allowed as first char */
                        if (i == 0)
-                               return (ISC_FALSE);
+                               return (false);
                        /* '..', two dots together is not allowed. */
                        else if (input[i-1] == '.')
-                               return (ISC_FALSE);
+                               return (false);
                        /* '.' is not allowed as last char */
                        if (i == len)
-                               return (ISC_FALSE);
+                               return (false);
                        /* only 1 dot in ok location, continue at next char */
                        continue;
                }
@@ -145,10 +145,10 @@ is_safe(const char *input) {
                 * if we reach this point we have encountered a
                 * disallowed char!
                 */
-               return (ISC_FALSE);
+               return (false);
        }
         /* everything ok. */
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -220,11 +220,11 @@ create_path(const char *zone, const char *host, const char *client,
        int pathsize;
        int len;
        isc_result_t result;
-       isc_boolean_t isroot = ISC_FALSE;
+       bool isroot = false;
 
        /* special case for root zone */
        if (strcmp(zone, ".") == 0)
-               isroot = ISC_TRUE;
+               isroot = true;
 
        /* if the requested zone is "unsafe", return error */
        if (!isroot && !is_safe(zone))
@@ -353,11 +353,11 @@ process_dir(dir_t *dir, void *passback, config_data_t *cd,
        int i;
        int len;
        dir_entry_t *direntry;
-       isc_boolean_t foundHost;
+       bool foundHost;
 
        tmp[0] = '\0'; /* set 1st byte to '\0' so strcpy works right. */
        host[0] = '\0';
-       foundHost = ISC_FALSE;
+       foundHost = false;
 
        /* copy base directory name to tmp. */
        strcpy(tmp, dir->dirname);
@@ -397,7 +397,7 @@ process_dir(dir_t *dir, void *passback, config_data_t *cd,
                                                strcat(host, tmpString);
                                }
 
-                               foundHost = ISC_TRUE;
+                               foundHost = true;
                                /* set tmp again for use later */
                                strcpy(tmp, dir->dirname);
                        }
@@ -422,7 +422,7 @@ process_dir(dir_t *dir, void *passback, config_data_t *cd,
                                                   sizeof(host) - 1);
                                                host[255] = '\0';
                                        }
-                                       foundHost = ISC_TRUE;
+                                       foundHost = true;
                                        break;
                                }
                        }
@@ -481,7 +481,7 @@ process_dir(dir_t *dir, void *passback, config_data_t *cd,
                                 */
 
                        } else if (dir_list != NULL &&
-                                  foundHost == ISC_FALSE) {
+                                  foundHost == false) {
                                continue;
                        }
                } else /* if we cannot stat entry, skip it. */
index 5123927c4faf6ee92f315225726d4761f3bc3ace..10e274a158175fc040c8af8ea580602fcecbfe57 100644 (file)
@@ -61,7 +61,7 @@ typedef struct driverinstance driverinstance_t;
 struct query_segment {
        void                            *cmd;
        unsigned int                    strlen;
-       isc_boolean_t                   direct;
+       bool                    direct;
        DLZ_LINK(query_segment_t)       link;
 };
 
index 18dc11250c208f536263ddb7fd353c3ab3f9153d..7bd6775c21021ec9b790209fc0fc2ed75416651c 100644 (file)
@@ -37,7 +37,7 @@
 #include <arpa/inet.h>
 
 typedef unsigned int isc_result_t;
-typedef int isc_boolean_t;
+typedef int bool;
 typedef uint32_t dns_ttl_t;
 
 /*
@@ -68,8 +68,8 @@ typedef uint32_t dns_ttl_t;
 #define ISC_R_FILENOTFOUND             38
 
 /* boolean values */
-#define ISC_TRUE 1
-#define ISC_FALSE 0
+#define true 1
+#define false 0
 
 /* log levels */
 #define ISC_LOG_INFO           (-1)
@@ -249,7 +249,7 @@ dlz_newversion(const char *zone, void *dbdata, void **versionp);
  * dlz_newversion() function
  */
 void
-dlz_closeversion(const char *zone, isc_boolean_t commit, void *dbdata,
+dlz_closeversion(const char *zone, bool commit, void *dbdata,
                 void **versionp);
 
 /*
@@ -268,7 +268,7 @@ dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb, void *dbdata);
  * dlz_ssumatch() is optional, but must be supplied if you want to support
  * dynamic updates
  */
-isc_boolean_t
+bool
 dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
             const char *type, const char *key, uint32_t keydatalen,
             uint8_t *keydata, void *dbdata);
index 11257056f345690cba6212d51732222ebc315cce..a2299bf97106bdac1074fa70d101815f1acdfcc8 100644 (file)
@@ -309,7 +309,7 @@ ldap_find_avail_conn(ldap_instance_t *ldap) {
 
 static isc_result_t
 ldap_process_results(ldap_instance_t *db, LDAP *dbc, LDAPMessage *msg,
-                    char **attrs, void *ptr, isc_boolean_t allnodes)
+                    char **attrs, void *ptr, bool allnodes)
 {
        isc_result_t result = ISC_R_SUCCESS;
        int i = 0;
@@ -735,13 +735,13 @@ ldap_get_results(const char *zone, const char *record,
        case ALLNODES:
                result = ldap_process_results(db, (LDAP *) dbi->dbconn,
                                              ldap_msg, ldap_url->lud_attrs,
-                                             ptr, ISC_TRUE);
+                                             ptr, true);
                break;
        case AUTHORITY:
        case LOOKUP:
                result = ldap_process_results(db, (LDAP *) dbi->dbconn,
                                              ldap_msg, ldap_url->lud_attrs,
-                                             ptr, ISC_FALSE);
+                                             ptr, false);
                break;
        case ALLOWXFR:
                entries = ldap_count_entries((LDAP *) dbi->dbconn, ldap_msg);
index 0c398af97cf6fd145286dfb207696e713654b7f7..13f99f68f6b1b415832974111596d9f9f404b5a0 100644 (file)
@@ -261,7 +261,7 @@ static const char *modname = "dlz_mysqldyn";
 /*
  * Local functions
  */
-static isc_boolean_t
+static bool
 db_connect(mysql_data_t *state, mysql_instance_t *dbi) {
        MYSQL *conn;
        /*
@@ -270,7 +270,7 @@ db_connect(mysql_data_t *state, mysql_instance_t *dbi) {
        mysql_thread_init();
 
        if (dbi->connected)
-               return (ISC_TRUE);
+               return (true);
 
        if (state->log != NULL)
                state->log(ISC_LOG_INFO, "%s: init connection %d ",
@@ -287,11 +287,11 @@ db_connect(mysql_data_t *state, mysql_instance_t *dbi) {
                                   modname, mysql_error(dbi->sock));
 
                dlz_mutex_unlock(&dbi->mutex);
-               return (ISC_FALSE);
+               return (false);
        }
 
        dbi->connected = 1;
-       return (ISC_TRUE);
+       return (true);
 }
 
 static mysql_instance_t *
@@ -373,7 +373,7 @@ build_query(mysql_data_t *state, mysql_instance_t *dbi,
            const char *command, ...)
 {
        isc_result_t result;
-       isc_boolean_t localdbi = ISC_FALSE;
+       bool localdbi = false;
        mysql_arglist_t arglist;
        mysql_arg_t *item;
        char *p, *q, *tmp = NULL, *querystr = NULL;
@@ -386,7 +386,7 @@ build_query(mysql_data_t *state, mysql_instance_t *dbi,
                dbi = get_dbi(state);
                if (dbi == NULL)
                        return (NULL);
-               localdbi = ISC_TRUE;
+               localdbi = true;
        }
 
        /* Make sure this instance is connected */
@@ -474,11 +474,11 @@ build_query(mysql_data_t *state, mysql_instance_t *dbi,
 }
 
 /* Does this name end in a dot? */
-static isc_boolean_t
+static bool
 isrelative(const char *s) {
        if (s == NULL || s[strlen(s) - 1] == '.')
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 /* Return a dot if 's' doesn't already end with one */
@@ -593,7 +593,7 @@ db_execute(mysql_data_t *state, mysql_instance_t *dbi, const char *query) {
 static MYSQL_RES *
 db_query(mysql_data_t *state, mysql_instance_t *dbi, const char *query) {
        isc_result_t result;
-       isc_boolean_t localdbi = ISC_FALSE;
+       bool localdbi = false;
        MYSQL_RES *res = NULL;
 
        if (query == NULL)
@@ -604,7 +604,7 @@ db_query(mysql_data_t *state, mysql_instance_t *dbi, const char *query) {
                dbi = get_dbi(state);
                if (dbi == NULL)
                        return (NULL);
-               localdbi = ISC_TRUE;
+               localdbi = true;
        }
 
        /* Make sure this instance is connected */
@@ -749,7 +749,7 @@ notify(mysql_data_t *state, const char *zone, int sn) {
 
        /* Tell each nameserver of the update */
        while ((row = mysql_fetch_row(res)) != NULL) {
-               isc_boolean_t local = ISC_FALSE;
+               bool local = false;
                struct hostent *h;
                struct sockaddr_in addr, *sin;
 
@@ -780,7 +780,7 @@ notify(mysql_data_t *state, const char *zone, int sn) {
 
                        /* See if nameserver address matches this one */
                        if (strcmp(ifaddr, zaddr) == 0)
-                               local = ISC_TRUE;
+                               local = true;
                }
 
                if (!local) {
@@ -1065,7 +1065,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
 {
        isc_result_t result;
        mysql_data_t *state = (mysql_data_t *)dbdata;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
        char *real_name;
        MYSQL_RES *res;
        MYSQL_ROW row;
@@ -1172,7 +1172,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
                        return (result);
                }
 
-               found = ISC_TRUE;
+               found = true;
        }
 
        if (state->debug && state->log != NULL)
@@ -1348,7 +1348,7 @@ dlz_newversion(const char *zone, void *dbdata, void **versionp) {
  * End a transaction
  */
 void
-dlz_closeversion(const char *zone, isc_boolean_t commit,
+dlz_closeversion(const char *zone, bool commit,
                 void *dbdata, void **versionp)
 {
        isc_result_t result;
@@ -1539,7 +1539,7 @@ dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb, void *dbdata)
 /*
  * Authorize a zone update
  */
-isc_boolean_t
+bool
 dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
             const char *type, const char *key, uint32_t keydatalen,
             unsigned char *keydata, void *dbdata)
@@ -1556,7 +1556,7 @@ dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
                state->log(ISC_LOG_INFO,
                           "%s: allowing update of %s by key %s",
                           modname, name, signer);
-       return (ISC_TRUE);
+       return (true);
 }
 
 isc_result_t
index 6dd8e04ccfe3205481bc14cf7f082cefa544c206..07b65d2fce5d54a424b49c36de9af06553500134 100644 (file)
@@ -234,7 +234,7 @@ dlz_lookup(const char *zone, const char *name,
        const char *p;
        char *namebuf;
        nrr_t *nrec;
-       isc_boolean_t origin = ISC_TRUE;
+       bool origin = true;
 
 #if DLZ_DLOPEN_VERSION >= 2
        UNUSED(methods);
@@ -257,7 +257,7 @@ dlz_lookup(const char *zone, const char *name,
                strncpy(namebuf, zone, len - 1);
                namebuf[len - 1] = '\0';
                cd->record = namebuf;
-               origin = ISC_FALSE;
+               origin = false;
        } else if (p == zone)
                cd->record = "@";
 
@@ -330,7 +330,7 @@ dlz_authority(const char *zone, void *dbdata, dns_sdlzlookup_t *lookup) {
        result = ISC_R_NOTFOUND;
        nrec = DLZ_LIST_HEAD(cd->rrs_list);
        while (nrec != NULL) {
-               isc_boolean_t origin;
+               bool origin;
                if (strcmp("@", nrec->name) == 0) {
                        isc_result_t presult;
 
index 2fa1b863d16cda87238f5bb99571d8acbcf12770..6dbc187d60aecb05da4f06065373ae7efc7c8d44 100644 (file)
@@ -76,7 +76,7 @@ bdb_create(const char *zone, int argc, char **argv,
                return ISC_R_FAILURE;
        }
 
-       if (isc_file_exists(*argv) != ISC_TRUE) {
+       if (isc_file_exists(*argv) != true) {
                isc_log_iwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE,
                               DNS_LOGMODULE_SDB, ISC_LOG_CRITICAL, isc_msgcat,
                               ISC_MSGSET_GENERAL, ISC_MSG_FATALERROR,
index 8f79b75590b1d9fda22b6883718c669df5ed053b..6599db1958f206d9d8003f25934a0e9daaf43ac3 100644 (file)
@@ -69,14 +69,14 @@ bdb_putrdata(DB *db, dns_name_t *name, dns_ttl_t ttl, dns_rdata_t *rdata)
 
        isc_buffer_init(&keybuf, nametext, DNS_NAME_MAXTEXT);
 
-       dns_name_totext(name, ISC_TRUE, &keybuf);
+       dns_name_totext(name, true, &keybuf);
 
        key.data = isc_buffer_base(&keybuf);
        key.size = isc_buffer_usedlength(&keybuf);
 
        isc_buffer_init(&databuf, rdatatext, MAX_RDATATEXT);
 
-       dns_ttl_totext(ttl, ISC_FALSE, &databuf);
+       dns_ttl_totext(ttl, false, &databuf);
        *(char *)isc_buffer_used(&databuf) = ' ';
        isc_buffer_add(&databuf, 1);
 
index 2798a095490b6017d7f6e88d3257a50a790a851f..301265a708aa70f68007dbe678b5cb3e6249b97b 100644 (file)
@@ -386,7 +386,7 @@ generate_ldap (dns_name_t * dnsname, dns_rdata_t * rdata, unsigned int ttl)
   isc_result_t result;
 
   isc_buffer_init (&buff, name, sizeof (name));
-  result = dns_name_totext (dnsname, ISC_TRUE, &buff);
+  result = dns_name_totext (dnsname, true, &buff);
   isc_result_check (result, "dns_name_totext");
   name[isc_buffer_usedlength (&buff)] = 0;
 
index a7013120d8e5ec718ed7f3c4f6cb43a26b64af62..df7e9392081c93bcbbcf7836b2e546dcafdf71db 100644 (file)
@@ -91,7 +91,7 @@ addrdata(dns_name_t *name, dns_ttl_t ttl, dns_rdata_t *rdata) {
        PGresult *res;
 
        isc_buffer_init(&b, namearray, sizeof(namearray) - 1);
-       result = dns_name_totext(name, ISC_TRUE, &b);
+       result = dns_name_totext(name, true, &b);
        check_result(result, "dns_name_totext");
        namearray[isc_buffer_usedlength(&b)] = 0;
        quotestring((const unsigned char *)namearray, canonnamearray);
index ec6cd164421e7166e5b28970e330626c200b88c6..86d577e676b2c06b85ffdaacad855dcc7c4fef0e 100644 (file)
@@ -103,7 +103,7 @@ addrdata(dns_name_t *name, dns_ttl_t ttl, dns_rdata_t *rdata)
     int res;
     
     isc_buffer_init(&b, namearray, sizeof(namearray) - 1);
-    result = dns_name_totext(name, ISC_TRUE, &b);
+    result = dns_name_totext(name, true, &b);
     check_result(result, "dns_name_totext");
     namearray[isc_buffer_usedlength(&b)] = 0;
     
index dc88424fc5670cffb756c98f4c9497cb9a0b500e..ade7dc494da0122143912303280d1d4659cd87c3 100644 (file)
@@ -110,7 +110,7 @@ Functions:
        struct dns_compress {
                unsigned int allowed;   /* Allowed methods. */
                unsigned int rdata;     /* Start of local rdata */
-               isc_boolean_t global16; /* 16 bit offsets allowed */
+               bool global16;  /* 16 bit offsets allowed */
                dns_rbt_t *local;       /* Local RBT */
                dns_rbt_t *global;      /* Global RBT */
                isc_mem_t *mctx;        /* Required by RBT */
@@ -118,12 +118,12 @@ Functions:
 
        sets allowed based on the value of edns.
 
-       isc_boolean_t
+       bool
        dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
                                dns_name_t *prefix, dns_name_t *suffix,
                                uint16_t *offset, isc_buffer_t *workspace);
 
-       isc_boolean_t
+       bool
        dns_compress_findlocal(dns_compress_t *cctx, dns_name_t *name,
                               dns_name_t *prefix, dns_name_t *suffix,
                               uint16_t *offset, isc_buffer_t *workspace);
index f9a1f2ab4280fab0f0bc91e334c4318e3215d217..3c4f6b1df7482bd4888859c7308278f749da9097 100644 (file)
@@ -45,14 +45,14 @@ Types:
                int             edns;
                dns_name_t      owner_name;
                unsigned int    rdata;
-               isc_boolean_t   strict;
+               bool    strict;
        }
 
 Functions:
 
        void
        dns_decompress_init(dns_decompress_t *dctx, int edns,
-                           isc_boolean_t strict);
+                           bool strict);
        initalise dctx
        dctx->ownername is invalidated
 
@@ -87,12 +87,12 @@ Functions:
 
        returns dctx->edns
 
-       isc_boolean_t
+       bool
        dns_decompress_strict(dns_decompress_t *dctx);
 
        returns dctx->strict
 
        dns_result_t
        dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
-                         dns_decompress_t *dctx, isc_boolean_t downcase,
+                         dns_decompress_t *dctx, bool downcase,
                          isc_buffer_t *target)
index 6582cd1c9188cdea55315bbb15bf7d600951a104..227576d8565774124e1a703043f92d6c4c96663b 100644 (file)
@@ -238,7 +238,7 @@ Functions:
 
     dns_zone_setxfracl(dns_zone_t *, dns_acl_t *)
 
-    dns_zone_addnotify(dns_zone_t *, isc_sockaddr_t *addr, isc_boolean_t perm);
+    dns_zone_addnotify(dns_zone_t *, isc_sockaddr_t *addr, bool perm);
 
     dns_zone_clearnotify(dns_zone_t *)
 
index f8249b54b23d02bf3801031f183afd18d08fe1ee..42cefd583f0cdd4a88e1c42f08813240f7c5b9a6 100644 (file)
@@ -267,7 +267,7 @@ will look like the following:
         ATF_TC_BODY(serialize_align, tc) {
                 UNUSED(tc);
 
-                result = isc_test_begin(NULL, ISC_TRUE);
+                result = isc_test_begin(NULL, true);
                 ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                 ATF_CHECK_EQ(value1, value2);
@@ -453,7 +453,7 @@ or the end of file was reached, but BIND's version uses result codes:
 
 Only functions which cannot fail (assuming the caller has provided valid
 arguments) should return data directly instead of a result code.  For
-example, `dns_name_issubdomain()` returns an `isc_boolean_t`, because it
+example, `dns_name_issubdomain()` returns an `bool`, because it
 has no failure mode.
 
 A result code can be converted to a human-readable error message by
@@ -1387,24 +1387,24 @@ this simply involves adding the entire record to a region and passing that
 to `digest`, because new record types are treated as opaque blobs of data
 by DNSSEC.
 
-        static isc_boolean_t
+        static bool
         checkowner[_<class>]_<type>(dns_name_t *name,
                                     dns_rdataclass_t rdclass,
                                     dns_rdatatype_t type,
-                                    isc_boolean_t wildcard);
+                                    bool wildcard);
 
 "checkowner" takes the owner name of the record and checks
 that it meets appropriate rules that are defined external to the DNS.
-In most cases this can just be a function that returns `ISC_TRUE`.
+In most cases this can just be a function that returns `true`.
 
-        static isc_boolean_t
+        static bool
         checknames[_<class>]_<type>(dns_rdata_t *rdata,
                                     dns_name_t *owner,
                                     dns_name_t *bad);
 
 "checknames" checks the contents of the rdata with the given
 owner name to ensure that it meets externally defined syntax rules.
-If `ISC_FALSE` is returned, then `bad` will point to the name that
+If `false` is returned, then `bad` will point to the name that
 caused the probelm.
 
         static int
index 96c19a50a9c1b9e2f475a6c6672492bebfe98197..4ea04b532ceaf262aa3fc59d046a593d3c6b814c 100644 (file)
@@ -128,7 +128,7 @@ is declared as follows for class-generic functions.
         static dns_result_t
         fromtext_typename(dns_rdataclass_t class, dns_rdatatype_t type,
                           isc_lex_t *lexer, dns_name_t *origin,
-                          isc_boolean_t downcase, isc_buffer_t *target);
+                          bool downcase, isc_buffer_t *target);
 
 Class specific functions contain the class name in addition to the
 type name.
@@ -138,7 +138,7 @@ type name.
                                     dns_rdatatype_t type,
                                     isc_lex_t *lexer,
                                     dns_name_t *origin,
-                                    isc_boolean_t downcase,
+                                    bool downcase,
                                     isc_buffer_t *target);
 
 |Parameter|Description |
@@ -188,7 +188,7 @@ security area and must be paranoid about its input.
                            dns_rdatatype_t type,
                            isc_buffer_t *source,
                            dns_decompress_t *dctx,
-                           isc_boolean_t downcase,
+                           bool downcase,
                            isc_buffer_t *target);
 
         static dns_result_t
@@ -196,7 +196,7 @@ security area and must be paranoid about its input.
                                     dns_rdatatype_t type,
                                     isc_buffer_t *source,
                                     dns_decompress_t *dctx,
-                                    isc_boolean_t downcase,
+                                    bool downcase,
                                     isc_buffer_t *target);
 
 `fromwire_classname_typename()` is required to set the valid
@@ -346,13 +346,13 @@ first octet after the octet-length-tagged text string.
 
 Returns `DNS_R_UNEXPECTEDEND`, `DNS_R_NOSPACE` or `DNS_R_SUCCESS`.
 
-        static isc_boolean_t
+        static bool
         name_prefix(dns_name_t *name, dns_name_t *origin, dns_name_t *target);
 
 If `origin` is NULL or the root label, set `target` to refer to `name` and
-return `ISC_FALSE`.  Otherwise, see if `name` is a subdomain of `origin` and
+return `false`.  Otherwise, see if `name` is a subdomain of `origin` and
 not equal to it.  If so, make `target` refer to the prefix of `name` and return
-`ISC_TRUE`.  Otherwise, make `target` refer to `name` and return `ISC_FALSE`.
+`true`.  Otherwise, make `target` refer to `name` and return `false`.
 
 Typical use:
 
@@ -362,7 +362,7 @@ Typical use:
         {
                 isc_region_t region;
                 dns_name_t name, prefix;
-                isc_boolean_t sub;
+                bool sub;
 
                 dns_name_init(&name, NULL);
                 dns_name_init(&prefix, NULL);
@@ -380,11 +380,11 @@ to `target`.
 
 Returns `DNS_R_NOSPACE` and `DNS_R_SUCCESS`.
 
-        static isc_boolean_t
+        static bool
         buffer_empty(isc_buffer_t *source);
 
-Returns `ISC_TRUE` if the active region of `source` is
-empty otherwise `ISC_FALSE`.
+Returns `true` if the active region of `source` is
+empty otherwise `false`.
 
         static void
         buffer_fromregion(isc_buffer_t *buffer, isc_region_t *region,
@@ -422,12 +422,12 @@ Requires `(region->length >= 2)`.
 
         static dns_result_t
         gettoken(isc_lex_t *lexer, isc_token_t *token,
-                 isc_tokentype_t expect, isc_boolean_t eol);
+                 isc_tokentype_t expect, bool eol);
 
 Gets the next token from the input stream `lexer`. Ensures that the returned
 token matches `expect` (isc_tokentype_qstring can also return
 isc_tokentype_string), or isc_tokentype_eol and isc_tokentype_eof if `eol` is
-`ISC_TRUE`.
+`true`.
 
 Returns `DNS_R_UNEXPECTED`, `DNS_R_UNEXPECTEDEND`, `DNS_R_UNEXPECTEDTOKEN` and
 `DNS_R_SUCCESS`.
index 52ead48250252b05c880387b79824034a782d0f4..b242d73e7fac4fe603b965b2bdfbb5822da6cea3 100644 (file)
@@ -57,4 +57,4 @@ function's return values separate.
 
 Functions which cannot fail (assuming the caller has provided valid
 arguments) need not return a result type.  For example, dns_name_issubdomain()
-returns an isc_boolean_t, because it cannot fail.
+returns an bool, because it cannot fail.
index b2dbe55afb088f7b5cb6846d01aac086d5fb56a0..d044cde7b3d033f62007df6d878887ca8793f8c3 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <inttypes.h>
 
@@ -62,7 +63,7 @@ static dns_name_t const dlviscorg =
        DNS_NAME_INITABSOLUTE(dlviscorg_ndata, dlviscorg_offsets);
 
 static isc_result_t
-fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, isc_boolean_t writeable,
+fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
          isc_log_t *logctxlogc);
 
 static void
@@ -716,7 +717,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
        const cfg_obj_t *options, *aclobj, *obj = NULL;
        dns_acl_t *acl = NULL;
        isc_result_t result = ISC_R_SUCCESS, tresult;
-       isc_boolean_t recursion;
+       bool recursion;
        const char *forview = " for view ";
        int i = 0;
 
@@ -732,7 +733,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                        cfg_map_get(options, "recursion", &obj);
        }
        if (obj == NULL)
-               recursion = ISC_TRUE;
+               recursion = true;
        else
                recursion = cfg_obj_asboolean(obj);
 
@@ -765,7 +766,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                if (acl == NULL)
                        continue;
 
-               if (recursion == ISC_FALSE && !dns_acl_isnone(acl)) {
+               if (recursion == false && !dns_acl_isnone(acl)) {
                        cfg_obj_log(aclobj, logctx, ISC_LOG_WARNING,
                                    "both \"recursion no;\" and "
                                    "\"%s\" active%s%s",
@@ -1152,7 +1153,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
        (void)cfg_map_get(options, "dnssec-lookaside", &obj);
        if (obj != NULL) {
                tresult = isc_symtab_create(mctx, 100, freekey, mctx,
-                                           ISC_FALSE, &symtab);
+                                           false, &symtab);
                if (tresult != ISC_R_SUCCESS)
                        result = tresult;
                for (element = cfg_list_first(obj);
@@ -1268,7 +1269,7 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
        (void)cfg_map_get(options, "dnssec-must-be-secure", &obj);
        if (obj != NULL) {
                tresult = isc_symtab_create(mctx, 100, freekey, mctx,
-                                           ISC_FALSE, &symtab);
+                                           false, &symtab);
                if (tresult != ISC_R_SUCCESS)
                        result = tresult;
                for (element = cfg_list_first(obj);
@@ -1548,7 +1549,7 @@ validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
        const cfg_obj_t *list;
 
        REQUIRE(countp != NULL);
-       result = isc_symtab_create(mctx, 100, NULL, NULL, ISC_FALSE, &symtab);
+       result = isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
        if (result != ISC_R_SUCCESS) {
                *countp = count;
                return (result);
@@ -1818,13 +1819,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        dns_fixedname_t fixedname;
        dns_name_t *zname = NULL;
        isc_buffer_t b;
-       isc_boolean_t root = ISC_FALSE;
-       isc_boolean_t rfc1918 = ISC_FALSE;
-       isc_boolean_t ula = ISC_FALSE;
+       bool root = false;
+       bool rfc1918 = false;
+       bool ula = false;
        const cfg_listelt_t *element;
-       isc_boolean_t dlz;
+       bool dlz;
        dns_masterformat_t masterformat;
-       isc_boolean_t ddns = ISC_FALSE;
+       bool ddns = false;
        const void *clauses = NULL;
        const char *option = NULL;
        static const char *acls[] = {
@@ -1946,11 +1947,11 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                if (tresult != ISC_R_SUCCESS)
                        result = tresult;
                if (dns_name_equal(zname, dns_rootname))
-                       root = ISC_TRUE;
+                       root = true;
                else if (dns_name_isrfc1918(zname))
-                       rfc1918 = ISC_TRUE;
+                       rfc1918 = true;
                else if (dns_name_isula(zname))
-                       ula = ISC_TRUE;
+                       ula = true;
                tmp += strlen(tmp);
                len -= strlen(tmp);
                (void)snprintf(tmp, len, "%u/%s", zclass,
@@ -2066,7 +2067,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
         * shouldn't if notify is disabled.
         */
        if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE) {
-               isc_boolean_t donotify = ISC_TRUE;
+               bool donotify = true;
 
                obj = NULL;
                tresult = cfg_map_get(zoptions, "notify", &obj);
@@ -2081,7 +2082,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                                const char *notifystr = cfg_obj_asstring(obj);
                                if (ztype != CFG_ZONE_MASTER &&
                                    strcasecmp(notifystr, "master-only") == 0)
-                                       donotify = ISC_FALSE;
+                                       donotify = false;
                        }
                }
 
@@ -2134,7 +2135,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
         * Master zones can't have both "allow-update" and "update-policy".
         */
        if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE) {
-               isc_boolean_t signing = ISC_FALSE;
+               bool signing = false;
                isc_result_t res1, res2, res3;
                const cfg_obj_t *au = NULL;
                const char *arg;
@@ -2166,7 +2167,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        res1 = cfg_map_get(goptions, "allow-update", &au);
 
                if (res2 == ISC_R_SUCCESS)
-                       ddns = ISC_TRUE;
+                       ddns = true;
                else if (res1 == ISC_R_SUCCESS) {
                        dns_acl_t *acl = NULL;
                        res1 = cfg_acl_fromconfig(au, config, logctx,
@@ -2178,7 +2179,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                                result = ISC_R_FAILURE;
                        } else if (acl != NULL) {
                                if (!dns_acl_isnone(acl))
-                                       ddns = ISC_TRUE;
+                                       ddns = true;
                                dns_acl_detach(&acl);
                        }
                }
@@ -2473,10 +2474,10 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
         * file clause as well
         */
        obj = NULL;
-       dlz = ISC_FALSE;
+       dlz = false;
        tresult = cfg_map_get(zoptions, "dlz", &obj);
        if (tresult == ISC_R_SUCCESS)
-               dlz = ISC_TRUE;
+               dlz = true;
 
        obj = NULL;
        tresult = cfg_map_get(zoptions, "database", &obj);
@@ -2507,14 +2508,14 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        result = tresult;
                } else if (tresult == ISC_R_SUCCESS &&
                           (ztype == CFG_ZONE_SLAVE || ddns)) {
-                       tresult = fileexist(fileobj, files, ISC_TRUE, logctx);
+                       tresult = fileexist(fileobj, files, true, logctx);
                        if (tresult != ISC_R_SUCCESS)
                                result = tresult;
                } else if (tresult == ISC_R_SUCCESS &&
                           (ztype == CFG_ZONE_MASTER ||
                            ztype == CFG_ZONE_HINT))
                {
-                       tresult = fileexist(fileobj, files, ISC_FALSE, logctx);
+                       tresult = fileexist(fileobj, files, false, logctx);
                        if (tresult != ISC_R_SUCCESS)
                                result = tresult;
                }
@@ -2624,7 +2625,7 @@ bind9_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
 }
 
 static isc_result_t
-fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, isc_boolean_t writeable,
+fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
          isc_log_t *logctx)
 {
        isc_result_t result;
@@ -2753,14 +2754,14 @@ static struct {
  *
  *     "foo." is different to "foo".
  */
-static isc_boolean_t
+static bool
 rndckey_exists(const cfg_obj_t *keylist, const char *keyname) {
        const cfg_listelt_t *element;
        const cfg_obj_t *obj;
        const char *str;
 
        if (keylist == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        for (element = cfg_list_first(keylist);
             element != NULL;
@@ -2769,9 +2770,9 @@ rndckey_exists(const cfg_obj_t *keylist, const char *keyname) {
                obj = cfg_listelt_value(element);
                str = cfg_obj_asstring(cfg_map_getname(obj));
                if (!strcasecmp(str, keyname))
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -2888,7 +2889,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
 #define DLV_KSK_KEY    0x4
 
 static isc_result_t
-check_trusted_key(const cfg_obj_t *key, isc_boolean_t managed,
+check_trusted_key(const cfg_obj_t *key, bool managed,
                  unsigned int *keyflags, isc_log_t *logctx)
 {
        const char *keystr, *keynamestr;
@@ -3172,7 +3173,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        const cfg_obj_t *obj;
        const cfg_obj_t *options = NULL;
        const cfg_obj_t *opts = NULL;
-       isc_boolean_t enablednssec, enablevalidation;
+       bool enablednssec, enablevalidation;
        const char *valstr = "no";
        unsigned int tflags, mflags;
 
@@ -3194,7 +3195,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
         * there are no duplicate zones.
         */
        tresult = isc_symtab_create(mctx, 1000, freekey, mctx,
-                                   ISC_FALSE, &symtab);
+                                   false, &symtab);
        if (tresult != ISC_R_SUCCESS)
                return (ISC_R_NOMEMORY);
 
@@ -3282,7 +3283,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
         * there are no duplicate keys.
         */
        tresult = isc_symtab_create(mctx, 1000, freekey, mctx,
-                                   ISC_FALSE, &symtab);
+                                   false, &symtab);
        if (tresult != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -3324,7 +3325,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        if (obj == NULL && options != NULL)
                (void)cfg_map_get(options, "dnssec-enable", &obj);
        if (obj == NULL)
-               enablednssec = ISC_TRUE;
+               enablednssec = true;
        else
                enablednssec = cfg_obj_asboolean(obj);
 
@@ -3340,7 +3341,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                enablevalidation = cfg_obj_asboolean(obj);
                valstr = enablevalidation ? "yes" : "no";
        } else {
-               enablevalidation = ISC_TRUE;
+               enablevalidation = true;
                valstr = "auto";
        }
 
@@ -3368,7 +3369,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                     element2 != NULL;
                     element2 = cfg_list_next(element2)) {
                        obj = cfg_listelt_value(element2);
-                       tresult = check_trusted_key(obj, ISC_FALSE, &tflags,
+                       tresult = check_trusted_key(obj, false, &tflags,
                                                    logctx);
                        if (tresult != ISC_R_SUCCESS)
                                result = tresult;
@@ -3404,7 +3405,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                     element2 != NULL;
                     element2 = cfg_list_next(element2)) {
                        obj = cfg_listelt_value(element2);
-                       tresult = check_trusted_key(obj, ISC_TRUE, &mflags,
+                       tresult = check_trusted_key(obj, true, &mflags,
                                                    logctx);
                        if (tresult != ISC_R_SUCCESS)
                                result = tresult;
@@ -3510,7 +3511,7 @@ bind9_check_logging(const cfg_obj_t *config, isc_log_t *logctx,
        if (logobj == NULL)
                return (ISC_R_SUCCESS);
 
-       result = isc_symtab_create(mctx, 100, NULL, NULL, ISC_FALSE, &symtab);
+       result = isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -3761,7 +3762,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
         * case sensitive. This will prevent people using FOO.DB and foo.db
         * on case sensitive file systems but that shouldn't be a major issue.
         */
-       tresult = isc_symtab_create(mctx, 100, NULL, NULL, ISC_FALSE,
+       tresult = isc_symtab_create(mctx, 100, NULL, NULL, false,
                                    &files);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
@@ -3769,7 +3770,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
        }
 
        tresult = isc_symtab_create(mctx, 100, freekey, mctx,
-                                   ISC_TRUE, &inview);
+                                   true, &inview);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
                goto cleanup;
@@ -3793,7 +3794,7 @@ bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
                }
        }
 
-       tresult = isc_symtab_create(mctx, 100, NULL, NULL, ISC_TRUE, &symtab);
+       tresult = isc_symtab_create(mctx, 100, NULL, NULL, true, &symtab);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
                goto cleanup;
index 066634d9d8fd64258535cdcdc85585ffb170dd2c..46cd4d519b3fb6145755e1729ad809478d7262c1 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/net.h>
@@ -47,7 +48,7 @@ bind9_getaddresses(const char *hostname, in_port_t port,
 {
        struct in_addr in4;
        struct in6_addr in6;
-       isc_boolean_t have_ipv4, have_ipv6;
+       bool have_ipv4, have_ipv6;
        int i;
 
 #ifdef USE_GETADDRINFO
@@ -62,8 +63,8 @@ bind9_getaddresses(const char *hostname, in_port_t port,
        REQUIRE(addrcount != NULL);
        REQUIRE(addrsize > 0);
 
-       have_ipv4 = ISC_TF((isc_net_probeipv4() == ISC_R_SUCCESS));
-       have_ipv6 = ISC_TF((isc_net_probeipv6() == ISC_R_SUCCESS));
+       have_ipv4 = (isc_net_probeipv4() == ISC_R_SUCCESS);
+       have_ipv6 = (isc_net_probeipv6() == ISC_R_SUCCESS);
 
        /*
         * Try IPv4, then IPv6.  In order to handle the extended format
index 70fc177380faae2e9585a1fe05f9fbefefec4700..60a466155caae5294f7324e4d836bc7e217b49cc 100644 (file)
@@ -167,7 +167,7 @@ struct acache_cleaner {
        unsigned long           ncleaned;       /* Number of entries cleaned
                                                   up (for logging purposes) */
        cleaner_state_t         state;          /* Idle/Busy/Done. */
-       isc_boolean_t           overmem;        /* The acache is in an overmem
+       bool            overmem;        /* The acache is in an overmem
                                                   state. */
 };
 
@@ -208,11 +208,11 @@ struct dns_acache {
        unsigned int                    dbentries;
        dbentrylist_t                   dbbucket[DBBUCKETS];
 
-       isc_boolean_t                   shutting_down;
+       bool                    shutting_down;
 
        isc_task_t                      *task;
        isc_event_t                     cevent;
-       isc_boolean_t                   cevent_sent;
+       bool                    cevent_sent;
 
        dns_acachestats_t               stats;
 };
@@ -258,7 +258,7 @@ struct dns_acacheentry {
 /*
  *     Internal functions (and prototypes).
  */
-static inline isc_boolean_t check_noentry(dns_acache_t *acache);
+static inline bool check_noentry(dns_acache_t *acache);
 static void destroy(dns_acache_t *acache);
 static void shutdown_entries(dns_acache_t *acache);
 static void shutdown_buckets(dns_acache_t *acache);
@@ -299,13 +299,13 @@ reset_stats(dns_acache_t *acache) {
 /*
  * The acache must be locked before calling.
  */
-static inline isc_boolean_t
+static inline bool
 check_noentry(dns_acache_t *acache) {
        if (ISC_LIST_EMPTY(acache->entries) && acache->dbentries == 0) {
-               return (ISC_TRUE);
+               return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -489,7 +489,7 @@ finddbent(dns_acache_t *acache, dns_db_t *db, dbentry_t **dbentryp) {
         * The caller must be holding the acache lock.
         */
 
-       bucket = isc_hash_function(&db, sizeof(db), ISC_TRUE, NULL) % DBBUCKETS;
+       bucket = isc_hash_function(&db, sizeof(db), true, NULL) % DBBUCKETS;
 
        for (dbentry = ISC_LIST_HEAD(acache->dbbucket[bucket]);
             dbentry != NULL;
@@ -540,7 +540,7 @@ clear_entry(dns_acache_t *acache, dns_acacheentry_t *entry) {
        }
        if (entry->version != NULL) {
                INSIST(entry->db != NULL);
-               dns_db_closeversion(entry->db, &entry->version, ISC_FALSE);
+               dns_db_closeversion(entry->db, &entry->version, false);
        }
        if (entry->db != NULL)
                dns_db_detach(&entry->db);
@@ -566,7 +566,7 @@ acache_cleaner_init(dns_acache_t *acache, isc_timermgr_t *timermgr,
        cleaner->increment = DNS_ACACHE_CLEANERINCREMENT;
        cleaner->state = cleaner_s_idle;
        cleaner->acache = acache;
-       cleaner->overmem = ISC_FALSE;
+       cleaner->overmem = false;
 
        cleaner->cleaning_timer = NULL;
        cleaner->resched_event = NULL;
@@ -770,7 +770,7 @@ acache_cleaning_timer_action(isc_task_t *task, isc_event_t *event) {
 }
 
 /* The caller must hold entry lock. */
-static inline isc_boolean_t
+static inline bool
 entry_stale(acache_cleaner_t *cleaner, dns_acacheentry_t *entry,
            isc_stdtime32_t now32, unsigned int interval)
 {
@@ -779,13 +779,13 @@ entry_stale(acache_cleaner_t *cleaner, dns_acacheentry_t *entry,
         * entry.
         */
        if (entry->callback == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        if (interval > cleaner->cleaning_interval)
                interval = cleaner->cleaning_interval;
 
        if (entry->lastused + interval < now32)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * If the acache is in the overmem state, probabilistically decide if
@@ -802,14 +802,14 @@ entry_stale(acache_cleaner_t *cleaner, dns_acacheentry_t *entry,
                        passed = 0;
 
                if (passed > interval / 2)
-                       return (ISC_TRUE);
+                       return (true);
                isc_random_get(&val);
                if (passed > interval / 4)
-                       return (ISC_TF(val % 4 == 0));
-               return (ISC_TF(val % 8 == 0));
+                       return (val % 4 == 0);
+               return (val % 8 == 0);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -852,7 +852,7 @@ acache_incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
                interval = 0;
 
        while (n_entries-- > 0) {
-               isc_boolean_t is_stale = ISC_FALSE;
+               bool is_stale = false;
 
                INSIST(entry != NULL);
 
@@ -940,7 +940,7 @@ acache_incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
 static void
 acache_overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
        acache_cleaner_t *cleaner = event->ev_arg;
-       isc_boolean_t want_cleaning = ISC_FALSE;
+       bool want_cleaning = false;
 
        UNUSED(task);
 
@@ -956,7 +956,7 @@ acache_overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
 
        if (cleaner->overmem) {
                if (cleaner->state == cleaner_s_idle)
-                       want_cleaning = ISC_TRUE;
+                       want_cleaning = true;
        } else {
                if (cleaner->state == cleaner_s_busy)
                        /*
@@ -981,7 +981,7 @@ acache_overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
 static void
 water(void *arg, int mark) {
        dns_acache_t *acache = arg;
-       isc_boolean_t overmem = ISC_TF(mark == ISC_MEM_HIWATER);
+       bool overmem = (mark == ISC_MEM_HIWATER);
 
        REQUIRE(DNS_ACACHE_VALID(acache));
 
@@ -1011,7 +1011,7 @@ water(void *arg, int mark) {
 static void
 acache_cleaner_shutdown_action(isc_task_t *task, isc_event_t *event) {
        dns_acache_t *acache = event->ev_arg;
-       isc_boolean_t should_free = ISC_FALSE;
+       bool should_free = false;
 
        INSIST(task == acache->task);
        INSIST(event->ev_type == ISC_TASKEVENT_SHUTDOWN);
@@ -1030,8 +1030,8 @@ acache_cleaner_shutdown_action(isc_task_t *task, isc_event_t *event) {
        INSIST(acache->live_cleaners == 0);
 
        if (isc_refcount_current(&acache->refs) == 0) {
-               INSIST(check_noentry(acache) == ISC_TRUE);
-               should_free = ISC_TRUE;
+               INSIST(check_noentry(acache) == true);
+               should_free = true;
        }
 
        /*
@@ -1091,7 +1091,7 @@ dns_acache_create(dns_acache_t **acachep, isc_mem_t *mctx,
        isc_mem_attach(mctx, &acache->mctx);
        ISC_LIST_INIT(acache->entries);
 
-       acache->shutting_down = ISC_FALSE;
+       acache->shutting_down = false;
 
        acache->task = NULL;
        acache->entrylocks = NULL;
@@ -1108,7 +1108,7 @@ dns_acache_create(dns_acache_t **acachep, isc_mem_t *mctx,
        ISC_EVENT_INIT(&acache->cevent, sizeof(acache->cevent), 0, NULL,
                       DNS_EVENT_ACACHECONTROL, shutdown_task, NULL,
                       NULL, NULL, NULL);
-       acache->cevent_sent = ISC_FALSE;
+       acache->cevent_sent = false;
 
        acache->dbentries = 0;
        for (i = 0; i < DBBUCKETS; i++)
@@ -1187,7 +1187,7 @@ void
 dns_acache_detach(dns_acache_t **acachep) {
        dns_acache_t *acache;
        unsigned int refs;
-       isc_boolean_t should_free = ISC_FALSE;
+       bool should_free = false;
 
        REQUIRE(acachep != NULL && DNS_ACACHE_VALID(*acachep));
        acache = *acachep;
@@ -1196,8 +1196,8 @@ dns_acache_detach(dns_acache_t **acachep) {
 
        isc_refcount_decrement(&acache->refs, &refs);
        if (refs == 0) {
-               INSIST(check_noentry(acache) == ISC_TRUE);
-               should_free = ISC_TRUE;
+               INSIST(check_noentry(acache) == true);
+               should_free = true;
        }
 
        *acachep = NULL;
@@ -1207,7 +1207,7 @@ dns_acache_detach(dns_acache_t **acachep) {
         */
        if (should_free && acache->live_cleaners > 0) {
                isc_task_shutdown(acache->task);
-               should_free = ISC_FALSE;
+               should_free = false;
        }
 
        if (should_free)
@@ -1228,7 +1228,7 @@ dns_acache_shutdown(dns_acache_t *acache) {
 
                INSIST(!acache->cevent_sent);
 
-               acache->shutting_down = ISC_TRUE;
+               acache->shutting_down = true;
 
                isc_mem_setwater(acache->mctx, NULL, NULL, 0, 0);
 
@@ -1240,7 +1240,7 @@ dns_acache_shutdown(dns_acache_t *acache) {
                event = &acache->cevent;
                event->ev_arg = acache_evarg;
                isc_task_send(acache->task, &event);
-               acache->cevent_sent = ISC_TRUE;
+               acache->cevent_sent = true;
        }
 
        UNLOCK(&acache->lock);
@@ -1280,7 +1280,7 @@ dns_acache_setdb(dns_acache_t *acache, dns_db_t *db) {
        dbentry->db = NULL;
        dns_db_attach(db, &dbentry->db);
 
-       bucket = isc_hash_function(&db, sizeof(db), ISC_TRUE, NULL) % DBBUCKETS;
+       bucket = isc_hash_function(&db, sizeof(db), true, NULL) % DBBUCKETS;
 
        ISC_LIST_APPEND(acache->dbbucket[bucket], dbentry, link);
 
@@ -1368,7 +1368,7 @@ dns_acache_putdb(dns_acache_t *acache, dns_db_t *db) {
        INSIST(ISC_LIST_EMPTY(dbentry->originlist) &&
               ISC_LIST_EMPTY(dbentry->referlist));
 
-       bucket = isc_hash_function(&db, sizeof(db), ISC_TRUE, NULL) % DBBUCKETS;
+       bucket = isc_hash_function(&db, sizeof(db), true, NULL) % DBBUCKETS;
 
        ISC_LIST_UNLINK(acache->dbbucket[bucket], dbentry, link);
        dns_db_detach(&dbentry->db);
@@ -1543,7 +1543,7 @@ dns_acache_getentry(dns_acacheentry_t *entry, dns_zone_t **zonep,
        if (*nodep != NULL)
                dns_db_detachnode(*dbp, nodep);
        if (*versionp != NULL)
-               dns_db_closeversion(*dbp, versionp, ISC_FALSE);
+               dns_db_closeversion(*dbp, versionp, false);
        if (*dbp != NULL)
                dns_db_detach(dbp);
        if (zonep != NULL && *zonep != NULL)
@@ -1560,7 +1560,7 @@ dns_acache_setentry(dns_acache_t *acache, dns_acacheentry_t *entry,
        isc_result_t result;
        dbentry_t *odbent;
        dbentry_t *rdbent = NULL;
-       isc_boolean_t close_version = ISC_FALSE;
+       bool close_version = false;
        dns_acacheentry_t *dummy_entry = NULL;
 
        REQUIRE(DNS_ACACHE_VALID(acache));
@@ -1582,7 +1582,7 @@ dns_acache_setentry(dns_acache_t *acache, dns_acacheentry_t *entry,
        if (version == NULL) {
                if (db != NULL) {
                        dns_db_currentversion(db, &version);
-                       close_version = ISC_TRUE;
+                       close_version = true;
                }
        }
        if (version != NULL) {
@@ -1590,7 +1590,7 @@ dns_acache_setentry(dns_acache_t *acache, dns_acacheentry_t *entry,
                dns_db_attachversion(db, version, &entry->version);
        }
        if (close_version)
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
        /* Set DB node. */
        if (node != NULL) {
                INSIST(db != NULL);
@@ -1677,10 +1677,10 @@ dns_acache_setentry(dns_acache_t *acache, dns_acacheentry_t *entry,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_acache_cancelentry(dns_acacheentry_t *entry) {
        dns_acache_t *acache;
-       isc_boolean_t callback_active;
+       bool callback_active;
 
        REQUIRE(DNS_ACACHEENTRY_VALID(entry));
 
@@ -1691,7 +1691,7 @@ dns_acache_cancelentry(dns_acacheentry_t *entry) {
        LOCK(&acache->lock);
        ACACHE_LOCK(&acache->entrylocks[entry->locknum], isc_rwlocktype_write);
 
-       callback_active = ISC_TF(entry->cbarg != NULL);
+       callback_active = (entry->cbarg != NULL);
 
        /*
         * Release dependencies stored in this entry as much as possible.
@@ -1770,13 +1770,13 @@ dns_acache_setcleaninginterval(dns_acache_t *acache, unsigned int t) {
        if (t == 0) {
                result = isc_timer_reset(acache->cleaner.cleaning_timer,
                                         isc_timertype_inactive,
-                                        NULL, NULL, ISC_TRUE);
+                                        NULL, NULL, true);
        } else {
                isc_interval_set(&interval, acache->cleaner.cleaning_interval,
                                 0);
                result = isc_timer_reset(acache->cleaner.cleaning_timer,
                                         isc_timertype_ticker,
-                                        NULL, &interval, ISC_FALSE);
+                                        NULL, &interval, false);
        }
        if (result != ISC_R_SUCCESS)
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
index 1f424d9b62d67de2bba0b2791f443571b9449ec0..c1108e8d204d5ce61cba3588bc03bd18d162fc49 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/once.h>
 #include <isc/string.h>
@@ -62,7 +64,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
        acl->elements = NULL;
        acl->alloc = 0;
        acl->length = 0;
-       acl->has_negatives = ISC_FALSE;
+       acl->has_negatives = false;
 
        ISC_LINK_INIT(acl, nextincache);
        /*
@@ -92,7 +94,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
  * "none" is the same as "!any".
  */
 static isc_result_t
-dns_acl_anyornone(isc_mem_t *mctx, isc_boolean_t neg, dns_acl_t **target) {
+dns_acl_anyornone(isc_mem_t *mctx, bool neg, dns_acl_t **target) {
        isc_result_t result;
        dns_acl_t *acl = NULL;
 
@@ -100,7 +102,7 @@ dns_acl_anyornone(isc_mem_t *mctx, isc_boolean_t neg, dns_acl_t **target) {
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       result = dns_iptable_addprefix(acl->iptable, NULL, 0, ISC_TF(!neg));
+       result = dns_iptable_addprefix(acl->iptable, NULL, 0, !neg);
        if (result != ISC_R_SUCCESS) {
                dns_acl_detach(&acl);
                return (result);
@@ -115,7 +117,7 @@ dns_acl_anyornone(isc_mem_t *mctx, isc_boolean_t neg, dns_acl_t **target) {
  */
 isc_result_t
 dns_acl_any(isc_mem_t *mctx, dns_acl_t **target) {
-       return (dns_acl_anyornone(mctx, ISC_FALSE, target));
+       return (dns_acl_anyornone(mctx, false, target));
 }
 
 /*
@@ -123,15 +125,15 @@ dns_acl_any(isc_mem_t *mctx, dns_acl_t **target) {
  */
 isc_result_t
 dns_acl_none(isc_mem_t *mctx, dns_acl_t **target) {
-       return (dns_acl_anyornone(mctx, ISC_TRUE, target));
+       return (dns_acl_anyornone(mctx, true, target));
 }
 
 /*
- * If pos is ISC_TRUE, test whether acl is set to "{ any; }"
- * If pos is ISC_FALSE, test whether acl is set to "{ none; }"
+ * If pos is true, test whether acl is set to "{ any; }"
+ * If pos is false, test whether acl is set to "{ none; }"
  */
-static isc_boolean_t
-dns_acl_isanyornone(dns_acl_t *acl, isc_boolean_t pos)
+static bool
+dns_acl_isanyornone(dns_acl_t *acl, bool pos)
 {
        /* Should never happen but let's be safe */
        if (acl == NULL ||
@@ -139,37 +141,37 @@ dns_acl_isanyornone(dns_acl_t *acl, isc_boolean_t pos)
            acl->iptable->radix == NULL ||
            acl->iptable->radix->head == NULL ||
            acl->iptable->radix->head->prefix == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (acl->length != 0 || acl->node_count != 1)
-               return (ISC_FALSE);
+               return (false);
 
        if (acl->iptable->radix->head->prefix->bitlen == 0 &&
            acl->iptable->radix->head->data[0] != NULL &&
            acl->iptable->radix->head->data[0] ==
                    acl->iptable->radix->head->data[1] &&
-           *(isc_boolean_t *) (acl->iptable->radix->head->data[0]) == pos)
-               return (ISC_TRUE);
+           *(bool *) (acl->iptable->radix->head->data[0]) == pos)
+               return (true);
 
-       return (ISC_FALSE); /* All others */
+       return (false); /* All others */
 }
 
 /*
  * Test whether acl is set to "{ any; }"
  */
-isc_boolean_t
+bool
 dns_acl_isany(dns_acl_t *acl)
 {
-       return (dns_acl_isanyornone(acl, ISC_TRUE));
+       return (dns_acl_isanyornone(acl, true));
 }
 
 /*
  * Test whether acl is set to "{ none; }"
  */
-isc_boolean_t
+bool
 dns_acl_isnone(dns_acl_t *acl)
 {
-       return (dns_acl_isanyornone(acl, ISC_FALSE));
+       return (dns_acl_isanyornone(acl, false));
 }
 
 /*
@@ -224,7 +226,7 @@ dns_acl_match2(const isc_netaddr_t *reqaddr,
 
        /* Always match with host addresses. */
        bitlen = (addr->family == AF_INET6) ? 128 : 32;
-       NETADDR_TO_PREFIX_T(addr, pfx, bitlen, ISC_FALSE);
+       NETADDR_TO_PREFIX_T(addr, pfx, bitlen, false);
 
        /* Assume no match. */
        *match = 0;
@@ -236,7 +238,7 @@ dns_acl_match2(const isc_netaddr_t *reqaddr,
        if (result == ISC_R_SUCCESS && node != NULL) {
                int fam = ISC_RADIX_FAMILY(&pfx);
                match_num = node->node_num[fam];
-               if (*(isc_boolean_t *) node->data[fam]) {
+               if (*(bool *) node->data[fam]) {
                        *match = match_num;
                } else {
                        *match = -match_num;
@@ -261,7 +263,7 @@ dns_acl_match2(const isc_netaddr_t *reqaddr,
                        addr = &v4addr;
                }
 
-               NETADDR_TO_PREFIX_T(addr, pfx, ecslen, ISC_TRUE);
+               NETADDR_TO_PREFIX_T(addr, pfx, ecslen, true);
 
                result = isc_radix_search(acl->iptable->radix, &node, &pfx);
                if (result == ISC_R_SUCCESS && node != NULL) {
@@ -273,7 +275,7 @@ dns_acl_match2(const isc_netaddr_t *reqaddr,
                                if (scope != NULL) {
                                        *scope = node->bit;
                                }
-                               if (*(isc_boolean_t *) node->data[off]) {
+                               if (*(bool *) node->data[off]) {
                                        *match = match_num;
                                } else {
                                        *match = -match_num;
@@ -319,7 +321,7 @@ dns_acl_match2(const isc_netaddr_t *reqaddr,
  * an unexpected positive match in the parent ACL.
  */
 isc_result_t
-dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, isc_boolean_t pos)
+dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, bool pos)
 {
        isc_result_t result;
        unsigned int newalloc, nelem, i;
@@ -397,7 +399,7 @@ dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, isc_boolean_t pos)
 
                /* reverse sense of positives if this is a negative acl */
                if (!pos && !source->elements[i].negative) {
-                       dest->elements[nelem + i].negative = ISC_TRUE;
+                       dest->elements[nelem + i].negative = true;
                } else {
                        dest->elements[nelem + i].negative =
                                source->elements[i].negative;
@@ -420,14 +422,14 @@ dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, isc_boolean_t pos)
 
 /*
  * Like dns_acl_match, but matches against the single ACL element 'e'
- * rather than a complete ACL, and returns ISC_TRUE iff it matched.
+ * rather than a complete ACL, and returns true iff it matched.
  *
  * To determine whether the match was positive or negative, the
  * caller should examine e->negative.  Since the element 'e' may be
  * a reference to a named ACL or a nested ACL, a matching element
  * returned through 'matchelt' is not necessarily 'e' itself.
  */
-isc_boolean_t
+bool
 dns_aclelement_match(const isc_netaddr_t *reqaddr,
                     const dns_name_t *reqsigner,
                     const dns_aclelement_t *e,
@@ -438,7 +440,7 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr,
                                      e, env, matchelt));
 }
 
-isc_boolean_t
+bool
 dns_aclelement_match2(const isc_netaddr_t *reqaddr,
                      const dns_name_t *reqsigner,
                      const isc_netaddr_t *ecs,
@@ -463,9 +465,9 @@ dns_aclelement_match2(const isc_netaddr_t *reqaddr,
                    dns_name_equal(reqsigner, &e->keyname)) {
                        if (matchelt != NULL)
                                *matchelt = e;
-                       return (ISC_TRUE);
+                       return (true);
                } else
-                       return (ISC_FALSE);
+                       return (false);
 
        case dns_aclelementtype_nestedacl:
                inner = e->nestedacl;
@@ -473,20 +475,20 @@ dns_aclelement_match2(const isc_netaddr_t *reqaddr,
 
        case dns_aclelementtype_localhost:
                if (env == NULL || env->localhost == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                inner = env->localhost;
                break;
 
        case dns_aclelementtype_localnets:
                if (env == NULL || env->localnets == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                inner = env->localnets;
                break;
 
 #ifdef HAVE_GEOIP
        case dns_aclelementtype_geoip:
                if (env == NULL || env->geoip == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                addr = (env->geoip_use_ecs && ecs != NULL) ? ecs : reqaddr;
                return (dns_geoip_match(addr, scope, env->geoip,
                                        &e->geoip_elem));
@@ -509,7 +511,7 @@ dns_aclelement_match2(const isc_netaddr_t *reqaddr,
        if (indirectmatch > 0) {
                if (matchelt != NULL)
                        *matchelt = e;
-               return (ISC_TRUE);
+               return (true);
        }
 
        /*
@@ -519,7 +521,7 @@ dns_aclelement_match2(const isc_netaddr_t *reqaddr,
        if (matchelt != NULL)
                *matchelt = NULL;
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 void
@@ -572,7 +574,7 @@ dns_acl_detach(dns_acl_t **aclp) {
 
 static isc_once_t      insecure_prefix_once = ISC_ONCE_INIT;
 static isc_mutex_t     insecure_prefix_lock;
-static isc_boolean_t   insecure_prefix_found;
+static bool    insecure_prefix_found;
 
 static void
 initialize_action(void) {
@@ -588,10 +590,10 @@ is_insecure(isc_prefix_t *prefix, void **data) {
        /*
         * If all nonexistent or negative then this node is secure.
         */
-       if ((data[0] == NULL || !* (isc_boolean_t *) data[0]) &&
-           (data[1] == NULL || !* (isc_boolean_t *) data[1]) &&
-           (data[2] == NULL || !* (isc_boolean_t *) data[2]) &&
-           (data[3] == NULL || !* (isc_boolean_t *) data[3]))
+       if ((data[0] == NULL || !* (bool *) data[0]) &&
+           (data[1] == NULL || !* (bool *) data[1]) &&
+           (data[2] == NULL || !* (bool *) data[2]) &&
+           (data[3] == NULL || !* (bool *) data[3]))
                return;
 
        /*
@@ -600,35 +602,35 @@ is_insecure(isc_prefix_t *prefix, void **data) {
         */
        if (prefix->bitlen == 32 &&
            htonl(prefix->add.sin.s_addr) == INADDR_LOOPBACK &&
-           (data[1] == NULL || !* (isc_boolean_t *) data[1]) &&
-           (data[2] == NULL || !* (isc_boolean_t *) data[2]) &&
-           (data[3] == NULL || !* (isc_boolean_t *) data[3]))
+           (data[1] == NULL || !* (bool *) data[1]) &&
+           (data[2] == NULL || !* (bool *) data[2]) &&
+           (data[3] == NULL || !* (bool *) data[3]))
                return;
 
        if (prefix->bitlen == 128 &&
            IN6_IS_ADDR_LOOPBACK(&prefix->add.sin6) &&
-           (data[0] == NULL || !* (isc_boolean_t *) data[0]) &&
-           (data[2] == NULL || !* (isc_boolean_t *) data[2]) &&
-           (data[3] == NULL || !* (isc_boolean_t *) data[3]))
+           (data[0] == NULL || !* (bool *) data[0]) &&
+           (data[2] == NULL || !* (bool *) data[2]) &&
+           (data[3] == NULL || !* (bool *) data[3]))
                return;
 
        /* Non-negated, non-loopback */
-       insecure_prefix_found = ISC_TRUE;       /* LOCKED */
+       insecure_prefix_found = true;   /* LOCKED */
        return;
 }
 
 /*
- * Return ISC_TRUE iff the acl 'a' is considered insecure, that is,
+ * Return true iff the acl 'a' is considered insecure, that is,
  * if it contains IP addresses other than those of the local host.
  * This is intended for applications such as printing warning
  * messages for suspect ACLs; it is not intended for making access
  * control decisions.  We make no guarantee that an ACL for which
- * this function returns ISC_FALSE is safe.
+ * this function returns false is safe.
  */
-isc_boolean_t
+bool
 dns_acl_isinsecure(const dns_acl_t *a) {
        unsigned int i;
-       isc_boolean_t insecure;
+       bool insecure;
 
        RUNTIME_CHECK(isc_once_do(&insecure_prefix_once,
                                  initialize_action) == ISC_R_SUCCESS);
@@ -638,12 +640,12 @@ dns_acl_isinsecure(const dns_acl_t *a) {
         * non-loopback prefixes.
         */
        LOCK(&insecure_prefix_lock);
-       insecure_prefix_found = ISC_FALSE;
+       insecure_prefix_found = false;
        isc_radix_process(a->iptable->radix, is_insecure);
        insecure = insecure_prefix_found;
        UNLOCK(&insecure_prefix_lock);
        if (insecure)
-               return (ISC_TRUE);
+               return (true);
 
        /* Now check non-radix elements */
        for (i = 0; i < a->length; i++) {
@@ -660,23 +662,23 @@ dns_acl_isinsecure(const dns_acl_t *a) {
 
                case dns_aclelementtype_nestedacl:
                        if (dns_acl_isinsecure(e->nestedacl))
-                               return (ISC_TRUE);
+                               return (true);
                        continue;
 
 #ifdef HAVE_GEOIP
                case dns_aclelementtype_geoip:
 #endif
                case dns_aclelementtype_localnets:
-                       return (ISC_TRUE);
+                       return (true);
 
                default:
                        INSIST(0);
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
 
        /* No insecure elements were found. */
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -694,10 +696,10 @@ dns_aclenv_init(isc_mem_t *mctx, dns_aclenv_t *env) {
        result = dns_acl_create(mctx, 0, &env->localnets);
        if (result != ISC_R_SUCCESS)
                goto cleanup_localhost;
-       env->match_mapped = ISC_FALSE;
+       env->match_mapped = false;
 #ifdef HAVE_GEOIP
        env->geoip = NULL;
-       env->geoip_use_ecs = ISC_FALSE;
+       env->geoip_use_ecs = false;
 #endif
        return (ISC_R_SUCCESS);
 
index 5097cc5358afd001d5a3e987b5364ff094cf4626..956f368889d856017b3a381064b28f3bc4e2b031 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <limits.h>
 #include <inttypes.h>
 
@@ -133,7 +134,7 @@ struct dns_adb {
        dns_adbnamelist_t               *names;
        dns_adbnamelist_t               *deadnames;
        isc_mutex_t                     *namelocks;
-       isc_boolean_t                   *name_sd;
+       bool                   *name_sd;
        unsigned int                    *name_refcnt;
 
        /*!
@@ -147,17 +148,17 @@ struct dns_adb {
        dns_adbentrylist_t              *entries;
        dns_adbentrylist_t              *deadentries;
        isc_mutex_t                     *entrylocks;
-       isc_boolean_t                   *entry_sd; /*%< shutting down */
+       bool                   *entry_sd; /*%< shutting down */
        unsigned int                    *entry_refcnt;
 
        isc_event_t                     cevent;
-       isc_boolean_t                   cevent_out;
-       isc_boolean_t                   shutting_down;
+       bool                   cevent_out;
+       bool                   shutting_down;
        isc_eventlist_t                 whenshutdown;
        isc_event_t                     growentries;
-       isc_boolean_t                   growentries_sent;
+       bool                    growentries_sent;
        isc_event_t                     grownames;
-       isc_boolean_t                   grownames_sent;
+       bool                    grownames_sent;
 
        uint32_t                        quota;
        uint32_t                        atr_freq;
@@ -296,7 +297,7 @@ static inline void free_adblameinfo(dns_adb_t *, dns_adblameinfo_t **);
 static inline dns_adbentry_t *new_adbentry(dns_adb_t *);
 static inline void free_adbentry(dns_adb_t *, dns_adbentry_t **);
 static inline dns_adbfind_t *new_adbfind(dns_adb_t *);
-static inline isc_boolean_t free_adbfind(dns_adb_t *, dns_adbfind_t **);
+static inline bool free_adbfind(dns_adb_t *, dns_adbfind_t **);
 static inline dns_adbaddrinfo_t *new_adbaddrinfo(dns_adb_t *, dns_adbentry_t *,
                                                 in_port_t);
 static inline dns_adbfetch_t *new_adbfetch(dns_adb_t *);
@@ -306,47 +307,47 @@ static inline dns_adbname_t *find_name_and_lock(dns_adb_t *, dns_name_t *,
 static inline dns_adbentry_t *find_entry_and_lock(dns_adb_t *,
                                                  isc_sockaddr_t *, int *,
                                                  isc_stdtime_t);
-static void dump_adb(dns_adb_t *, FILE *, isc_boolean_t debug, isc_stdtime_t);
+static void dump_adb(dns_adb_t *, FILE *, bool debug, isc_stdtime_t);
 static void print_dns_name(FILE *, dns_name_t *);
 static void print_namehook_list(FILE *, const char *legend,
                                dns_adb_t *adb,
                                dns_adbnamehooklist_t *list,
-                               isc_boolean_t debug,
+                               bool debug,
                                isc_stdtime_t now);
 static void print_find_list(FILE *, dns_adbname_t *);
 static void print_fetch_list(FILE *, dns_adbname_t *);
-static inline isc_boolean_t dec_adb_irefcnt(dns_adb_t *);
+static inline bool dec_adb_irefcnt(dns_adb_t *);
 static inline void inc_adb_irefcnt(dns_adb_t *);
 static inline void inc_adb_erefcnt(dns_adb_t *);
 static inline void inc_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
-                                   isc_boolean_t);
-static inline isc_boolean_t dec_entry_refcnt(dns_adb_t *, isc_boolean_t,
-                                            dns_adbentry_t *, isc_boolean_t);
+                                   bool);
+static inline bool dec_entry_refcnt(dns_adb_t *, bool,
+                                            dns_adbentry_t *, bool);
 static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
-static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
+static bool clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
 static void clean_target(dns_adb_t *, dns_name_t *);
 static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t, unsigned int);
-static isc_boolean_t check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
-static isc_boolean_t check_expire_entry(dns_adb_t *, dns_adbentry_t **,
+static bool check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
+static bool check_expire_entry(dns_adb_t *, dns_adbentry_t **,
                                        isc_stdtime_t);
 static void cancel_fetches_at_name(dns_adbname_t *);
 static isc_result_t dbfind_name(dns_adbname_t *, isc_stdtime_t,
                                dns_rdatatype_t);
-static isc_result_t fetch_name(dns_adbname_t *, isc_boolean_t,
+static isc_result_t fetch_name(dns_adbname_t *, bool,
                               unsigned int, isc_counter_t *qc,
                               dns_rdatatype_t);
 static inline void check_exit(dns_adb_t *);
 static void destroy(dns_adb_t *);
-static isc_boolean_t shutdown_names(dns_adb_t *);
-static isc_boolean_t shutdown_entries(dns_adb_t *);
+static bool shutdown_names(dns_adb_t *);
+static bool shutdown_entries(dns_adb_t *);
 static inline void link_name(dns_adb_t *, int, dns_adbname_t *);
-static inline isc_boolean_t unlink_name(dns_adb_t *, dns_adbname_t *);
+static inline bool unlink_name(dns_adb_t *, dns_adbname_t *);
 static inline void link_entry(dns_adb_t *, int, dns_adbentry_t *);
-static inline isc_boolean_t unlink_entry(dns_adb_t *, dns_adbentry_t *);
-static isc_boolean_t kill_name(dns_adbname_t **, isc_eventtype_t);
+static inline bool unlink_entry(dns_adb_t *, dns_adbentry_t *);
+static bool kill_name(dns_adbname_t **, isc_eventtype_t);
 static void water(void *, int);
 static void dump_entry(FILE *, dns_adb_t *, dns_adbentry_t *,
-                      isc_boolean_t, isc_stdtime_t);
+                      bool, isc_stdtime_t);
 static void adjustsrtt(dns_adbaddrinfo_t *addr, unsigned int rtt,
                       unsigned int factor, isc_stdtime_t now);
 static void shutdown_task(isc_task_t *task, isc_event_t *ev);
@@ -559,7 +560,7 @@ grow_entries(isc_task_t *task, isc_event_t *ev) {
        dns_adbentry_t *e;
        dns_adbentrylist_t *newdeadentries = NULL;
        dns_adbentrylist_t *newentries = NULL;
-       isc_boolean_t *newentry_sd = NULL;
+       bool *newentry_sd = NULL;
        isc_mutex_t *newentrylocks = NULL;
        isc_result_t result;
        unsigned int *newentry_refcnt = NULL;
@@ -614,7 +615,7 @@ grow_entries(isc_task_t *task, isc_event_t *ev) {
        for (i = 0; i < n; i++) {
                ISC_LIST_INIT(newentries[i]);
                ISC_LIST_INIT(newdeadentries[i]);
-               newentry_sd[i] = ISC_FALSE;
+               newentry_sd[i] = false;
                newentry_refcnt[i] = 0;
                adb->irefcnt++;
        }
@@ -626,7 +627,7 @@ grow_entries(isc_task_t *task, isc_event_t *ev) {
                e = ISC_LIST_HEAD(adb->entries[i]);
                while (e != NULL) {
                        ISC_LIST_UNLINK(adb->entries[i], e, plink);
-                       bucket = isc_sockaddr_hash(&e->sockaddr, ISC_TRUE) % n;
+                       bucket = isc_sockaddr_hash(&e->sockaddr, true) % n;
                        e->lock_bucket = bucket;
                        ISC_LIST_APPEND(newentries[bucket], e, plink);
                        INSIST(adb->entry_refcnt[i] > 0);
@@ -637,7 +638,7 @@ grow_entries(isc_task_t *task, isc_event_t *ev) {
                e = ISC_LIST_HEAD(adb->deadentries[i]);
                while (e != NULL) {
                        ISC_LIST_UNLINK(adb->deadentries[i], e, plink);
-                       bucket = isc_sockaddr_hash(&e->sockaddr, ISC_TRUE) % n;
+                       bucket = isc_sockaddr_hash(&e->sockaddr, true) % n;
                        e->lock_bucket = bucket;
                        ISC_LIST_APPEND(newdeadentries[bucket], e, plink);
                        INSIST(adb->entry_refcnt[i] > 0);
@@ -677,10 +678,10 @@ grow_entries(isc_task_t *task, isc_event_t *ev) {
        set_adbstat(adb, adb->nentries, dns_adbstats_nentries);
 
        /*
-        * Only on success do we set adb->growentries_sent to ISC_FALSE.
+        * Only on success do we set adb->growentries_sent to false.
         * This will prevent us being continuously being called on error.
         */
-       adb->growentries_sent = ISC_FALSE;
+       adb->growentries_sent = false;
        goto done;
 
  cleanup:
@@ -716,7 +717,7 @@ grow_names(isc_task_t *task, isc_event_t *ev) {
        dns_adbname_t *name;
        dns_adbnamelist_t *newdeadnames = NULL;
        dns_adbnamelist_t *newnames = NULL;
-       isc_boolean_t *newname_sd = NULL;
+       bool *newname_sd = NULL;
        isc_mutex_t *newnamelocks = NULL;
        isc_result_t result;
        unsigned int *newname_refcnt = NULL;
@@ -771,7 +772,7 @@ grow_names(isc_task_t *task, isc_event_t *ev) {
        for (i = 0; i < n; i++) {
                ISC_LIST_INIT(newnames[i]);
                ISC_LIST_INIT(newdeadnames[i]);
-               newname_sd[i] = ISC_FALSE;
+               newname_sd[i] = false;
                newname_refcnt[i] = 0;
                adb->irefcnt++;
        }
@@ -783,7 +784,7 @@ grow_names(isc_task_t *task, isc_event_t *ev) {
                name = ISC_LIST_HEAD(adb->names[i]);
                while (name != NULL) {
                        ISC_LIST_UNLINK(adb->names[i], name, plink);
-                       bucket = dns_name_fullhash(&name->name, ISC_TRUE) % n;
+                       bucket = dns_name_fullhash(&name->name, true) % n;
                        name->lock_bucket = bucket;
                        ISC_LIST_APPEND(newnames[bucket], name, plink);
                        INSIST(adb->name_refcnt[i] > 0);
@@ -794,7 +795,7 @@ grow_names(isc_task_t *task, isc_event_t *ev) {
                name = ISC_LIST_HEAD(adb->deadnames[i]);
                while (name != NULL) {
                        ISC_LIST_UNLINK(adb->deadnames[i], name, plink);
-                       bucket = dns_name_fullhash(&name->name, ISC_TRUE) % n;
+                       bucket = dns_name_fullhash(&name->name, true) % n;
                        name->lock_bucket = bucket;
                        ISC_LIST_APPEND(newdeadnames[bucket], name, plink);
                        INSIST(adb->name_refcnt[i] > 0);
@@ -834,10 +835,10 @@ grow_names(isc_task_t *task, isc_event_t *ev) {
        set_adbstat(adb, adb->nnames, dns_adbstats_nnames);
 
        /*
-        * Only on success do we set adb->grownames_sent to ISC_FALSE.
+        * Only on success do we set adb->grownames_sent to false.
         * This will prevent us being continuously being called on error.
         */
-       adb->grownames_sent = ISC_FALSE;
+       adb->grownames_sent = false;
        goto done;
 
  cleanup:
@@ -882,7 +883,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
        isc_sockaddr_t sockaddr;
        dns_adbentry_t *foundentry;  /* NO CLEAN UP! */
        int addr_bucket;
-       isc_boolean_t new_addresses_added;
+       bool new_addresses_added;
        dns_rdatatype_t rdtype;
        unsigned int findoptions;
        dns_adbnamehooklist_t *hookhead;
@@ -899,7 +900,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
                findoptions = DNS_ADBFIND_INET6;
 
        addr_bucket = DNS_ADB_INVALIDBUCKET;
-       new_addresses_added = ISC_FALSE;
+       new_addresses_added = false;
 
        nh = NULL;
        result = dns_rdataset_first(rdataset);
@@ -959,7 +960,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
                                free_adbnamehook(adb, &nh);
                }
 
-               new_addresses_added = ISC_TRUE;
+               new_addresses_added = true;
                if (nh != NULL)
                        ISC_LIST_APPEND(*hookhead, nh, plink);
                nh = NULL;
@@ -1009,11 +1010,11 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
 /*
  * Requires the name's bucket be locked.
  */
-static isc_boolean_t
+static bool
 kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
        dns_adbname_t *name;
-       isc_boolean_t result = ISC_FALSE;
-       isc_boolean_t result4, result6;
+       bool result = false;
+       bool result4, result6;
        int bucket;
        dns_adb_t *adb;
 
@@ -1046,14 +1047,14 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
        result4 = clean_namehooks(adb, &name->v4);
        result6 = clean_namehooks(adb, &name->v6);
        clean_target(adb, &name->target);
-       result = ISC_TF(result4 || result6);
+       result = (result4 || result6);
 
        /*
         * If fetches are running, cancel them.  If none are running, we can
         * just kill the name here.
         */
        if (!NAME_FETCH(name)) {
-               INSIST(result == ISC_FALSE);
+               INSIST(result == false);
                result = unlink_name(adb, name);
                free_adbname(adb, &name);
                if (result)
@@ -1073,11 +1074,11 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
 /*
  * Requires the name's bucket be locked and no entry buckets be locked.
  */
-static isc_boolean_t
+static bool
 check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
        dns_adb_t *adb;
-       isc_boolean_t result4 = ISC_FALSE;
-       isc_boolean_t result6 = ISC_FALSE;
+       bool result4 = false;
+       bool result6 = false;
 
        INSIST(DNS_ADBNAME_VALID(name));
        adb = name->adb;
@@ -1116,7 +1117,7 @@ check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
                clean_target(adb, &name->target);
                name->expire_target = INT_MAX;
        }
-       return (ISC_TF(result4 || result6));
+       return (result4 || result6);
 }
 
 /*
@@ -1134,10 +1135,10 @@ link_name(dns_adb_t *adb, int bucket, dns_adbname_t *name) {
 /*
  * Requires the name's bucket be locked.
  */
-static inline isc_boolean_t
+static inline bool
 unlink_name(dns_adb_t *adb, dns_adbname_t *name) {
        int bucket;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        bucket = name->lock_bucket;
        INSIST(bucket != DNS_ADB_INVALIDBUCKET);
@@ -1150,7 +1151,7 @@ unlink_name(dns_adb_t *adb, dns_adbname_t *name) {
        INSIST(adb->name_refcnt[bucket] > 0);
        adb->name_refcnt[bucket]--;
        if (adb->name_sd[bucket] && adb->name_refcnt[bucket] == 0)
-               result = ISC_TRUE;
+               result = true;
        return (result);
 }
 
@@ -1187,10 +1188,10 @@ link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) {
 /*
  * Requires the entry's bucket be locked.
  */
-static inline isc_boolean_t
+static inline bool
 unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) {
        int bucket;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        bucket = entry->lock_bucket;
        INSIST(bucket != DNS_ADB_INVALIDBUCKET);
@@ -1203,7 +1204,7 @@ unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) {
        INSIST(adb->entry_refcnt[bucket] > 0);
        adb->entry_refcnt[bucket]--;
        if (adb->entry_sd[bucket] && adb->entry_refcnt[bucket] == 0)
-               result = ISC_TRUE;
+               result = true;
        return (result);
 }
 
@@ -1220,16 +1221,16 @@ violate_locking_hierarchy(isc_mutex_t *have, isc_mutex_t *want) {
  * The ADB _MUST_ be locked before calling.  Also, exit conditions must be
  * checked after calling this function.
  */
-static isc_boolean_t
+static bool
 shutdown_names(dns_adb_t *adb) {
        unsigned int bucket;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
        dns_adbname_t *name;
        dns_adbname_t *next_name;
 
        for (bucket = 0; bucket < adb->nnames; bucket++) {
                LOCK(&adb->namelocks[bucket]);
-               adb->name_sd[bucket] = ISC_TRUE;
+               adb->name_sd[bucket] = true;
 
                name = ISC_LIST_HEAD(adb->names[bucket]);
                if (name == NULL) {
@@ -1238,7 +1239,7 @@ shutdown_names(dns_adb_t *adb) {
                         * irefcnt ourselves, since it will not be
                         * automatically triggered by a name being unlinked.
                         */
-                       INSIST(result == ISC_FALSE);
+                       INSIST(result == false);
                        result = dec_adb_irefcnt(adb);
                } else {
                        /*
@@ -1249,7 +1250,7 @@ shutdown_names(dns_adb_t *adb) {
                         */
                        while (name != NULL) {
                                next_name = ISC_LIST_NEXT(name, plink);
-                               INSIST(result == ISC_FALSE);
+                               INSIST(result == false);
                                result = kill_name(&name,
                                                   DNS_EVENT_ADBSHUTDOWN);
                                name = next_name;
@@ -1265,16 +1266,16 @@ shutdown_names(dns_adb_t *adb) {
  * The ADB _MUST_ be locked before calling.  Also, exit conditions must be
  * checked after calling this function.
  */
-static isc_boolean_t
+static bool
 shutdown_entries(dns_adb_t *adb) {
        unsigned int bucket;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
        dns_adbentry_t *entry;
        dns_adbentry_t *next_entry;
 
        for (bucket = 0; bucket < adb->nentries; bucket++) {
                LOCK(&adb->entrylocks[bucket]);
-               adb->entry_sd[bucket] = ISC_TRUE;
+               adb->entry_sd[bucket] = true;
 
                entry = ISC_LIST_HEAD(adb->entries[bucket]);
                if (adb->entry_refcnt[bucket] == 0) {
@@ -1322,13 +1323,13 @@ cancel_fetches_at_name(dns_adbname_t *name) {
 /*
  * Assumes the name bucket is locked.
  */
-static isc_boolean_t
+static bool
 clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
        dns_adbentry_t *entry;
        dns_adbnamehook_t *namehook;
        int addr_bucket;
-       isc_boolean_t result = ISC_FALSE;
-       isc_boolean_t overmem = isc_mem_isovermem(adb->mctx);
+       bool result = false;
+       bool overmem = isc_mem_isovermem(adb->mctx);
 
        addr_bucket = DNS_ADB_INVALIDBUCKET;
        namehook = ISC_LIST_HEAD(*namehooks);
@@ -1352,7 +1353,7 @@ clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
 
                        entry->nh--;
                        result = dec_entry_refcnt(adb, overmem, entry,
-                                                 ISC_FALSE);
+                                                 false);
                }
 
                /*
@@ -1472,7 +1473,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
        isc_task_t *task;
        dns_adbfind_t *find;
        dns_adbfind_t *next_find;
-       isc_boolean_t process;
+       bool process;
        unsigned int wanted, notify;
 
        DP(ENTER_LEVEL,
@@ -1484,7 +1485,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
                LOCK(&find->lock);
                next_find = ISC_LIST_NEXT(find, plink);
 
-               process = ISC_FALSE;
+               process = false;
                wanted = find->flags & DNS_ADBFIND_ADDRESSMASK;
                notify = wanted & addrs;
 
@@ -1493,7 +1494,7 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
                        DP(ISC_LOG_DEBUG(3), "DNS_EVENT_ADBMOREADDRESSES");
                        if ((notify) != 0) {
                                find->flags &= ~addrs;
-                               process = ISC_TRUE;
+                               process = true;
                        }
                        break;
                case DNS_EVENT_ADBNOMOREADDRESSES:
@@ -1501,11 +1502,11 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
                        find->flags &= ~addrs;
                        wanted = find->flags & DNS_ADBFIND_ADDRESSMASK;
                        if (wanted == 0)
-                               process = ISC_TRUE;
+                               process = true;
                        break;
                default:
                        find->flags &= ~addrs;
-                       process = ISC_TRUE;
+                       process = true;
                }
 
                if (process) {
@@ -1564,15 +1565,15 @@ check_exit(dns_adb_t *adb) {
                               adb, NULL, NULL);
                event = &adb->cevent;
                isc_task_send(adb->task, &event);
-               adb->cevent_out = ISC_TRUE;
+               adb->cevent_out = true;
        }
 }
 
-static inline isc_boolean_t
+static inline bool
 dec_adb_irefcnt(dns_adb_t *adb) {
        isc_event_t *event;
        isc_task_t *etask;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        LOCK(&adb->reflock);
 
@@ -1591,7 +1592,7 @@ dec_adb_irefcnt(dns_adb_t *adb) {
        }
 
        if (adb->irefcnt == 0 && adb->erefcnt == 0)
-               result = ISC_TRUE;
+               result = true;
        UNLOCK(&adb->reflock);
        return (result);
 }
@@ -1611,7 +1612,7 @@ inc_adb_erefcnt(dns_adb_t *adb) {
 }
 
 static inline void
-inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
+inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, bool lock) {
        int bucket;
 
        bucket = entry->lock_bucket;
@@ -1625,13 +1626,13 @@ inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
                UNLOCK(&adb->entrylocks[bucket]);
 }
 
-static inline isc_boolean_t
-dec_entry_refcnt(dns_adb_t *adb, isc_boolean_t overmem, dns_adbentry_t *entry,
-                isc_boolean_t lock)
+static inline bool
+dec_entry_refcnt(dns_adb_t *adb, bool overmem, dns_adbentry_t *entry,
+                bool lock)
 {
        int bucket;
-       isc_boolean_t destroy_entry;
-       isc_boolean_t result = ISC_FALSE;
+       bool destroy_entry;
+       bool result = false;
 
        bucket = entry->lock_bucket;
 
@@ -1641,11 +1642,11 @@ dec_entry_refcnt(dns_adb_t *adb, isc_boolean_t overmem, dns_adbentry_t *entry,
        INSIST(entry->refcnt > 0);
        entry->refcnt--;
 
-       destroy_entry = ISC_FALSE;
+       destroy_entry = false;
        if (entry->refcnt == 0 &&
            (adb->entry_sd[bucket] || entry->expires == 0 || overmem ||
             (entry->flags & ENTRY_IS_DEAD) != 0)) {
-               destroy_entry = ISC_TRUE;
+               destroy_entry = true;
                result = unlink_entry(adb, entry);
        }
 
@@ -1705,7 +1706,7 @@ new_adbname(dns_adb_t *adb, dns_name_t *dnsname) {
                isc_event_t *event = &adb->grownames;
                inc_adb_irefcnt(adb);
                isc_task_send(adb->excl, &event);
-               adb->grownames_sent = ISC_TRUE;
+               adb->grownames_sent = true;
        }
        UNLOCK(&adb->namescntlock);
 
@@ -1851,7 +1852,7 @@ new_adbentry(dns_adb_t *adb) {
                isc_event_t *event = &adb->growentries;
                inc_adb_irefcnt(adb);
                isc_task_send(adb->excl, &event);
-               adb->growentries_sent = ISC_TRUE;
+               adb->growentries_sent = true;
        }
        UNLOCK(&adb->entriescntlock);
 
@@ -1966,7 +1967,7 @@ free_adbfetch(dns_adb_t *adb, dns_adbfetch_t **fetch) {
        isc_mempool_put(adb->afmp, f);
 }
 
-static inline isc_boolean_t
+static inline bool
 free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) {
        dns_adbfind_t *find;
 
@@ -2042,7 +2043,7 @@ find_name_and_lock(dns_adb_t *adb, dns_name_t *name,
        dns_adbname_t *adbname;
        int bucket;
 
-       bucket = dns_name_fullhash(name, ISC_FALSE) % adb->nnames;
+       bucket = dns_name_fullhash(name, false) % adb->nnames;
 
        if (*bucketp == DNS_ADB_INVALIDBUCKET) {
                LOCK(&adb->namelocks[bucket]);
@@ -2084,7 +2085,7 @@ find_entry_and_lock(dns_adb_t *adb, isc_sockaddr_t *addr, int *bucketp,
        dns_adbentry_t *entry, *entry_next;
        int bucket;
 
-       bucket = isc_sockaddr_hash(addr, ISC_TRUE) % adb->nentries;
+       bucket = isc_sockaddr_hash(addr, true) % adb->nentries;
 
        if (*bucketp == DNS_ADB_INVALIDBUCKET) {
                LOCK(&adb->entrylocks[bucket]);
@@ -2116,18 +2117,18 @@ find_entry_and_lock(dns_adb_t *adb, isc_sockaddr_t *addr, int *bucketp,
 /*
  * Entry bucket MUST be locked!
  */
-static isc_boolean_t
+static bool
 entry_is_lame(dns_adb_t *adb, dns_adbentry_t *entry, dns_name_t *qname,
              dns_rdatatype_t qtype, isc_stdtime_t now)
 {
        dns_adblameinfo_t *li, *next_li;
-       isc_boolean_t is_bad;
+       bool is_bad;
 
-       is_bad = ISC_FALSE;
+       is_bad = false;
 
        li = ISC_LIST_HEAD(entry->lameinfo);
        if (li == NULL)
-               return (ISC_FALSE);
+               return (false);
        while (li != NULL) {
                next_li = ISC_LIST_NEXT(li, plink);
 
@@ -2147,7 +2148,7 @@ entry_is_lame(dns_adb_t *adb, dns_adbentry_t *entry, dns_name_t *qname,
                 */
                if (li != NULL && !is_bad && li->qtype == qtype &&
                    dns_name_equal(qname, &li->qname))
-                       is_bad = ISC_TRUE;
+                       is_bad = true;
 
                li = next_li;
        }
@@ -2216,7 +2217,7 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_name_t *qname,
                        /*
                         * Found a valid entry.  Add it to the find's list.
                         */
-                       inc_entry_refcnt(adb, entry, ISC_FALSE);
+                       inc_entry_refcnt(adb, entry, false);
                        ISC_LIST_APPEND(find->list, addrinfo, publink);
                        addrinfo = NULL;
                nextv4:
@@ -2256,7 +2257,7 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_name_t *qname,
                        /*
                         * Found a valid entry.  Add it to the find's list.
                         */
-                       inc_entry_refcnt(adb, entry, ISC_FALSE);
+                       inc_entry_refcnt(adb, entry, false);
                        ISC_LIST_APPEND(find->list, addrinfo, publink);
                        addrinfo = NULL;
                nextv6:
@@ -2292,10 +2293,10 @@ shutdown_task(isc_task_t *task, isc_event_t *ev) {
 /*
  * Name bucket must be locked; adb may be locked; no other locks held.
  */
-static isc_boolean_t
+static bool
 check_expire_name(dns_adbname_t **namep, isc_stdtime_t now) {
        dns_adbname_t *name;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        INSIST(namep != NULL && DNS_ADBNAME_VALID(*namep));
        name = *namep;
@@ -2339,7 +2340,7 @@ static void
 check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
        int victims, max_victims;
        dns_adbname_t *victim, *next_victim;
-       isc_boolean_t overmem = isc_mem_isovermem(adb->mctx);
+       bool overmem = isc_mem_isovermem(adb->mctx);
        int scans = 0;
 
        INSIST(bucket != DNS_ADB_INVALIDBUCKET);
@@ -2369,7 +2370,7 @@ check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
                    (overmem || victim->last_used + ADB_STALE_MARGIN <= now)) {
                        RUNTIME_CHECK(kill_name(&victim,
                                                DNS_EVENT_ADBCANCELED) ==
-                                     ISC_FALSE);
+                                     false);
                        victims++;
                }
 
@@ -2382,11 +2383,11 @@ check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
 /*
  * Entry bucket must be locked; adb may be locked; no other locks held.
  */
-static isc_boolean_t
+static bool
 check_expire_entry(dns_adb_t *adb, dns_adbentry_t **entryp, isc_stdtime_t now)
 {
        dns_adbentry_t *entry;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        INSIST(entryp != NULL && DNS_ADBENTRY_VALID(*entryp));
        entry = *entryp;
@@ -2413,11 +2414,11 @@ check_expire_entry(dns_adb_t *adb, dns_adbentry_t **entryp, isc_stdtime_t now)
 /*
  * ADB must be locked, and no other locks held.
  */
-static isc_boolean_t
+static bool
 cleanup_names(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
        dns_adbname_t *name;
        dns_adbname_t *next_name;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        DP(CLEAN_LEVEL, "cleaning name bucket %d", bucket);
 
@@ -2430,7 +2431,7 @@ cleanup_names(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
        name = ISC_LIST_HEAD(adb->names[bucket]);
        while (name != NULL) {
                next_name = ISC_LIST_NEXT(name, plink);
-               INSIST(result == ISC_FALSE);
+               INSIST(result == false);
                result = check_expire_namehooks(name, now);
                if (!result)
                        result = check_expire_name(&name, now);
@@ -2443,10 +2444,10 @@ cleanup_names(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
 /*
  * ADB must be locked, and no other locks held.
  */
-static isc_boolean_t
+static bool
 cleanup_entries(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
        dns_adbentry_t *entry, *next_entry;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        DP(CLEAN_LEVEL, "cleaning entry bucket %d", bucket);
 
@@ -2454,7 +2455,7 @@ cleanup_entries(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
        entry = ISC_LIST_HEAD(adb->entries[bucket]);
        while (entry != NULL) {
                next_entry = ISC_LIST_NEXT(entry, plink);
-               INSIST(result == ISC_FALSE);
+               INSIST(result == false);
                result = check_expire_entry(adb, &entry, now);
                entry = next_entry;
        }
@@ -2559,8 +2560,8 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
        adb->next_cleanbucket = 0;
        ISC_EVENT_INIT(&adb->cevent, sizeof(adb->cevent),
                       0, NULL, 0, NULL, NULL, NULL, NULL, NULL);
-       adb->cevent_out = ISC_FALSE;
-       adb->shutting_down = ISC_FALSE;
+       adb->cevent_out = false;
+       adb->shutting_down = false;
        ISC_LIST_INIT(adb->whenshutdown);
 
        adb->nentries = nbuckets[0];
@@ -2573,7 +2574,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
        ISC_EVENT_INIT(&adb->growentries, sizeof(adb->growentries), 0, NULL,
                       DNS_EVENT_ADBGROWENTRIES, grow_entries, adb,
                       adb, NULL, NULL);
-       adb->growentries_sent = ISC_FALSE;
+       adb->growentries_sent = false;
 
        adb->quota = 0;
        adb->atr_freq = 0;
@@ -2591,7 +2592,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
        ISC_EVENT_INIT(&adb->grownames, sizeof(adb->grownames), 0, NULL,
                       DNS_EVENT_ADBGROWNAMES, grow_names, adb,
                       adb, NULL, NULL);
-       adb->grownames_sent = ISC_FALSE;
+       adb->grownames_sent = false;
 
        result = isc_taskmgr_excltask(adb->taskmgr, &adb->excl);
        if (result != ISC_R_SUCCESS) {
@@ -2670,14 +2671,14 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
        for (i = 0; i < adb->nnames; i++) {
                ISC_LIST_INIT(adb->names[i]);
                ISC_LIST_INIT(adb->deadnames[i]);
-               adb->name_sd[i] = ISC_FALSE;
+               adb->name_sd[i] = false;
                adb->name_refcnt[i] = 0;
                adb->irefcnt++;
        }
        for (i = 0; i < adb->nentries; i++) {
                ISC_LIST_INIT(adb->entries[i]);
                ISC_LIST_INIT(adb->deadentries[i]);
-               adb->entry_sd[i] = ISC_FALSE;
+               adb->entry_sd[i] = false;
                adb->entry_refcnt[i] = 0;
                adb->irefcnt++;
        }
@@ -2819,7 +2820,7 @@ dns_adb_attach(dns_adb_t *adb, dns_adb_t **adbx) {
 void
 dns_adb_detach(dns_adb_t **adbx) {
        dns_adb_t *adb;
-       isc_boolean_t need_exit_check;
+       bool need_exit_check;
 
        REQUIRE(adbx != NULL && DNS_ADB_VALID(*adbx));
 
@@ -2830,7 +2831,7 @@ dns_adb_detach(dns_adb_t **adbx) {
 
        LOCK(&adb->reflock);
        adb->erefcnt--;
-       need_exit_check = ISC_TF(adb->erefcnt == 0 && adb->irefcnt == 0);
+       need_exit_check = (adb->erefcnt == 0 && adb->irefcnt == 0);
        UNLOCK(&adb->reflock);
 
        if (need_exit_check) {
@@ -2845,7 +2846,7 @@ void
 dns_adb_whenshutdown(dns_adb_t *adb, isc_task_t *task, isc_event_t **eventp) {
        isc_task_t *tclone;
        isc_event_t *event;
-       isc_boolean_t zeroirefcnt;
+       bool zeroirefcnt;
 
        /*
         * Send '*eventp' to 'task' when 'adb' has shutdown.
@@ -2860,7 +2861,7 @@ dns_adb_whenshutdown(dns_adb_t *adb, isc_task_t *task, isc_event_t **eventp) {
        LOCK(&adb->lock);
        LOCK(&adb->reflock);
 
-       zeroirefcnt = ISC_TF(adb->irefcnt == 0);
+       zeroirefcnt = (adb->irefcnt == 0);
 
        if (adb->shutting_down && zeroirefcnt &&
            isc_mempool_getallocated(adb->ahmp) == 0) {
@@ -2891,7 +2892,7 @@ shutdown_stage2(isc_task_t *task, isc_event_t *event) {
 
        LOCK(&adb->lock);
        INSIST(adb->shutting_down);
-       adb->cevent_out = ISC_FALSE;
+       adb->cevent_out = false;
        (void)shutdown_names(adb);
        (void)shutdown_entries(adb);
        if (dec_adb_irefcnt(adb))
@@ -2910,7 +2911,7 @@ dns_adb_shutdown(dns_adb_t *adb) {
        LOCK(&adb->lock);
 
        if (!adb->shutting_down) {
-               adb->shutting_down = ISC_TRUE;
+               adb->shutting_down = true;
                isc_mem_setwater(adb->mctx, water, adb, 0, 0);
                /*
                 * Isolate shutdown_names and shutdown_entries calls.
@@ -2919,7 +2920,7 @@ dns_adb_shutdown(dns_adb_t *adb) {
                ISC_EVENT_INIT(&adb->cevent, sizeof(adb->cevent), 0, NULL,
                               DNS_EVENT_ADBCONTROL, shutdown_stage2, adb,
                               adb, NULL, NULL);
-               adb->cevent_out = ISC_TRUE;
+               adb->cevent_out = true;
                event = &adb->cevent;
                isc_task_send(adb->task, &event);
        }
@@ -2950,7 +2951,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
        dns_adbfind_t *find;
        dns_adbname_t *adbname;
        int bucket;
-       isc_boolean_t want_event, start_at_zone, alias, have_address;
+       bool want_event, start_at_zone, alias, have_address;
        isc_result_t result;
        unsigned int wanted_addresses;
        unsigned int wanted_fetches;
@@ -2973,9 +2974,9 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
        wanted_addresses = (options & DNS_ADBFIND_ADDRESSMASK);
        wanted_fetches = 0;
        query_pending = 0;
-       want_event = ISC_FALSE;
-       start_at_zone = ISC_FALSE;
-       alias = ISC_FALSE;
+       want_event = false;
+       start_at_zone = false;
+       alias = false;
 
        if (now == 0)
                isc_stdtime_get(&now);
@@ -3030,7 +3031,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
        if (adb->name_sd[bucket]) {
                DP(DEF_LEVEL,
                   "dns_adb_createfind: returning ISC_R_SHUTTINGDOWN");
-               RUNTIME_CHECK(free_adbfind(adb, &find) == ISC_FALSE);
+               RUNTIME_CHECK(free_adbfind(adb, &find) == false);
                result = ISC_R_SHUTTINGDOWN;
                goto out;
        }
@@ -3047,7 +3048,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
 
                adbname = new_adbname(adb, name);
                if (adbname == NULL) {
-                       RUNTIME_CHECK(free_adbfind(adb, &find) == ISC_FALSE);
+                       RUNTIME_CHECK(free_adbfind(adb, &find) == false);
                        result = ISC_R_NOMEMORY;
                        goto out;
                }
@@ -3068,7 +3069,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
        /*
         * Expire old entries, etc.
         */
-       RUNTIME_CHECK(check_expire_namehooks(adbname, now) == ISC_FALSE);
+       RUNTIME_CHECK(check_expire_namehooks(adbname, now) == false);
 
        /*
         * Do we know that the name is an alias?
@@ -3080,7 +3081,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
                DP(DEF_LEVEL,
                   "dns_adb_createfind: name %s (%p) is an alias (cached)",
                   namebuf, adbname);
-               alias = ISC_TRUE;
+               alias = true;
                goto post_copy;
        }
 
@@ -3106,7 +3107,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
                        DP(DEF_LEVEL,
                           "dns_adb_createfind: name %s (%p) is an alias",
                           namebuf, adbname);
-                       alias = ISC_TRUE;
+                       alias = true;
                        goto post_copy;
                }
 
@@ -3146,7 +3147,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
                        DP(DEF_LEVEL,
                           "dns_adb_createfind: name %s (%p) is an alias",
                           namebuf, adbname);
-                       alias = ISC_TRUE;
+                       alias = true;
                        goto post_copy;
                }
 
@@ -3164,9 +3165,9 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
  fetch:
        if ((WANT_INET(wanted_addresses) && NAME_HAS_V4(adbname)) ||
            (WANT_INET6(wanted_addresses) && NAME_HAS_V6(adbname)))
-               have_address = ISC_TRUE;
+               have_address = true;
        else
-               have_address = ISC_FALSE;
+               have_address = false;
        if (wanted_fetches != 0 &&
            ! (FIND_AVOIDFETCHES(find) && have_address)) {
                /*
@@ -3177,7 +3178,7 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
                 */
 
                if (FIND_STARTATZONE(find))
-                       start_at_zone = ISC_TRUE;
+                       start_at_zone = true;
 
                /*
                 * Start V4.
@@ -3218,15 +3219,15 @@ dns_adb_createfind2(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
         * Attach to the name's query list if there are queries
         * already running, and we have been asked to.
         */
-       want_event = ISC_TRUE;
+       want_event = true;
        if (!FIND_WANTEVENT(find))
-               want_event = ISC_FALSE;
+               want_event = false;
        if (FIND_WANTEMPTYEVENT(find) && FIND_HAS_ADDRS(find))
-               want_event = ISC_FALSE;
+               want_event = false;
        if ((wanted_addresses & query_pending) == 0)
-               want_event = ISC_FALSE;
+               want_event = false;
        if (alias)
-               want_event = ISC_FALSE;
+               want_event = false;
        if (want_event) {
                find->adbname = adbname;
                find->name_bucket = bucket;
@@ -3294,7 +3295,7 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
        dns_adbaddrinfo_t *ai;
        int bucket;
        dns_adb_t *adb;
-       isc_boolean_t overmem;
+       bool overmem;
 
        REQUIRE(findp != NULL && DNS_ADBFIND_VALID(*findp));
        find = *findp;
@@ -3326,8 +3327,8 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
                entry = ai->entry;
                ai->entry = NULL;
                INSIST(DNS_ADBENTRY_VALID(entry));
-               RUNTIME_CHECK(dec_entry_refcnt(adb, overmem, entry, ISC_TRUE) ==
-                             ISC_FALSE);
+               RUNTIME_CHECK(dec_entry_refcnt(adb, overmem, entry, true) ==
+                             false);
                free_adbaddrinfo(adb, &ai);
                ai = ISC_LIST_HEAD(find->list);
        }
@@ -3422,11 +3423,11 @@ dns_adb_dump(dns_adb_t *adb, FILE *f) {
        isc_stdtime_get(&now);
 
        for (i = 0; i < adb->nnames; i++)
-               RUNTIME_CHECK(cleanup_names(adb, i, now) == ISC_FALSE);
+               RUNTIME_CHECK(cleanup_names(adb, i, now) == false);
        for (i = 0; i < adb->nentries; i++)
-               RUNTIME_CHECK(cleanup_entries(adb, i, now) == ISC_FALSE);
+               RUNTIME_CHECK(cleanup_entries(adb, i, now) == false);
 
-       dump_adb(adb, f, ISC_FALSE, now);
+       dump_adb(adb, f, false, now);
        UNLOCK(&adb->lock);
 }
 
@@ -3438,7 +3439,7 @@ dump_ttl(FILE *f, const char *legend, isc_stdtime_t value, isc_stdtime_t now) {
 }
 
 static void
-dump_adb(dns_adb_t *adb, FILE *f, isc_boolean_t debug, isc_stdtime_t now) {
+dump_adb(dns_adb_t *adb, FILE *f, bool debug, isc_stdtime_t now) {
        unsigned int i;
        dns_adbname_t *name;
        dns_adbentry_t *entry;
@@ -3525,7 +3526,7 @@ dump_adb(dns_adb_t *adb, FILE *f, isc_boolean_t debug, isc_stdtime_t now) {
 
 static void
 dump_entry(FILE *f, dns_adb_t *adb, dns_adbentry_t *entry,
-          isc_boolean_t debug, isc_stdtime_t now)
+          bool debug, isc_stdtime_t now)
 {
        char addrbuf[ISC_NETADDR_FORMATSIZE];
        char typebuf[DNS_RDATATYPE_FORMATSIZE];
@@ -3637,7 +3638,7 @@ print_dns_name(FILE *f, dns_name_t *name) {
 static void
 print_namehook_list(FILE *f, const char *legend,
                    dns_adb_t *adb, dns_adbnamehooklist_t *list,
-                   isc_boolean_t debug, isc_stdtime_t now)
+                   bool debug, isc_stdtime_t now)
 {
        dns_adbnamehook_t *nh;
 
@@ -3708,9 +3709,9 @@ dbfind_name(dns_adbname_t *adbname, isc_stdtime_t now, dns_rdatatype_t rdtype)
         */
        result = dns_view_find2(adb->view, &adbname->name, rdtype, now,
                                NAME_GLUEOK(adbname) ? DNS_DBFIND_GLUEOK : 0,
-                               ISC_TF(NAME_HINTOK(adbname)),
+                               NAME_HINTOK(adbname),
                                (adbname->flags & NAME_STARTATZONE) != 0 ?
-                               ISC_TRUE : ISC_FALSE,
+                               true : false,
                                NULL, NULL, fname, &rdataset, NULL);
 
        /* XXXVIX this switch statement is too sparse to gen a jump table. */
@@ -3830,7 +3831,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
        isc_stdtime_t now;
        isc_result_t result;
        unsigned int address_type;
-       isc_boolean_t want_check_exit = ISC_FALSE;
+       bool want_check_exit = false;
 
        UNUSED(task);
 
@@ -4001,7 +4002,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
 }
 
 static isc_result_t
-fetch_name(dns_adbname_t *adbname, isc_boolean_t start_at_zone,
+fetch_name(dns_adbname_t *adbname, bool start_at_zone,
           unsigned int depth, isc_counter_t *qc, dns_rdatatype_t type)
 {
        isc_result_t result;
@@ -4033,7 +4034,7 @@ fetch_name(dns_adbname_t *adbname, isc_boolean_t start_at_zone,
                   adbname);
                name = dns_fixedname_initname(&fixed);
                result = dns_view_findzonecut2(adb->view, &adbname->name, name,
-                                              0, 0, ISC_TRUE, ISC_FALSE,
+                                              0, 0, true, false,
                                               &rdataset, NULL);
                if (result != ISC_R_SUCCESS && result != DNS_R_HINT)
                        goto cleanup;
@@ -4234,7 +4235,7 @@ static int quota_adj[] = {
  */
 static void
 maybe_adjust_quota(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
-                  isc_boolean_t timeout)
+                  bool timeout)
 {
        double tr;
 
@@ -4283,10 +4284,10 @@ maybe_adjust_quota(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
 }
 
 #define EDNSTOS 3U
-isc_boolean_t
+bool
 dns_adb_noedns(dns_adb_t *adb, dns_adbaddrinfo_t *addr) {
        int bucket;
-       isc_boolean_t noedns = ISC_FALSE;
+       bool noedns = false;
 
        REQUIRE(DNS_ADB_VALID(adb));
        REQUIRE(DNS_ADBADDRINFO_VALID(addr));
@@ -4297,7 +4298,7 @@ dns_adb_noedns(dns_adb_t *adb, dns_adbaddrinfo_t *addr) {
        if (addr->entry->edns == 0U &&
            (addr->entry->plain > EDNSTOS || addr->entry->to4096 > EDNSTOS)) {
                if (((addr->entry->plain + addr->entry->to4096) & 0x3f) != 0) {
-                       noedns = ISC_TRUE;
+                       noedns = true;
                } else {
                        /*
                         * Increment plain so we don't get stuck.
@@ -4328,7 +4329,7 @@ dns_adb_plainresponse(dns_adb_t *adb, dns_adbaddrinfo_t *addr) {
        bucket = addr->entry->lock_bucket;
        LOCK(&adb->entrylocks[bucket]);
 
-       maybe_adjust_quota(adb, addr, ISC_FALSE);
+       maybe_adjust_quota(adb, addr, false);
 
        addr->entry->plain++;
        if (addr->entry->plain == 0xff) {
@@ -4353,7 +4354,7 @@ dns_adb_timeout(dns_adb_t *adb, dns_adbaddrinfo_t *addr) {
        bucket = addr->entry->lock_bucket;
        LOCK(&adb->entrylocks[bucket]);
 
-       maybe_adjust_quota(adb, addr, ISC_TRUE);
+       maybe_adjust_quota(adb, addr, true);
 
        /*
         * If we have not had a successful query then clear all
@@ -4390,7 +4391,7 @@ dns_adb_ednsto(dns_adb_t *adb, dns_adbaddrinfo_t *addr, unsigned int size) {
        bucket = addr->entry->lock_bucket;
        LOCK(&adb->entrylocks[bucket]);
 
-       maybe_adjust_quota(adb, addr, ISC_TRUE);
+       maybe_adjust_quota(adb, addr, true);
 
        if (size <= 512U) {
                if (addr->entry->to512 <= EDNSTOS) {
@@ -4441,7 +4442,7 @@ dns_adb_setudpsize(dns_adb_t *adb, dns_adbaddrinfo_t *addr, unsigned int size) {
        if (size > addr->entry->udpsize)
                addr->entry->udpsize = size;
 
-       maybe_adjust_quota(adb, addr, ISC_FALSE);
+       maybe_adjust_quota(adb, addr, false);
 
        addr->entry->edns++;
        if (addr->entry->edns == 0xff) {
@@ -4604,7 +4605,7 @@ dns_adb_findaddrinfo(dns_adb_t *adb, isc_sockaddr_t *sa,
        if (addr == NULL) {
                result = ISC_R_NOMEMORY;
        } else {
-               inc_entry_refcnt(adb, entry, ISC_FALSE);
+               inc_entry_refcnt(adb, entry, false);
                *addrp = addr;
        }
 
@@ -4620,8 +4621,8 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
        dns_adbentry_t *entry;
        int bucket;
        isc_stdtime_t now;
-       isc_boolean_t want_check_exit = ISC_FALSE;
-       isc_boolean_t overmem;
+       bool want_check_exit = false;
+       bool overmem;
 
        REQUIRE(DNS_ADB_VALID(adb));
        REQUIRE(addrp != NULL);
@@ -4641,7 +4642,7 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
                entry->expires = now + ADB_ENTRY_WINDOW;
        }
 
-       want_check_exit = dec_entry_refcnt(adb, overmem, entry, ISC_FALSE);
+       want_check_exit = dec_entry_refcnt(adb, overmem, entry, false);
 
        UNLOCK(&adb->entrylocks[bucket]);
 
@@ -4667,12 +4668,12 @@ dns_adb_flush(dns_adb_t *adb) {
         * Call our cleanup routines.
         */
        for (i = 0; i < adb->nnames; i++)
-               RUNTIME_CHECK(cleanup_names(adb, i, INT_MAX) == ISC_FALSE);
+               RUNTIME_CHECK(cleanup_names(adb, i, INT_MAX) == false);
        for (i = 0; i < adb->nentries; i++)
-               RUNTIME_CHECK(cleanup_entries(adb, i, INT_MAX) == ISC_FALSE);
+               RUNTIME_CHECK(cleanup_entries(adb, i, INT_MAX) == false);
 
 #ifdef DUMP_ADB_AFTER_CLEANING
-       dump_adb(adb, stdout, ISC_TRUE, INT_MAX);
+       dump_adb(adb, stdout, true, INT_MAX);
 #endif
 
        UNLOCK(&adb->lock);
@@ -4688,7 +4689,7 @@ dns_adb_flushname(dns_adb_t *adb, dns_name_t *name) {
        REQUIRE(name != NULL);
 
        LOCK(&adb->lock);
-       bucket = dns_name_hash(name, ISC_FALSE) % adb->nnames;
+       bucket = dns_name_hash(name, false) % adb->nnames;
        LOCK(&adb->namelocks[bucket]);
        adbname = ISC_LIST_HEAD(adb->names[bucket]);
        while (adbname != NULL) {
@@ -4697,7 +4698,7 @@ dns_adb_flushname(dns_adb_t *adb, dns_name_t *name) {
                    dns_name_equal(name, &adbname->name)) {
                        RUNTIME_CHECK(kill_name(&adbname,
                                                DNS_EVENT_ADBCANCELED) ==
-                                     ISC_FALSE);
+                                     false);
                }
                adbname = nextname;
        }
@@ -4718,14 +4719,14 @@ dns_adb_flushnames(dns_adb_t *adb, dns_name_t *name) {
                LOCK(&adb->namelocks[i]);
                adbname = ISC_LIST_HEAD(adb->names[i]);
                while (adbname != NULL) {
-                       isc_boolean_t ret;
+                       bool ret;
                        nextname = ISC_LIST_NEXT(adbname, plink);
                        if (!NAME_DEAD(adbname) &&
                            dns_name_issubdomain(&adbname->name, name))
                        {
                                ret = kill_name(&adbname,
                                                DNS_EVENT_ADBCANCELED);
-                               RUNTIME_CHECK(ret == ISC_FALSE);
+                               RUNTIME_CHECK(ret == false);
                        }
                        adbname = nextname;
                }
@@ -4745,7 +4746,7 @@ water(void *arg, int mark) {
         */
 
        dns_adb_t *adb = arg;
-       isc_boolean_t overmem = ISC_TF(mark == ISC_MEM_HIWATER);
+       bool overmem = (mark == ISC_MEM_HIWATER);
 
        REQUIRE(DNS_ADB_VALID(adb));
 
@@ -4784,11 +4785,11 @@ dns_adb_setquota(dns_adb_t *adb, uint32_t quota, uint32_t freq,
        adb->atr_discount = discount;
 }
 
-isc_boolean_t
+bool
 dns_adbentry_overquota(dns_adbentry_t *entry) {
-       isc_boolean_t block;
+       bool block;
        REQUIRE(DNS_ADBENTRY_VALID(entry));
-       block = ISC_TF(entry->quota != 0 && entry->active >= entry->quota);
+       block = (entry->quota != 0 && entry->active >= entry->quota);
        return (block);
 }
 
index 4a10da9e94e44742d78dcb025b8e3bd91b1bb57d..5c784bec297b49888bbf3cd2853df73d2e1a77e9 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/log.h>
@@ -58,7 +59,7 @@ struct dns_bcentry {
 };
 
 static isc_result_t
-badcache_resize(dns_badcache_t *bc, isc_time_t *now, isc_boolean_t grow);
+badcache_resize(dns_badcache_t *bc, isc_time_t *now, bool grow);
 
 isc_result_t
 dns_badcache_init(isc_mem_t *mctx, unsigned int size, dns_badcache_t **bcp) {
@@ -118,7 +119,7 @@ dns_badcache_destroy(dns_badcache_t **bcp) {
 }
 
 static isc_result_t
-badcache_resize(dns_badcache_t *bc, isc_time_t *now, isc_boolean_t grow) {
+badcache_resize(dns_badcache_t *bc, isc_time_t *now, bool grow) {
        dns_bcentry_t **newtable, *bad, *next;
        unsigned int newsize, i;
 
@@ -156,7 +157,7 @@ badcache_resize(dns_badcache_t *bc, isc_time_t *now, isc_boolean_t grow) {
 
 void
 dns_badcache_add(dns_badcache_t *bc, dns_name_t *name,
-                dns_rdatatype_t type, isc_boolean_t update,
+                dns_rdatatype_t type, bool update,
                 uint32_t flags, isc_time_t *expire)
 {
        isc_result_t result;
@@ -174,7 +175,7 @@ dns_badcache_add(dns_badcache_t *bc, dns_name_t *name,
        if (result != ISC_R_SUCCESS)
                isc_time_settoepoch(&now);
 
-       hashval = dns_name_hash(name, ISC_FALSE);
+       hashval = dns_name_hash(name, false);
        i = hashval % bc->size;
        prev = NULL;
        for (bad = bc->table[i]; bad != NULL; bad = next) {
@@ -214,9 +215,9 @@ dns_badcache_add(dns_badcache_t *bc, dns_name_t *name,
                bc->table[i] = bad;
                bc->count++;
                if (bc->count > bc->size * 8)
-                       badcache_resize(bc, &now, ISC_TRUE);
+                       badcache_resize(bc, &now, true);
                if (bc->count < bc->size * 2 && bc->size > bc->minsize)
-                       badcache_resize(bc, &now, ISC_FALSE);
+                       badcache_resize(bc, &now, false);
        } else
                bad->expire = *expire;
 
@@ -224,13 +225,13 @@ dns_badcache_add(dns_badcache_t *bc, dns_name_t *name,
        UNLOCK(&bc->lock);
 }
 
-isc_boolean_t
+bool
 dns_badcache_find(dns_badcache_t *bc, dns_name_t *name,
                  dns_rdatatype_t type, uint32_t *flagp,
                  isc_time_t *now)
 {
        dns_bcentry_t *bad, *prev, *next;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
        unsigned int i;
 
        REQUIRE(VALID_BADCACHE(bc));
@@ -254,7 +255,7 @@ dns_badcache_find(dns_badcache_t *bc, dns_name_t *name,
        if (bc->count == 0)
                goto skip;
 
-       i = dns_name_hash(name, ISC_FALSE) % bc->size;
+       i = dns_name_hash(name, false) % bc->size;
        prev = NULL;
        for (bad = bc->table[i]; bad != NULL; bad = next) {
                next = bad->next;
@@ -275,7 +276,7 @@ dns_badcache_find(dns_badcache_t *bc, dns_name_t *name,
                if (bad->type == type && dns_name_equal(name, &bad->name)) {
                        if (flagp != NULL)
                                *flagp = bad->flags;
-                       answer = ISC_TRUE;
+                       answer = true;
                        break;
                }
                prev = bad;
@@ -330,7 +331,7 @@ dns_badcache_flushname(dns_badcache_t *bc, dns_name_t *name) {
        result = isc_time_now(&now);
        if (result != ISC_R_SUCCESS)
                isc_time_settoepoch(&now);
-       i = dns_name_hash(name, ISC_FALSE) % bc->size;
+       i = dns_name_hash(name, false) % bc->size;
        prev = NULL;
        for (bad = bc->table[i]; bad != NULL; bad = next) {
                int n;
index 0cea92d1f537154eaeac5396453fa05cf3f87f65..9eece308a1a1e1300aaac995b0f65645b0ee277e 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/netaddr.h>
 #include <isc/print.h>
@@ -42,7 +44,7 @@ static char hex_digits[] = {
 };
 
 isc_result_t
-dns_byaddr_createptrname(isc_netaddr_t *address, isc_boolean_t nibble,
+dns_byaddr_createptrname(isc_netaddr_t *address, bool nibble,
                         dns_name_t *name)
 {
        /*
@@ -117,7 +119,7 @@ struct dns_byaddr {
        dns_lookup_t *          lookup;
        isc_task_t *            task;
        dns_byaddrevent_t *     event;
-       isc_boolean_t           canceled;
+       bool            canceled;
 };
 
 #define BYADDR_MAGIC                   ISC_MAGIC('B', 'y', 'A', 'd')
@@ -256,7 +258,7 @@ dns_byaddr_create(isc_mem_t *mctx, isc_netaddr_t *address, dns_view_t *view,
        if (result != ISC_R_SUCCESS)
                goto cleanup_lock;
 
-       byaddr->canceled = ISC_FALSE;
+       byaddr->canceled = false;
        byaddr->magic = BYADDR_MAGIC;
 
        *byaddrp = byaddr;
@@ -286,7 +288,7 @@ dns_byaddr_cancel(dns_byaddr_t *byaddr) {
        LOCK(&byaddr->lock);
 
        if (!byaddr->canceled) {
-               byaddr->canceled = ISC_TRUE;
+               byaddr->canceled = true;
                if (byaddr->lookup != NULL)
                        dns_lookup_cancel(byaddr->lookup);
        }
index 92420cd69eb8936e489d3beacab01c0daf10957a..4701ff8574b1f57f57d9a4ff608b8cb59b8f6119 100644 (file)
@@ -111,8 +111,8 @@ struct cache_cleaner {
        unsigned int    increment;      /*% Number of names to
                                           clean in one increment */
        cleaner_state_t state;          /*% Idle/Busy. */
-       isc_boolean_t   overmem;        /*% The cache is in an overmem state. */
-       isc_boolean_t    replaceiterator;
+       bool    overmem;        /*% The cache is in an overmem state. */
+       bool     replaceiterator;
 };
 
 /*%
@@ -432,7 +432,7 @@ dns_cache_attach(dns_cache_t *cache, dns_cache_t **targetp) {
 void
 dns_cache_detach(dns_cache_t **cachep) {
        dns_cache_t *cache;
-       isc_boolean_t free_cache = ISC_FALSE;
+       bool free_cache = false;
 
        REQUIRE(cachep != NULL);
        cache = *cachep;
@@ -442,8 +442,8 @@ dns_cache_detach(dns_cache_t **cachep) {
        REQUIRE(cache->references > 0);
        cache->references--;
        if (cache->references == 0) {
-               cache->cleaner.overmem = ISC_FALSE;
-               free_cache = ISC_TRUE;
+               cache->cleaner.overmem = false;
+               free_cache = true;
        }
 
        *cachep = NULL;
@@ -465,7 +465,7 @@ dns_cache_detach(dns_cache_t **cachep) {
                 */
                if (cache->live_tasks > 0) {
                        isc_task_shutdown(cache->cleaner.task);
-                       free_cache = ISC_FALSE;
+                       free_cache = false;
                }
        }
 
@@ -559,13 +559,13 @@ dns_cache_setcleaninginterval(dns_cache_t *cache, unsigned int t) {
        if (t == 0) {
                result = isc_timer_reset(cache->cleaner.cleaning_timer,
                                         isc_timertype_inactive,
-                                        NULL, NULL, ISC_TRUE);
+                                        NULL, NULL, true);
        } else {
                isc_interval_set(&interval, cache->cleaner.cleaning_interval,
                                 0);
                result = isc_timer_reset(cache->cleaner.cleaning_timer,
                                         isc_timertype_ticker,
-                                        NULL, &interval, ISC_FALSE);
+                                        NULL, &interval, false);
        }
        if (result != ISC_R_SUCCESS)
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
@@ -616,8 +616,8 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
        cleaner->state = cleaner_s_idle;
        cleaner->cache = cache;
        cleaner->iterator = NULL;
-       cleaner->overmem = ISC_FALSE;
-       cleaner->replaceiterator = ISC_FALSE;
+       cleaner->overmem = false;
+       cleaner->replaceiterator = false;
 
        cleaner->task = NULL;
        cleaner->cleaning_timer = NULL;
@@ -625,7 +625,7 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
        cleaner->overmem_event = NULL;
        cleaner->cleaning_interval = 0; /* Initially turned off. */
 
-       result = dns_db_createiterator(cleaner->cache->db, ISC_FALSE,
+       result = dns_db_createiterator(cleaner->cache->db, false,
                                       &cleaner->iterator);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
@@ -714,7 +714,7 @@ begin_cleaning(cache_cleaner_t *cleaner) {
         * position it at the beginning of the cache.
         */
        if (cleaner->iterator == NULL)
-               result = dns_db_createiterator(cleaner->cache->db, ISC_FALSE,
+               result = dns_db_createiterator(cleaner->cache->db, false,
                                               &cleaner->iterator);
        if (result != ISC_R_SUCCESS)
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
@@ -722,7 +722,7 @@ begin_cleaning(cache_cleaner_t *cleaner) {
                              "cache cleaner could not create "
                              "iterator: %s", isc_result_totext(result));
        else {
-               dns_dbiterator_setcleanmode(cleaner->iterator, ISC_TRUE);
+               dns_dbiterator_setcleanmode(cleaner->iterator, true);
                result = dns_dbiterator_first(cleaner->iterator);
        }
        if (result != ISC_R_SUCCESS) {
@@ -809,7 +809,7 @@ cleaning_timer_action(isc_task_t *task, isc_event_t *event) {
 static void
 overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
        cache_cleaner_t *cleaner = event->ev_arg;
-       isc_boolean_t want_cleaning = ISC_FALSE;
+       bool want_cleaning = false;
 
        UNUSED(task);
 
@@ -826,7 +826,7 @@ overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
 
        if (cleaner->overmem) {
                if (cleaner->state == cleaner_s_idle)
-                       want_cleaning = ISC_TRUE;
+                       want_cleaning = true;
        } else {
                if (cleaner->state == cleaner_s_busy)
                        /*
@@ -871,9 +871,9 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
                if (cleaner->replaceiterator) {
                        dns_dbiterator_destroy(&cleaner->iterator);
                        (void) dns_db_createiterator(cleaner->cache->db,
-                                                    ISC_FALSE,
+                                                    false,
                                                     &cleaner->iterator);
-                       cleaner->replaceiterator = ISC_FALSE;
+                       cleaner->replaceiterator = false;
                }
                UNLOCK(&cleaner->lock);
                UNLOCK(&cleaner->cache->lock);
@@ -1020,7 +1020,7 @@ dns_cache_clean(dns_cache_t *cache, isc_stdtime_t now) {
 static void
 water(void *arg, int mark) {
        dns_cache_t *cache = arg;
-       isc_boolean_t overmem = ISC_TF(mark == ISC_MEM_HIWATER);
+       bool overmem = (mark == ISC_MEM_HIWATER);
 
        REQUIRE(VALID_CACHE(cache));
 
@@ -1098,7 +1098,7 @@ dns_cache_getcachesize(dns_cache_t *cache) {
 static void
 cleaner_shutdown_action(isc_task_t *task, isc_event_t *event) {
        dns_cache_t *cache = event->ev_arg;
-       isc_boolean_t should_free = ISC_FALSE;
+       bool should_free = false;
 
        UNUSED(task);
 
@@ -1116,7 +1116,7 @@ cleaner_shutdown_action(isc_task_t *task, isc_event_t *event) {
        INSIST(cache->live_tasks == 0);
 
        if (cache->references == 0)
-               should_free = ISC_TRUE;
+               should_free = true;
 
        /*
         * By detaching the timer in the context of its task,
@@ -1145,7 +1145,7 @@ dns_cache_flush(dns_cache_t *cache) {
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       result = dns_db_createiterator(db, ISC_FALSE, &dbiterator);
+       result = dns_db_createiterator(db, false, &dbiterator);
        if (result != ISC_R_SUCCESS) {
                dns_db_detach(&db);
                return (result);
@@ -1160,7 +1160,7 @@ dns_cache_flush(dns_cache_t *cache) {
        } else {
                if (cache->cleaner.state == cleaner_s_busy)
                        cache->cleaner.state = cleaner_s_done;
-               cache->cleaner.replaceiterator = ISC_TRUE;
+               cache->cleaner.replaceiterator = true;
        }
        olddb = cache->db;
        cache->db = db;
@@ -1220,7 +1220,7 @@ cleartree(dns_db_t *db, dns_name_t *name) {
         * Create the node if it doesn't exist so dns_dbiterator_seek()
         * can find it.  We will continue even if this fails.
         */
-       (void)dns_db_findnode(db, name, ISC_TRUE, &top);
+       (void)dns_db_findnode(db, name, true, &top);
 
        nodename = dns_fixedname_initname(&fnodename);
 
@@ -1273,12 +1273,12 @@ cleartree(dns_db_t *db, dns_name_t *name) {
 
 isc_result_t
 dns_cache_flushname(dns_cache_t *cache, dns_name_t *name) {
-       return (dns_cache_flushnode(cache, name, ISC_FALSE));
+       return (dns_cache_flushnode(cache, name, false));
 }
 
 isc_result_t
 dns_cache_flushnode(dns_cache_t *cache, dns_name_t *name,
-                   isc_boolean_t tree)
+                   bool tree)
 {
        isc_result_t result;
        dns_dbnode_t *node = NULL;
@@ -1297,7 +1297,7 @@ dns_cache_flushnode(dns_cache_t *cache, dns_name_t *name,
        if (tree) {
                result = cleartree(cache->db, name);
        } else {
-               result = dns_db_findnode(cache->db, name, ISC_FALSE, &node);
+               result = dns_db_findnode(cache->db, name, false, &node);
                if (result == ISC_R_NOTFOUND) {
                        result = ISC_R_SUCCESS;
                        goto cleanup_db;
index 0448e3139901f92e0044aa184f966ca3031babe7..b750d66e1fd24318093bfa3eb5404a9006cece44 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/hex.h>
 #include <isc/mem.h>
@@ -57,7 +58,7 @@ struct dns_catz_zone {
        dns_catz_options_t      defoptions;
        dns_catz_options_t      zoneoptions;
        isc_time_t              lastupdated;
-       isc_boolean_t           updatepending;
+       bool            updatepending;
        uint32_t                version;
 
        dns_db_t                *db;
@@ -66,8 +67,8 @@ struct dns_catz_zone {
        isc_timer_t             *updatetimer;
        isc_event_t             updateevent;
 
-       isc_boolean_t           active;
-       isc_boolean_t           db_registered;
+       bool            active;
+       bool            db_registered;
 
        isc_refcount_t          refs;
 };
@@ -104,7 +105,7 @@ dns_catz_options_init(dns_catz_options_t *options) {
        options->allow_query = NULL;
        options->allow_transfer = NULL;
 
-       options->in_memory = ISC_FALSE;
+       options->in_memory = false;
        options->min_update_interval = 5;
        options->zonedir = NULL;
 }
@@ -259,53 +260,53 @@ dns_catz_entry_detach(dns_catz_zone_t *zone, dns_catz_entry_t **entryp) {
        }
 }
 
-isc_boolean_t
+bool
 dns_catz_entry_validate(const dns_catz_entry_t *entry) {
        UNUSED(entry);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dns_catz_entry_cmp(const dns_catz_entry_t *ea, const dns_catz_entry_t *eb) {
        isc_region_t ra, rb;
 
        if (ea == eb)
-               return (ISC_TRUE);
+               return (true);
 
        if (ea->opts.masters.count != eb->opts.masters.count)
-               return (ISC_FALSE);
+               return (false);
 
        if (memcmp(ea->opts.masters.addrs, eb->opts.masters.addrs,
                   ea->opts.masters.count * sizeof(isc_sockaddr_t)))
-               return (ISC_FALSE);
+               return (false);
 
        /* If one is NULL and the other isn't, the entries don't match */
        if ((ea->opts.allow_query == NULL) != (eb->opts.allow_query == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        /* If one is non-NULL, then they both are */
        if (ea->opts.allow_query != NULL) {
                isc_buffer_usedregion(ea->opts.allow_query, &ra);
                isc_buffer_usedregion(eb->opts.allow_query, &rb);
                if (isc_region_compare(&ra, &rb))
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        /* Repeat the above checks with allow_transfer */
        if ((ea->opts.allow_transfer == NULL) !=
            (eb->opts.allow_transfer == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        if (ea->opts.allow_transfer != NULL) {
                isc_buffer_usedregion(ea->opts.allow_transfer, &ra);
                isc_buffer_usedregion(eb->opts.allow_transfer, &rb);
                if (isc_region_compare(&ra, &rb))
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        /* xxxwpk TODO compare dscps/keys! */
-       return (ISC_TRUE);
+       return (true);
 }
 
 dns_name_t *
@@ -336,7 +337,7 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
        isc_ht_iter_t *iter1 = NULL, *iter2 = NULL;
        isc_ht_iter_t *iteradd = NULL, *itermod = NULL;
        isc_ht_t *toadd = NULL, *tomod = NULL;
-       isc_boolean_t delcur = ISC_FALSE;
+       bool delcur = false;
        char czname[DNS_NAME_FORMATSIZE];
        char zname[DNS_NAME_FORMATSIZE];
        dns_catz_zoneop_fn_t addzone, modzone, delzone;
@@ -401,7 +402,7 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
                dns_catz_entry_t *oentry;
                unsigned char * key;
                size_t keysize;
-               delcur = ISC_FALSE;
+               delcur = false;
 
                isc_ht_iter_current(iter1, (void **) &nentry);
                isc_ht_iter_currentkey(iter1, &key, &keysize);
@@ -413,7 +414,7 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
                 */
                if (dns_name_countlabels(&nentry->name) == 0) {
                        dns_catz_entry_detach(newzone, &nentry);
-                       delcur = ISC_TRUE;
+                       delcur = true;
                        continue;
                }
 
@@ -443,7 +444,7 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
                        continue;
                }
 
-               if (dns_catz_entry_cmp(oentry, nentry) != ISC_TRUE) {
+               if (dns_catz_entry_cmp(oentry, nentry) != true) {
                        result = isc_ht_add(tomod, key, (uint32_t)keysize,
                                            nentry);
                        if (result != ISC_R_SUCCESS)
@@ -643,14 +644,14 @@ dns_catz_new_zone(dns_catz_zones_t *catzs, dns_catz_zone_t **zonep,
                goto cleanup_ht;
 
        isc_time_settoepoch(&new_zone->lastupdated);
-       new_zone->updatepending = ISC_FALSE;
+       new_zone->updatepending = false;
        new_zone->db = NULL;
        new_zone->dbversion = NULL;
        new_zone->catzs = catzs;
        dns_catz_options_init(&new_zone->defoptions);
        dns_catz_options_init(&new_zone->zoneoptions);
-       new_zone->active = ISC_TRUE;
-       new_zone->db_registered = ISC_FALSE;
+       new_zone->active = true;
+       new_zone->db_registered = false;
        new_zone->version = (uint32_t)(-1);
        isc_refcount_init(&new_zone->refs, 1);
 
@@ -702,7 +703,7 @@ dns_catz_add_zone(dns_catz_zones_t *catzs, const dns_name_t *name,
                tresult = isc_ht_find(catzs->zones, name->ndata,
                                     name->length, (void **) &new_zone);
                INSIST(tresult == ISC_R_SUCCESS && !new_zone->active);
-               new_zone->active = ISC_TRUE;
+               new_zone->active = true;
        }
 
        *zonep = new_zone;
@@ -778,7 +779,7 @@ dns_catz_zone_detach(dns_catz_zone_t **zonep) {
                mctx = zone->catzs->mctx;
                isc_timer_detach(&zone->updatetimer);
                isc_refcount_destroy(&zone->refs);
-               if (zone->db_registered == ISC_TRUE) {
+               if (zone->db_registered == true) {
                        result = dns_db_updatenotify_unregister(zone->db,
                                                    dns_catz_dbupdate_callback,
                                                    zone->catzs);
@@ -786,7 +787,7 @@ dns_catz_zone_detach(dns_catz_zone_t **zonep) {
                }
                if (zone->dbversion)
                        dns_db_closeversion(zone->db, &zone->dbversion,
-                                           ISC_FALSE);
+                                           false);
                if (zone->db != NULL)
                        dns_db_detach(&zone->db);
 
@@ -847,14 +848,14 @@ typedef enum {
        CATZ_OPT_VERSION,
 } catz_opt_t;
 
-static isc_boolean_t
+static bool
 catz_opt_cmp(const dns_label_t *option, const char *opt) {
        unsigned int l = strlen(opt);
        if (option->length - 1 == l &&
            memcmp(opt, option->base + 1, l - 1) == 0)
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static catz_opt_t
@@ -1247,7 +1248,7 @@ catz_process_apl(dns_catz_zone_t *zone, isc_buffer_t **aclbp,
        if (result != ISC_R_SUCCESS)
                return (result);
        result = isc_buffer_allocate(zone->catzs->mctx, &aclb, 16);
-       isc_buffer_setautorealloc(aclb, ISC_TRUE);
+       isc_buffer_setautorealloc(aclb, true);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
        for (result = dns_rdata_apl_first(&rdata_apl);
@@ -1461,12 +1462,12 @@ dns_catz_generate_masterfilename(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
 
        isc_buffer_putstr(tbuf, zone->catzs->view->name);
        isc_buffer_putstr(tbuf, "_");
-       result = dns_name_totext(&zone->name, ISC_TRUE, tbuf);
+       result = dns_name_totext(&zone->name, true, tbuf);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
        isc_buffer_putstr(tbuf, "_");
-       result = dns_name_totext(&entry->name, ISC_TRUE, tbuf);
+       result = dns_name_totext(&entry->name, true, tbuf);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -1539,9 +1540,9 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
                goto cleanup;
        }
 
-       isc_buffer_setautorealloc(buffer, ISC_TRUE);
+       isc_buffer_setautorealloc(buffer, true);
        isc_buffer_putstr(buffer, "zone ");
-       dns_name_totext(&entry->name, ISC_TRUE, buffer);
+       dns_name_totext(&entry->name, true, buffer);
        isc_buffer_putstr(buffer, " { type slave; masters");
 
        /*
@@ -1591,14 +1592,14 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
                if (entry->opts.masters.keys[i] != NULL) {
                        isc_buffer_putstr(buffer, " key ");
                        result = dns_name_totext(entry->opts.masters.keys[i],
-                                                ISC_TRUE, buffer);
+                                                true, buffer);
                        if (result != ISC_R_SUCCESS)
                                goto cleanup;
                }
                isc_buffer_putstr(buffer, "; ");
        }
        isc_buffer_putstr(buffer, "}; ");
-       if (entry->opts.in_memory == ISC_FALSE) {
+       if (entry->opts.in_memory == false) {
                isc_buffer_putstr(buffer, "file \"");
                result = dns_catz_generate_masterfilename(zone, entry, &buffer);
                if (result != ISC_R_SUCCESS)
@@ -1640,10 +1641,10 @@ dns_catz_update_taskaction(isc_task_t *task, isc_event_t *event) {
        REQUIRE(zone != NULL);
 
        LOCK(&zone->catzs->lock);
-       zone->updatepending = ISC_FALSE;
+       zone->updatepending = false;
        dns_catz_update_from_db(zone->db, zone->catzs);
        result = isc_timer_reset(zone->updatetimer, isc_timertype_inactive,
-                                NULL, NULL, ISC_TRUE);
+                                NULL, NULL, true);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
        isc_event_free(&event);
        result = isc_time_now(&zone->lastupdated);
@@ -1675,19 +1676,19 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
        if (zone->db != NULL && zone->db != db) {
                if (zone->dbversion != NULL)
                        dns_db_closeversion(zone->db, &zone->dbversion,
-                                                   ISC_FALSE);
+                                                   false);
                dns_db_detach(&zone->db);
                /*
                 * We're not registering db update callback, it will be
                 * registered at the end of update_from_db
                 */
-               zone->db_registered = ISC_FALSE;
+               zone->db_registered = false;
        }
        if (zone->db == NULL)
                dns_db_attach(db, &zone->db);
 
-       if (zone->updatepending == ISC_FALSE) {
-               zone->updatepending = ISC_TRUE;
+       if (zone->updatepending == false) {
+               zone->updatepending = true;
                isc_time_now(&now);
                tdiff = isc_time_microdiff(&now, &zone->lastupdated)/1000000;
                if (tdiff < zone->defoptions.min_update_interval) {
@@ -1702,7 +1703,7 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
                        dns_db_currentversion(db, &zone->dbversion);
                        result = isc_timer_reset(zone->updatetimer,
                                                 isc_timertype_once,
-                                                NULL, &interval, ISC_TRUE);
+                                                NULL, &interval, true);
                        if (result != ISC_R_SUCCESS)
                                goto cleanup;
                } else {
@@ -1723,7 +1724,7 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
                              "catz: update already queued");
                if (zone->dbversion != NULL)
                        dns_db_closeversion(zone->db, &zone->dbversion,
-                                           ISC_FALSE);
+                                           false);
                dns_db_currentversion(zone->db, &zone->dbversion);
        }
 
@@ -1766,7 +1767,7 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
        }
 
        isc_buffer_init(&ibname, bname, DNS_NAME_FORMATSIZE);
-       result = dns_name_totext(&db->origin, ISC_TRUE, &ibname);
+       result = dns_name_totext(&db->origin, true, &ibname);
        INSIST(result == ISC_R_SUCCESS);
 
        result = dns_db_getsoaserial(db, oldzone->dbversion, &vers);
@@ -1786,7 +1787,7 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
 
        result = dns_catz_new_zone(catzs, &newzone, &db->origin);
        if (result != ISC_R_SUCCESS) {
-               dns_db_closeversion(db, &oldzone->dbversion, ISC_FALSE);
+               dns_db_closeversion(db, &oldzone->dbversion, false);
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
                              DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                              "catz: failed to create new zone - %s",
@@ -1797,7 +1798,7 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
        result = dns_db_createiterator(db, DNS_DB_NONSEC3, &it);
        if (result != ISC_R_SUCCESS) {
                dns_catz_zone_detach(&newzone);
-               dns_db_closeversion(db, &oldzone->dbversion, ISC_FALSE);
+               dns_db_closeversion(db, &oldzone->dbversion, false);
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
                              DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                              "catz: failed to create DB iterator - %s",
@@ -1879,7 +1880,7 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
        }
 
        dns_dbiterator_destroy(&it);
-       dns_db_closeversion(db, &oldzone->dbversion, ISC_FALSE);
+       dns_db_closeversion(db, &oldzone->dbversion, false);
        isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
                      DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3),
                      "catz: update_from_db: iteration finished");
@@ -1909,12 +1910,12 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
         * update callback in zone_startload or axfr_makedb, but we will
         * call onupdate() artificially so we can register the callback here.
         */
-       if (oldzone->db_registered == ISC_FALSE) {
+       if (oldzone->db_registered == false) {
                result = dns_db_updatenotify_register(db,
                                                    dns_catz_dbupdate_callback,
                                                    oldzone->catzs);
                if (result == ISC_R_SUCCESS)
-                       oldzone->db_registered = ISC_TRUE;
+                       oldzone->db_registered = true;
        }
 }
 
@@ -1933,7 +1934,7 @@ dns_catz_prereconfig(dns_catz_zones_t *catzs) {
             result = isc_ht_iter_next(iter))
        {
                isc_ht_iter_current(iter, (void **) &zone);
-               zone->active = ISC_FALSE;
+               zone->active = false;
        }
        INSIST(result == ISC_R_NOMORE);
        isc_ht_iter_destroy(&iter);
@@ -1953,7 +1954,7 @@ dns_catz_postreconfig(dns_catz_zones_t *catzs) {
             result == ISC_R_SUCCESS;)
        {
                isc_ht_iter_current(iter, (void **) &zone);
-               if (zone->active == ISC_FALSE) {
+               if (zone->active == false) {
                        char cname[DNS_NAME_FORMATSIZE];
                        dns_name_format(&zone->name, cname,
                                        DNS_NAME_FORMATSIZE);
index b0dfa57dbe5d26bf241f55a6337b8ca4378c3bb1..a6d0e2130b250cbe3852404af46e4dad534809f7 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stddef.h>
 
 #include <isc/app.h>
@@ -123,10 +124,10 @@ typedef struct resctx {
        unsigned int            magic;
        isc_mutex_t             lock;
        dns_client_t            *client;
-       isc_boolean_t           want_dnssec;
-       isc_boolean_t           want_validation;
-       isc_boolean_t           want_cdflag;
-       isc_boolean_t           want_tcp;
+       bool            want_dnssec;
+       bool            want_validation;
+       bool            want_cdflag;
+       bool            want_tcp;
 
        /* Locked */
        ISC_LINK(struct resctx) link;
@@ -139,7 +140,7 @@ typedef struct resctx {
        dns_namelist_t          namelist;
        isc_result_t            result;
        dns_clientresevent_t    *event;
-       isc_boolean_t           canceled;
+       bool            canceled;
        dns_rdataset_t          *rdataset;
        dns_rdataset_t          *sigrdataset;
 } resctx_t;
@@ -158,7 +159,7 @@ typedef struct resarg {
        isc_result_t            vresult;
        dns_namelist_t          *namelist;
        dns_clientrestrans_t    *trans;
-       isc_boolean_t           canceled;
+       bool            canceled;
 } resarg_t;
 
 /*%
@@ -173,7 +174,7 @@ typedef struct reqctx {
 
        /* Locked */
        ISC_LINK(struct reqctx) link;
-       isc_boolean_t           canceled;
+       bool            canceled;
        dns_tsigkey_t           *tsigkey;
        dns_request_t           *request;
        dns_clientreqevent_t    *event;
@@ -191,7 +192,7 @@ typedef struct reqarg {
        /* Locked */
        isc_result_t            result;
        dns_clientreqtrans_t    *trans;
-       isc_boolean_t           canceled;
+       bool            canceled;
 } reqarg_t;
 
 /*%
@@ -206,7 +207,7 @@ typedef struct updatearg {
        /* Locked */
        isc_result_t            result;
        dns_clientupdatetrans_t *trans;
-       isc_boolean_t           canceled;
+       bool            canceled;
 } updatearg_t;
 
 /*%
@@ -217,14 +218,14 @@ typedef struct updatectx {
        unsigned int                    magic;
        isc_mutex_t                     lock;
        dns_client_t                    *client;
-       isc_boolean_t                   want_tcp;
+       bool                    want_tcp;
 
        /* Locked */
        dns_request_t                   *updatereq;
        dns_request_t                   *soareq;
        dns_clientrestrans_t            *restrans;
        dns_clientrestrans_t            *restrans2;
-       isc_boolean_t                   canceled;
+       bool                    canceled;
 
        /* Task Locked */
        ISC_LINK(struct updatectx)      link;
@@ -254,7 +255,7 @@ static isc_result_t send_update(updatectx_t *uctx);
 static isc_result_t
 getudpdispatch(int family, dns_dispatchmgr_t *dispatchmgr,
               isc_socketmgr_t *socketmgr, isc_taskmgr_t *taskmgr,
-              isc_boolean_t is_shared, dns_dispatch_t **dispp,
+              bool is_shared, dns_dispatch_t **dispp,
               isc_sockaddr_t *localaddr)
 {
        unsigned int attrs, attrmask;
@@ -489,7 +490,7 @@ dns_client_createx2(isc_mem_t *mctx, isc_appctx_t *actx,
        client->dispatchv4 = NULL;
        if (localaddr4 != NULL || localaddr6 == NULL) {
                result = getudpdispatch(AF_INET, dispatchmgr, socketmgr,
-                                       taskmgr, ISC_TRUE,
+                                       taskmgr, true,
                                        &dispatchv4, localaddr4);
                if (result == ISC_R_SUCCESS)
                        client->dispatchv4 = dispatchv4;
@@ -498,7 +499,7 @@ dns_client_createx2(isc_mem_t *mctx, isc_appctx_t *actx,
        client->dispatchv6 = NULL;
        if (localaddr6 != NULL || localaddr4 == NULL) {
                result = getudpdispatch(AF_INET6, dispatchmgr, socketmgr,
-                                       taskmgr, ISC_TRUE,
+                                       taskmgr, true,
                                        &dispatchv6, localaddr6);
                if (result == ISC_R_SUCCESS)
                        client->dispatchv6 = dispatchv6;
@@ -599,7 +600,7 @@ destroyclient(dns_client_t **clientp) {
 void
 dns_client_destroy(dns_client_t **clientp) {
        dns_client_t *client;
-       isc_boolean_t destroyok = ISC_FALSE;
+       bool destroyok = false;
 
        REQUIRE(clientp != NULL);
        client = *clientp;
@@ -610,7 +611,7 @@ dns_client_destroy(dns_client_t **clientp) {
        if (client->references == 0 && ISC_LIST_EMPTY(client->resctxs) &&
            ISC_LIST_EMPTY(client->reqctxs) &&
            ISC_LIST_EMPTY(client->updatectxs)) {
-               destroyok = ISC_TRUE;
+               destroyok = true;
        }
        UNLOCK(&client->lock);
 
@@ -808,7 +809,7 @@ view_find(resctx_t *rctx, dns_db_t **dbp, dns_dbnode_t **nodep,
        else
                type = rctx->type;
 
-       result = dns_view_find(rctx->view, name, type, 0, 0, ISC_FALSE,
+       result = dns_view_find(rctx->view, name, type, 0, 0, false,
                               dbp, nodep, foundname, rctx->rdataset,
                               rctx->sigrdataset);
 
@@ -820,8 +821,8 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
        isc_mem_t *mctx;
        isc_result_t tresult, result = ISC_R_SUCCESS;
        isc_result_t vresult = ISC_R_SUCCESS;
-       isc_boolean_t want_restart;
-       isc_boolean_t send_event = ISC_FALSE;
+       bool want_restart;
+       bool send_event = false;
        dns_name_t *name, *prefix;
        dns_fixedname_t foundname, fixed;
        dns_rdataset_t *trdataset;
@@ -847,7 +848,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                dns_dbnode_t *node = NULL;
 
                rctx->restarts++;
-               want_restart = ISC_FALSE;
+               want_restart = false;
 
                if (event == NULL && !rctx->canceled) {
                        fname = dns_fixedname_initname(&foundname);
@@ -872,7 +873,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                                        if (rctx->sigrdataset != NULL)
                                                putrdataset(mctx,
                                                            &rctx->sigrdataset);
-                                       send_event = ISC_TRUE;
+                                       send_event = true;
                                }
                                goto done;
                        }
@@ -918,7 +919,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
 
                switch (result) {
                case ISC_R_SUCCESS:
-                       send_event = ISC_TRUE;
+                       send_event = true;
                        /*
                         * This case is handled in the main line below.
                         */
@@ -953,7 +954,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                        tresult = dns_name_copy(&cname.cname, name, NULL);
                        dns_rdata_freestruct(&cname);
                        if (tresult == ISC_R_SUCCESS)
-                               want_restart = ISC_TRUE;
+                               want_restart = true;
                        else
                                result = tresult;
                        goto done;
@@ -999,7 +1000,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                                                      name, NULL);
                        dns_rdata_freestruct(&dname);
                        if (tresult == ISC_R_SUCCESS)
-                               want_restart = ISC_TRUE;
+                               want_restart = true;
                        else
                                result = tresult;
                        goto done;
@@ -1012,14 +1013,14 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                        /* What about sigrdataset? */
                        if (rctx->sigrdataset != NULL)
                                putrdataset(mctx, &rctx->sigrdataset);
-                       send_event = ISC_TRUE;
+                       send_event = true;
                        goto done;
                default:
                        if (rctx->rdataset != NULL)
                                putrdataset(mctx, &rctx->rdataset);
                        if (rctx->sigrdataset != NULL)
                                putrdataset(mctx, &rctx->sigrdataset);
-                       send_event = ISC_TRUE;
+                       send_event = true;
                        goto done;
                }
 
@@ -1126,9 +1127,9 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                 * Limit the number of restarts.
                 */
                if (want_restart && rctx->restarts == MAX_RESTARTS) {
-                       want_restart = ISC_FALSE;
+                       want_restart = false;
                        result = ISC_R_QUOTA;
-                       send_event = ISC_TRUE;
+                       send_event = true;
                }
 
                /*
@@ -1147,8 +1148,8 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                        }
 
                        if (result != ISC_R_SUCCESS) {
-                               want_restart = ISC_FALSE;
-                               send_event = ISC_TRUE;
+                               want_restart = false;
+                               send_event = true;
                        }
                }
        } while (want_restart);
@@ -1264,7 +1265,7 @@ dns_client_resolve(dns_client_t *client, dns_name_t *name,
        resarg->result = DNS_R_SERVFAIL;
        resarg->namelist = namelist;
        resarg->trans = NULL;
-       resarg->canceled = ISC_FALSE;
+       resarg->canceled = false;
        result = dns_client_startresolve(client, name, rdclass, type, options,
                                         client->task, resolve_done, resarg,
                                         &resarg->trans);
@@ -1296,7 +1297,7 @@ dns_client_resolve(dns_client_t *client, dns_name_t *name,
                 * Unusual termination (perhaps due to signal).  We need some
                 * tricky cleanup process.
                 */
-               resarg->canceled = ISC_TRUE;
+               resarg->canceled = true;
                dns_client_cancelresolve(resarg->trans);
 
                UNLOCK(&resarg->lock);
@@ -1326,7 +1327,7 @@ dns_client_startresolve(dns_client_t *client, dns_name_t *name,
        isc_mem_t *mctx;
        isc_result_t result;
        dns_rdataset_t *rdataset, *sigrdataset;
-       isc_boolean_t want_dnssec, want_validation, want_cdflag, want_tcp;
+       bool want_dnssec, want_validation, want_cdflag, want_tcp;
 
        REQUIRE(DNS_CLIENT_VALID(client));
        REQUIRE(transp != NULL && *transp == NULL);
@@ -1341,10 +1342,10 @@ dns_client_startresolve(dns_client_t *client, dns_name_t *name,
        mctx = client->mctx;
        rdataset = NULL;
        sigrdataset = NULL;
-       want_dnssec = ISC_TF((options & DNS_CLIENTRESOPT_NODNSSEC) == 0);
-       want_validation = ISC_TF((options & DNS_CLIENTRESOPT_NOVALIDATE) == 0);
-       want_cdflag = ISC_TF((options & DNS_CLIENTRESOPT_NOCDFLAG) == 0);
-       want_tcp = ISC_TF((options & DNS_CLIENTRESOPT_TCP) != 0);
+       want_dnssec = !(options & DNS_CLIENTRESOPT_NODNSSEC);
+       want_validation = !(options & DNS_CLIENTRESOPT_NOVALIDATE);
+       want_cdflag = !(options & DNS_CLIENTRESOPT_NOCDFLAG);
+       want_tcp = (options & DNS_CLIENTRESOPT_TCP);
 
        /*
         * Prepare some intermediate resources
@@ -1393,7 +1394,7 @@ dns_client_startresolve(dns_client_t *client, dns_name_t *name,
 
        rctx->client = client;
        ISC_LINK_INIT(rctx, link);
-       rctx->canceled = ISC_FALSE;
+       rctx->canceled = false;
        rctx->task = client->task;
        rctx->type = type;
        rctx->view = view;
@@ -1445,7 +1446,7 @@ dns_client_cancelresolve(dns_clientrestrans_t *trans) {
        LOCK(&rctx->lock);
 
        if (!rctx->canceled) {
-               rctx->canceled = ISC_TRUE;
+               rctx->canceled = true;
                if (rctx->fetch != NULL)
                        dns_resolver_cancelfetch(rctx->fetch);
        }
@@ -1477,7 +1478,7 @@ dns_client_destroyrestrans(dns_clientrestrans_t **transp) {
        resctx_t *rctx;
        isc_mem_t *mctx;
        dns_client_t *client;
-       isc_boolean_t need_destroyclient = ISC_FALSE;
+       bool need_destroyclient = false;
 
        REQUIRE(transp != NULL);
        rctx = (resctx_t *)*transp;
@@ -1505,7 +1506,7 @@ dns_client_destroyrestrans(dns_clientrestrans_t **transp) {
        if (client->references == 0 && ISC_LIST_EMPTY(client->resctxs) &&
            ISC_LIST_EMPTY(client->reqctxs) &&
            ISC_LIST_EMPTY(client->updatectxs))
-               need_destroyclient = ISC_TRUE;
+               need_destroyclient = true;
 
        UNLOCK(&client->lock);
 
@@ -1549,7 +1550,7 @@ dns_client_addtrustedkey(dns_client_t *client, dns_rdataclass_t rdclass,
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
-       result = dns_keytable_add(secroots, ISC_FALSE, &dstkey);
+       result = dns_keytable_add(secroots, false, &dstkey);
 
  cleanup:
        if (dstkey != NULL)
@@ -1673,7 +1674,7 @@ dns_client_request(dns_client_t *client, dns_message_t *qmessage,
        reqarg->actx = actx;
        reqarg->client = client;
        reqarg->trans = NULL;
-       reqarg->canceled = ISC_FALSE;
+       reqarg->canceled = false;
 
        result = dns_client_startrequest(client, qmessage, rmessage, server,
                                         options, parseoptions, tsec, timeout,
@@ -1700,7 +1701,7 @@ dns_client_request(dns_client_t *client, dns_message_t *qmessage,
                 * Unusual termination (perhaps due to signal).  We need some
                 * tricky cleanup process.
                 */
-               reqarg->canceled = ISC_TRUE;
+               reqarg->canceled = true;
                dns_client_cancelresolve(reqarg->trans);
 
                UNLOCK(&reqarg->lock);
@@ -1782,7 +1783,7 @@ dns_client_startrequest(dns_client_t *client, dns_message_t *qmessage,
        ctx->client = client;
        ISC_LINK_INIT(ctx, link);
        ctx->parseoptions = parseoptions;
-       ctx->canceled = ISC_FALSE;
+       ctx->canceled = false;
        ctx->event = event;
        ctx->event->rmessage = rmessage;
        ctx->tsigkey = NULL;
@@ -1834,7 +1835,7 @@ dns_client_cancelrequest(dns_clientreqtrans_t *trans) {
        LOCK(&ctx->lock);
 
        if (!ctx->canceled) {
-               ctx->canceled = ISC_TRUE;
+               ctx->canceled = true;
                if (ctx->request != NULL)
                        dns_request_cancel(ctx->request);
        }
@@ -1847,7 +1848,7 @@ dns_client_destroyreqtrans(dns_clientreqtrans_t **transp) {
        reqctx_t *ctx;
        isc_mem_t *mctx;
        dns_client_t *client;
-       isc_boolean_t need_destroyclient = ISC_FALSE;
+       bool need_destroyclient = false;
 
        REQUIRE(transp != NULL);
        ctx = (reqctx_t *)*transp;
@@ -1868,7 +1869,7 @@ dns_client_destroyreqtrans(dns_clientreqtrans_t **transp) {
        if (client->references == 0 && ISC_LIST_EMPTY(client->resctxs) &&
            ISC_LIST_EMPTY(client->reqctxs) &&
            ISC_LIST_EMPTY(client->updatectxs)) {
-               need_destroyclient = ISC_TRUE;
+               need_destroyclient = true;
        }
 
        UNLOCK(&client->lock);
@@ -2089,7 +2090,7 @@ resolveaddr_done(isc_task_t *task, isc_event_t *event) {
        dns_name_t *name;
        dns_rdataset_t *rdataset;
        updatectx_t *uctx;
-       isc_boolean_t completed = ISC_FALSE;
+       bool completed = false;
 
        UNUSED(task);
 
@@ -2182,7 +2183,7 @@ resolveaddr_done(isc_task_t *task, isc_event_t *event) {
 
        LOCK(&uctx->lock);
        if (uctx->restrans == NULL && uctx->restrans2 == NULL)
-               completed = ISC_TRUE;
+               completed = true;
        UNLOCK(&uctx->lock);
 
        if (completed) {
@@ -2279,8 +2280,8 @@ receive_soa(isc_task_t *task, isc_event_t *event) {
        dns_name_t *name;
        dns_message_t *soaquery = NULL;
        isc_sockaddr_t *addr;
-       isc_boolean_t seencname = ISC_FALSE;
-       isc_boolean_t droplabel = ISC_FALSE;
+       bool seencname = false;
+       bool droplabel = false;
        dns_name_t tname;
        unsigned int nlabels, reqoptions;
 
@@ -2354,7 +2355,7 @@ receive_soa(isc_task_t *task, isc_event_t *event) {
        else if (pass == 1)
                section = DNS_SECTION_AUTHORITY;
        else {
-               droplabel = ISC_TRUE;
+               droplabel = true;
                goto out;
        }
 
@@ -2380,7 +2381,7 @@ receive_soa(isc_task_t *task, isc_event_t *event) {
                                                 &tset) == ISC_R_SUCCESS
                            )
                        {
-                               seencname = ISC_TRUE;
+                               seencname = true;
                                break;
                        }
                }
@@ -2394,7 +2395,7 @@ receive_soa(isc_task_t *task, isc_event_t *event) {
        }
 
        if (seencname) {
-               droplabel = ISC_TRUE;
+               droplabel = true;
                goto out;
        }
 
@@ -2729,7 +2730,7 @@ dns_client_update(dns_client_t *client, dns_rdataclass_t rdclass,
        uarg->client = client;
        uarg->result = ISC_R_FAILURE;
        uarg->trans = NULL;
-       uarg->canceled = ISC_FALSE;
+       uarg->canceled = false;
 
        result = dns_client_startupdate(client, rdclass, zonename,
                                        prerequisites, updates, servers,
@@ -2757,7 +2758,7 @@ dns_client_update(dns_client_t *client, dns_rdataclass_t rdclass,
                 * Unusual termination (perhaps due to signal).  We need some
                 * tricky cleanup process.
                 */
-               uarg->canceled = ISC_TRUE;
+               uarg->canceled = true;
                dns_client_cancelupdate(uarg->trans);
 
                UNLOCK(&uarg->lock);
@@ -2831,7 +2832,7 @@ dns_client_startupdate(dns_client_t *client, dns_rdataclass_t rdclass,
        dns_section_t section = DNS_SECTION_UPDATE;
        isc_sockaddr_t *server, *sa = NULL;
        dns_tsectype_t tsectype = dns_tsectype_none;
-       isc_boolean_t want_tcp;
+       bool want_tcp;
 
        UNUSED(options);
 
@@ -2853,7 +2854,7 @@ dns_client_startupdate(dns_client_t *client, dns_rdataclass_t rdclass,
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       want_tcp = ISC_TF((options & DNS_CLIENTUPDOPT_TCP) != 0);
+       want_tcp = (options & DNS_CLIENTUPDOPT_TCP);
 
        /*
         * Create a context and prepare some resources.
@@ -2879,7 +2880,7 @@ dns_client_startupdate(dns_client_t *client, dns_rdataclass_t rdclass,
        uctx->state = dns_clientupdatestate_prepare;
        uctx->view = view;
        uctx->rdclass = rdclass;
-       uctx->canceled = ISC_FALSE;
+       uctx->canceled = false;
        uctx->updatemsg = NULL;
        uctx->soaquery = NULL;
        uctx->updatereq = NULL;
@@ -3027,7 +3028,7 @@ dns_client_cancelupdate(dns_clientupdatetrans_t *trans) {
        LOCK(&uctx->lock);
 
        if (!uctx->canceled) {
-               uctx->canceled = ISC_TRUE;
+               uctx->canceled = true;
                if (uctx->updatereq != NULL)
                        dns_request_cancel(uctx->updatereq);
                if (uctx->soareq != NULL)
@@ -3046,7 +3047,7 @@ dns_client_destroyupdatetrans(dns_clientupdatetrans_t **transp) {
        updatectx_t *uctx;
        isc_mem_t *mctx;
        dns_client_t *client;
-       isc_boolean_t need_destroyclient = ISC_FALSE;
+       bool need_destroyclient = false;
        isc_sockaddr_t *sa;
 
        REQUIRE(transp != NULL);
@@ -3074,7 +3075,7 @@ dns_client_destroyupdatetrans(dns_clientupdatetrans_t **transp) {
        if (client->references == 0 && ISC_LIST_EMPTY(client->resctxs) &&
            ISC_LIST_EMPTY(client->reqctxs) &&
            ISC_LIST_EMPTY(client->updatectxs))
-               need_destroyclient = ISC_TRUE;
+               need_destroyclient = true;
 
        UNLOCK(&client->lock);
 
index 86992db479263c58840c30bcdef550f02cf55a8a..605e97f9a8e184599faa64ecdeeb8f7f4840d47c 100644 (file)
@@ -15,6 +15,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/string.h>
 #include <isc/util.h>
@@ -105,7 +107,7 @@ dns_compress_disable(dns_compress_t *cctx) {
 }
 
 void
-dns_compress_setsensitive(dns_compress_t *cctx, isc_boolean_t sensitive) {
+dns_compress_setsensitive(dns_compress_t *cctx, bool sensitive) {
        REQUIRE(VALID_CCTX(cctx));
 
        if (sensitive)
@@ -114,11 +116,11 @@ dns_compress_setsensitive(dns_compress_t *cctx, isc_boolean_t sensitive) {
                cctx->allowed &= ~DNS_COMPRESS_CASESENSITIVE;
 }
 
-isc_boolean_t
+bool
 dns_compress_getsensitive(dns_compress_t *cctx) {
        REQUIRE(VALID_CCTX(cctx));
 
-       return (ISC_TF((cctx->allowed & DNS_COMPRESS_CASESENSITIVE) != 0));
+       return (cctx->allowed & DNS_COMPRESS_CASESENSITIVE);
 }
 
 int
@@ -137,10 +139,10 @@ do { \
 
 /*
  * Find the longest match of name in the table.
- * If match is found return ISC_TRUE. prefix, suffix and offset are updated.
- * If no match is found return ISC_FALSE.
+ * If match is found return true. prefix, suffix and offset are updated.
+ * If no match is found return false.
  */
-isc_boolean_t
+bool
 dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
                        dns_name_t *prefix, uint16_t *offset)
 {
@@ -149,16 +151,16 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
        unsigned int labels, hash, n;
 
        REQUIRE(VALID_CCTX(cctx));
-       REQUIRE(dns_name_isabsolute(name) == ISC_TRUE);
+       REQUIRE(dns_name_isabsolute(name) == true);
        REQUIRE(offset != NULL);
 
        if ((cctx->allowed & DNS_COMPRESS_ENABLED) == 0)
-               return (ISC_FALSE);
+               return (false);
 
        TABLE_READY;
 
        if (cctx->count == 0)
-               return (ISC_FALSE);
+               return (false);
 
        labels = dns_name_countlabels(name);
        INSIST(labels > 0);
@@ -168,7 +170,7 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
 
        for (n = 0; n < labels - 1; n++) {
                dns_name_getlabelsequence(name, n, labels - n, &tname);
-               hash = dns_name_hash(&tname, ISC_FALSE) %
+               hash = dns_name_hash(&tname, false) %
                       DNS_COMPRESS_TABLESIZE;
                for (node = cctx->table[hash]; node != NULL; node = node->next)
                {
@@ -189,7 +191,7 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
         * If node == NULL, we found no match at all.
         */
        if (node == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (n == 0)
                dns_name_reset(prefix);
@@ -197,7 +199,7 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
                dns_name_getlabelsequence(name, 0, n, prefix);
 
        *offset = (node->offset & 0x7fff);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline unsigned int
@@ -257,7 +259,7 @@ dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
 
        while (count > 0) {
                dns_name_getlabelsequence(&xname, start, n, &tname);
-               hash = dns_name_hash(&tname, ISC_FALSE) %
+               hash = dns_name_hash(&tname, false) %
                       DNS_COMPRESS_TABLESIZE;
                tlength = name_length(&tname);
                toffset = (uint16_t)(offset + (length - tlength));
index 9b95fc87661ffef702c78ec8b190d9d6553fe3ba..ee3e00d53c84d177b4961c5a948a99498da0e795 100644 (file)
@@ -18,6 +18,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/mem.h>
@@ -180,7 +181,7 @@ dns_db_ondestroy(dns_db_t *db, isc_task_t *task, isc_event_t **eventp)
 }
 
 
-isc_boolean_t
+bool
 dns_db_iscache(dns_db_t *db) {
 
        /*
@@ -190,12 +191,12 @@ dns_db_iscache(dns_db_t *db) {
        REQUIRE(DNS_DB_VALID(db));
 
        if ((db->attributes & DNS_DBATTR_CACHE) != 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_db_iszone(dns_db_t *db) {
 
        /*
@@ -205,12 +206,12 @@ dns_db_iszone(dns_db_t *db) {
        REQUIRE(DNS_DB_VALID(db));
 
        if ((db->attributes & (DNS_DBATTR_CACHE|DNS_DBATTR_STUB)) == 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_db_isstub(dns_db_t *db) {
 
        /*
@@ -220,12 +221,12 @@ dns_db_isstub(dns_db_t *db) {
        REQUIRE(DNS_DB_VALID(db));
 
        if ((db->attributes & DNS_DBATTR_STUB) != 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_db_isdnssec(dns_db_t *db) {
 
        /*
@@ -240,7 +241,7 @@ dns_db_isdnssec(dns_db_t *db) {
        return ((db->methods->issecure)(db));
 }
 
-isc_boolean_t
+bool
 dns_db_issecure(dns_db_t *db) {
 
        /*
@@ -253,7 +254,7 @@ dns_db_issecure(dns_db_t *db) {
        return ((db->methods->issecure)(db));
 }
 
-isc_boolean_t
+bool
 dns_db_ispersistent(dns_db_t *db) {
 
        /*
@@ -445,7 +446,7 @@ dns_db_attachversion(dns_db_t *db, dns_dbversion_t *source,
 
 void
 dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
-                   isc_boolean_t commit)
+                   bool commit)
 {
        dns_dbonupdatelistener_t *listener;
 
@@ -459,7 +460,7 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
 
        (db->methods->closeversion)(db, versionp, commit);
 
-       if (commit == ISC_TRUE) {
+       if (commit == true) {
                for (listener = ISC_LIST_HEAD(db->update_listeners);
                     listener != NULL;
                     listener = ISC_LIST_NEXT(listener, link))
@@ -475,7 +476,7 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
 
 isc_result_t
 dns_db_findnode(dns_db_t *db, dns_name_t *name,
-               isc_boolean_t create, dns_dbnode_t **nodep)
+               bool create, dns_dbnode_t **nodep)
 {
 
        /*
@@ -494,7 +495,7 @@ dns_db_findnode(dns_db_t *db, dns_name_t *name,
 
 isc_result_t
 dns_db_findnodeext(dns_db_t *db, dns_name_t *name,
-                  isc_boolean_t create, dns_clientinfomethods_t *methods,
+                  bool create, dns_clientinfomethods_t *methods,
                   dns_clientinfo_t *clientinfo, dns_dbnode_t **nodep)
 {
        /*
@@ -514,7 +515,7 @@ dns_db_findnodeext(dns_db_t *db, dns_name_t *name,
 
 isc_result_t
 dns_db_findnsec3node(dns_db_t *db, dns_name_t *name,
-                    isc_boolean_t create, dns_dbnode_t **nodep)
+                    bool create, dns_dbnode_t **nodep)
 {
 
        /*
@@ -827,7 +828,7 @@ dns_db_deleterdataset(dns_db_t *db, dns_dbnode_t *node,
 }
 
 void
-dns_db_overmem(dns_db_t *db, isc_boolean_t overmem) {
+dns_db_overmem(dns_db_t *db, bool overmem) {
 
        REQUIRE(DNS_DB_VALID(db));
 
@@ -845,7 +846,7 @@ dns_db_getsoaserial(dns_db_t *db, dns_dbversion_t *ver, uint32_t *serialp)
 
        REQUIRE(dns_db_iszone(db) || dns_db_isstub(db));
 
-       result = dns_db_findnode(db, dns_db_origin(db), ISC_FALSE, &node);
+       result = dns_db_findnode(db, dns_db_origin(db), false, &node);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -962,7 +963,7 @@ dns_db_unregister(dns_dbimplementation_t **dbimp) {
 isc_result_t
 dns_db_getoriginnode(dns_db_t *db, dns_dbnode_t **nodep) {
        REQUIRE(DNS_DB_VALID(db));
-       REQUIRE(dns_db_iszone(db) == ISC_TRUE);
+       REQUIRE(dns_db_iszone(db) == true);
        REQUIRE(nodep != NULL && *nodep == NULL);
 
        if (db->methods->getoriginnode != NULL)
@@ -998,7 +999,7 @@ dns_db_getnsec3parameters(dns_db_t *db, dns_dbversion_t *version,
                          unsigned char *salt, size_t *salt_length)
 {
        REQUIRE(DNS_DB_VALID(db));
-       REQUIRE(dns_db_iszone(db) == ISC_TRUE);
+       REQUIRE(dns_db_iszone(db) == true);
 
        if (db->methods->getnsec3parameters != NULL)
                return ((db->methods->getnsec3parameters)(db, version, hash,
@@ -1013,7 +1014,7 @@ dns_db_getsize(dns_db_t *db, dns_dbversion_t *version, uint64_t *records,
               uint64_t *bytes)
 {
        REQUIRE(DNS_DB_VALID(db));
-       REQUIRE(dns_db_iszone(db) == ISC_TRUE);
+       REQUIRE(dns_db_iszone(db) == true);
 
        if (db->methods->getsize != NULL)
                return ((db->methods->getsize)(db, version, records, bytes));
index 445bb18dea672ae47821f55a2e72fc1121bf85f5..548f6115d92d17d45c390736cda31e4927da86a2 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/util.h>
 
 #include <dns/dbiterator.h>
@@ -129,7 +131,7 @@ dns_dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
 }
 
 void
-dns_dbiterator_setcleanmode(dns_dbiterator_t *iterator, isc_boolean_t mode) {
+dns_dbiterator_setcleanmode(dns_dbiterator_t *iterator, bool mode) {
        REQUIRE(DNS_DBITERATOR_VALID(iterator));
 
        iterator->cleaning = mode;
index 1b8ffa13d4f0b02806a92390b0351b10810819ba..3cc7cb69b5f7723c5f1c7a1dc6e801ea5e1c2f6a 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/rwlock.h>
 #include <isc/util.h>
@@ -137,7 +139,7 @@ dns_dbtable_attach(dns_dbtable_t *source, dns_dbtable_t **targetp) {
 void
 dns_dbtable_detach(dns_dbtable_t **dbtablep) {
        dns_dbtable_t *dbtable;
-       isc_boolean_t free_dbtable = ISC_FALSE;
+       bool free_dbtable = false;
 
        REQUIRE(dbtablep != NULL);
        dbtable = *dbtablep;
@@ -148,7 +150,7 @@ dns_dbtable_detach(dns_dbtable_t **dbtablep) {
        INSIST(dbtable->references > 0);
        dbtable->references--;
        if (dbtable->references == 0)
-               free_dbtable = ISC_TRUE;
+               free_dbtable = true;
 
        UNLOCK(&dbtable->lock);
 
@@ -202,7 +204,7 @@ dns_dbtable_remove(dns_dbtable_t *dbtable, dns_db_t *db) {
        if (result == ISC_R_SUCCESS) {
                INSIST(stored_data == db);
 
-               (void)dns_rbt_deletename(dbtable->rbt, name, ISC_FALSE);
+               (void)dns_rbt_deletename(dbtable->rbt, name, false);
        }
 
        RWUNLOCK(&dbtable->tree_lock, isc_rwlocktype_write);
index 4eb40541420b0ba34e009444402ece6ffe183909..d846f04c6b512981fbbe8c6ef07418894f4381ce 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -248,7 +249,7 @@ setownercase(dns_rdataset_t *rdataset, dns_name_t *name) {
 
 static isc_result_t
 diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
-          isc_boolean_t warn)
+          bool warn)
 {
        dns_difftuple_t *t;
        dns_dbnode_t *node = NULL;
@@ -311,10 +312,10 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
                        node = NULL;
                        if (type != dns_rdatatype_nsec3 &&
                            covers != dns_rdatatype_nsec3)
-                               CHECK(dns_db_findnode(db, name, ISC_TRUE,
+                               CHECK(dns_db_findnode(db, name, true,
                                                      &node));
                        else
-                               CHECK(dns_db_findnsec3node(db, name, ISC_TRUE,
+                               CHECK(dns_db_findnsec3node(db, name, true,
                                                           &node));
 
                        while (t != NULL &&
@@ -453,12 +454,12 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
 
 isc_result_t
 dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver) {
-       return (diff_apply(diff, db, ver, ISC_TRUE));
+       return (diff_apply(diff, db, ver, true));
 }
 
 isc_result_t
 dns_diff_applysilently(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver) {
-       return (diff_apply(diff, db, ver, ISC_FALSE));
+       return (diff_apply(diff, db, ver, false));
 }
 
 /* XXX this duplicates lots of code in diff_apply(). */
@@ -626,7 +627,7 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
  again:
                isc_buffer_init(&buf, mem, size);
                result = dns_rdataset_totext(&rds, &t->name,
-                                            ISC_FALSE, ISC_FALSE, &buf);
+                                            false, false, &buf);
 
                if (result == ISC_R_NOSPACE) {
                        isc_mem_put(diff->mctx, mem, size);
index 9c694ec04d7fecd5c8878bad0997dd79009fb16c..d1e4c16371980e6750448f4339774093136a881e 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <stdlib.h>
 #include <sys/types.h>
@@ -133,7 +134,7 @@ struct dns_dispentry {
        isc_task_t                     *task;
        isc_taskaction_t                action;
        void                           *arg;
-       isc_boolean_t                   item_out;
+       bool                    item_out;
        dispsocket_t                    *dispsocket;
        ISC_LIST(dns_dispatchevent_t)   items;
        ISC_LINK(dns_dispentry_t)       link;
@@ -282,7 +283,7 @@ struct dns_dispatch {
  */
 static dns_dispentry_t *entry_search(dns_qid_t *, isc_sockaddr_t *,
                                     dns_messageid_t, in_port_t, unsigned int);
-static isc_boolean_t destroy_disp_ok(dns_dispatch_t *);
+static bool destroy_disp_ok(dns_dispatch_t *);
 static void destroy_disp(isc_task_t *task, isc_event_t *event);
 static void destroy_dispsocket(dns_dispatch_t *, dispsocket_t **);
 static void deactivate_dispsocket(dns_dispatch_t *, dispsocket_t *);
@@ -316,16 +317,16 @@ static isc_result_t dispatch_createudp(dns_dispatchmgr_t *mgr,
                                       unsigned int attributes,
                                       dns_dispatch_t **dispp,
                                       isc_socket_t *dup_socket);
-static isc_boolean_t destroy_mgr_ok(dns_dispatchmgr_t *mgr);
+static bool destroy_mgr_ok(dns_dispatchmgr_t *mgr);
 static void destroy_mgr(dns_dispatchmgr_t **mgrp);
 static isc_result_t qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
                                 unsigned int increment, dns_qid_t **qidp,
-                                isc_boolean_t needaddrtable);
+                                bool needaddrtable);
 static void qid_destroy(isc_mem_t *mctx, dns_qid_t **qidp);
 static isc_result_t open_socket(isc_socketmgr_t *mgr, isc_sockaddr_t *local,
                                unsigned int options, isc_socket_t **sockp,
                                isc_socket_t *dup_socket);
-static isc_boolean_t portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
+static bool portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
                                   isc_sockaddr_t *sockaddrp);
 
 #define LVL(x) ISC_LOG_DEBUG(x)
@@ -427,7 +428,7 @@ dns_hash(dns_qid_t *qid, isc_sockaddr_t *dest, dns_messageid_t id,
 {
        uint32_t ret;
 
-       ret = isc_sockaddr_hash(dest, ISC_TRUE);
+       ret = isc_sockaddr_hash(dest, true);
        ret ^= ((uint32_t)id << 16) | port;
        ret %= qid->qid_nbuckets;
 
@@ -484,22 +485,22 @@ linear_next(dns_qid_t *qid, dns_dispentry_t *resp) {
 /*
  * The dispatch must be locked.
  */
-static isc_boolean_t
+static bool
 destroy_disp_ok(dns_dispatch_t *disp)
 {
        if (disp->refcount != 0)
-               return (ISC_FALSE);
+               return (false);
 
        if (disp->recv_pending != 0)
-               return (ISC_FALSE);
+               return (false);
 
        if (!ISC_LIST_EMPTY(disp->activesockets))
-               return (ISC_FALSE);
+               return (false);
 
        if (disp->shutting_down == 0)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*
@@ -512,7 +513,7 @@ static void
 destroy_disp(isc_task_t *task, isc_event_t *event) {
        dns_dispatch_t *disp;
        dns_dispatchmgr_t *mgr;
-       isc_boolean_t killmgr;
+       bool killmgr;
        dispsocket_t *dispsocket;
        int i;
 
@@ -1043,14 +1044,14 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
        dns_dispentry_t *resp = NULL;
        dns_dispatchevent_t *rev;
        unsigned int bucket;
-       isc_boolean_t killit;
-       isc_boolean_t queue_response;
+       bool killit;
+       bool queue_response;
        dns_dispatchmgr_t *mgr;
        dns_qid_t *qid;
        isc_netaddr_t netaddr;
        int match;
        int result;
-       isc_boolean_t qidlocked = ISC_FALSE;
+       bool qidlocked = false;
 
        LOCK(&disp->lock);
 
@@ -1189,7 +1190,7 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
        if (resp == NULL) {
                bucket = dns_hash(qid, &ev->address, id, disp->localport);
                LOCK(&qid->lock);
-               qidlocked = ISC_TRUE;
+               qidlocked = true;
                resp = entry_search(qid, &ev->address, id, disp->localport,
                                    bucket);
                dispatch_log(disp, LVL(90),
@@ -1284,7 +1285,7 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
                            "[a] Sent event %p buffer %p len %d to task %p",
                            rev, rev->buffer.base, rev->buffer.length,
                            resp->task);
-               resp->item_out = ISC_TRUE;
+               resp->item_out = true;
                isc_task_send(resp->task, ISC_EVENT_PTR(&rev));
        }
  unlock:
@@ -1334,8 +1335,8 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
        dns_dispentry_t *resp;
        dns_dispatchevent_t *rev;
        unsigned int bucket;
-       isc_boolean_t killit;
-       isc_boolean_t queue_response;
+       bool killit;
+       bool queue_response;
        dns_qid_t *qid;
        int level;
        char buf[ISC_SOCKADDR_FORMATSIZE];
@@ -1476,7 +1477,7 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) {
                            "[b] Sent event %p buffer %p len %d to task %p",
                            rev, rev->buffer.base, rev->buffer.length,
                            resp->task);
-               resp->item_out = ISC_TRUE;
+               resp->item_out = true;
                isc_task_send(resp->task, ISC_EVENT_PTR(&rev));
        }
  unlock:
@@ -1595,7 +1596,7 @@ startrecv(dns_dispatch_t *disp, dispsocket_t *dispsock) {
 /*
  * Mgr must be locked when calling this function.
  */
-static isc_boolean_t
+static bool
 destroy_mgr_ok(dns_dispatchmgr_t *mgr) {
        mgr_log(mgr, LVL(90),
                "destroy_mgr_ok: shuttingdown=%d, listnonempty=%d, "
@@ -1605,17 +1606,17 @@ destroy_mgr_ok(dns_dispatchmgr_t *mgr) {
                isc_mempool_getallocated(mgr->rpool),
                isc_mempool_getallocated(mgr->dpool));
        if (!MGR_IS_SHUTTINGDOWN(mgr))
-               return (ISC_FALSE);
+               return (false);
        if (!ISC_LIST_EMPTY(mgr->list))
-               return (ISC_FALSE);
+               return (false);
        if (isc_mempool_getallocated(mgr->depool) != 0)
-               return (ISC_FALSE);
+               return (false);
        if (isc_mempool_getallocated(mgr->rpool) != 0)
-               return (ISC_FALSE);
+               return (false);
        if (isc_mempool_getallocated(mgr->dpool) != 0)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*
@@ -1710,7 +1711,7 @@ open_socket(isc_socketmgr_t *mgr, isc_sockaddr_t *local,
        isc_socket_setname(sock, "dispatcher", NULL);
 
 #ifndef ISC_ALLOW_MAPPED
-       isc_socket_ipv6only(sock, ISC_TRUE);
+       isc_socket_ipv6only(sock, true);
 #endif
        result = isc_socket_bind(sock, local, options);
        if (result != ISC_R_SUCCESS) {
@@ -2090,7 +2091,7 @@ dns_dispatchmgr_setudp(dns_dispatchmgr_t *mgr,
        isc_mempool_associatelock(mgr->spool, &mgr->spool_lock);
        isc_mempool_setfillcount(mgr->spool, 32);
 
-       result = qid_allocate(mgr, buckets, increment, &mgr->qid, ISC_TRUE);
+       result = qid_allocate(mgr, buckets, increment, &mgr->qid, true);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -2110,7 +2111,7 @@ dns_dispatchmgr_setudp(dns_dispatchmgr_t *mgr,
 void
 dns_dispatchmgr_destroy(dns_dispatchmgr_t **mgrp) {
        dns_dispatchmgr_t *mgr;
-       isc_boolean_t killit;
+       bool killit;
 
        REQUIRE(mgrp != NULL);
        REQUIRE(VALID_DISPATCHMGR(*mgrp));
@@ -2151,7 +2152,7 @@ port_cmp(const void *key, const void *ent) {
                return (1);
 }
 
-static isc_boolean_t
+static bool
 portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
              isc_sockaddr_t *sockaddrp)
 {
@@ -2159,7 +2160,7 @@ portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
        isc_result_t result;
        in_port_t *ports, port;
        unsigned int nports;
-       isc_boolean_t available = ISC_FALSE;
+       bool available = false;
 
        REQUIRE(sock != NULL || sockaddrp != NULL);
 
@@ -2183,7 +2184,7 @@ portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
 
        port = isc_sockaddr_getport(sockaddrp);
        if (bsearch(&port, ports, nports, sizeof(in_port_t), port_cmp) != NULL)
-               available = ISC_TRUE;
+               available = true;
 
 unlock:
        PORTBUFUNLOCK(mgr);
@@ -2192,7 +2193,7 @@ unlock:
 
 #define ATTRMATCH(_a1, _a2, _mask) (((_a1) & (_mask)) == ((_a2) & (_mask)))
 
-static isc_boolean_t
+static bool
 local_addr_match(dns_dispatch_t *disp, isc_sockaddr_t *addr) {
        isc_sockaddr_t sockaddr;
        isc_result_t result;
@@ -2200,7 +2201,7 @@ local_addr_match(dns_dispatch_t *disp, isc_sockaddr_t *addr) {
        REQUIRE(disp->socket != NULL);
 
        if (addr == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Don't match wildcard ports unless the port is available in the
@@ -2209,7 +2210,7 @@ local_addr_match(dns_dispatch_t *disp, isc_sockaddr_t *addr) {
        if (isc_sockaddr_getport(addr) == 0 &&
            isc_sockaddr_getport(&disp->local) == 0 &&
            !portavailable(disp->mgr, disp->socket, NULL)) {
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -2217,18 +2218,18 @@ local_addr_match(dns_dispatch_t *disp, isc_sockaddr_t *addr) {
         * Wildcard ports match/fail here.
         */
        if (isc_sockaddr_equal(&disp->local, addr))
-               return (ISC_TRUE);
+               return (true);
        if (isc_sockaddr_getport(addr) == 0)
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * Check if we match a bound wildcard port <address,port>.
         */
        if (!isc_sockaddr_eqaddr(&disp->local, addr))
-               return (ISC_FALSE);
+               return (false);
        result = isc_socket_getsockname(disp->socket, &sockaddr);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        return (isc_sockaddr_equal(&sockaddr, addr));
 }
@@ -2283,7 +2284,7 @@ dispatch_find(dns_dispatchmgr_t *mgr, isc_sockaddr_t *local,
 static isc_result_t
 qid_allocate(dns_dispatchmgr_t *mgr, unsigned int buckets,
             unsigned int increment, dns_qid_t **qidp,
-            isc_boolean_t needsocktable)
+            bool needsocktable)
 {
        dns_qid_t *qid;
        unsigned int i;
@@ -2545,7 +2546,7 @@ dns_dispatch_createtcp2(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
                return (result);
        }
 
-       result = qid_allocate(mgr, buckets, increment, &disp->qid, ISC_FALSE);
+       result = qid_allocate(mgr, buckets, increment, &disp->qid, false);
        if (result != ISC_R_SUCCESS)
                goto deallocate_dispatch;
 
@@ -2630,7 +2631,7 @@ dns_dispatch_gettcp(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
        isc_sockaddr_t peeraddr;
        isc_sockaddr_t sockname;
        unsigned int attributes, mask;
-       isc_boolean_t match = ISC_FALSE;
+       bool match = false;
 
        REQUIRE(VALID_DISPATCHMGR(mgr));
        REQUIRE(destaddr != NULL);
@@ -2660,7 +2661,7 @@ dns_dispatch_gettcp(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
                                /* attach */
                                disp->refcount++;
                                *dispp = disp;
-                               match = ISC_TRUE;
+                               match = true;
                        }
                }
                UNLOCK(&disp->lock);
@@ -2672,7 +2673,7 @@ dns_dispatch_gettcp(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
 
 isc_result_t
 dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
-                    isc_sockaddr_t *localaddr, isc_boolean_t *connected,
+                    isc_sockaddr_t *localaddr, bool *connected,
                     dns_dispatch_t **dispp)
 {
        dns_dispatch_t *disp;
@@ -2680,7 +2681,7 @@ dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
        isc_sockaddr_t peeraddr;
        isc_sockaddr_t sockname;
        unsigned int attributes, mask;
-       isc_boolean_t match = ISC_FALSE;
+       bool match = false;
 
        REQUIRE(VALID_DISPATCHMGR(mgr));
        REQUIRE(destaddr != NULL);
@@ -2712,8 +2713,8 @@ dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
                                /* attach */
                                disp->refcount++;
                                *dispp = disp;
-                               match = ISC_TRUE;
-                               *connected = ISC_TRUE;
+                               match = true;
+                               *connected = true;
                        }
                }
                UNLOCK(&disp->lock);
@@ -2738,7 +2739,7 @@ dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
                        /* attach */
                        disp->refcount++;
                        *dispp = disp;
-                       match = ISC_TRUE;
+                       match = true;
                }
                UNLOCK(&disp->lock);
                disp = ISC_LIST_NEXT(disp, link);
@@ -2866,12 +2867,12 @@ get_udpsocket(dns_dispatchmgr_t *mgr, dns_dispatch_t *disp,
        isc_sockaddr_t localaddr_bound;
        isc_socket_t *sock = NULL;
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t anyport;
+       bool anyport;
 
        INSIST(sockp != NULL && *sockp == NULL);
 
        localaddr_bound = *localaddr;
-       anyport = ISC_TF(isc_sockaddr_getport(localaddr) == 0);
+       anyport = (isc_sockaddr_getport(localaddr) == 0);
 
        if (anyport) {
                unsigned int nports;
@@ -3142,7 +3143,7 @@ void
 dns_dispatch_detach(dns_dispatch_t **dispp) {
        dns_dispatch_t *disp;
        dispsocket_t *dispsock;
-       isc_boolean_t killit;
+       bool killit;
 
        REQUIRE(dispp != NULL && VALID_DISPATCH(*dispp));
 
@@ -3196,7 +3197,7 @@ dns_dispatch_addresponse3(dns_dispatch_t *disp, unsigned int options,
        in_port_t localport = 0;
        dns_messageid_t id;
        int i;
-       isc_boolean_t ok;
+       bool ok;
        dns_qid_t *qid;
        dispsocket_t *dispsocket = NULL;
        isc_result_t result;
@@ -3244,7 +3245,7 @@ dns_dispatch_addresponse3(dns_dispatch_t *disp, unsigned int options,
                                               oldestresp->action,
                                               oldestresp->arg, oldestresp,
                                               NULL, NULL);
-                               oldestresp->item_out = ISC_TRUE;
+                               oldestresp->item_out = true;
                                isc_task_send(oldestresp->task,
                                              ISC_EVENT_PTR(&rev));
                                inc_stats(disp->mgr,
@@ -3286,12 +3287,12 @@ dns_dispatch_addresponse3(dns_dispatch_t *disp, unsigned int options,
                id = *idp;
        else
                id = (dns_messageid_t)isc_rng_random(DISP_RNGCTX(disp));
-       ok = ISC_FALSE;
+       ok = false;
        i = 0;
        do {
                bucket = dns_hash(qid, dest, id, localport);
                if (entry_search(qid, dest, id, localport, bucket) == NULL) {
-                       ok = ISC_TRUE;
+                       ok = true;
                        break;
                }
                if ((disp->attributes & DNS_DISPATCHATTR_FIXEDID) != 0)
@@ -3328,7 +3329,7 @@ dns_dispatch_addresponse3(dns_dispatch_t *disp, unsigned int options,
        res->dispsocket = dispsocket;
        if (dispsocket != NULL)
                dispsocket->resp = res;
-       res->item_out = ISC_FALSE;
+       res->item_out = false;
        ISC_LIST_INIT(res->items);
        ISC_LINK_INIT(res, link);
        res->magic = RESPONSE_MAGIC;
@@ -3421,8 +3422,8 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) {
        disp = resp->disp;
        REQUIRE(VALID_DISPATCH(disp));
 
-       REQUIRE(resp->item_out == ISC_TRUE);
-       resp->item_out = ISC_FALSE;
+       REQUIRE(resp->item_out == true);
+       resp->item_out = false;
 
        ev = *sockevent;
        *sockevent = NULL;
@@ -3445,7 +3446,7 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) {
                            "[c] Sent event %p buffer %p len %d to task %p",
                            ev, ev->buffer.base, ev->buffer.length,
                            resp->task);
-               resp->item_out = ISC_TRUE;
+               resp->item_out = true;
                isc_task_send(resp->task, ISC_EVENT_PTR(&ev));
        }
        UNLOCK(&disp->lock);
@@ -3462,7 +3463,7 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
        dispsocket_t *dispsock;
        dns_dispatchevent_t *ev;
        unsigned int bucket;
-       isc_boolean_t killit;
+       bool killit;
        unsigned int n;
        isc_eventlist_t events;
        dns_qid_t *qid;
@@ -3532,8 +3533,8 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
        }
 
        if (ev != NULL) {
-               REQUIRE(res->item_out == ISC_TRUE);
-               res->item_out = ISC_FALSE;
+               REQUIRE(res->item_out == true);
+               res->item_out = false;
                if (ev->buffer.base != NULL)
                        free_buffer(disp, ev->buffer.base, ev->buffer.length);
                free_devent(disp, ev);
@@ -3612,7 +3613,7 @@ do_cancel(dns_dispatch_t *disp) {
        request_log(disp, resp, LVL(10),
                    "cancel: failsafe event %p -> task %p",
                    ev, resp->task);
-       resp->item_out = ISC_TRUE;
+       resp->item_out = true;
        isc_task_send(resp->task, ISC_EVENT_PTR(&ev));
  unlock:
        UNLOCK(&qid->lock);
index ac153e450415a6512f23916df6626c2e7aed3854..6c93d9793a7d3737293464434cf4655462638979 100644 (file)
@@ -53,6 +53,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <dns/db.h>
 #include <dns/dlz.h>
 #include <dns/fixedname.h>
@@ -471,7 +473,7 @@ dns_dlz_writeablezone(dns_view_t *view, dns_dlzdb_t *dlzdb,
                goto cleanup;
        dns_zone_setview(zone, view);
 
-       dns_zone_setadded(zone, ISC_TRUE);
+       dns_zone_setadded(zone, true);
 
        if (dlzdb->ssutable == NULL) {
                result = dns_ssutable_createdlz(dlzdb->mctx,
@@ -521,13 +523,13 @@ dns_dlzconfigure(dns_view_t *view, dns_dlzdb_t *dlzdb,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_dlz_ssumatch(dns_dlzdb_t *dlzdatabase, dns_name_t *signer,
                 dns_name_t *name, isc_netaddr_t *tcpaddr,
                 dns_rdatatype_t type, const dst_key_t *key)
 {
        dns_dlzimplementation_t *impl;
-       isc_boolean_t r;
+       bool r;
 
        REQUIRE(dlzdatabase != NULL);
        REQUIRE(dlzdatabase->implementation != NULL);
@@ -538,7 +540,7 @@ dns_dlz_ssumatch(dns_dlzdb_t *dlzdatabase, dns_name_t *signer,
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
                              DNS_LOGMODULE_DLZ, ISC_LOG_INFO,
                              "No ssumatch method for DLZ database");
-               return (ISC_FALSE);
+               return (false);
        }
 
        r = impl->methods->ssumatch(signer, name, tcpaddr, type, key,
index 7fba5e5e06b634a41aae282f448ac0d8c3704c59..490445c720fd2133eabbc799970770b32f1947cf 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/list.h>
 #include <isc/mem.h>
 #include <isc/netaddr.h>
@@ -194,18 +196,18 @@ dns_dns64_unlink(dns_dns64list_t *list, dns_dns64_t *dns64) {
        ISC_LIST_UNLINK(*list, dns64, link);
 }
 
-isc_boolean_t
+bool
 dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
                 const dns_name_t *reqsigner, const dns_aclenv_t *env,
                 unsigned int flags, dns_rdataset_t *rdataset,
-                isc_boolean_t *aaaaok, size_t aaaaoklen)
+                bool *aaaaok, size_t aaaaoklen)
 {
        struct in6_addr in6;
        isc_netaddr_t netaddr;
        isc_result_t result;
        int match;
-       isc_boolean_t answer = ISC_FALSE;
-       isc_boolean_t found = ISC_FALSE;
+       bool answer = false;
+       bool found = false;
        unsigned int i, ok;
 
        REQUIRE(rdataset != NULL);
@@ -237,20 +239,20 @@ dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
 
                if (!found && aaaaok != NULL) {
                        for (i = 0; i < aaaaoklen; i++)
-                               aaaaok[i] = ISC_FALSE;
+                               aaaaok[i] = false;
                }
-               found = ISC_TRUE;
+               found = true;
 
                /*
                 * If we are not excluding any addresses then any AAAA
                 * will do.
                 */
                if (dns64->excluded == NULL) {
-                       answer = ISC_TRUE;
+                       answer = true;
                        if (aaaaok == NULL)
                                goto done;
                        for (i = 0; i < aaaaoklen; i++)
-                               aaaaok[i] = ISC_TRUE;
+                               aaaaok[i] = true;
                        goto done;
                }
 
@@ -269,10 +271,10 @@ dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
                                                       dns64->excluded,
                                                       env, &match, NULL);
                                if (result == ISC_R_SUCCESS && match <= 0) {
-                                       answer = ISC_TRUE;
+                                       answer = true;
                                        if (aaaaok == NULL)
                                                goto done;
-                                       aaaaok[i] = ISC_TRUE;
+                                       aaaaok[i] = true;
                                        ok++;
                                }
                        } else
@@ -289,7 +291,7 @@ dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
  done:
        if (!found && aaaaok != NULL) {
                for (i = 0; i < aaaaoklen; i++)
-                       aaaaok[i] = ISC_TRUE;
+                       aaaaok[i] = true;
        }
-       return (found ? answer : ISC_TRUE);
+       return (found ? answer : true);
 }
index 81af078cbe108ab785cd522d1dc9a719310f86d5..7d45e3abff09806b13a045002a140276100c47c9 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -156,7 +157,7 @@ dns_dnssec_keyfromrdata(dns_name_t *name, dns_rdata_t *rdata, isc_mem_t *mctx,
 }
 
 static isc_result_t
-digest_sig(dst_context_t *ctx, isc_boolean_t downcase, dns_rdata_t *sigrdata,
+digest_sig(dst_context_t *ctx, bool downcase, dns_rdata_t *sigrdata,
           dns_rdata_rrsig_t *rrsig)
 {
        isc_region_t r;
@@ -270,14 +271,14 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
                goto cleanup_databuf;
 
        ret = dst_context_create3(key, mctx,
-                                 DNS_LOGCATEGORY_DNSSEC, ISC_TRUE, &ctx);
+                                 DNS_LOGCATEGORY_DNSSEC, true, &ctx);
        if (ret != ISC_R_SUCCESS)
                goto cleanup_databuf;
 
        /*
         * Digest the SIG rdata.
         */
-       ret = digest_sig(ctx, ISC_FALSE, &tmpsigrdata, &sig);
+       ret = digest_sig(ctx, false, &tmpsigrdata, &sig);
        if (ret != ISC_R_SUCCESS)
                goto cleanup_context;
 
@@ -365,7 +366,7 @@ cleanup_signature:
 
 isc_result_t
 dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
-                  isc_boolean_t ignoretime, isc_mem_t *mctx,
+                  bool ignoretime, isc_mem_t *mctx,
                   dns_rdata_t *sigrdata, dns_name_t *wild)
 {
        return (dns_dnssec_verify3(name, set, key, ignoretime, 0, mctx,
@@ -374,7 +375,7 @@ dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
 
 isc_result_t
 dns_dnssec_verify3(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
-                  isc_boolean_t ignoretime, unsigned int maxbits,
+                  bool ignoretime, unsigned int maxbits,
                   isc_mem_t *mctx, dns_rdata_t *sigrdata, dns_name_t *wild)
 {
        dns_rdata_rrsig_t sig;
@@ -389,7 +390,7 @@ dns_dnssec_verify3(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
        dst_context_t *ctx = NULL;
        int labels = 0;
        uint32_t flags;
-       isc_boolean_t downcase = ISC_FALSE;
+       bool downcase = false;
 
        REQUIRE(name != NULL);
        REQUIRE(set != NULL);
@@ -466,7 +467,7 @@ dns_dnssec_verify3(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
 
  again:
        ret = dst_context_create4(key, mctx, DNS_LOGCATEGORY_DNSSEC,
-                                 ISC_FALSE, maxbits, &ctx);
+                                 false, maxbits, &ctx);
        if (ret != ISC_R_SUCCESS)
                goto cleanup_struct;
 
@@ -568,7 +569,7 @@ cleanup_array:
 cleanup_context:
        dst_context_destroy(&ctx);
        if (ret == DST_R_VERIFYFAILURE && !downcase) {
-               downcase = ISC_TRUE;
+               downcase = true;
                goto again;
        }
 cleanup_struct:
@@ -593,7 +594,7 @@ cleanup_struct:
 
 isc_result_t
 dns_dnssec_verify(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
-                 isc_boolean_t ignoretime, isc_mem_t *mctx,
+                 bool ignoretime, isc_mem_t *mctx,
                  dns_rdata_t *sigrdata)
 {
        isc_result_t result;
@@ -605,13 +606,13 @@ dns_dnssec_verify(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_dnssec_keyactive(dst_key_t *key, isc_stdtime_t now) {
        isc_result_t result;
        isc_stdtime_t publish, active, revoke, inactive, deltime;
-       isc_boolean_t pubset = ISC_FALSE, actset = ISC_FALSE;
-       isc_boolean_t revset = ISC_FALSE, inactset = ISC_FALSE;
-       isc_boolean_t delset = ISC_FALSE;
+       bool pubset = false, actset = false;
+       bool revset = false, inactset = false;
+       bool delset = false;
        int major, minor;
 
        /* Is this an old-style key? */
@@ -623,49 +624,49 @@ dns_dnssec_keyactive(dst_key_t *key, isc_stdtime_t now) {
         * keys are assumed active
         */
        if (major == 1 && minor <= 2)
-               return (ISC_TRUE);
+               return (true);
 
        result = dst_key_gettime(key, DST_TIME_PUBLISH, &publish);
        if (result == ISC_R_SUCCESS)
-               pubset = ISC_TRUE;
+               pubset = true;
 
        result = dst_key_gettime(key, DST_TIME_ACTIVATE, &active);
        if (result == ISC_R_SUCCESS)
-               actset = ISC_TRUE;
+               actset = true;
 
        result = dst_key_gettime(key, DST_TIME_REVOKE, &revoke);
        if (result == ISC_R_SUCCESS)
-               revset = ISC_TRUE;
+               revset = true;
 
        result = dst_key_gettime(key, DST_TIME_INACTIVE, &inactive);
        if (result == ISC_R_SUCCESS)
-               inactset = ISC_TRUE;
+               inactset = true;
 
        result = dst_key_gettime(key, DST_TIME_DELETE, &deltime);
        if (result == ISC_R_SUCCESS)
-               delset = ISC_TRUE;
+               delset = true;
 
        if ((inactset && inactive <= now) || (delset && deltime <= now))
-               return (ISC_FALSE);
+               return (false);
 
        if (revset && revoke <= now && pubset && publish <= now)
-               return (ISC_TRUE);
+               return (true);
 
        if (actset && active <= now)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%<
  * Indicate whether a key is scheduled to to have CDS/CDNSKEY records
  * published now.
  *
- * Returns ISC_TRUE iff.
+ * Returns true iff.
  *  - SyncPublish is set and in the past, AND
  *  - SyncDelete is unset or in the future
  */
-static isc_boolean_t
+static bool
 syncpublish(dst_key_t *key, isc_stdtime_t now) {
        isc_result_t result;
        isc_stdtime_t when;
@@ -681,27 +682,27 @@ syncpublish(dst_key_t *key, isc_stdtime_t now) {
         * Smart signing started with key format 1.3
         */
        if (major == 1 && minor <= 2)
-               return (ISC_FALSE);
+               return (false);
 
        result = dst_key_gettime(key, DST_TIME_SYNCPUBLISH, &when);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        result = dst_key_gettime(key, DST_TIME_SYNCDELETE, &when);
        if (result != ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
        if (when <= now)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 /*%<
  * Indicate whether a key is scheduled to to have CDS/CDNSKEY records
  * deleted now.
  *
- * Returns ISC_TRUE iff. SyncDelete is set and in the past.
+ * Returns true iff. SyncDelete is set and in the past.
  */
-static isc_boolean_t
+static bool
 syncdelete(dst_key_t *key, isc_stdtime_t now) {
        isc_result_t result;
        isc_stdtime_t when;
@@ -717,14 +718,14 @@ syncdelete(dst_key_t *key, isc_stdtime_t now) {
         * Smart signing started with key format 1.3.
         */
        if (major == 1 && minor <= 2)
-               return (ISC_FALSE);
+               return (false);
 
        result = dst_key_gettime(key, DST_TIME_SYNCDELETE, &when);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
        if (when <= now)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 #define is_zone_key(key) ((dst_key_flags(key) & DNS_KEYFLAG_OWNERMASK) \
@@ -792,7 +793,7 @@ dns_dnssec_findzonekeys3(dns_db_t *db, dns_dbversion_t *ver,
                                                          mctx, &keys[count]);
                                if (result == ISC_R_SUCCESS &&
                                    dst_key_pubcompare(pubkey, keys[count],
-                                                      ISC_FALSE)) {
+                                                      false)) {
                                        dst_key_setflags(keys[count], flags);
                                }
                                dst_key_setflags(pubkey, flags);
@@ -848,7 +849,7 @@ dns_dnssec_findzonekeys3(dns_db_t *db, dns_dbversion_t *ver,
                 * If a key is marked inactive, skip it
                 */
                if (!dns_dnssec_keyactive(keys[count], now)) {
-                       dst_key_setinactive(pubkey, ISC_TRUE);
+                       dst_key_setinactive(pubkey, true);
                        dst_key_free(&keys[count]);
                        keys[count] = pubkey;
                        pubkey = NULL;
@@ -936,7 +937,7 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
        dst_context_t *ctx = NULL;
        isc_mem_t *mctx;
        isc_result_t result;
-       isc_boolean_t signeedsfree = ISC_TRUE;
+       bool signeedsfree = true;
 
        REQUIRE(msg != NULL);
        REQUIRE(key != NULL);
@@ -973,7 +974,7 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
        isc_buffer_init(&databuf, data, sizeof(data));
 
        RETERR(dst_context_create3(key, mctx,
-                                  DNS_LOGCATEGORY_DNSSEC, ISC_TRUE, &ctx));
+                                  DNS_LOGCATEGORY_DNSSEC, true, &ctx));
 
        /*
         * Digest the fields of the SIG - we can cheat and use
@@ -1027,7 +1028,7 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
                                    &sig, dynbuf));
 
        isc_mem_put(mctx, sig.signature, sig.siglen);
-       signeedsfree = ISC_FALSE;
+       signeedsfree = false;
 
        dns_message_takebuffer(msg, &dynbuf);
 
@@ -1067,7 +1068,7 @@ dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
        isc_mem_t *mctx;
        isc_result_t result;
        uint16_t addcount, addcount_n;
-       isc_boolean_t signeedsfree = ISC_FALSE;
+       bool signeedsfree = false;
 
        REQUIRE(source != NULL);
        REQUIRE(msg != NULL);
@@ -1090,7 +1091,7 @@ dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
        dns_rdataset_current(msg->sig0, &rdata);
 
        RETERR(dns_rdata_tostruct(&rdata, &sig, NULL));
-       signeedsfree = ISC_TRUE;
+       signeedsfree = true;
 
        if (sig.labels != 0) {
                result = DNS_R_SIGINVALID;
@@ -1122,7 +1123,7 @@ dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
        }
 
        RETERR(dst_context_create3(key, mctx,
-                                  DNS_LOGCATEGORY_DNSSEC, ISC_FALSE, &ctx));
+                                  DNS_LOGCATEGORY_DNSSEC, false, &ctx));
 
        /*
         * Digest the SIG(0) record, except for the signature.
@@ -1192,10 +1193,10 @@ failure:
 /*%
  * Does this key ('rdata') self sign the rrset ('rdataset')?
  */
-isc_boolean_t
+bool
 dns_dnssec_selfsigns(dns_rdata_t *rdata, dns_name_t *name,
                     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
-                    isc_boolean_t ignoretime, isc_mem_t *mctx)
+                    bool ignoretime, isc_mem_t *mctx)
 {
        INSIST(rdataset->type == dns_rdatatype_key ||
               rdataset->type == dns_rdatatype_dnskey);
@@ -1212,10 +1213,10 @@ dns_dnssec_selfsigns(dns_rdata_t *rdata, dns_name_t *name,
 
 }
 
-isc_boolean_t
+bool
 dns_dnssec_signs(dns_rdata_t *rdata, dns_name_t *name,
                     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
-                    isc_boolean_t ignoretime, isc_mem_t *mctx)
+                    bool ignoretime, isc_mem_t *mctx)
 {
        dst_key_t *dstkey = NULL;
        dns_keytag_t keytag;
@@ -1226,11 +1227,11 @@ dns_dnssec_signs(dns_rdata_t *rdata, dns_name_t *name,
 
        INSIST(sigrdataset->type == dns_rdatatype_rrsig);
        if (sigrdataset->covers != rdataset->type)
-               return (ISC_FALSE);
+               return (false);
 
        result = dns_dnssec_keyfromrdata(name, rdata, mctx, &dstkey);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
        result = dns_rdata_tostruct(rdata, &key, NULL);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
@@ -1251,12 +1252,12 @@ dns_dnssec_signs(dns_rdata_t *rdata, dns_name_t *name,
                                                    &sigrdata, NULL);
                        if (result == ISC_R_SUCCESS) {
                                dst_key_free(&dstkey);
-                               return (ISC_TRUE);
+                               return (true);
                        }
                }
        }
        dst_key_free(&dstkey);
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
@@ -1274,26 +1275,26 @@ dns_dnsseckey_create(isc_mem_t *mctx, dst_key_t **dstkey,
 
        dk->key = *dstkey;
        *dstkey = NULL;
-       dk->force_publish = ISC_FALSE;
-       dk->force_sign = ISC_FALSE;
-       dk->hint_publish = ISC_FALSE;
-       dk->hint_sign = ISC_FALSE;
-       dk->hint_remove = ISC_FALSE;
-       dk->first_sign = ISC_FALSE;
-       dk->is_active = ISC_FALSE;
+       dk->force_publish = false;
+       dk->force_sign = false;
+       dk->hint_publish = false;
+       dk->hint_sign = false;
+       dk->hint_remove = false;
+       dk->first_sign = false;
+       dk->is_active = false;
        dk->prepublish = 0;
        dk->source = dns_keysource_unknown;
        dk->index = 0;
 
        /* KSK or ZSK? */
-       dk->ksk = ISC_TF((dst_key_flags(dk->key) & DNS_KEYFLAG_KSK) != 0);
+       dk->ksk = (dst_key_flags(dk->key) & DNS_KEYFLAG_KSK);
 
        /* Is this an old-style key? */
        result = dst_key_getprivateformat(dk->key, &major, &minor);
        INSIST(result == ISC_R_SUCCESS);
 
        /* Smart signing started with key format 1.3 */
-       dk->legacy = ISC_TF(major == 1 && minor <= 2);
+       dk->legacy = (major == 1 && minor <= 2);
 
        ISC_LINK_INIT(dk, link);
        *dkp = dk;
@@ -1316,43 +1317,43 @@ static void
 get_hints(dns_dnsseckey_t *key, isc_stdtime_t now) {
        isc_result_t result;
        isc_stdtime_t publish, active, revoke, inactive, deltime;
-       isc_boolean_t pubset = ISC_FALSE, actset = ISC_FALSE;
-       isc_boolean_t revset = ISC_FALSE, inactset = ISC_FALSE;
-       isc_boolean_t delset = ISC_FALSE;
+       bool pubset = false, actset = false;
+       bool revset = false, inactset = false;
+       bool delset = false;
 
        REQUIRE(key != NULL && key->key != NULL);
 
        result = dst_key_gettime(key->key, DST_TIME_PUBLISH, &publish);
        if (result == ISC_R_SUCCESS)
-               pubset = ISC_TRUE;
+               pubset = true;
 
        result = dst_key_gettime(key->key, DST_TIME_ACTIVATE, &active);
        if (result == ISC_R_SUCCESS)
-               actset = ISC_TRUE;
+               actset = true;
 
        result = dst_key_gettime(key->key, DST_TIME_REVOKE, &revoke);
        if (result == ISC_R_SUCCESS)
-               revset = ISC_TRUE;
+               revset = true;
 
        result = dst_key_gettime(key->key, DST_TIME_INACTIVE, &inactive);
        if (result == ISC_R_SUCCESS)
-               inactset = ISC_TRUE;
+               inactset = true;
 
        result = dst_key_gettime(key->key, DST_TIME_DELETE, &deltime);
        if (result == ISC_R_SUCCESS)
-               delset = ISC_TRUE;
+               delset = true;
 
        /* Metadata says publish (but possibly not activate) */
        if (pubset && publish <= now)
-               key->hint_publish = ISC_TRUE;
+               key->hint_publish = true;
 
        /* Metadata says activate (so we must also publish) */
        if (actset && active <= now) {
-               key->hint_sign = ISC_TRUE;
+               key->hint_sign = true;
 
                /* Only publish if publish time has already passed. */
                if (pubset && publish <= now)
-                       key->hint_publish = ISC_TRUE;
+                       key->hint_publish = true;
        }
 
        /*
@@ -1361,7 +1362,7 @@ get_hints(dns_dnsseckey_t *key, isc_stdtime_t now) {
         * publish now and activate later.
         */
        if (actset && !pubset)
-               key->hint_publish = ISC_TRUE;
+               key->hint_publish = true;
 
        /*
         * If activation date is in the future, make note of how far off
@@ -1375,7 +1376,7 @@ get_hints(dns_dnsseckey_t *key, isc_stdtime_t now) {
         * but don't sign.
         */
        if (key->hint_publish && inactset && inactive <= now) {
-               key->hint_sign = ISC_FALSE;
+               key->hint_sign = false;
        }
 
        /*
@@ -1387,7 +1388,7 @@ get_hints(dns_dnsseckey_t *key, isc_stdtime_t now) {
         */
        if (key->hint_publish && (revset && revoke <= now)) {
                uint32_t flags;
-               key->hint_sign = ISC_TRUE;
+               key->hint_sign = true;
                flags = dst_key_flags(key->key);
                if ((flags & DNS_KEYFLAG_REVOKE) == 0) {
                        flags |= DNS_KEYFLAG_REVOKE;
@@ -1399,9 +1400,9 @@ get_hints(dns_dnsseckey_t *key, isc_stdtime_t now) {
         * Metadata says delete, so don't publish this key or sign with it.
         */
        if (delset && deltime <= now) {
-               key->hint_publish = ISC_FALSE;
-               key->hint_sign = ISC_FALSE;
-               key->hint_remove = ISC_TRUE;
+               key->hint_publish = false;
+               key->hint_sign = false;
+               key->hint_remove = true;
        }
 }
 
@@ -1414,7 +1415,7 @@ dns_dnssec_findmatchingkeys2(dns_name_t *origin, const char *directory,
                             dns_dnsseckeylist_t *keylist)
 {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t dir_open = ISC_FALSE;
+       bool dir_open = false;
        dns_dnsseckeylist_t list;
        isc_dir_t dir;
        dns_dnsseckey_t *key = NULL;
@@ -1428,14 +1429,14 @@ dns_dnssec_findmatchingkeys2(dns_name_t *origin, const char *directory,
        isc_dir_init(&dir);
 
        isc_buffer_init(&b, namebuf, sizeof(namebuf) - 1);
-       RETERR(dns_name_tofilenametext(origin, ISC_FALSE, &b));
+       RETERR(dns_name_tofilenametext(origin, false, &b));
        len = isc_buffer_usedlength(&b);
        namebuf[len] = '\0';
 
        if (directory == NULL)
                directory = ".";
        RETERR(isc_dir_open(&dir, directory));
-       dir_open = ISC_TRUE;
+       dir_open = true;
 
        while (isc_dir_read(&dir) == ISC_R_SUCCESS) {
                if (dir.entry.name[0] != 'K' ||
@@ -1553,13 +1554,13 @@ dns_dnssec_findmatchingkeys(dns_name_t *origin, const char *directory,
 /*%
  * Add 'newkey' to 'keylist' if it's not already there.
  *
- * If 'savekeys' is ISC_TRUE, then we need to preserve all
+ * If 'savekeys' is true, then we need to preserve all
  * the keys in the keyset, regardless of whether they have
  * metadata indicating they should be deactivated or removed.
  */
 static isc_result_t
 addkey(dns_dnsseckeylist_t *keylist, dst_key_t **newkey,
-       isc_boolean_t savekeys, isc_mem_t *mctx)
+       bool savekeys, isc_mem_t *mctx)
 {
        dns_dnsseckey_t *key;
        isc_result_t result;
@@ -1597,7 +1598,7 @@ addkey(dns_dnsseckeylist_t *keylist, dst_key_t **newkey,
        if (result != ISC_R_SUCCESS)
                return (result);
        if (key->legacy || savekeys) {
-               key->force_publish = ISC_TRUE;
+               key->force_publish = true;
                key->force_sign = dst_key_isprivate(key->key);
        }
        key->source = dns_keysource_zoneapex;
@@ -1642,7 +1643,7 @@ mark_active_keys(dns_dnsseckeylist_t *keylist, dns_rdataset_t *rrsigs) {
                        sigalg = sig.algorithm;
                        sigid = sig.keyid;
                        if (keyid == sigid && keyalg == sigalg) {
-                               key->is_active = ISC_TRUE;
+                               key->is_active = true;
                                break;
                        }
                }
@@ -1663,8 +1664,8 @@ isc_result_t
 dns_dnssec_keylistfromrdataset(dns_name_t *origin,
                               const char *directory, isc_mem_t *mctx,
                               dns_rdataset_t *keyset, dns_rdataset_t *keysigs,
-                              dns_rdataset_t *soasigs, isc_boolean_t savekeys,
-                              isc_boolean_t publickey,
+                              dns_rdataset_t *soasigs, bool savekeys,
+                              bool publickey,
                               dns_dnsseckeylist_t *keylist)
 {
        dns_rdataset_t keys;
@@ -1724,7 +1725,7 @@ dns_dnssec_keylistfromrdataset(dns_name_t *origin,
                                                          mctx, &privkey);
                                if (result == ISC_R_SUCCESS &&
                                    dst_key_pubcompare(pubkey, privkey,
-                                                      ISC_FALSE)) {
+                                                      false)) {
                                        dst_key_setflags(privkey, flags);
                                }
                                dst_key_setflags(pubkey, flags);
@@ -1863,7 +1864,7 @@ delrdata(dns_rdata_t *rdata, dns_diff_t *diff, dns_name_t *origin,
 
 static isc_result_t
 publish_key(dns_diff_t *diff, dns_dnsseckey_t *key, dns_name_t *origin,
-           dns_ttl_t ttl, isc_mem_t *mctx, isc_boolean_t allzsk,
+           dns_ttl_t ttl, isc_mem_t *mctx, bool allzsk,
            void (*report)(const char *, ...))
 {
        isc_result_t result;
@@ -1928,7 +1929,7 @@ remove_key(dns_diff_t *diff, dns_dnsseckey_t *key, dns_name_t *origin,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 exists(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
        isc_result_t result;
        dns_rdataset_t trdataset;
@@ -1943,11 +1944,11 @@ exists(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
                dns_rdataset_current(&trdataset, &current);
                if (dns_rdata_compare(rdata, &current) == 0) {
                        dns_rdataset_disassociate(&trdataset);
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
        dns_rdataset_disassociate(&trdataset);
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
@@ -2081,12 +2082,12 @@ isc_result_t
 dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                      dns_dnsseckeylist_t *removed, dns_name_t *origin,
                      dns_ttl_t hint_ttl, dns_diff_t *diff,
-                     isc_boolean_t allzsk, isc_mem_t *mctx,
+                     bool allzsk, isc_mem_t *mctx,
                      void (*report)(const char *, ...))
 {
        isc_result_t result;
        dns_dnsseckey_t *key, *key1, *key2, *next;
-       isc_boolean_t found_ttl = ISC_FALSE;
+       bool found_ttl = false;
        dns_ttl_t ttl = hint_ttl;
 
        /*
@@ -2107,7 +2108,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                }
                if (key->source == dns_keysource_zoneapex) {
                        ttl = dst_key_getttl(key->key);
-                       found_ttl = ISC_TRUE;
+                       found_ttl = true;
                }
        }
 
@@ -2136,7 +2137,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
         * with known keys, and update accordingly.
         */
        for (key1 = ISC_LIST_HEAD(*newkeys); key1 != NULL; key1 = next) {
-               isc_boolean_t key_revoked = ISC_FALSE;
+               bool key_revoked = false;
 
                next = ISC_LIST_NEXT(key1, link);
 
@@ -2150,13 +2151,13 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                        if (nr1 == nr2 &&
                            dst_key_alg(key1->key) == dst_key_alg(key2->key) &&
                            dst_key_pubcompare(key1->key, key2->key,
-                                              ISC_TRUE)) {
+                                              true)) {
                                int r1, r2;
                                r1 = dst_key_flags(key1->key) &
                                        DNS_KEYFLAG_REVOKE;
                                r2 = dst_key_flags(key2->key) &
                                        DNS_KEYFLAG_REVOKE;
-                               key_revoked = ISC_TF(r1 != r2);
+                               key_revoked = (r1 != r2);
                                break;
                        }
                }
@@ -2171,7 +2172,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                                RETERR(publish_key(diff, key1, origin, ttl,
                                                   mctx, allzsk, report));
                                if (key1->hint_sign || key1->force_sign)
-                                       key1->first_sign = ISC_TRUE;
+                                       key1->first_sign = true;
                        }
 
                        continue;
@@ -2215,12 +2216,12 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                         * zone, sign the DNSKEY set with it, but not
                         * sign other records with it.
                         */
-                       key1->ksk = ISC_TRUE;
+                       key1->ksk = true;
                        continue;
                } else {
                        if (!key2->is_active &&
                            (key1->hint_sign || key1->force_sign))
-                               key2->first_sign = ISC_TRUE;
+                               key2->first_sign = true;
                        key2->hint_sign = key1->hint_sign;
                        key2->hint_publish = key1->hint_publish;
                }
index d51ed2c854d5b1e22f1bc9ec1cbac00d6ba47749..ab3bd749d58e7e77afdcb830f5f43065727bb293 100644 (file)
@@ -50,6 +50,7 @@
 #endif /* HAVE_DNSTAP */
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -118,7 +119,7 @@ struct dns_dtenv {
        } while (0)
 
 static isc_mutex_t dt_mutex;
-static isc_boolean_t dt_initialized = ISC_FALSE;
+static bool dt_initialized = false;
 static isc_thread_key_t dt_key;
 static isc_once_t mutex_once = ISC_ONCE_INIT;
 static isc_mem_t *dt_mctx = NULL;
@@ -159,11 +160,11 @@ dt_init(void) {
                if (result != ISC_R_SUCCESS)
                        goto unlock;
                isc_mem_setname(dt_mctx, "dt", NULL);
-               isc_mem_setdestroycheck(dt_mctx, ISC_FALSE);
+               isc_mem_setdestroycheck(dt_mctx, false);
 
                ret = isc_thread_key_create(&dt_key, dtfree);
                if (ret == 0)
-                       dt_initialized = ISC_TRUE;
+                       dt_initialized = true;
                else
                        result = ISC_R_FAILURE;
        }
@@ -346,7 +347,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) {
                file.stream = NULL;
                file.versions = roll != 0 ? roll : ISC_LOG_ROLLINFINITE;
                file.maximum_size = 0;
-               file.maximum_reached = ISC_FALSE;
+               file.maximum_reached = false;
                result = isc_logfile_roll(&file);
                isc_mem_free(env->mctx, filename);
                CHECK(result);
@@ -594,13 +595,13 @@ init_msg(dns_dtenv_t *env, dns_dtmsg_t *dm, Dnstap__Message__Type mtype) {
        if (env->identity.length != 0) {
                dm->d.identity.data = env->identity.base;
                dm->d.identity.len = env->identity.length;
-               dm->d.has_identity = ISC_TRUE;
+               dm->d.has_identity = true;
        }
 
        if (env->version.length != 0) {
                dm->d.version.data = env->version.base;
                dm->d.version.len = env->version.length;
-               dm->d.has_version = ISC_TRUE;
+               dm->d.has_version = true;
        }
 }
 
@@ -644,7 +645,7 @@ cpbuf(isc_buffer_t *buf, ProtobufCBinaryData *p, protobuf_c_boolean *has) {
 }
 
 static void
-setaddr(dns_dtmsg_t *dm, isc_sockaddr_t *sa, isc_boolean_t tcp,
+setaddr(dns_dtmsg_t *dm, isc_sockaddr_t *sa, bool tcp,
        ProtobufCBinaryData *addr, protobuf_c_boolean *has_addr,
        uint32_t *port, protobuf_c_boolean *has_port)
 {
@@ -679,7 +680,7 @@ setaddr(dns_dtmsg_t *dm, isc_sockaddr_t *sa, isc_boolean_t tcp,
 void
 dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype,
            isc_sockaddr_t *qaddr, isc_sockaddr_t *raddr,
-           isc_boolean_t tcp, isc_region_t *zone, isc_time_t *qtime,
+           bool tcp, isc_region_t *zone, isc_time_t *qtime,
            isc_time_t *rtime, isc_buffer_t *buf)
 {
        isc_time_t now, *t;
@@ -812,7 +813,7 @@ putaddr(isc_buffer_t **b, isc_region_t *ip) {
        return (putstr(b, buf));
 }
 
-static isc_boolean_t
+static bool
 dnstap_file(struct fstrm_reader *r) {
        fstrm_res res;
        const struct fstrm_control *control = NULL;
@@ -822,25 +823,25 @@ dnstap_file(struct fstrm_reader *r) {
 
        res = fstrm_reader_get_control(r, FSTRM_CONTROL_START, &control);
        if (res != fstrm_res_success)
-               return (ISC_FALSE);
+               return (false);
 
        res = fstrm_control_get_num_field_content_type(control, &n);
        if (res != fstrm_res_success)
-               return (ISC_FALSE);
+               return (false);
        if (n > 0) {
                res = fstrm_control_get_field_content_type(control, 0,
                                                           &rtype, &rlen);
                if (res != fstrm_res_success)
-                       return (ISC_FALSE);
+                       return (false);
 
                if (rlen != dlen)
-                       return (ISC_FALSE);
+                       return (false);
 
                if (memcmp(DNSTAP_CONTENT_TYPE, rtype, dlen) == 0)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
@@ -1014,9 +1015,9 @@ dns_dt_parse(isc_mem_t *mctx, isc_region_t *src, dns_dtdata_t **destp) {
 
        /* Query? */
        if ((d->type & DNS_DTTYPE_QUERY) != 0)
-               d->query = ISC_TRUE;
+               d->query = true;
        else
-               d->query = ISC_FALSE;
+               d->query = false;
 
        /* Parse DNS message */
        if (d->query && m->has_query_message) {
@@ -1073,9 +1074,9 @@ dns_dt_parse(isc_mem_t *mctx, isc_region_t *src, dns_dtdata_t **destp) {
                                m->socket_protocol);
                if (type != NULL &&
                    type->value == DNSTAP__SOCKET_PROTOCOL__TCP)
-                       d->tcp = ISC_TRUE;
+                       d->tcp = true;
                else
-                       d->tcp = ISC_FALSE;
+                       d->tcp = false;
        }
 
        /* Query tuple */
index bde201a1f86d9b57e4d906932f49ad4d8e760b41..97fee6836925dc1bcef0f429cb1aa773a56019d5 100644 (file)
@@ -28,6 +28,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 
@@ -71,7 +72,7 @@ static dst_func_t *dst_t_func[DST_MAX_ALGS];
 static isc_entropy_t *dst_entropy_pool = NULL;
 static unsigned int dst_entropy_flags = 0;
 
-static isc_boolean_t dst_initialized = ISC_FALSE;
+static bool dst_initialized = false;
 
 void gss_log(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
 
@@ -154,7 +155,7 @@ dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
        isc_result_t result;
 
        REQUIRE(mctx != NULL);
-       REQUIRE(dst_initialized == ISC_FALSE);
+       REQUIRE(dst_initialized == false);
 
 #if !defined(OPENSSL) && !defined(PKCS11CRYPTO)
        UNUSED(engine);
@@ -178,7 +179,7 @@ dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
                return (result);
        isc_mem_setname(dst__memory_pool, "dst", NULL);
 #ifndef OPENSSL_LEAKS
-       isc_mem_setdestroycheck(dst__memory_pool, ISC_FALSE);
+       isc_mem_setdestroycheck(dst__memory_pool, false);
 #endif
 #else /* OPENSSL */
        isc_mem_attach(mctx, &dst__memory_pool);
@@ -266,12 +267,12 @@ dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
 #ifdef GSSAPI
        RETERR(dst__gssapi_init(&dst_t_func[DST_ALG_GSSAPI]));
 #endif
-       dst_initialized = ISC_TRUE;
+       dst_initialized = true;
        return (ISC_R_SUCCESS);
 
  out:
        /* avoid immediate crash! */
-       dst_initialized = ISC_TRUE;
+       dst_initialized = true;
        dst_lib_destroy();
        return (result);
 }
@@ -279,8 +280,8 @@ dst_lib_init2(isc_mem_t *mctx, isc_entropy_t *ectx,
 void
 dst_lib_destroy(void) {
        int i;
-       RUNTIME_CHECK(dst_initialized == ISC_TRUE);
-       dst_initialized = ISC_FALSE;
+       RUNTIME_CHECK(dst_initialized == true);
+       dst_initialized = false;
 
        for (i = 0; i < DST_MAX_ALGS; i++)
                if (dst_t_func[i] != NULL && dst_t_func[i]->cleanup != NULL)
@@ -296,45 +297,41 @@ dst_lib_destroy(void) {
                isc_entropy_detach(&dst_entropy_pool);
 }
 
-isc_boolean_t
+bool
 dst_algorithm_supported(unsigned int alg) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
 
        if (alg >= DST_MAX_ALGS || dst_t_func[alg] == NULL)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dst_ds_digest_supported(unsigned int digest_type) {
+       return  (digest_type == DNS_DSDIGEST_SHA1 ||
+                digest_type == DNS_DSDIGEST_SHA256 ||
 #if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
-       return  (ISC_TF(digest_type == DNS_DSDIGEST_SHA1 ||
-                       digest_type == DNS_DSDIGEST_SHA256 ||
-                       digest_type == DNS_DSDIGEST_GOST ||
-                       digest_type == DNS_DSDIGEST_SHA384));
-#else
-       return  (ISC_TF(digest_type == DNS_DSDIGEST_SHA1 ||
-                       digest_type == DNS_DSDIGEST_SHA256 ||
-                       digest_type == DNS_DSDIGEST_SHA384));
+                digest_type == DNS_DSDIGEST_GOST ||
 #endif
+                digest_type == DNS_DSDIGEST_SHA384);
 }
 
 isc_result_t
 dst_context_create(dst_key_t *key, isc_mem_t *mctx, dst_context_t **dctxp) {
        return (dst_context_create4(key, mctx, DNS_LOGCATEGORY_GENERAL,
-                                   ISC_TRUE, 0, dctxp));
+                                   true, 0, dctxp));
 }
 
 isc_result_t
 dst_context_create2(dst_key_t *key, isc_mem_t *mctx,
                    isc_logcategory_t *category, dst_context_t **dctxp)
 {
-       return (dst_context_create4(key, mctx, category, ISC_TRUE, 0, dctxp));
+       return (dst_context_create4(key, mctx, category, true, 0, dctxp));
 }
 
 isc_result_t
 dst_context_create3(dst_key_t *key, isc_mem_t *mctx,
-                   isc_logcategory_t *category, isc_boolean_t useforsigning,
+                   isc_logcategory_t *category, bool useforsigning,
                    dst_context_t **dctxp)
 {
        return (dst_context_create4(key, mctx, category,
@@ -343,13 +340,13 @@ dst_context_create3(dst_key_t *key, isc_mem_t *mctx,
 
 isc_result_t
 dst_context_create4(dst_key_t *key, isc_mem_t *mctx,
-                   isc_logcategory_t *category, isc_boolean_t useforsigning,
+                   isc_logcategory_t *category, bool useforsigning,
                    int maxbits, dst_context_t **dctxp)
 {
        dst_context_t *dctx;
        isc_result_t result;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE(mctx != NULL);
        REQUIRE(dctxp != NULL && *dctxp == NULL);
@@ -426,7 +423,7 @@ dst_context_sign(dst_context_t *dctx, isc_buffer_t *sig) {
        if (key->func->sign == NULL)
                return (DST_R_NOTPRIVATEKEY);
        if (key->func->isprivate == NULL ||
-           key->func->isprivate(key) == ISC_FALSE)
+           key->func->isprivate(key) == false)
                return (DST_R_NOTPRIVATEKEY);
 
        return (key->func->sign(dctx, sig));
@@ -469,7 +466,7 @@ isc_result_t
 dst_key_computesecret(const dst_key_t *pub, const dst_key_t *priv,
                      isc_buffer_t *secret)
 {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(pub) && VALID_KEY(priv));
        REQUIRE(secret != NULL);
 
@@ -484,7 +481,7 @@ dst_key_computesecret(const dst_key_t *pub, const dst_key_t *priv,
            priv->func->computesecret == NULL)
                return (DST_R_KEYCANNOTCOMPUTESECRET);
 
-       if (dst_key_isprivate(priv) == ISC_FALSE)
+       if (dst_key_isprivate(priv) == false)
                return (DST_R_NOTPRIVATEKEY);
 
        return (pub->func->computesecret(pub, priv, secret));
@@ -494,7 +491,7 @@ isc_result_t
 dst_key_tofile(const dst_key_t *key, int type, const char *directory) {
        isc_result_t ret = ISC_R_SUCCESS;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE((type & (DST_TYPE_PRIVATE | DST_TYPE_PUBLIC)) != 0);
 
@@ -517,11 +514,11 @@ dst_key_tofile(const dst_key_t *key, int type, const char *directory) {
 }
 
 void
-dst_key_setexternal(dst_key_t *key, isc_boolean_t value) {
+dst_key_setexternal(dst_key_t *key, bool value) {
        key->external = value;
 }
 
-isc_boolean_t
+bool
 dst_key_isexternal(dst_key_t *key) {
        return (key->external);
 }
@@ -533,7 +530,7 @@ dst_key_getfilename(dns_name_t *name, dns_keytag_t id,
 {
        isc_result_t result;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(dns_name_isabsolute(name));
        REQUIRE((type & (DST_TYPE_PRIVATE | DST_TYPE_PUBLIC)) != 0);
        REQUIRE(mctx != NULL);
@@ -562,7 +559,7 @@ dst_key_fromfile(dns_name_t *name, dns_keytag_t id,
        isc_buffer_t buf;
        dst_key_t *key;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(dns_name_isabsolute(name));
        REQUIRE((type & (DST_TYPE_PRIVATE | DST_TYPE_PUBLIC)) != 0);
        REQUIRE(mctx != NULL);
@@ -611,7 +608,7 @@ dst_key_fromnamedfile(const char *filename, const char *dirname,
        int newfilenamelen = 0;
        isc_lex_t *lex = NULL;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(filename != NULL);
        REQUIRE((type & (DST_TYPE_PRIVATE | DST_TYPE_PUBLIC)) != 0);
        REQUIRE(mctx != NULL);
@@ -710,7 +707,7 @@ dst_key_fromnamedfile(const char *filename, const char *dirname,
 
 isc_result_t
 dst_key_todns(const dst_key_t *key, isc_buffer_t *target) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE(target != NULL);
 
@@ -809,7 +806,7 @@ dst_key_frombuffer(dns_name_t *name, unsigned int alg,
 
 isc_result_t
 dst_key_tobuffer(const dst_key_t *key, isc_buffer_t *target) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE(target != NULL);
 
@@ -826,7 +823,7 @@ dst_key_privatefrombuffer(dst_key_t *key, isc_buffer_t *buffer) {
        isc_lex_t *lex = NULL;
        isc_result_t result = ISC_R_SUCCESS;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE(!dst_key_isprivate(key));
        REQUIRE(buffer != NULL);
@@ -892,7 +889,7 @@ dst_key_buildinternal(dns_name_t *name, unsigned int alg,
        dst_key_t *key;
        isc_result_t result;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(dns_name_isabsolute(name));
        REQUIRE(mctx != NULL);
        REQUIRE(keyp != NULL && *keyp == NULL);
@@ -926,7 +923,7 @@ dst_key_fromlabel(dns_name_t *name, int alg, unsigned int flags,
        dst_key_t *key;
        isc_result_t result;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(dns_name_isabsolute(name));
        REQUIRE(mctx != NULL);
        REQUIRE(keyp != NULL && *keyp == NULL);
@@ -981,7 +978,7 @@ dst_key_generate2(dns_name_t *name, unsigned int alg,
        dst_key_t *key;
        isc_result_t ret;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(dns_name_isabsolute(name));
        REQUIRE(mctx != NULL);
        REQUIRE(keyp != NULL && *keyp == NULL);
@@ -1038,7 +1035,7 @@ dst_key_setnum(dst_key_t *key, int type, uint32_t value)
        REQUIRE(VALID_KEY(key));
        REQUIRE(type <= DST_MAX_NUMERIC);
        key->nums[type] = value;
-       key->numset[type] = ISC_TRUE;
+       key->numset[type] = true;
 }
 
 void
@@ -1046,7 +1043,7 @@ dst_key_unsetnum(dst_key_t *key, int type)
 {
        REQUIRE(VALID_KEY(key));
        REQUIRE(type <= DST_MAX_NUMERIC);
-       key->numset[type] = ISC_FALSE;
+       key->numset[type] = false;
 }
 
 isc_result_t
@@ -1065,14 +1062,14 @@ dst_key_settime(dst_key_t *key, int type, isc_stdtime_t when) {
        REQUIRE(VALID_KEY(key));
        REQUIRE(type <= DST_MAX_TIMES);
        key->times[type] = when;
-       key->timeset[type] = ISC_TRUE;
+       key->timeset[type] = true;
 }
 
 void
 dst_key_unsettime(dst_key_t *key, int type) {
        REQUIRE(VALID_KEY(key));
        REQUIRE(type <= DST_MAX_TIMES);
-       key->timeset[type] = ISC_FALSE;
+       key->timeset[type] = false;
 }
 
 isc_result_t
@@ -1092,41 +1089,41 @@ dst_key_setprivateformat(dst_key_t *key, int major, int minor) {
        key->fmt_minor = minor;
 }
 
-static isc_boolean_t
+static bool
 comparekeys(const dst_key_t *key1, const dst_key_t *key2,
-           isc_boolean_t match_revoked_key,
-           isc_boolean_t (*compare)(const dst_key_t *key1,
+           bool match_revoked_key,
+           bool (*compare)(const dst_key_t *key1,
                                     const dst_key_t *key2))
 {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key1));
        REQUIRE(VALID_KEY(key2));
 
        if (key1 == key2)
-               return (ISC_TRUE);
+               return (true);
 
        if (key1->key_alg != key2->key_alg)
-               return (ISC_FALSE);
+               return (false);
 
        if (key1->key_id != key2->key_id) {
                if (!match_revoked_key)
-                       return (ISC_FALSE);
+                       return (false);
 #ifndef PK11_MD5_DISABLE
                if (key1->key_alg == DST_ALG_RSAMD5)
-                       return (ISC_FALSE);
+                       return (false);
 #endif
                if ((key1->key_flags & DNS_KEYFLAG_REVOKE) ==
                    (key2->key_flags & DNS_KEYFLAG_REVOKE))
-                       return (ISC_FALSE);
+                       return (false);
                if (key1->key_id != key2->key_rid &&
                    key1->key_rid != key2->key_id)
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        if (compare != NULL)
                return (compare(key1, key2));
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 
@@ -1134,7 +1131,7 @@ comparekeys(const dst_key_t *key1, const dst_key_t *key2,
  * Compares only the public portion of two keys, by converting them
  * both to wire format and comparing the results.
  */
-static isc_boolean_t
+static bool
 pub_compare(const dst_key_t *key1, const dst_key_t *key2) {
        isc_result_t result;
        unsigned char buf1[DST_KEY_MAXSIZE], buf2[DST_KEY_MAXSIZE];
@@ -1144,7 +1141,7 @@ pub_compare(const dst_key_t *key1, const dst_key_t *key2) {
        isc_buffer_init(&b1, buf1, sizeof(buf1));
        result = dst_key_todns(key1, &b1);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
        /* Zero out flags. */
        buf1[0] = buf1[1] = 0;
        if ((key1->key_flags & DNS_KEYFLAG_EXTENDED) != 0)
@@ -1153,7 +1150,7 @@ pub_compare(const dst_key_t *key1, const dst_key_t *key2) {
        isc_buffer_init(&b2, buf2, sizeof(buf2));
        result = dst_key_todns(key2, &b2);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
        /* Zero out flags. */
        buf2[0] = buf2[1] = 0;
        if ((key2->key_flags & DNS_KEYFLAG_EXTENDED) != 0)
@@ -1172,42 +1169,42 @@ pub_compare(const dst_key_t *key1, const dst_key_t *key2) {
                memmove(&buf2[4], &buf2[6], r2.length - 6);
                r2.length -= 2;
        }
-       return (ISC_TF(isc_region_compare(&r1, &r2) == 0));
+       return (isc_region_compare(&r1, &r2) == 0);
 }
 
-isc_boolean_t
+bool
 dst_key_compare(const dst_key_t *key1, const dst_key_t *key2) {
-       return (comparekeys(key1, key2, ISC_FALSE, key1->func->compare));
+       return (comparekeys(key1, key2, false, key1->func->compare));
 }
 
-isc_boolean_t
+bool
 dst_key_pubcompare(const dst_key_t *key1, const dst_key_t *key2,
-                  isc_boolean_t match_revoked_key)
+                  bool match_revoked_key)
 {
        return (comparekeys(key1, key2, match_revoked_key, pub_compare));
 }
 
 
-isc_boolean_t
+bool
 dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key1));
        REQUIRE(VALID_KEY(key2));
 
        if (key1 == key2)
-               return (ISC_TRUE);
+               return (true);
        if (key1->key_alg == key2->key_alg &&
            key1->func->paramcompare != NULL &&
-           key1->func->paramcompare(key1, key2) == ISC_TRUE)
-               return (ISC_TRUE);
+           key1->func->paramcompare(key1, key2) == true)
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 void
 dst_key_attach(dst_key_t *source, dst_key_t **target) {
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(target != NULL && *target == NULL);
        REQUIRE(VALID_KEY(source));
 
@@ -1221,7 +1218,7 @@ dst_key_free(dst_key_t **keyp) {
        dst_key_t *key;
        unsigned int refs;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(keyp != NULL && VALID_KEY(*keyp));
 
        key = *keyp;
@@ -1250,7 +1247,7 @@ dst_key_free(dst_key_t **keyp) {
        *keyp = NULL;
 }
 
-isc_boolean_t
+bool
 dst_key_isprivate(const dst_key_t *key) {
        REQUIRE(VALID_KEY(key));
        INSIST(key->func->isprivate != NULL);
@@ -1271,7 +1268,7 @@ dst_key_buildfilename(const dst_key_t *key, int type,
 
 isc_result_t
 dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE(n != NULL);
 
@@ -1341,7 +1338,7 @@ dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
 
 isc_result_t
 dst_key_secretsize(const dst_key_t *key, unsigned int *n) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
        REQUIRE(n != NULL);
 
@@ -1397,7 +1394,7 @@ dst_key_restore(dns_name_t *name, unsigned int alg, unsigned int flags,
        isc_result_t result;
        dst_key_t *key;
 
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(keyp != NULL && *keyp == NULL);
 
        if (alg >= DST_MAX_ALGS || dst_t_func[alg] == NULL)
@@ -1476,14 +1473,14 @@ get_key_struct(dns_name_t *name, unsigned int alg,
        key->fmt_minor = 0;
        for (i = 0; i < (DST_MAX_TIMES + 1); i++) {
                key->times[i] = 0;
-               key->timeset[i] = ISC_FALSE;
+               key->timeset[i] = false;
        }
-       key->inactive = ISC_FALSE;
+       key->inactive = false;
        key->magic = KEY_MAGIC;
        return (key);
 }
 
-isc_boolean_t
+bool
 dst_key_inactive(const dst_key_t *key) {
 
        REQUIRE(VALID_KEY(key));
@@ -1492,7 +1489,7 @@ dst_key_inactive(const dst_key_t *key) {
 }
 
 void
-dst_key_setinactive(dst_key_t *key, isc_boolean_t inactive) {
+dst_key_setinactive(dst_key_t *key, bool inactive) {
 
        REQUIRE(VALID_KEY(key));
 
@@ -1608,7 +1605,7 @@ dst_key_read_public(const char *filename, int type,
 
        isc_buffer_init(&b, rdatabuf, sizeof(rdatabuf));
        ret = dns_rdata_fromtext(&rdata, rdclass, keytype, lex, NULL,
-                                ISC_FALSE, mctx, &b, NULL);
+                                false, mctx, &b, NULL);
        if (ret != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -1625,9 +1622,9 @@ dst_key_read_public(const char *filename, int type,
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 issymmetric(const dst_key_t *key) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
        REQUIRE(VALID_KEY(key));
 
        /* XXXVIX this switch statement is too sparse to gen a jump table. */
@@ -1651,7 +1648,7 @@ issymmetric(const dst_key_t *key) {
        case DST_ALG_ECDSA384:
        case DST_ALG_ED25519:
        case DST_ALG_ED448:
-               return (ISC_FALSE);
+               return (false);
 #ifndef PK11_MD5_DISABLE
        case DST_ALG_HMACMD5:
 #endif
@@ -1661,9 +1658,9 @@ issymmetric(const dst_key_t *key) {
        case DST_ALG_HMACSHA384:
        case DST_ALG_HMACSHA512:
        case DST_ALG_GSSAPI:
-               return (ISC_TRUE);
+               return (true);
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -1856,7 +1853,7 @@ buildfilename(dns_name_t *name, dns_keytag_t id,
        if (isc_buffer_availablelength(out) < 1)
                return (ISC_R_NOSPACE);
        isc_buffer_putstr(out, "K");
-       result = dns_name_tofilenametext(name, ISC_FALSE, out);
+       result = dns_name_tofilenametext(name, false, out);
        if (result != ISC_R_SUCCESS)
                return (result);
        len = 1 + 3 + 1 + 5 + strlen(suffix) + 1;
@@ -1929,7 +1926,7 @@ frombuffer(dns_name_t *name, unsigned int alg, unsigned int flags,
 
 static isc_result_t
 algorithm_status(unsigned int alg) {
-       REQUIRE(dst_initialized == ISC_TRUE);
+       REQUIRE(dst_initialized == true);
 
        if (dst_algorithm_supported(alg))
                return (ISC_R_SUCCESS);
@@ -1974,7 +1971,7 @@ addsuffix(char *filename, int len, const char *odirname,
 }
 
 isc_result_t
-dst__entropy_getdata(void *buf, unsigned int len, isc_boolean_t pseudo) {
+dst__entropy_getdata(void *buf, unsigned int len, bool pseudo) {
        unsigned int flags = dst_entropy_flags;
 
        if (dst_entropy_pool == NULL)
@@ -2003,7 +2000,7 @@ dst__entropy_status(void) {
        unsigned int flags = dst_entropy_flags;
        isc_result_t ret;
        unsigned char buf[32];
-       static isc_boolean_t first = ISC_TRUE;
+       static bool first = true;
 
        if (dst_entropy_pool == NULL)
                return (0);
@@ -2016,7 +2013,7 @@ dst__entropy_status(void) {
                INSIST(ret == ISC_R_SUCCESS);
                isc_entropy_putdata(dst_entropy_pool, buf,
                                    sizeof(buf), 2 * sizeof(buf));
-               first = ISC_FALSE;
+               first = false;
        }
 #endif
        return (isc_entropy_status(dst_entropy_pool));
index 58b46c7833202b28dd666e945befb2a8b28c11ca..11e5fc6f7566833bafe5ce42bdd02c95d981804b 100644 (file)
@@ -28,6 +28,7 @@
 #define DST_DST_INTERNAL_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/buffer.h>
@@ -139,12 +140,12 @@ struct dst_key {
        } keydata;                      /*%< pointer to key in crypto pkg fmt */
 
        isc_stdtime_t   times[DST_MAX_TIMES + 1];    /*%< timing metadata */
-       isc_boolean_t   timeset[DST_MAX_TIMES + 1];  /*%< data set? */
+       bool    timeset[DST_MAX_TIMES + 1];  /*%< data set? */
        isc_stdtime_t   nums[DST_MAX_NUMERIC + 1];   /*%< numeric metadata */
-       isc_boolean_t   numset[DST_MAX_NUMERIC + 1]; /*%< data set? */
-       isc_boolean_t   inactive;      /*%< private key not present as it is
+       bool    numset[DST_MAX_NUMERIC + 1]; /*%< data set? */
+       bool    inactive;      /*%< private key not present as it is
                                            inactive */
-       isc_boolean_t   external;      /*%< external key */
+       bool    external;      /*%< external key */
 
        int             fmt_major;     /*%< private key format, major version */
        int             fmt_minor;     /*%< private key format, minor version */
@@ -204,12 +205,12 @@ struct dst_func {
        isc_result_t (*computesecret)(const dst_key_t *pub,
                                      const dst_key_t *priv,
                                      isc_buffer_t *secret);
-       isc_boolean_t (*compare)(const dst_key_t *key1, const dst_key_t *key2);
-       isc_boolean_t (*paramcompare)(const dst_key_t *key1,
+       bool (*compare)(const dst_key_t *key1, const dst_key_t *key2);
+       bool (*paramcompare)(const dst_key_t *key1,
                                      const dst_key_t *key2);
        isc_result_t (*generate)(dst_key_t *key, int parms,
                                 void (*callback)(int));
-       isc_boolean_t (*isprivate)(const dst_key_t *key);
+       bool (*isprivate)(const dst_key_t *key);
        void (*destroy)(dst_key_t *key);
 
        /* conversion functions */
@@ -292,7 +293,7 @@ void * dst__mem_realloc(void *ptr, size_t size);
  * Entropy retriever using the DST entropy pool.
  */
 isc_result_t dst__entropy_getdata(void *buf, unsigned int len,
-                                 isc_boolean_t pseudo);
+                                 bool pseudo);
 
 /*
  * Entropy status hook.
index 34b86b0f86e4d2f57947e370099d31bc21083638..f31c33db5e0a05ffc52725b628c456a13a271dcc 100644 (file)
@@ -26,6 +26,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/base64.h>
 #include <isc/dir.h>
@@ -186,17 +187,17 @@ find_numericdata(const char *s) {
 }
 
 static int
-check_rsa(const dst_private_t *priv, isc_boolean_t external) {
+check_rsa(const dst_private_t *priv, bool external) {
        int i, j;
-       isc_boolean_t have[RSA_NTAGS];
-       isc_boolean_t ok;
+       bool have[RSA_NTAGS];
+       bool ok;
        unsigned int mask;
 
        if (external)
                return ((priv->nelements == 0) ? 0 : -1);
 
        for (i = 0; i < RSA_NTAGS; i++)
-               have[i] = ISC_FALSE;
+               have[i] = false;
 
        for (j = 0; j < priv->nelements; j++) {
                for (i = 0; i < RSA_NTAGS; i++)
@@ -204,7 +205,7 @@ check_rsa(const dst_private_t *priv, isc_boolean_t external) {
                                break;
                if (i == RSA_NTAGS)
                        return (-1);
-               have[i] = ISC_TRUE;
+               have[i] = true;
        }
 
        mask = (1ULL << TAG_SHIFT) - 1;
@@ -244,7 +245,7 @@ check_dh(const dst_private_t *priv) {
 
 #ifndef PK11_DSA_DISABLE
 static int
-check_dsa(const dst_private_t *priv, isc_boolean_t external) {
+check_dsa(const dst_private_t *priv, bool external) {
        int i, j;
 
        if (external)
@@ -265,7 +266,7 @@ check_dsa(const dst_private_t *priv, isc_boolean_t external) {
 #endif
 
 static int
-check_gost(const dst_private_t *priv, isc_boolean_t external) {
+check_gost(const dst_private_t *priv, bool external) {
 
        if (external)
                return ((priv->nelements == 0)? 0 : -1);
@@ -279,24 +280,24 @@ check_gost(const dst_private_t *priv, isc_boolean_t external) {
 }
 
 static int
-check_ecdsa(const dst_private_t *priv, isc_boolean_t external) {
+check_ecdsa(const dst_private_t *priv, bool external) {
        int i, j;
-       isc_boolean_t have[ECDSA_NTAGS];
-       isc_boolean_t ok;
+       bool have[ECDSA_NTAGS];
+       bool ok;
        unsigned int mask;
 
        if (external)
                return ((priv->nelements == 0) ? 0 : -1);
 
        for (i = 0; i < ECDSA_NTAGS; i++)
-               have[i] = ISC_FALSE;
+               have[i] = false;
        for (j = 0; j < priv->nelements; j++) {
                for (i = 0; i < ECDSA_NTAGS; i++)
                        if (priv->elements[j].tag == TAG(DST_ALG_ECDSA256, i))
                                break;
                if (i == ECDSA_NTAGS)
                        return (-1);
-               have[i] = ISC_TRUE;
+               have[i] = true;
        }
 
        mask = (1ULL << TAG_SHIFT) - 1;
@@ -309,24 +310,24 @@ check_ecdsa(const dst_private_t *priv, isc_boolean_t external) {
 }
 
 static int
-check_eddsa(const dst_private_t *priv, isc_boolean_t external) {
+check_eddsa(const dst_private_t *priv, bool external) {
        int i, j;
-       isc_boolean_t have[EDDSA_NTAGS];
-       isc_boolean_t ok;
+       bool have[EDDSA_NTAGS];
+       bool ok;
        unsigned int mask;
 
        if (external)
                return ((priv->nelements == 0) ? 0 : -1);
 
        for (i = 0; i < EDDSA_NTAGS; i++)
-               have[i] = ISC_FALSE;
+               have[i] = false;
        for (j = 0; j < priv->nelements; j++) {
                for (i = 0; i < EDDSA_NTAGS; i++)
                        if (priv->elements[j].tag == TAG(DST_ALG_ED25519, i))
                                break;
                if (i == EDDSA_NTAGS)
                        return (-1);
-               have[i] = ISC_TRUE;
+               have[i] = true;
        }
 
        mask = (1ULL << TAG_SHIFT) - 1;
@@ -340,7 +341,7 @@ check_eddsa(const dst_private_t *priv, isc_boolean_t external) {
 
 #ifndef PK11_MD5_DISABLE
 static int
-check_hmac_md5(const dst_private_t *priv, isc_boolean_t old) {
+check_hmac_md5(const dst_private_t *priv, bool old) {
        int i, j;
 
        if (priv->nelements != HMACMD5_NTAGS) {
@@ -386,7 +387,7 @@ check_hmac_sha(const dst_private_t *priv, unsigned int ntags,
 
 static int
 check_data(const dst_private_t *priv, const unsigned int alg,
-          isc_boolean_t old, isc_boolean_t external)
+          bool old, bool external)
 {
 #ifdef PK11_MD5_DISABLE
        UNUSED(old);
@@ -463,7 +464,7 @@ dst__privstruct_parse(dst_key_t *key, unsigned int alg, isc_lex_t *lex,
        unsigned int opt = ISC_LEXOPT_EOL;
        isc_stdtime_t when;
        isc_result_t ret;
-       isc_boolean_t external = ISC_FALSE;
+       bool external = false;
 
        REQUIRE(priv != NULL);
 
@@ -563,7 +564,7 @@ dst__privstruct_parse(dst_key_t *key, unsigned int alg, isc_lex_t *lex,
                }
 
                if (strcmp(DST_AS_STR(token), "External:") == 0) {
-                       external = ISC_TRUE;
+                       external = true;
                        goto next;
                }
 
@@ -640,9 +641,9 @@ dst__privstruct_parse(dst_key_t *key, unsigned int alg, isc_lex_t *lex,
 
 #ifdef PK11_MD5_DISABLE
        check = check_data(priv, alg == DST_ALG_RSA ? DST_ALG_RSASHA1 : alg,
-                          ISC_TRUE, external);
+                          true, external);
 #else
-       check = check_data(priv, alg, ISC_TRUE, external);
+       check = check_data(priv, alg, true, external);
 #endif
        if (check < 0) {
                ret = DST_R_INVALIDPRIVATEKEY;
@@ -683,7 +684,7 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
 
        REQUIRE(priv != NULL);
 
-       ret = check_data(priv, dst_key_alg(key), ISC_FALSE, key->external);
+       ret = check_data(priv, dst_key_alg(key), false, key->external);
        if (ret < 0)
                return (DST_R_INVALIDPRIVATEKEY);
        else if (ret != ISC_R_SUCCESS)
index e21a84c71e23497bbcad60d26c6061544c8673c3..93ad7954012a520878d3b0070aa073bca2749ced 100644 (file)
@@ -385,7 +385,7 @@ cleanup:
 }
 
 void
-dns_dyndb_cleanup(isc_boolean_t exiting) {
+dns_dyndb_cleanup(bool exiting) {
        dyndb_implementation_t *elem;
        dyndb_implementation_t *prev;
 
@@ -406,7 +406,7 @@ dns_dyndb_cleanup(isc_boolean_t exiting) {
        }
        UNLOCK(&dyndb_lock);
 
-       if (exiting == ISC_TRUE)
+       if (exiting == true)
                isc_mutex_destroy(&dyndb_lock);
 }
 
index 0c35baf03cfcd906782f26bd2f3df1cbc11e8271..cf24d7374696c568bca191edaaebf391f974c25b 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+
 #include <isc/result.h>
 #include <isc/util.h>
 #include <isc/mutex.h>
@@ -186,7 +188,7 @@ destroy_ecdb(dns_ecdb_t **ecdbp) {
 static void
 detach(dns_db_t **dbp) {
        dns_ecdb_t *ecdb;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(dbp != NULL);
        ecdb = (dns_ecdb_t *)*dbp;
@@ -195,7 +197,7 @@ detach(dns_db_t **dbp) {
        LOCK(&ecdb->lock);
        ecdb->references--;
        if (ecdb->references == 0 && ISC_LIST_EMPTY(ecdb->nodes))
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&ecdb->lock);
 
        if (need_destroy)
@@ -226,7 +228,7 @@ static void
 destroynode(dns_ecdbnode_t *node) {
        isc_mem_t *mctx;
        dns_ecdb_t *ecdb = node->ecdb;
-       isc_boolean_t need_destroydb = ISC_FALSE;
+       bool need_destroydb = false;
        rdatasetheader_t *header;
 
        mctx = ecdb->common.mctx;
@@ -234,7 +236,7 @@ destroynode(dns_ecdbnode_t *node) {
        LOCK(&ecdb->lock);
        ISC_LIST_UNLINK(ecdb->nodes, node, link);
        if (ecdb->references == 0 && ISC_LIST_EMPTY(ecdb->nodes))
-               need_destroydb = ISC_TRUE;
+               need_destroydb = true;
        UNLOCK(&ecdb->lock);
 
        dns_name_free(&node->name, mctx);
@@ -262,7 +264,7 @@ static void
 detachnode(dns_db_t *db, dns_dbnode_t **nodep) {
        dns_ecdb_t *ecdb = (dns_ecdb_t *)db;
        dns_ecdbnode_t *node;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(VALID_ECDB(ecdb));
        REQUIRE(nodep != NULL);
@@ -275,7 +277,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **nodep) {
        INSIST(node->references > 0);
        node->references--;
        if (node->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&node->lock);
 
        if (need_destroy)
@@ -329,7 +331,7 @@ findzonecut(dns_db_t *db, dns_name_t *name,
 }
 
 static isc_result_t
-findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnode(dns_db_t *db, dns_name_t *name, bool create,
         dns_dbnode_t **nodep)
 {
        dns_ecdb_t *ecdb = (dns_ecdb_t *)db;
@@ -342,7 +344,7 @@ findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
 
        UNUSED(name);
 
-       if (create != ISC_TRUE) {
+       if (create != true)     {
                /* an 'ephemeral' node is never reused. */
                return (ISC_R_NOTFOUND);
        }
index b38623bd47c9124636f74655655df8e026fc299c..cf1865fe9dad73d390cebec816bf36c952d30538 100644 (file)
@@ -181,7 +181,7 @@ dns_fwdtable_delete(dns_fwdtable_t *fwdtable, dns_name_t *name) {
        REQUIRE(VALID_FWDTABLE(fwdtable));
 
        RWLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
-       result = dns_rbt_deletename(fwdtable->table, name, ISC_FALSE);
+       result = dns_rbt_deletename(fwdtable->table, name, false);
        RWUNLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
 
        if (result == DNS_R_PARTIALMATCH)
index 816c66477ea65fcd1dc9375c5e68df57a2523cc8..84c3e7f78f35520da5af812ea3f895f7a24ca3b3 100644 (file)
@@ -29,9 +29,9 @@
 #include <sys/types.h>          /* Required on some systems for dirent.h. */
 
 #include <dirent.h>
+#include <stdbool.h>
 #include <unistd.h>            /* XXXDCL Required for ?. */
 
-#include <isc/boolean.h>
 #include <isc/lang.h>
 
 #ifdef NEED_OPTARG
@@ -48,18 +48,18 @@ typedef struct {
 
 ISC_LANG_BEGINDECLS
 
-static isc_boolean_t
+static bool
 start_directory(const char *path, isc_dir_t *dir) {
        dir->handle = opendir(path);
 
        if (dir->handle != NULL)
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 
 }
 
-static isc_boolean_t
+static bool
 next_file(isc_dir_t *dir) {
        struct dirent *dirent;
 
@@ -72,9 +72,9 @@ next_file(isc_dir_t *dir) {
        }
 
        if (dir->filename != NULL)
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static void
index cd21a562afb13ffcd1bd7415422e47045575a47b..47910326506a406d943af223601d8ade83b6939c 100644 (file)
 #ifndef DNS_GEN_WIN32_H
 #define DNS_GEN_WIN32_H 1
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 #include <windows.h>
 
-#include <isc/boolean.h>
 #include <isc/lang.h>
 
 int isc_commandline_index = 1;         /* Index into parent argv vector. */
@@ -72,8 +72,8 @@ int isc_commandline_option;           /* Character checked for validity. */
 char *isc_commandline_argument;                /* Argument associated with option. */
 char *isc_commandline_progname;                /* For printing error messages. */
 
-isc_boolean_t isc_commandline_errprint = ISC_TRUE; /* Print error messages. */
-isc_boolean_t isc_commandline_reset = ISC_TRUE; /* Reset processing. */
+bool isc_commandline_errprint = true; /* Print error messages. */
+bool isc_commandline_reset = true; /* Reset processing. */
 
 #define BADOPT '?'
 #define BADARG ':'
@@ -95,7 +95,7 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) {
         * the previous argv was finished.
         */
        if (isc_commandline_reset || *place == '\0') {
-               isc_commandline_reset = ISC_FALSE;
+               isc_commandline_reset = false;
 
                if (isc_commandline_progname == NULL)
                        isc_commandline_progname = argv[0];
@@ -204,11 +204,11 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) {
 typedef struct {
        HANDLE handle;
        WIN32_FIND_DATA find_data;
-       isc_boolean_t first_file;
+       bool first_file;
        char *filename;
 } isc_dir_t;
 
-isc_boolean_t
+bool
 start_directory(const char *path, isc_dir_t *dir) {
        char pattern[_MAX_PATH], *p;
 
@@ -216,7 +216,7 @@ start_directory(const char *path, isc_dir_t *dir) {
         * Need space for slash-splat and final NUL.
         */
        if (strlen(path) + 3 > sizeof(pattern))
-               return (ISC_FALSE);
+               return (false);
 
        strcpy(pattern, path);
 
@@ -229,23 +229,23 @@ start_directory(const char *path, isc_dir_t *dir) {
        *p++ = '*';
        *p++ = '\0';
 
-       dir->first_file = ISC_TRUE;
+       dir->first_file = true;
 
        dir->handle = FindFirstFile(pattern, &dir->find_data);
 
        if (dir->handle == INVALID_HANDLE_VALUE) {
                dir->filename = NULL;
-               return (ISC_FALSE);
+               return (false);
        } else {
                dir->filename = dir->find_data.cFileName;
-               return (ISC_TRUE);
+               return (true);
        }
 }
 
-isc_boolean_t
+bool
 next_file(isc_dir_t *dir) {
        if (dir->first_file)
-               dir->first_file = ISC_FALSE;
+               dir->first_file = false;
 
        else if (dir->handle != INVALID_HANDLE_VALUE) {
                if (FindNextFile(dir->handle, &dir->find_data) == TRUE)
@@ -257,9 +257,9 @@ next_file(isc_dir_t *dir) {
                dir->filename = NULL;
 
        if (dir->filename != NULL)
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 void
index 00809a46538cadeafcbbcf2c6f8c78cb287b3120..2a3b94bbf717de18932dd91f55c88910d04601e5 100644 (file)
 #define TOTEXTARGS "rdata, tctx, target"
 #define TOTEXTCLASS "rdata->rdclass"
 #define TOTEXTTYPE "rdata->type"
-#define TOTEXTDEF "use_default = ISC_TRUE"
+#define TOTEXTDEF "use_default = true"
 
 #define FROMWIREARGS "rdclass, type, source, dctx, options, target"
 #define FROMWIRECLASS "rdclass"
 #define FROMWIRETYPE "type"
-#define FROMWIREDEF "use_default = ISC_TRUE"
+#define FROMWIREDEF "use_default = true"
 
 #define TOWIREARGS "rdata, cctx, target"
 #define TOWIRECLASS "rdata->rdclass"
 #define TOWIRETYPE "rdata->type"
-#define TOWIREDEF "use_default = ISC_TRUE"
+#define TOWIREDEF "use_default = true"
 
 #define FROMSTRUCTARGS "rdclass, type, source, target"
 #define FROMSTRUCTCLASS "rdclass"
 #define FROMSTRUCTTYPE "type"
-#define FROMSTRUCTDEF "use_default = ISC_TRUE"
+#define FROMSTRUCTDEF "use_default = true"
 
 #define TOSTRUCTARGS "rdata, target, mctx"
 #define TOSTRUCTCLASS "rdata->rdclass"
 #define TOSTRUCTTYPE "rdata->type"
-#define TOSTRUCTDEF "use_default = ISC_TRUE"
+#define TOSTRUCTDEF "use_default = true"
 
 #define FREESTRUCTARGS "source"
 #define FREESTRUCTCLASS "common->rdclass"
 #define COMPAREARGS "rdata1, rdata2"
 #define COMPARECLASS "rdata1->rdclass"
 #define COMPARETYPE "rdata1->type"
-#define COMPAREDEF "use_default = ISC_TRUE"
+#define COMPAREDEF "use_default = true"
 
 #define ADDITIONALDATAARGS "rdata, add, arg"
 #define ADDITIONALDATACLASS "rdata->rdclass"
 #define ADDITIONALDATATYPE "rdata->type"
-#define ADDITIONALDATADEF "use_default = ISC_TRUE"
+#define ADDITIONALDATADEF "use_default = true"
 
 #define DIGESTARGS "rdata, digest, arg"
 #define DIGESTCLASS "rdata->rdclass"
 #define DIGESTTYPE "rdata->type"
-#define DIGESTDEF "use_default = ISC_TRUE"
+#define DIGESTDEF "use_default = true"
 
 #define CHECKOWNERARGS "name, rdclass, type, wildcard"
 #define CHECKOWNERCLASS "rdclass"
 #define CHECKOWNERTYPE "type"
-#define CHECKOWNERDEF "result = ISC_TRUE"
+#define CHECKOWNERDEF "result = true"
 
 #define CHECKNAMESARGS "rdata, owner, bad"
 #define CHECKNAMESCLASS "rdata->rdclass"
 #define CHECKNAMESTYPE "rdata->type"
-#define CHECKNAMESDEF "result = ISC_TRUE"
+#define CHECKNAMESDEF "result = true"
 
 static const char copyright[] =
 "/*\n"
@@ -637,7 +637,6 @@ main(int argc, char **argv) {
                fputs("#ifndef DNS_CODE_H\n", stdout);
                fputs("#define DNS_CODE_H 1\n\n", stdout);
 
-               fputs("#include <isc/boolean.h>\n", stdout);
                fputs("#include <isc/result.h>\n\n", stdout);
                fputs("#include <dns/name.h>\n\n", stdout);
 
index 343220386498e666bba6f343140d0757eca8503c..ec20baa95834d7082e6ed0ae594106a2f4aab57d 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/util.h>
 
 #include <isc/mem.h>
@@ -78,7 +80,7 @@ typedef struct geoip_state {
 
 #ifdef ISC_PLATFORM_USETHREADS
 static isc_mutex_t key_mutex;
-static isc_boolean_t state_key_initialized = ISC_FALSE;
+static bool state_key_initialized = false;
 static isc_thread_key_t state_key;
 static isc_once_t mutex_once = ISC_ONCE_INIT;
 static isc_mem_t *state_mctx = NULL;
@@ -117,11 +119,11 @@ state_key_init(void) {
                        if (result != ISC_R_SUCCESS)
                                goto unlock;
                        isc_mem_setname(state_mctx, "geoip_state", NULL);
-                       isc_mem_setdestroycheck(state_mctx, ISC_FALSE);
+                       isc_mem_setdestroycheck(state_mctx, false);
 
                        ret = isc_thread_key_create(&state_key, free_state);
                        if (ret == 0)
-                               state_key_initialized = ISC_TRUE;
+                               state_key_initialized = true;
                        else
                                result = ISC_R_FAILURE;
                }
@@ -374,7 +376,7 @@ city_string(GeoIPRecord *record, dns_geoip_subtype_t subtype, int *maxlen) {
        }
 }
 
-static isc_boolean_t
+static bool
 is_city(dns_geoip_subtype_t subtype) {
        switch (subtype) {
        case dns_geoip_city_countrycode:
@@ -388,9 +390,9 @@ is_city(dns_geoip_subtype_t subtype) {
        case dns_geoip_city_timezonecode:
        case dns_geoip_city_metrocode:
        case dns_geoip_city_areacode:
-               return (ISC_TRUE);
+               return (true);
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -468,14 +470,14 @@ static char * region_string(GeoIPRegion *region, dns_geoip_subtype_t subtype, in
        }
 }
 
-static isc_boolean_t
+static bool
 is_region(dns_geoip_subtype_t subtype) {
        switch (subtype) {
        case dns_geoip_region_countrycode:
        case dns_geoip_region_code:
-               return (ISC_TRUE);
+               return (true);
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -563,7 +565,7 @@ netspeed_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
                uint32_t ipnum, uint8_t *scope)
 {
        geoip_state_t *prev_state = NULL;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
        GeoIPLookup gl;
        int id = -1;
 
@@ -574,7 +576,7 @@ netspeed_lookup(GeoIP *db, dns_geoip_subtype_t subtype,
                id = prev_state->id;
                if (scope != NULL)
                        *scope = prev_state->scope;
-               found = ISC_TRUE;
+               found = true;
        }
 
        if (!found) {
@@ -647,7 +649,7 @@ fix_subtype(const isc_netaddr_t *reqaddr, const dns_geoip_databases_t *geoip,
 }
 #endif /* HAVE_GEOIP */
 
-isc_boolean_t
+bool
 dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                const dns_geoip_databases_t *geoip,
                const dns_geoip_elem_t *elt)
@@ -657,7 +659,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
        UNUSED(geoip);
        UNUSED(elt);
 
-       return (ISC_FALSE);
+       return (false);
 #else
        GeoIP *db;
        GeoIPRecord *record;
@@ -685,10 +687,10 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                ipnum6 = &reqaddr->type.in6;
                break;
 #else
-               return (ISC_FALSE);
+               return (false);
 #endif
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 
        subtype = fix_subtype(reqaddr, geoip, elt->subtype);
@@ -707,13 +709,13 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
  getcountry:
                db = DB46(reqaddr, geoip, country);
                if (db == NULL)
-                       return (ISC_FALSE);
+                       return (false);
 
                INSIST(elt->as_string != NULL);
 
                cs = country_lookup(db, subtype, family, ipnum, ipnum6, scope);
                if (cs != NULL && strncasecmp(elt->as_string, cs, maxlen) == 0)
-                       return (ISC_TRUE);
+                       return (true);
                break;
 
        case dns_geoip_city_countrycode:
@@ -729,7 +731,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
 
                db = DB46(reqaddr, geoip, city);
                if (db == NULL)
-                       return (ISC_FALSE);
+                       return (false);
 
                record = city_lookup(db, subtype, family,
                                     ipnum, ipnum6, scope);
@@ -739,13 +741,13 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                s = city_string(record, subtype, &maxlen);
                INSIST(maxlen != 0);
                if (s != NULL && strncasecmp(elt->as_string, s, maxlen) == 0)
-                       return (ISC_TRUE);
+                       return (true);
                break;
 
        case dns_geoip_city_metrocode:
                db = DB46(reqaddr, geoip, city);
                if (db == NULL)
-                       return (ISC_FALSE);
+                       return (false);
 
                record = city_lookup(db, subtype, family,
                                     ipnum, ipnum6, scope);
@@ -753,13 +755,13 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                        break;
 
                if (elt->as_int == record->metro_code)
-                       return (ISC_TRUE);
+                       return (true);
                break;
 
        case dns_geoip_city_areacode:
                db = DB46(reqaddr, geoip, city);
                if (db == NULL)
-                       return (ISC_FALSE);
+                       return (false);
 
                record = city_lookup(db, subtype, family,
                                     ipnum, ipnum6, scope);
@@ -767,7 +769,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                        break;
 
                if (elt->as_int == record->area_code)
-                       return (ISC_TRUE);
+                       return (true);
                break;
 
        case dns_geoip_region_countrycode:
@@ -775,13 +777,13 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
        case dns_geoip_region_name:
        case dns_geoip_region:
                if (geoip->region == NULL)
-                       return (ISC_FALSE);
+                       return (false);
 
                INSIST(elt->as_string != NULL);
 
                /* Region DB is not supported for IPv6 */
                if (family == AF_INET6)
-                       return (ISC_FALSE);
+                       return (false);
 
                region = region_lookup(geoip->region, subtype, ipnum, scope);
                if (region == NULL)
@@ -790,7 +792,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                s = region_string(region, subtype, &maxlen);
                INSIST(maxlen != 0);
                if (s != NULL && strncasecmp(elt->as_string, s, maxlen) == 0)
-                       return (ISC_TRUE);
+                       return (true);
                break;
 
        case dns_geoip_isp_name:
@@ -810,18 +812,18 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
 
  getname:
                if (db == NULL)
-                       return (ISC_FALSE);
+                       return (false);
 
                INSIST(elt->as_string != NULL);
                /* ISP, Org, AS, and Domain are not supported for IPv6 */
                if (family == AF_INET6)
-                       return (ISC_FALSE);
+                       return (false);
 
                s = name_lookup(db, subtype, ipnum, scope);
                if (s != NULL) {
                        size_t l;
                        if (strcasecmp(elt->as_string, s) == 0)
-                               return (ISC_TRUE);
+                               return (true);
                        if (subtype != dns_geoip_as_asnum)
                                break;
                        /*
@@ -831,7 +833,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                        if (l > 0U && strchr(elt->as_string, ' ') == NULL &&
                            strncasecmp(elt->as_string, s, l) == 0 &&
                            s[l] == ' ')
-                               return (ISC_TRUE);
+                               return (true);
                }
                break;
 
@@ -840,11 +842,11 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
 
                /* Netspeed DB is not supported for IPv6 */
                if (family == AF_INET6)
-                       return (ISC_FALSE);
+                       return (false);
 
                id = netspeed_lookup(geoip->netspeed, subtype, ipnum, scope);
                if (id == elt->as_int)
-                       return (ISC_TRUE);
+                       return (true);
                break;
 
        case dns_geoip_countrycode:
@@ -861,7 +863,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                INSIST(0);
        }
 
-       return (ISC_FALSE);
+       return (false);
 #endif
 }
 
index 5a4c5c4aad756182aad03631291b10cf26031496..82eac957c8e517e1a4ee452b4362969f008b0c5e 100644 (file)
@@ -13,6 +13,8 @@
 
 #ifdef GSSAPI
 
+#include <stdbool.h>
+
 #include <isc/base64.h>
 #include <isc/buffer.h>
 #include <isc/mem.h>
@@ -242,13 +244,13 @@ gssapi_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 gssapi_compare(const dst_key_t *key1, const dst_key_t *key2) {
        gss_ctx_id_t gsskey1 = key1->keydata.gssctx;
        gss_ctx_id_t gsskey2 = key2->keydata.gssctx;
 
        /* No idea */
-       return (ISC_TF(gsskey1 == gsskey2));
+       return (gsskey1 == gsskey2);
 }
 
 static isc_result_t
@@ -261,10 +263,10 @@ gssapi_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ISC_R_FAILURE);
 }
 
-static isc_boolean_t
+static bool
 gssapi_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
index 8b34a4769356e3e42422cf5fd51b6925b25cc9fd..cac049867c9e0d41ddcd9b01f6ab6987e043d905 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -246,7 +247,7 @@ check_config(const char *gss_name) {
 #endif
 
 isc_result_t
-dst_gssapi_acquirecred(dns_name_t *name, isc_boolean_t initiate,
+dst_gssapi_acquirecred(dns_name_t *name, bool initiate,
                       gss_cred_id_t *cred)
 {
 #ifdef GSSAPI
@@ -343,7 +344,7 @@ cleanup:
 #endif
 }
 
-isc_boolean_t
+bool
 dst_gssapi_identitymatchesrealmkrb5(dns_name_t *signer, dns_name_t *name,
                                    dns_name_t *realm)
 {
@@ -375,7 +376,7 @@ dst_gssapi_identitymatchesrealmkrb5(dns_name_t *signer, dns_name_t *name,
         */
        rname = strchr(sbuf, '@');
        if (rname == NULL)
-               return (isc_boolean_false);
+               return (false);
        *rname = '\0';
        rname++;
 
@@ -389,11 +390,11 @@ dst_gssapi_identitymatchesrealmkrb5(dns_name_t *signer, dns_name_t *name,
         */
        sname = strchr(sbuf, '/');
        if (sname == NULL)
-               return (isc_boolean_false);
+               return (false);
        *sname = '\0';
        sname++;
        if (strcmp(sbuf, "host") != 0)
-               return (isc_boolean_false);
+               return (false);
 
        /*
         * Now, we do a simple comparison between the name and the realm.
@@ -401,22 +402,22 @@ dst_gssapi_identitymatchesrealmkrb5(dns_name_t *signer, dns_name_t *name,
        if (name != NULL) {
                if ((strcasecmp(sname, nbuf) == 0)
                    && (strcmp(rname, rbuf) == 0))
-                       return (isc_boolean_true);
+                       return (true);
        } else {
                if (strcmp(rname, rbuf) == 0)
-                       return (isc_boolean_true);
+                       return (true);
        }
 
-       return (isc_boolean_false);
+       return (false);
 #else
        UNUSED(signer);
        UNUSED(name);
        UNUSED(realm);
-       return (isc_boolean_false);
+       return (false);
 #endif
 }
 
-isc_boolean_t
+bool
 dst_gssapi_identitymatchesrealmms(dns_name_t *signer, dns_name_t *name,
                                  dns_name_t *realm)
 {
@@ -449,16 +450,16 @@ dst_gssapi_identitymatchesrealmms(dns_name_t *signer, dns_name_t *name,
         */
        rname = strchr(sbuf, '@');
        if (rname == NULL)
-               return (isc_boolean_false);
+               return (false);
        sname = strchr(sbuf, '$');
        if (sname == NULL)
-               return (isc_boolean_false);
+               return (false);
 
        /*
         * Verify that the $ and @ follow one another.
         */
        if (rname - sname != 1)
-               return (isc_boolean_false);
+               return (false);
 
        /*
         * Find the host portion of the signer's name.  Zero out the $ so
@@ -480,7 +481,7 @@ dst_gssapi_identitymatchesrealmms(dns_name_t *signer, dns_name_t *name,
        if (name != NULL) {
                nname = strchr(nbuf, '.');
                if (nname == NULL)
-                       return (isc_boolean_false);
+                       return (false);
                *nname++ = '\0';
        }
 
@@ -491,19 +492,19 @@ dst_gssapi_identitymatchesrealmms(dns_name_t *signer, dns_name_t *name,
                if ((strcasecmp(sname, nbuf) == 0)
                    && (strcmp(rname, rbuf) == 0)
                    && (strcasecmp(nname, rbuf) == 0))
-                       return (isc_boolean_true);
+                       return (true);
        } else {
                if (strcmp(rname, rbuf) == 0)
-                       return (isc_boolean_true);
+                       return (true);
        }
 
 
-       return (isc_boolean_false);
+       return (false);
 #else
        UNUSED(signer);
        UNUSED(name);
        UNUSED(realm);
-       return (isc_boolean_false);
+       return (false);
 #endif
 }
 
index 59aa4705e5b9277ae1d3d19a8e9b978365f4d40a..94e73b1d9e2d50aa641c1f0dc96d4b66ae8a525f 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/buffer.h>
 #include <isc/hmacmd5.h>
 #include <isc/hmacsha.h>
@@ -124,7 +126,7 @@ hmacmd5_verify(dst_context_t *dctx, const isc_region_t *sig) {
                return (DST_R_VERIFYFAILURE);
 }
 
-static isc_boolean_t
+static bool
 hmacmd5_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dst_hmacmd5_key_t *hkey1, *hkey2;
 
@@ -132,14 +134,14 @@ hmacmd5_compare(const dst_key_t *key1, const dst_key_t *key2) {
        hkey2 = key2->keydata.hmacmd5;
 
        if (hkey1 == NULL && hkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (hkey1 == NULL || hkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (isc_safe_memequal(hkey1->key, hkey2->key, ISC_MD5_BLOCK_LENGTH))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static isc_result_t
@@ -158,7 +160,7 @@ hmacmd5_generate(dst_key_t *key, int pseudorandom_ok, void (*callback)(int)) {
        }
 
        memset(data, 0, ISC_MD5_BLOCK_LENGTH);
-       ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
+       ret = dst__entropy_getdata(data, bytes, pseudorandom_ok);
 
        if (ret != ISC_R_SUCCESS)
                return (ret);
@@ -171,10 +173,10 @@ hmacmd5_generate(dst_key_t *key, int pseudorandom_ok, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 hmacmd5_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -357,7 +359,7 @@ dst__hmacmd5_init(dst_func_t **funcp) {
         * Prevent use of incorrect crypto
         */
 
-       RUNTIME_CHECK(isc_md5_check(ISC_FALSE));
+       RUNTIME_CHECK(isc_md5_check(false));
        RUNTIME_CHECK(isc_hmacmd5_check(0));
 
        REQUIRE(funcp != NULL);
@@ -432,7 +434,7 @@ hmacsha1_verify(dst_context_t *dctx, const isc_region_t *sig) {
                return (DST_R_VERIFYFAILURE);
 }
 
-static isc_boolean_t
+static bool
 hmacsha1_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dst_hmacsha1_key_t *hkey1, *hkey2;
 
@@ -440,14 +442,14 @@ hmacsha1_compare(const dst_key_t *key1, const dst_key_t *key2) {
        hkey2 = key2->keydata.hmacsha1;
 
        if (hkey1 == NULL && hkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (hkey1 == NULL || hkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (isc_safe_memequal(hkey1->key, hkey2->key, ISC_SHA1_BLOCK_LENGTH))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static isc_result_t
@@ -466,7 +468,7 @@ hmacsha1_generate(dst_key_t *key, int pseudorandom_ok, void (*callback)(int)) {
        }
 
        memset(data, 0, ISC_SHA1_BLOCK_LENGTH);
-       ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
+       ret = dst__entropy_getdata(data, bytes, pseudorandom_ok);
 
        if (ret != ISC_R_SUCCESS)
                return (ret);
@@ -479,10 +481,10 @@ hmacsha1_generate(dst_key_t *key, int pseudorandom_ok, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 hmacsha1_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -649,7 +651,7 @@ dst__hmacsha1_init(dst_func_t **funcp) {
        /*
         * Prevent use of incorrect crypto
         */
-       RUNTIME_CHECK(isc_sha1_check(ISC_FALSE));
+       RUNTIME_CHECK(isc_sha1_check(false));
        RUNTIME_CHECK(isc_hmacsha1_check(0));
 
        REQUIRE(funcp != NULL);
@@ -723,7 +725,7 @@ hmacsha224_verify(dst_context_t *dctx, const isc_region_t *sig) {
                return (DST_R_VERIFYFAILURE);
 }
 
-static isc_boolean_t
+static bool
 hmacsha224_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dst_hmacsha224_key_t *hkey1, *hkey2;
 
@@ -731,14 +733,14 @@ hmacsha224_compare(const dst_key_t *key1, const dst_key_t *key2) {
        hkey2 = key2->keydata.hmacsha224;
 
        if (hkey1 == NULL && hkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (hkey1 == NULL || hkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (isc_safe_memequal(hkey1->key, hkey2->key, ISC_SHA224_BLOCK_LENGTH))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static isc_result_t
@@ -759,7 +761,7 @@ hmacsha224_generate(dst_key_t *key, int pseudorandom_ok,
        }
 
        memset(data, 0, ISC_SHA224_BLOCK_LENGTH);
-       ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
+       ret = dst__entropy_getdata(data, bytes, pseudorandom_ok);
 
        if (ret != ISC_R_SUCCESS)
                return (ret);
@@ -772,10 +774,10 @@ hmacsha224_generate(dst_key_t *key, int pseudorandom_ok,
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 hmacsha224_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -1010,7 +1012,7 @@ hmacsha256_verify(dst_context_t *dctx, const isc_region_t *sig) {
                return (DST_R_VERIFYFAILURE);
 }
 
-static isc_boolean_t
+static bool
 hmacsha256_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dst_hmacsha256_key_t *hkey1, *hkey2;
 
@@ -1018,14 +1020,14 @@ hmacsha256_compare(const dst_key_t *key1, const dst_key_t *key2) {
        hkey2 = key2->keydata.hmacsha256;
 
        if (hkey1 == NULL && hkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (hkey1 == NULL || hkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (isc_safe_memequal(hkey1->key, hkey2->key, ISC_SHA256_BLOCK_LENGTH))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static isc_result_t
@@ -1046,7 +1048,7 @@ hmacsha256_generate(dst_key_t *key, int pseudorandom_ok,
        }
 
        memset(data, 0, ISC_SHA256_BLOCK_LENGTH);
-       ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
+       ret = dst__entropy_getdata(data, bytes, pseudorandom_ok);
 
        if (ret != ISC_R_SUCCESS)
                return (ret);
@@ -1059,10 +1061,10 @@ hmacsha256_generate(dst_key_t *key, int pseudorandom_ok,
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 hmacsha256_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -1297,7 +1299,7 @@ hmacsha384_verify(dst_context_t *dctx, const isc_region_t *sig) {
                return (DST_R_VERIFYFAILURE);
 }
 
-static isc_boolean_t
+static bool
 hmacsha384_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dst_hmacsha384_key_t *hkey1, *hkey2;
 
@@ -1305,14 +1307,14 @@ hmacsha384_compare(const dst_key_t *key1, const dst_key_t *key2) {
        hkey2 = key2->keydata.hmacsha384;
 
        if (hkey1 == NULL && hkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (hkey1 == NULL || hkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (isc_safe_memequal(hkey1->key, hkey2->key, ISC_SHA384_BLOCK_LENGTH))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static isc_result_t
@@ -1333,7 +1335,7 @@ hmacsha384_generate(dst_key_t *key, int pseudorandom_ok,
        }
 
        memset(data, 0, ISC_SHA384_BLOCK_LENGTH);
-       ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
+       ret = dst__entropy_getdata(data, bytes, pseudorandom_ok);
 
        if (ret != ISC_R_SUCCESS)
                return (ret);
@@ -1346,10 +1348,10 @@ hmacsha384_generate(dst_key_t *key, int pseudorandom_ok,
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 hmacsha384_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -1584,7 +1586,7 @@ hmacsha512_verify(dst_context_t *dctx, const isc_region_t *sig) {
                return (DST_R_VERIFYFAILURE);
 }
 
-static isc_boolean_t
+static bool
 hmacsha512_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dst_hmacsha512_key_t *hkey1, *hkey2;
 
@@ -1592,14 +1594,14 @@ hmacsha512_compare(const dst_key_t *key1, const dst_key_t *key2) {
        hkey2 = key2->keydata.hmacsha512;
 
        if (hkey1 == NULL && hkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (hkey1 == NULL || hkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (isc_safe_memequal(hkey1->key, hkey2->key, ISC_SHA512_BLOCK_LENGTH))
-               return (ISC_TRUE);
+               return (true);
        else
-               return (ISC_FALSE);
+               return (false);
 }
 
 static isc_result_t
@@ -1620,7 +1622,7 @@ hmacsha512_generate(dst_key_t *key, int pseudorandom_ok,
        }
 
        memset(data, 0, ISC_SHA512_BLOCK_LENGTH);
-       ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
+       ret = dst__entropy_getdata(data, bytes, pseudorandom_ok);
 
        if (ret != ISC_R_SUCCESS)
                return (ret);
@@ -1633,10 +1635,10 @@ hmacsha512_generate(dst_key_t *key, int pseudorandom_ok,
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 hmacsha512_isprivate(const dst_key_t *key) {
        UNUSED(key);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
index b69d290e99b8752c57238a6d972971fa7c05156a..3da434000787aae9c6ea82b4633a43ae419e0082 100644 (file)
@@ -382,7 +382,7 @@ dns_acache_setentry(dns_acache_t *acache, dns_acacheentry_t *entry,
  *     ISC_R_NOTFOUND
  */
 
-isc_boolean_t
+bool
 dns_acache_cancelentry(dns_acacheentry_t *entry);
 /*
  * Cancel the use of the cache entry 'entry'.  This function is supposed to
@@ -395,7 +395,7 @@ dns_acache_cancelentry(dns_acacheentry_t *entry);
  *     'entry' is a valid additional cache entry.
  *
  * Returns:
- *     ISC_TRUE if the entry was active when canceled
+ *     true if the entry was active when canceled
  */
 
 void
index 6704b7457f5613eb356e76a6612f2c68de87b2f0..c8a783361c8f91b11d7d5e497753d2982100d1c8 100644 (file)
@@ -27,6 +27,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/magic.h>
 #include <isc/netaddr.h>
@@ -68,7 +70,7 @@ struct dns_aclipprefix {
 
 struct dns_aclelement {
        dns_aclelementtype_t    type;
-       isc_boolean_t           negative;
+       bool            negative;
        dns_name_t              keyname;
 #ifdef HAVE_GEOIP
        dns_geoip_elem_t        geoip_elem;
@@ -84,7 +86,7 @@ struct dns_acl {
        dns_iptable_t           *iptable;
 #define node_count             iptable->radix->num_added_node
        dns_aclelement_t        *elements;
-       isc_boolean_t           has_negatives;
+       bool            has_negatives;
        unsigned int            alloc;          /*%< Elements allocated */
        unsigned int            length;         /*%< Elements initialized */
        char                    *name;          /*%< Temporary use only */
@@ -94,10 +96,10 @@ struct dns_acl {
 struct dns_aclenv {
        dns_acl_t *localhost;
        dns_acl_t *localnets;
-       isc_boolean_t match_mapped;
+       bool match_mapped;
 #ifdef HAVE_GEOIP
        dns_geoip_databases_t *geoip;
-       isc_boolean_t geoip_use_ecs;
+       bool geoip_use_ecs;
 #endif
 };
 
@@ -130,20 +132,20 @@ dns_acl_none(isc_mem_t *mctx, dns_acl_t **target);
  * Create a new ACL that matches nothing.
  */
 
-isc_boolean_t
+bool
 dns_acl_isany(dns_acl_t *acl);
 /*%<
  * Test whether ACL is set to "{ any; }"
  */
 
-isc_boolean_t
+bool
 dns_acl_isnone(dns_acl_t *acl);
 /*%<
  * Test whether ACL is set to "{ none; }"
  */
 
 isc_result_t
-dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, isc_boolean_t pos);
+dns_acl_merge(dns_acl_t *dest, dns_acl_t *source, bool pos);
 /*%<
  * Merge the contents of one ACL into another.  Call dns_iptable_merge()
  * for the IP tables, then concatenate the element arrays.
@@ -177,15 +179,15 @@ dns_acl_detach(dns_acl_t **aclp);
  *\li  '*aclp' is not linked on final detach.
  */
 
-isc_boolean_t
+bool
 dns_acl_isinsecure(const dns_acl_t *a);
 /*%<
- * Return #ISC_TRUE iff the acl 'a' is considered insecure, that is,
+ * Return #true iff the acl 'a' is considered insecure, that is,
  * if it contains IP addresses other than those of the local host.
  * This is intended for applications such as printing warning
  * messages for suspect ACLs; it is not intended for making access
  * control decisions.  We make no guarantee that an ACL for which
- * this function returns #ISC_FALSE is safe.
+ * this function returns #false is safe.
  */
 
 isc_result_t
@@ -249,14 +251,14 @@ dns_acl_match2(const isc_netaddr_t *reqaddr,
  *\li  #ISC_R_SUCCESS          Always succeeds.
  */
 
-isc_boolean_t
+bool
 dns_aclelement_match(const isc_netaddr_t *reqaddr,
                     const dns_name_t *reqsigner,
                     const dns_aclelement_t *e,
                     const dns_aclenv_t *env,
                     const dns_aclelement_t **matchelt);
 
-isc_boolean_t
+bool
 dns_aclelement_match2(const isc_netaddr_t *reqaddr,
                      const dns_name_t *reqsigner,
                      const isc_netaddr_t *ecs,
@@ -267,7 +269,7 @@ dns_aclelement_match2(const isc_netaddr_t *reqaddr,
                      const dns_aclelement_t **matchelt);
 /*%<
  * Like dns_acl_match, but matches against the single ACL element 'e'
- * rather than a complete ACL, and returns ISC_TRUE iff it matched.
+ * rather than a complete ACL, and returns true iff it matched.
  *
  * To determine whether the match was positive or negative, the
  * caller should examine e->negative.  Since the element 'e' may be
index 1a5ce1ff116e3bee3fb1f59d325f9dc8b66b26c1..ca35bac8c065ac98b09e5b441f6a636e947514f1 100644 (file)
@@ -67,6 +67,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -662,7 +663,7 @@ dns_adb_ednsto(dns_adb_t *adb, dns_adbaddrinfo_t *addr, unsigned int size);
  *\li  addr be valid.
  */
 
-isc_boolean_t
+bool
 dns_adb_noedns(dns_adb_t *adb, dns_adbaddrinfo_t *addr);
 /*%
  * Return whether EDNS should be disabled for this server.
@@ -809,7 +810,7 @@ dns_adb_setquota(dns_adb_t *adb, uint32_t quota, uint32_t freq,
  *\li  'adb' is valid.
  */
 
-isc_boolean_t
+bool
 dns_adbentry_overquota(dns_adbentry_t *entry);
 /*%<
  * Returns true if the specified ADB has too many active fetches.
index 2de83313bd472a573bfb30d84930676b938a3a95..276e3cb718eb982723412d2a737d6394ff60e542 100644 (file)
@@ -42,6 +42,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <dns/types.h>
 
@@ -73,12 +74,12 @@ dns_badcache_destroy(dns_badcache_t **bcp);
 
 void
 dns_badcache_add(dns_badcache_t *bc, dns_name_t *name,
-                dns_rdatatype_t type, isc_boolean_t update,
+                dns_rdatatype_t type, bool update,
                 uint32_t flags, isc_time_t *expire);
 /*%
  * Adds a badcache entry to the badcache 'bc' for name 'name' and
  * type 'type'.  If an entry already exists, then it will be updated if
- * 'update' is ISC_TRUE.  The entry will be stored with flags 'flags'
+ * 'update' is true.  The entry will be stored with flags 'flags'
  * and expiration date 'expire'.
  *
  * Requires:
@@ -87,15 +88,15 @@ dns_badcache_add(dns_badcache_t *bc, dns_name_t *name,
  * \li expire != NULL
  */
 
-isc_boolean_t
+bool
 dns_badcache_find(dns_badcache_t *bc, dns_name_t *name,
                  dns_rdatatype_t type, uint32_t *flagp,
                  isc_time_t *now);
 /*%
- * Returns ISC_TRUE if a record is found in the badcache 'bc' matching
+ * Returns true if a record is found in the badcache 'bc' matching
  * 'name' and 'type', with an expiration date later than 'now'.
  * If 'flagp' is not NULL, then '*flagp' is updated to the flags
- * that were stored in the badcache entry.  Returns ISC_FALSE if
+ * that were stored in the badcache entry.  Returns false if
  * no matching record is found.
  *
  * Requires:
index 5a908036a205ed538828634999a0781c8ba7badc..9ebb57a87ff4e13ddcb29b2f2a06c61a67526800 100644 (file)
 typedef uint64_t dns_bitset_t;
 
 #define DNS_BIT_SET(bit, bitset) \
-     (*(bitset) |= ((dns_bitset_t)1 << (bit)))
+       (*(bitset) |= ((dns_bitset_t)1 << (bit)))
 #define DNS_BIT_CLEAR(bit, bitset) \
-     (*(bitset) &= ~((dns_bitset_t)1 << (bit)))
+       (*(bitset) &= ~((dns_bitset_t)1 << (bit)))
 #define DNS_BIT_CHECK(bit, bitset) \
-     ISC_TF((*(bitset) & ((dns_bitset_t)1 << (bit))) \
-           == ((dns_bitset_t)1 << (bit)))
+       ((*(bitset) & ((dns_bitset_t)1 << (bit)))       \
+        == ((dns_bitset_t)1 << (bit)))
 
 #endif /* DNS_BIT_H */
-
index 1bf7dbe5bb89a561641c44eba15d8ccf90d56dfe..9fe3009c3889be40a64b2f4a57a905b91b2701b2 100644 (file)
@@ -40,6 +40,8 @@
  *\li  Drafts: TBS
  */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/event.h>
 
@@ -140,7 +142,7 @@ dns_byaddr_destroy(dns_byaddr_t **byaddrp);
  */
 
 isc_result_t
-dns_byaddr_createptrname(isc_netaddr_t *address, isc_boolean_t nibble,
+dns_byaddr_createptrname(isc_netaddr_t *address, bool nibble,
                         dns_name_t *name);
 
 isc_result_t
index de6b0102112326bfe43ee12452226947fecd6cc6..62797dbbd48c3fff4df862ba5e0c05221667d0fb 100644 (file)
@@ -42,6 +42,8 @@
  ***   Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/json.h>
 #include <isc/lang.h>
 #include <isc/stats.h>
@@ -270,7 +272,7 @@ dns_cache_flush(dns_cache_t *cache);
 
 isc_result_t
 dns_cache_flushnode(dns_cache_t *cache, dns_name_t *name,
-                   isc_boolean_t tree);
+                   bool tree);
 /*
  * Flush a given name from the cache.  If 'tree' is true, then
  * also flush all names under 'name'.
@@ -289,7 +291,7 @@ isc_result_t
 dns_cache_flushname(dns_cache_t *cache, dns_name_t *name);
 /*
  * Flush a given name from the cache.  Equivalent to
- * dns_cache_flushpartial(cache, name, ISC_FALSE).
+ * dns_cache_flushpartial(cache, name, false).
  *
  * Requires:
  *\li  'cache' to be valid.
index 488fbab84b4d37f1a8acbff0459547a7e954c738..f3248ae540166ad6eb67f4d69b62a8d7cc658c92 100644 (file)
@@ -14,6 +14,7 @@
 #define DNS_CATZ_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/ht.h>
 #include <isc/lang.h>
@@ -62,7 +63,7 @@ struct dns_catz_entry_options {
        char *zonedir;
 
        /* zone should not be stored on disk (no 'file' statement in def */
-       isc_boolean_t in_memory;
+       bool in_memory;
        /*
         * Minimal interval between catalog zone updates, if a new version
         * of catalog zone is received before this time the update will be
@@ -178,14 +179,14 @@ dns_catz_entry_detach(dns_catz_zone_t *zone, dns_catz_entry_t **entryp);
  * \li entryp is not NULL, *entryp is not NULL
  */
 
-isc_boolean_t
+bool
 dns_catz_entry_validate(const dns_catz_entry_t *entry);
 /*%<
  * Validate whether entry is correct.
  * (NOT YET IMPLEMENTED: always returns true)
  */
 
-isc_boolean_t
+bool
 dns_catz_entry_cmp(const dns_catz_entry_t *ea, const dns_catz_entry_t *eb);
 /*%<
  * Deep compare two entries
@@ -195,8 +196,8 @@ dns_catz_entry_cmp(const dns_catz_entry_t *ea, const dns_catz_entry_t *eb);
  * \li eb is not NULL
  *
  * Returns:
- * \li ISC_TRUE if entries are the same
- * \li ISC_FALSE if the entries differ
+ * \li true if entries are the same
+ * \li false if the entries differ
  */
 
 void
index 6bec649cdedd905313fbb99444da59cb2fcaebd1..0c951d781a3f47941ee9cd5a75a3d1fd43a17b01 100644 (file)
@@ -13,6 +13,7 @@
 #define DNS_COMPRESS_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/region.h>
@@ -145,7 +146,7 @@ dns_compress_disable(dns_compress_t *cctx);
  */
 
 void
-dns_compress_setsensitive(dns_compress_t *cctx, isc_boolean_t sensitive);
+dns_compress_setsensitive(dns_compress_t *cctx, bool sensitive);
 
 /*
  *     Preserve the case of compressed domain names.
@@ -154,7 +155,7 @@ dns_compress_setsensitive(dns_compress_t *cctx, isc_boolean_t sensitive);
  *             'cctx' to be initialized.
  */
 
-isc_boolean_t
+bool
 dns_compress_getsensitive(dns_compress_t *cctx);
 /*
  *     Return whether case is to be preserved when compressing
@@ -177,7 +178,7 @@ dns_compress_getedns(dns_compress_t *cctx);
  *\li          -1 .. 255
  */
 
-isc_boolean_t
+bool
 dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
                        dns_name_t *prefix, uint16_t *offset);
 /*%<
@@ -190,10 +191,10 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
  *\li          'offset' to point to an uint16_t.
  *
  *     Ensures:
- *\li          'prefix' and 'offset' are valid if ISC_TRUE is  returned.
+ *\li          'prefix' and 'offset' are valid if true is      returned.
  *
  *     Returns:
- *\li          #ISC_TRUE / #ISC_FALSE
+ *\li          #true / #false
  */
 
 void
index 066dd1b25aacabbe8915f1f463e294f4cceba7df..ae6ae36596bcaa861db12f9e941bcf98b41b42d8 100644 (file)
@@ -49,6 +49,7 @@
  *****/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/deprecated.h>
 #include <isc/lang.h>
@@ -91,9 +92,9 @@ typedef struct dns_dbmethods {
                                         dns_dbversion_t **targetp);
        void            (*closeversion)(dns_db_t *db,
                                        dns_dbversion_t **versionp,
-                                       isc_boolean_t commit);
+                                       bool commit);
        isc_result_t    (*findnode)(dns_db_t *db, dns_name_t *name,
-                                   isc_boolean_t create,
+                                   bool create,
                                    dns_dbnode_t **nodep);
        isc_result_t    (*find)(dns_db_t *db, dns_name_t *name,
                                dns_dbversion_t *version,
@@ -145,10 +146,10 @@ typedef struct dns_dbmethods {
                                          dns_dbversion_t *version,
                                          dns_rdatatype_t type,
                                          dns_rdatatype_t covers);
-       isc_boolean_t   (*issecure)(dns_db_t *db);
+       bool    (*issecure)(dns_db_t *db);
        unsigned int    (*nodecount)(dns_db_t *db);
-       isc_boolean_t   (*ispersistent)(dns_db_t *db);
-       void            (*overmem)(dns_db_t *db, isc_boolean_t overmem);
+       bool    (*ispersistent)(dns_db_t *db);
+       void            (*overmem)(dns_db_t *db, bool overmem);
        void            (*settask)(dns_db_t *db, isc_task_t *);
        isc_result_t    (*getoriginnode)(dns_db_t *db, dns_dbnode_t **nodep);
        void            (*transfernode)(dns_db_t *db, dns_dbnode_t **sourcep,
@@ -161,7 +162,7 @@ typedef struct dns_dbmethods {
                                              unsigned char *salt,
                                              size_t *salt_len);
        isc_result_t    (*findnsec3node)(dns_db_t *db, dns_name_t *name,
-                                        isc_boolean_t create,
+                                        bool create,
                                         dns_dbnode_t **nodep);
        isc_result_t    (*setsigningtime)(dns_db_t *db,
                                          dns_rdataset_t *rdataset,
@@ -171,13 +172,13 @@ typedef struct dns_dbmethods {
                                          dns_name_t *name);
        void            (*resigned)(dns_db_t *db, dns_rdataset_t *rdataset,
                                           dns_dbversion_t *version);
-       isc_boolean_t   (*isdnssec)(dns_db_t *db);
+       bool    (*isdnssec)(dns_db_t *db);
        dns_stats_t     *(*getrrsetstats)(dns_db_t *db);
        void            (*rpz_attach)(dns_db_t *db, dns_rpz_zones_t *rpzs,
                                      dns_rpz_num_t rpz_num);
        isc_result_t    (*rpz_ready)(dns_db_t *db);
        isc_result_t    (*findnodeext)(dns_db_t *db, dns_name_t *name,
-                                    isc_boolean_t create,
+                                    bool create,
                                     dns_clientinfomethods_t *methods,
                                     dns_clientinfo_t *clientinfo,
                                     dns_dbnode_t **nodep);
@@ -373,7 +374,7 @@ dns_db_ondestroy(dns_db_t *db, isc_task_t *task, isc_event_t **eventp);
  * sent to the task.
  */
 
-isc_boolean_t
+bool
 dns_db_iscache(dns_db_t *db);
 /*%<
  * Does 'db' have cache semantics?
@@ -383,11 +384,11 @@ dns_db_iscache(dns_db_t *db);
  * \li 'db' is a valid database.
  *
  * Returns:
- * \li #ISC_TRUE       'db' has cache semantics
- * \li #ISC_FALSE      otherwise
+ * \li #true   'db' has cache semantics
+ * \li #false  otherwise
  */
 
-isc_boolean_t
+bool
 dns_db_iszone(dns_db_t *db);
 /*%<
  * Does 'db' have zone semantics?
@@ -397,11 +398,11 @@ dns_db_iszone(dns_db_t *db);
  * \li 'db' is a valid database.
  *
  * Returns:
- * \li #ISC_TRUE       'db' has zone semantics
- * \li #ISC_FALSE      otherwise
+ * \li #true   'db' has zone semantics
+ * \li #false  otherwise
  */
 
-isc_boolean_t
+bool
 dns_db_isstub(dns_db_t *db);
 /*%<
  * Does 'db' have stub semantics?
@@ -411,11 +412,11 @@ dns_db_isstub(dns_db_t *db);
  * \li 'db' is a valid database.
  *
  * Returns:
- * \li #ISC_TRUE       'db' has zone semantics
- * \li #ISC_FALSE      otherwise
+ * \li #true   'db' has zone semantics
+ * \li #false  otherwise
  */
 
-isc_boolean_t
+bool
 dns_db_issecure(dns_db_t *db);
 /*%<
  * Is 'db' secure?
@@ -425,11 +426,11 @@ dns_db_issecure(dns_db_t *db);
  * \li 'db' is a valid database with zone semantics.
  *
  * Returns:
- * \li #ISC_TRUE       'db' is secure.
- * \li #ISC_FALSE      'db' is not secure.
+ * \li #true   'db' is secure.
+ * \li #false  'db' is not secure.
  */
 
-isc_boolean_t
+bool
 dns_db_isdnssec(dns_db_t *db);
 /*%<
  * Is 'db' secure or partially secure?
@@ -439,8 +440,8 @@ dns_db_isdnssec(dns_db_t *db);
  * \li 'db' is a valid database with zone semantics.
  *
  * Returns:
- * \li #ISC_TRUE       'db' is secure or is partially.
- * \li #ISC_FALSE      'db' is not secure.
+ * \li #true   'db' is secure or is partially.
+ * \li #false  'db' is not secure.
  */
 
 dns_name_t *
@@ -677,11 +678,11 @@ dns_db_attachversion(dns_db_t *db, dns_dbversion_t *source,
 
 void
 dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
-                   isc_boolean_t commit);
+                   bool commit);
 /*%<
  * Close version '*versionp'.
  *
- * Note: if '*versionp' is a read-write version and 'commit' is ISC_TRUE,
+ * Note: if '*versionp' is a read-write version and 'commit' is true,
  * then all changes made in the version will take effect, otherwise they
  * will be rolled back.  The value of 'commit' is ignored for read-only
  * versions.
@@ -700,7 +701,7 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
  *
  * \li *versionp == NULL
  *
- * \li If *versionp is a read-write version, and commit is ISC_TRUE, then
+ * \li If *versionp is a read-write version, and commit is true, then
  *     the version will become the current version.  If !commit, then all
  *     changes made in the version will be undone, and the version will
  *     not become the current version.
@@ -711,11 +712,11 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp,
  ***/
 
 isc_result_t
-dns_db_findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+dns_db_findnode(dns_db_t *db, dns_name_t *name, bool create,
                dns_dbnode_t **nodep);
 
 isc_result_t
-dns_db_findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+dns_db_findnodeext(dns_db_t *db, dns_name_t *name, bool create,
                   dns_clientinfomethods_t *methods,
                   dns_clientinfo_t *clientinfo, dns_dbnode_t **nodep);
 /*%<
@@ -727,7 +728,7 @@ dns_db_findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
  * response on the basis of that information.
  *
  * Notes:
- * \li If 'create' is ISC_TRUE and no node with name 'name' exists, then
+ * \li If 'create' is true and no node with name 'name' exists, then
  *     such a node will be created.
  *
  * \li This routine is for finding or creating a node with the specified
@@ -751,7 +752,7 @@ dns_db_findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
  *
  * \li #ISC_R_SUCCESS
  * \li #ISC_R_NOTFOUND                 If !create and name not found.
- * \li #ISC_R_NOMEMORY                 Can only happen if create is ISC_TRUE.
+ * \li #ISC_R_NOMEMORY                 Can only happen if create is true.
  *
  * \li Other results are possible, depending upon the database
  *     implementation used.
@@ -1365,7 +1366,7 @@ dns_db_getsoaserial(dns_db_t *db, dns_dbversion_t *ver, uint32_t *serialp);
  */
 
 void
-dns_db_overmem(dns_db_t *db, isc_boolean_t overmem);
+dns_db_overmem(dns_db_t *db, bool overmem);
 /*%<
  * Enable / disable aggressive cache cleaning.
  */
@@ -1408,7 +1409,7 @@ dns_db_settask(dns_db_t *db, isc_task_t *task);
  * \li 'task' to be valid or NULL.
  */
 
-isc_boolean_t
+bool
 dns_db_ispersistent(dns_db_t *db);
 /*%<
  * Is 'db' persistent?  A persistent database does not need to be loaded
@@ -1419,8 +1420,8 @@ dns_db_ispersistent(dns_db_t *db);
  * \li 'db' is a valid database.
  *
  * Returns:
- * \li #ISC_TRUE       'db' is persistent.
- * \li #ISC_FALSE      'db' is not persistent.
+ * \li #true   'db' is persistent.
+ * \li #false  'db' is not persistent.
  */
 
 isc_result_t
@@ -1521,12 +1522,12 @@ dns_db_getsize(dns_db_t *db, dns_dbversion_t *version, uint64_t *records,
 
 isc_result_t
 dns_db_findnsec3node(dns_db_t *db, dns_name_t *name,
-                    isc_boolean_t create, dns_dbnode_t **nodep);
+                    bool create, dns_dbnode_t **nodep);
 /*%<
  * Find the NSEC3 node with name 'name'.
  *
  * Notes:
- * \li If 'create' is ISC_TRUE and no node with name 'name' exists, then
+ * \li If 'create' is true and no node with name 'name' exists, then
  *     such a node will be created.
  *
  * Requires:
@@ -1545,7 +1546,7 @@ dns_db_findnsec3node(dns_db_t *db, dns_name_t *name,
  *
  * \li #ISC_R_SUCCESS
  * \li #ISC_R_NOTFOUND                 If !create and name not found.
- * \li #ISC_R_NOMEMORY                 Can only happen if create is ISC_TRUE.
+ * \li #ISC_R_NOMEMORY                 Can only happen if create is true.
  *
  * \li Other results are possible, depending upon the database
  *     implementation used.
index cd82a8efa29a6fc46da46e7a2b21324eabafed2d..8b50c8c87c7cb7003e5e7bce3aa65e8114eaf75c 100644 (file)
@@ -54,6 +54,8 @@
  ***** Imports
  *****/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/magic.h>
 
@@ -96,8 +98,8 @@ struct dns_dbiterator {
        unsigned int                    magic;
        dns_dbiteratormethods_t *       methods;
        dns_db_t *                      db;
-       isc_boolean_t                   relative_names;
-       isc_boolean_t                   cleaning;
+       bool                    relative_names;
+       bool                    cleaning;
 };
 
 void
@@ -220,7 +222,7 @@ dns_dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
  *
  *\li  #ISC_R_SUCCESS
  *\li  #DNS_R_NEWORIGIN                        If this iterator was created with
- *                                     'relative_names' set to ISC_TRUE,
+ *                                     'relative_names' set to true,
  *                                     then #DNS_R_NEWORIGIN will be returned
  *                                     when the origin the names are
  *                                     relative to changes.  This result
@@ -276,12 +278,12 @@ dns_dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name);
  */
 
 void
-dns_dbiterator_setcleanmode(dns_dbiterator_t *iterator, isc_boolean_t mode);
+dns_dbiterator_setcleanmode(dns_dbiterator_t *iterator, bool mode);
 /*%<
  * Indicate that the given iterator is/is not cleaning the DB.
  *
  * Notes:
- *\li  When 'mode' is ISC_TRUE,
+ *\li  When 'mode' is true,
  *
  * Requires:
  *\li  'iterator' is a valid iterator.
index 2669f819f5a86829bca21a4e47147e8b8269fe7f..476863ac08d496bc38d79b1709d27592437109b9 100644 (file)
@@ -44,6 +44,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/buffer.h>
 #include <isc/lang.h>
 #include <isc/mutex.h>
@@ -377,7 +379,7 @@ dns_dispatch_gettcp(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
                    isc_sockaddr_t *localaddr, dns_dispatch_t **dispp);
 isc_result_t
 dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
-                    isc_sockaddr_t *localaddr, isc_boolean_t *connected,
+                    isc_sockaddr_t *localaddr, bool *connected,
                     dns_dispatch_t **dispp);
 /*
  * Attempt to connect to a existing TCP connection (connection completed
index 6ca51ecf4db56ee5829349093bc26075d60114f5..cc43f7cbbbb56314f1a468da0111e370d0006d0d 100644 (file)
@@ -77,6 +77,8 @@
  ***** Imports
  *****/
 
+#include <stdbool.h>
+
 #include <dns/clientinfo.h>
 #include <dns/name.h>
 #include <dns/types.h>
@@ -174,7 +176,7 @@ typedef isc_result_t
  */
 
 
-typedef isc_boolean_t (*dns_dlzssumatch_t)(dns_name_t *signer,
+typedef bool (*dns_dlzssumatch_t)(dns_name_t *signer,
                                           dns_name_t *name,
                                           isc_netaddr_t *tcpaddr,
                                           dns_rdatatype_t type,
@@ -215,7 +217,7 @@ struct dns_dlzdb {
        dns_dlzimplementation_t *implementation;
        void                    *dbdata;
        dlzconfigure_callback_t configure_callback;
-       isc_boolean_t           search;
+       bool            search;
        char                    *dlzname;
        ISC_LINK(dns_dlzdb_t)   link;
        dns_ssutable_t          *ssutable;
@@ -324,12 +326,12 @@ dns_dlzconfigure(dns_view_t *view, dns_dlzdb_t *dlzdb,
  * call a DLZ drivers configure method, if supplied
  */
 
-isc_boolean_t
+bool
 dns_dlz_ssumatch(dns_dlzdb_t *dlzdatabase,
                  dns_name_t *signer, dns_name_t *name, isc_netaddr_t *tcpaddr,
                  dns_rdatatype_t type, const dst_key_t *key);
 /*%<
- * call a DLZ drivers ssumatch method, if supplied. Otherwise return ISC_FALSE
+ * call a DLZ drivers ssumatch method, if supplied. Otherwise return false
  */
 
 ISC_LANG_ENDDECLS
index 420f2106ad519958d09150a2921bf1674d2f3818..3719aa746ea2c46dd1acef00e47164149cc00aa5 100644 (file)
@@ -16,6 +16,7 @@
 #define DLZ_DLOPEN_H
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <dns/sdlz.h>
 
@@ -105,7 +106,7 @@ typedef isc_result_t dlz_dlopen_newversion_t(const char *zone,
  * a dlz_newversion() function
  */
 typedef void dlz_dlopen_closeversion_t(const char *zone,
-                                      isc_boolean_t commit,
+                                      bool commit,
                                       void *dbdata,
                                       void **versionp);
 
@@ -130,7 +131,7 @@ typedef isc_result_t dlz_dlopen_setclientcallback_t(dns_view_t *view,
  * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
  * to support dynamic updates
  */
-typedef isc_boolean_t dlz_dlopen_ssumatch_t(const char *signer,
+typedef bool dlz_dlopen_ssumatch_t(const char *signer,
                                            const char *name,
                                            const char *tcpaddr,
                                            const char *type,
index b49a395e40c885e74bebb1cbe4b0bfea50df1931..34c2ad50bc1e7b4130d6fa89637445588b206009 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef DNS_DNS64_H
 #define DNS_DNS64_H 1
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/types.h>
@@ -141,22 +143,22 @@ dns_dns64_unlink(dns_dns64list_t *list, dns_dns64_t *dns64);
  * Unlink the dns64 record from the list.
  */
 
-isc_boolean_t
+bool
 dns_dns64_aaaaok(const dns_dns64_t *dns64, const isc_netaddr_t *reqaddr,
                 const dns_name_t *reqsigner, const dns_aclenv_t *env,
                 unsigned int flags, dns_rdataset_t *rdataset,
-                isc_boolean_t *aaaaok, size_t aaaaoklen);
+                bool *aaaaok, size_t aaaaoklen);
 /*
  * Determine if there are any non-excluded AAAA records in from the
  * matching dns64 records in the list starting at 'dns64'.  If there
- * is a non-exluded address return ISC_TRUE.  If all addresses are
- * excluded in the matched records return ISC_FALSE.   If no records
- * match then return ISC_TRUE.
+ * is a non-exluded address return true.  If all addresses are
+ * excluded in the matched records return false.   If no records
+ * match then return true.
  *
  * If aaaaok is defined then dns_dns64_aaaaok() return a array of which
  * addresses in 'rdataset' were deemed to not be exclude by any matching
  * record.  If there are no matching records then all entries are set
- * to ISC_TRUE.
+ * to true.
  *
  * Requires
  *     'rdataset'      to be valid and to be for type AAAA and class IN.
index 75e32202a910ce98db2e8e804757b78dfb6eae23..0b6369c50dabced9a5c82ca3eb5df7dba9edc8b0 100644 (file)
@@ -15,6 +15,8 @@
 
 /*! \file dns/dnssec.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/stdtime.h>
 #include <isc/stats.h>
@@ -47,17 +49,17 @@ typedef enum {
  */
 struct dns_dnsseckey {
        dst_key_t *key;
-       isc_boolean_t hint_publish;  /*% metadata says to publish */
-       isc_boolean_t force_publish; /*% publish regardless of metadata */
-       isc_boolean_t hint_sign;     /*% metadata says to sign with this key */
-       isc_boolean_t force_sign;    /*% sign with key regardless of metadata */
-       isc_boolean_t hint_remove;   /*% metadata says *don't* publish */
-       isc_boolean_t is_active;     /*% key is already active */
-       isc_boolean_t first_sign;    /*% key is newly becoming active */
+       bool hint_publish;  /*% metadata says to publish */
+       bool force_publish; /*% publish regardless of metadata */
+       bool hint_sign;     /*% metadata says to sign with this key */
+       bool force_sign;    /*% sign with key regardless of metadata */
+       bool hint_remove;   /*% metadata says *don't* publish */
+       bool is_active;     /*% key is already active */
+       bool first_sign;    /*% key is newly becoming active */
        unsigned int prepublish;     /*% how long until active? */
        dns_keysource_t source;      /*% how the key was found */
-       isc_boolean_t ksk;           /*% this is a key-signing key */
-       isc_boolean_t legacy;        /*% this is old-style key with no
+       bool ksk;           /*% this is a key-signing key */
+       bool legacy;        /*% this is old-style key with no
                                         metadata (possibly generated by
                                         an older version of BIND9) and
                                         should be ignored when searching
@@ -118,23 +120,23 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
 
 isc_result_t
 dns_dnssec_verify(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
-                 isc_boolean_t ignoretime, isc_mem_t *mctx,
+                 bool ignoretime, isc_mem_t *mctx,
                  dns_rdata_t *sigrdata);
 
 isc_result_t
 dns_dnssec_verify2(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
-                  isc_boolean_t ignoretime, isc_mem_t *mctx,
+                  bool ignoretime, isc_mem_t *mctx,
                   dns_rdata_t *sigrdata, dns_name_t *wild);
 
 isc_result_t
 dns_dnssec_verify3(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
-                  isc_boolean_t ignoretime, unsigned int maxbits,
+                  bool ignoretime, unsigned int maxbits,
                   isc_mem_t *mctx, dns_rdata_t *sigrdata, dns_name_t *wild);
 /*%<
  *     Verifies the RRSIG record covering this rdataset signed by a specific
  *     key.  This does not determine if the key's owner is authorized to sign
  *     this record, as this requires a resolver or database.
- *     If 'ignoretime' is ISC_TRUE, temporal validity will not be checked.
+ *     If 'ignoretime' is true, temporal validity will not be checked.
  *
  *     'maxbits' specifies the maximum number of rsa exponent bits accepted.
  *
@@ -188,15 +190,15 @@ dns_dnssec_findzonekeys3(dns_db_t *db, dns_dbversion_t *ver,
  */
 /*@}*/
 
-isc_boolean_t
+bool
 dns_dnssec_keyactive(dst_key_t *key, isc_stdtime_t now);
 /*%<
  *
- *     Returns ISC_TRUE if 'key' is active as of the time specified
+ *     Returns true if 'key' is active as of the time specified
  *     in 'now' (i.e., if the activation date has passed, inactivation or
  *     deletion date has not yet been reached, and the key is not revoked
  *     -- or if it is a legacy key without metadata). Otherwise returns
- *     ISC_FALSE.
+ *     false.
  *
  *     Requires:
  *\li          'key' is a valid key
@@ -243,16 +245,16 @@ dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
  *\li          DST_R_*
  */
 
-isc_boolean_t
+bool
 dns_dnssec_selfsigns(dns_rdata_t *rdata, dns_name_t *name,
                     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
-                    isc_boolean_t ignoretime, isc_mem_t *mctx);
+                    bool ignoretime, isc_mem_t *mctx);
 
 
-isc_boolean_t
+bool
 dns_dnssec_signs(dns_rdata_t *rdata, dns_name_t *name,
                 dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
-                isc_boolean_t ignoretime, isc_mem_t *mctx);
+                bool ignoretime, isc_mem_t *mctx);
 /*%<
  * Verify that 'rdataset' is validly signed in 'sigrdataset' by
  * the key in 'rdata'.
@@ -319,14 +321,14 @@ isc_result_t
 dns_dnssec_keylistfromrdataset(dns_name_t *origin,
                               const char *directory, isc_mem_t *mctx,
                               dns_rdataset_t *keyset, dns_rdataset_t *keysigs,
-                              dns_rdataset_t *soasigs, isc_boolean_t savekeys,
-                              isc_boolean_t publickey,
+                              dns_rdataset_t *soasigs, bool savekeys,
+                              bool publickey,
                               dns_dnsseckeylist_t *keylist);
 /*%<
  * Append the contents of a DNSKEY rdataset 'keyset' to 'keylist'.
- * Omit duplicates.  If 'publickey' is ISC_FALSE, search 'directory' for
+ * Omit duplicates.  If 'publickey' is false, search 'directory' for
  * matching key files, and load the private keys that go with
- * the public ones.  If 'savekeys' is ISC_TRUE, mark the keys so
+ * the public ones.  If 'savekeys' is true, mark the keys so
  * they will not be deleted or inactivated regardless of metadata.
  *
  * 'keysigs' and 'soasigs', if not NULL and associated, contain the
@@ -337,7 +339,7 @@ dns_dnssec_keylistfromrdataset(dns_name_t *origin,
 isc_result_t
 dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                      dns_dnsseckeylist_t *removed, dns_name_t *origin,
-                     dns_ttl_t hint_ttl, dns_diff_t *diff, isc_boolean_t allzsk,
+                     dns_ttl_t hint_ttl, dns_diff_t *diff, bool allzsk,
                      isc_mem_t *mctx, void (*report)(const char *, ...));
 /*%<
  * Update the list of keys in 'keys' with new key information in 'newkeys'.
index 7f2ac7b65746cd9ccc957eb3c90c56681de6d32a..3d8934a348e6c33bddd91f2e0dffb060d3b8fe76 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #ifdef HAVE_DNSTAP
 #include <fstrm.h>
@@ -95,8 +96,8 @@ struct dns_dtdata {
 
        Dnstap__Dnstap *frame;
 
-       isc_boolean_t query;
-       isc_boolean_t tcp;
+       bool query;
+       bool tcp;
        dns_dtmsgtype_t type;
 
        isc_time_t qtime;
@@ -244,7 +245,7 @@ dns_dt_shutdown(void);
 void
 dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype,
            isc_sockaddr_t *qaddr, isc_sockaddr_t *dstaddr,
-           isc_boolean_t tcp, isc_region_t *zone, isc_time_t *qtime,
+           bool tcp, isc_region_t *zone, isc_time_t *qtime,
            isc_time_t *rtime, isc_buffer_t *buf);
 /*%<
  * Sends a dnstap message to the log, if 'msgtype' is one of the message
index c1b69d6ae1486cc083b0e6e6a4abbb2f557500aa..d5fedb5fda4d51ba599523633c456f669450575a 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef DNS_DYNDB_H
 #define DNS_DYNDB_H
 
+#include <stdbool.h>
+
 #include <isc/types.h>
 
 #include <dns/types.h>
@@ -38,7 +40,7 @@ struct dns_dyndbctx {
        dns_zonemgr_t   *zmgr;
        isc_task_t      *task;
        isc_timermgr_t  *timermgr;
-       isc_boolean_t   *refvar;
+       bool    *refvar;
 };
 
 #define DNS_DYNDBCTX_MAGIC     ISC_MAGIC('D', 'd', 'b', 'c')
@@ -121,7 +123,7 @@ dns_dyndb_load(const char *libname, const char *name, const char *parameters,
  */
 
 void
-dns_dyndb_cleanup(isc_boolean_t exiting);
+dns_dyndb_cleanup(bool exiting);
 /*%
  * Shut down and destroy all running dyndb modules.
  *
index 4a07d89d052d1a6de5903ab4dc6687a00139de3a..6dd0e6668a33f99b087b1bd209fd52358a532abb 100644 (file)
@@ -25,6 +25,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/magic.h>
 #include <isc/netaddr.h>
@@ -102,7 +104,7 @@ typedef struct dns_geoip_databases {
 
 ISC_LANG_BEGINDECLS
 
-isc_boolean_t
+bool
 dns_geoip_match(const isc_netaddr_t *reqaddr, uint8_t *scope,
                const dns_geoip_databases_t *geoip,
                const dns_geoip_elem_t *elt);
index dbf5cc3e0e68a74ab6000cee187bb38e29136f60..26a6ad5f6cd5a217a5d7139de4ee51e9cb2f7cd0 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef DNS_IPTABLE_H
 #define DNS_IPTABLE_H 1
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/magic.h>
 #include <isc/radix.h>
@@ -44,17 +46,17 @@ dns_iptable_create(isc_mem_t *mctx, dns_iptable_t **target);
 
 isc_result_t
 dns_iptable_addprefix(dns_iptable_t *tab, isc_netaddr_t *addr,
-                     uint16_t bitlen, isc_boolean_t pos);
+                     uint16_t bitlen, bool pos);
 isc_result_t
 dns_iptable_addprefix2(dns_iptable_t *tab, isc_netaddr_t *addr,
-                      uint16_t bitlen, isc_boolean_t pos,
-                      isc_boolean_t is_ecs);
+                      uint16_t bitlen, bool pos,
+                      bool is_ecs);
 /*
  * Add an IP prefix to an existing IP table
  */
 
 isc_result_t
-dns_iptable_merge(dns_iptable_t *tab, dns_iptable_t *source, isc_boolean_t pos);
+dns_iptable_merge(dns_iptable_t *tab, dns_iptable_t *source, bool pos);
 /*
  * Merge one IP table into another one.
  */
index 2ef2e5504874cd44f875f1b4778d14e3591b3d07..8bcb55139c47fdc8723599efde5cc5fdfca2c4ec 100644 (file)
@@ -27,6 +27,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -41,8 +42,8 @@
  ***/
 #define DNS_JOURNALOPT_RESIGN  0x00000001
 
-#define DNS_JOURNAL_READ       0x00000000      /* ISC_FALSE */
-#define DNS_JOURNAL_CREATE     0x00000001      /* ISC_TRUE */
+#define DNS_JOURNAL_READ       0x00000000      /* false */
+#define DNS_JOURNAL_CREATE     0x00000001      /* true */
 #define DNS_JOURNAL_WRITE      0x00000002
 
 /***
@@ -281,7 +282,7 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
  * exists and is non-empty 'serial' must exist in the journal.
  */
 
-isc_boolean_t
+bool
 dns_journal_get_sourceserial(dns_journal_t *j, uint32_t *sourceserial);
 void
 dns_journal_set_sourceserial(dns_journal_t *j, uint32_t sourceserial);
@@ -289,7 +290,7 @@ dns_journal_set_sourceserial(dns_journal_t *j, uint32_t sourceserial);
  * Get and set source serial.
  *
  * Returns:
- *      ISC_TRUE if sourceserial has previously been set.
+ *      true if sourceserial has previously been set.
  */
 
 ISC_LANG_ENDDECLS
index 0c74a0cc560b60cd5aa77feb70949d00efd97a2c..15e190575ed9a826646ae49211b88d8ec48c84ab 100644 (file)
@@ -34,6 +34,8 @@
  *\li  No anticipated impact.
  */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/magic.h>
 #include <isc/refcount.h>
@@ -103,7 +105,7 @@ dns_keytable_detach(dns_keytable_t **keytablep);
  */
 
 isc_result_t
-dns_keytable_add(dns_keytable_t *keytable, isc_boolean_t managed,
+dns_keytable_add(dns_keytable_t *keytable, bool managed,
                 dst_key_t **keyp);
 /*%<
  * Add '*keyp' to 'keytable' (using the name in '*keyp').
@@ -352,7 +354,7 @@ dns_keytable_detachkeynode(dns_keytable_t *keytable,
 
 isc_result_t
 dns_keytable_issecuredomain(dns_keytable_t *keytable, dns_name_t *name,
-                           dns_name_t *foundname, isc_boolean_t *wantdnssecp);
+                           dns_name_t *foundname, bool *wantdnssecp);
 /*%<
  * Is 'name' at or beneath a trusted key?
  *
@@ -364,11 +366,11 @@ dns_keytable_issecuredomain(dns_keytable_t *keytable, dns_name_t *name,
  *
  *\li  'foundanme' is NULL or is a pointer to an initialized dns_name_t
  *
- *\li  '*wantsdnssecp' is a valid isc_boolean_t.
+ *\li  '*wantsdnssecp' is a valid bool.
 
  * Ensures:
  *
- *\li  On success, *wantsdnssecp will be ISC_TRUE if and only if 'name'
+ *\li  On success, *wantsdnssecp will be true if and only if 'name'
  *     is at or beneath a trusted key.  If 'foundname' is not NULL, then
  *     it will be updated to contain the name of the closest enclosing
  *     trust anchor.
@@ -398,7 +400,7 @@ dns_keynode_key(dns_keynode_t *keynode);
  * Get the DST key associated with keynode.
  */
 
-isc_boolean_t
+bool
 dns_keynode_managed(dns_keynode_t *keynode);
 /*%<
  * Is this flagged as a managed key?
index 0d96d0bd77b7fa37777b3bab31daf0480cd52f72..334123b70b8a81aaf000b1cca0a1a72d9c97cf2f 100644 (file)
@@ -17,6 +17,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -999,7 +1000,7 @@ dns_message_peekheader(isc_buffer_t *source, dns_messageid_t *idp,
  */
 
 isc_result_t
-dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section);
+dns_message_reply(dns_message_t *msg, bool want_question_section);
 /*%<
  * Start formatting a reply to the query in 'msg'.
  *
@@ -1023,7 +1024,7 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section);
  *\li  #DNS_R_FORMERR          -- the header or question section of the
  *                                message is invalid, replying is impossible.
  *                                If DNS_R_FORMERR is returned when
- *                                want_question_section is ISC_FALSE, then
+ *                                want_question_section is false, then
  *                                it's the header section that's bad;
  *                                otherwise either of the header or question
  *                                sections may be bad.
index 5578c55f5dda51c271db8c9bafea25cdb76203d0..bbb663bfcf60bdfc899d07c90538ad8611b80e55 100644 (file)
@@ -66,8 +66,8 @@
 
 #include <stdio.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
-#include <isc/boolean.h>
 #include <isc/lang.h>
 #include <isc/magic.h>
 #include <isc/region.h>                /* Required for storage size of dns_label_t. */
@@ -194,7 +194,7 @@ LIBDNS_EXTERNAL_DATA extern dns_name_t *dns_wildcardname;
  */
 typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target,
                                                unsigned int used_org,
-                                               isc_boolean_t absolute);
+                                               bool absolute);
 
 /***
  *** Initialization
@@ -218,7 +218,7 @@ dns_name_init(dns_name_t *name, unsigned char *offsets);
  * Ensures:
  * \li 'name' is a valid name.
  * \li dns_name_countlabels(name) == 0
- * \li dns_name_isabsolute(name) == ISC_FALSE
+ * \li dns_name_isabsolute(name) == false
  */
 
 void
@@ -243,7 +243,7 @@ dns_name_reset(dns_name_t *name);
  * Ensures:
  * \li 'name' is a valid name.
  * \li dns_name_countlabels(name) == 0
- * \li dns_name_isabsolute(name) == ISC_FALSE
+ * \li dns_name_isabsolute(name) == false
  */
 
 void
@@ -261,7 +261,7 @@ dns_name_invalidate(dns_name_t *name);
  * \li If the name had a dedicated buffer, that association is ended.
  */
 
-isc_boolean_t
+bool
 dns_name_isvalid(const dns_name_t *name);
 /*%<
  * Check whether 'name' points to a valid dns_name
@@ -296,7 +296,7 @@ dns_name_setbuffer(dns_name_t *name, isc_buffer_t *buffer);
  *     dedicated buffer already, or 'buffer' is NULL.
  */
 
-isc_boolean_t
+bool
 dns_name_hasbuffer(const dns_name_t *name);
 /*%<
  * Does 'name' have a dedicated buffer?
@@ -305,15 +305,15 @@ dns_name_hasbuffer(const dns_name_t *name);
  * \li 'name' is a valid name.
  *
  * Returns:
- * \li ISC_TRUE        'name' has a dedicated buffer.
- * \li ISC_FALSE       'name' does not have a dedicated buffer.
+ * \li true    'name' has a dedicated buffer.
+ * \li false   'name' does not have a dedicated buffer.
  */
 
 /***
  *** Properties
  ***/
 
-isc_boolean_t
+bool
 dns_name_isabsolute(const dns_name_t *name);
 /*%<
  * Does 'name' end in the root label?
@@ -326,7 +326,7 @@ dns_name_isabsolute(const dns_name_t *name);
  * \li FALSE           The last label in 'name' is not the root label.
  */
 
-isc_boolean_t
+bool
 dns_name_iswildcard(const dns_name_t *name);
 /*%<
  * Is 'name' a wildcard name?
@@ -342,11 +342,11 @@ dns_name_iswildcard(const dns_name_t *name);
  */
 
 unsigned int
-dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive);
+dns_name_hash(dns_name_t *name, bool case_sensitive);
 /*%<
  * Provide a hash value for 'name'.
  *
- * Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in
+ * Note: if 'case_sensitive' is false, then names which differ only in
  * case will have the same hash value.
  *
  * Requires:
@@ -357,12 +357,12 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive);
  */
 
 unsigned int
-dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive);
+dns_name_fullhash(dns_name_t *name, bool case_sensitive);
 /*%<
  * Provide a hash value for 'name'.  Unlike dns_name_hash(), this function
  * always takes into account of the entire name to calculate the hash value.
  *
- * Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in
+ * Note: if 'case_sensitive' is false, then names which differ only in
  * case will have the same hash value.
  *
  * Requires:
@@ -373,7 +373,7 @@ dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive);
  */
 
 unsigned int
-dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive);
+dns_name_hashbylabel(dns_name_t *name, bool case_sensitive);
 /*%<
  * Provide a hash value for 'name', where the hash value is the sum
  * of the hash values of each label.  This function should only be used
@@ -382,7 +382,7 @@ dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive);
  * dns_name_fullhash() is the correct function to use for name
  * hashing.
  *
- * Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in
+ * Note: if 'case_sensitive' is false, then names which differ only in
  * case will have the same hash value.
  *
  * Requires:
@@ -464,7 +464,7 @@ dns_name_compare(const dns_name_t *name1, const dns_name_t *name2);
  * \li > 0             'name1' is greater than 'name2'
  */
 
-isc_boolean_t
+bool
 dns_name_equal(const dns_name_t *name1, const dns_name_t *name2);
 /*%<
  * Are 'name1' and 'name2' equal?
@@ -488,11 +488,11 @@ dns_name_equal(const dns_name_t *name1, const dns_name_t *name2);
  * \li Either name1 is absolute and name2 is absolute, or neither is.
  *
  * Returns:
- * \li ISC_TRUE        'name1' and 'name2' are equal
- * \li ISC_FALSE       'name1' and 'name2' are not equal
+ * \li true    'name1' and 'name2' are equal
+ * \li false   'name1' and 'name2' are not equal
  */
 
-isc_boolean_t
+bool
 dns_name_caseequal(const dns_name_t *name1, const dns_name_t *name2);
 /*%<
  * Case sensitive version of dns_name_equal().
@@ -519,7 +519,7 @@ dns_name_rdatacompare(const dns_name_t *name1, const dns_name_t *name2);
  * \li > 0             'name1' is greater than 'name2'
  */
 
-isc_boolean_t
+bool
 dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2);
 /*%<
  * Is 'name1' a subdomain of 'name2'?
@@ -545,7 +545,7 @@ dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2);
  * \li FALSE           'name1' is not a subdomain of 'name2'
  */
 
-isc_boolean_t
+bool
 dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname);
 /*%<
  * Does 'name' match the wildcard specified in 'wname'?
@@ -846,7 +846,7 @@ isc_result_t
 dns_name_toprincipal(const dns_name_t *name, isc_buffer_t *target);
 
 isc_result_t
-dns_name_totext(const dns_name_t *name, isc_boolean_t omit_final_dot,
+dns_name_totext(const dns_name_t *name, bool omit_final_dot,
                isc_buffer_t *target);
 
 isc_result_t
@@ -912,7 +912,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
  */
 
 isc_result_t
-dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot,
+dns_name_tofilenametext(dns_name_t *name, bool omit_final_dot,
                        isc_buffer_t *target);
 /*%<
  * Convert 'name' into an alternate text format appropriate for filenames,
@@ -1121,7 +1121,7 @@ dns_name_digest(dns_name_t *name, dns_digestfunc_t digest, void *arg);
  *
  */
 
-isc_boolean_t
+bool
 dns_name_dynamic(dns_name_t *name);
 /*%<
  * Returns whether there is dynamic memory associated with this name.
@@ -1132,7 +1132,7 @@ dns_name_dynamic(dns_name_t *name);
  *
  * Returns:
  *
- *\li  'ISC_TRUE' if the name is dynamic otherwise 'ISC_FALSE'.
+ *\li  'true' if the name is dynamic otherwise 'false'.
  */
 
 isc_result_t
@@ -1275,11 +1275,11 @@ dns_name_copy(const dns_name_t *source, dns_name_t *dest, isc_buffer_t *target);
  *\li  #ISC_R_NOSPACE
  */
 
-isc_boolean_t
-dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard);
+bool
+dns_name_ishostname(const dns_name_t *name, bool wildcard);
 /*%<
  * Return if 'name' is a valid hostname.  RFC 952 / RFC 1123.
- * If 'wildcard' is ISC_TRUE then allow the first label of name to
+ * If 'wildcard' is true then allow the first label of name to
  * be a wildcard.
  * The root is also accepted.
  *
@@ -1288,7 +1288,7 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard);
  */
 
 
-isc_boolean_t
+bool
 dns_name_ismailbox(const dns_name_t *name);
 /*%<
  * Return if 'name' is a valid mailbox.  RFC 821.
@@ -1297,7 +1297,7 @@ dns_name_ismailbox(const dns_name_t *name);
  * \li 'name' to be valid.
  */
 
-isc_boolean_t
+bool
 dns_name_internalwildcard(const dns_name_t *name);
 /*%<
  * Return if 'name' contains a internal wildcard name.
@@ -1318,25 +1318,25 @@ dns_name_destroy(void);
  * non-NULL argument prior to calling dns_name_destroy();
  */
 
-isc_boolean_t
+bool
 dns_name_isdnssd(const dns_name_t *owner);
 /*%<
  * Determine if the 'owner' is a DNS-SD prefix.
  */
 
-isc_boolean_t
+bool
 dns_name_isrfc1918(const dns_name_t *owner);
 /*%<
  * Determine if the 'name' is in the RFC 1918 reverse namespace.
  */
 
-isc_boolean_t
+bool
 dns_name_isula(const dns_name_t *owner);
 /*%<
  * Determine if the 'name' is in the ULA reverse namespace.
  */
 
-isc_boolean_t
+bool
 dns_name_istat(const dns_name_t *name);
 /*
  * Determine if 'name' is a potential 'trust-anchor-telemetry' name.
@@ -1385,7 +1385,7 @@ do { \
        (n)->buffer = (b)
 
 #define DNS_NAME_ISABSOLUTE(n) \
-       (((n)->attributes & DNS_NAMEATTR_ABSOLUTE) != 0 ? ISC_TRUE : ISC_FALSE)
+       (((n)->attributes & DNS_NAMEATTR_ABSOLUTE) != 0 ? true : false)
 
 #define DNS_NAME_COUNTLABELS(n) \
        ((n)->labels)
index 27e37a556e821025c532754a84eab9545b38c937..2942c26e97fb05074782a52e25b75dc44bea710f 100644 (file)
@@ -39,6 +39,8 @@
  *\li  RFC2308
  */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/stdtime.h>
 
@@ -60,7 +62,7 @@ isc_result_t
 dns_ncache_addoptout(dns_message_t *message, dns_db_t *cache,
                     dns_dbnode_t *node, dns_rdatatype_t covers,
                     isc_stdtime_t now, dns_ttl_t maxttl,
-                    isc_boolean_t optout, dns_rdataset_t *addedrdataset);
+                    bool optout, dns_rdataset_t *addedrdataset);
 /*%<
  * Convert the authority data from 'message' into a negative cache
  * rdataset, and store it in 'cache' at 'node' with a TTL limited to
index 92d8ceb96b616ce28f470dbb3fb28f0fa65c0623..18cec1706bbde48c98d66483fe82eae72ad2fdee 100644 (file)
@@ -15,6 +15,8 @@
 
 /*! \file dns/nsec.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/types.h>
@@ -48,7 +50,7 @@ dns_nsec_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
  * Build a NSEC record and add it to a database.
  */
 
-isc_boolean_t
+bool
 dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type);
 /*%<
  * Determine if a type is marked as present in an NSEC record.
@@ -59,11 +61,11 @@ dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type);
 
 isc_result_t
 dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version,
-                 isc_boolean_t *answer);
+                 bool *answer);
 /*
  * Report whether the DNSKEY RRset has a NSEC only algorithm.  Unknown
  * algorithms are assumed to support NSEC3.  If DNSKEY is not found,
- * *answer is set to ISC_FALSE, and ISC_R_NOTFOUND is returned.
+ * *answer is set to false, and ISC_R_NOTFOUND is returned.
  *
  * Requires:
  *     'answer' to be non NULL.
@@ -85,7 +87,7 @@ dns_nsec_setbit(unsigned char *array, unsigned int type, unsigned int bit);
  * Set type bit in raw 'array' to 'bit'.
  */
 
-isc_boolean_t
+bool
 dns_nsec_isset(const unsigned char *array, unsigned int type);
 /*%<
  * Test if the corresponding 'type' bit is set in 'array'.
@@ -94,7 +96,7 @@ dns_nsec_isset(const unsigned char *array, unsigned int type);
 isc_result_t
 dns_nsec_noexistnodata(dns_rdatatype_t type, dns_name_t *name,
                       dns_name_t *nsecname, dns_rdataset_t *nsecset,
-                      isc_boolean_t *exists, isc_boolean_t *data,
+                      bool *exists, bool *data,
                       dns_name_t *wild, dns_nseclog_t log, void *arg);
 /*%
  * Return ISC_R_SUCCESS if we can determine that the name doesn't exist
index a8d8a78bb60beff5e8135435b1efc5a52a457702..07d2bf0848c565c535c924161217a74107f9bda7 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef DNS_NSEC3_H
 #define DNS_NSEC3_H 1
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/iterated_hash.h>
 
@@ -62,7 +64,7 @@ dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version,
  *             to 'buffer'.
  */
 
-isc_boolean_t
+bool
 dns_nsec3_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type);
 /*%<
  * Determine if a type is marked as present in an NSEC3 record.
@@ -89,7 +91,7 @@ dns_nsec3_hashlength(dns_hash_t hash);
  * or zero when unknown.
  */
 
-isc_boolean_t
+bool
 dns_nsec3_supportedhash(dns_hash_t hash);
 /*%<
  * Return whether we support this hash algorithm or not.
@@ -98,17 +100,17 @@ dns_nsec3_supportedhash(dns_hash_t hash);
 isc_result_t
 dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
                   dns_name_t *name, const dns_rdata_nsec3param_t *nsec3param,
-                  dns_ttl_t nsecttl, isc_boolean_t unsecure, dns_diff_t *diff);
+                  dns_ttl_t nsecttl, bool unsecure, dns_diff_t *diff);
 
 isc_result_t
 dns_nsec3_addnsec3s(dns_db_t *db, dns_dbversion_t *version,
                    dns_name_t *name, dns_ttl_t nsecttl,
-                   isc_boolean_t unsecure, dns_diff_t *diff);
+                   bool unsecure, dns_diff_t *diff);
 
 isc_result_t
 dns_nsec3_addnsec3sx(dns_db_t *db, dns_dbversion_t *version,
                     dns_name_t *name, dns_ttl_t nsecttl,
-                    isc_boolean_t unsecure, dns_rdatatype_t private,
+                    bool unsecure, dns_rdatatype_t private,
                     dns_diff_t *diff);
 /*%<
  * Add NSEC3 records for 'name', recording the change in 'diff'.
@@ -178,15 +180,15 @@ dns_nsec3_delnsec3sx(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
 isc_result_t
 dns_nsec3_active(dns_db_t *db, dns_dbversion_t *version,
-                isc_boolean_t complete, isc_boolean_t *answer);
+                bool complete, bool *answer);
 
 isc_result_t
 dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version,
-                 isc_boolean_t complete, dns_rdatatype_t private,
-                 isc_boolean_t *answer);
+                 bool complete, dns_rdatatype_t private,
+                 bool *answer);
 /*%<
  * Check if there are any complete/to be built NSEC3 chains.
- * If 'complete' is ISC_TRUE only complete chains will be recognized.
+ * If 'complete' is true only complete chains will be recognized.
  *
  * dns_nsec3_activex() is similar to dns_nsec3_active() but 'private'
  * specifies the type of the private rdataset to be checked in addition to
@@ -212,13 +214,13 @@ dns_nsec3_maxiterations(dns_db_t *db, dns_dbversion_t *version,
  *     'iterationsp' to be non NULL.
  */
 
-isc_boolean_t
+bool
 dns_nsec3param_fromprivate(dns_rdata_t *src, dns_rdata_t *target,
                           unsigned char *buf, size_t buflen);
 /*%<
  * Convert a private rdata to a nsec3param rdata.
  *
- * Return ISC_TRUE if 'src' could be successfully converted.
+ * Return true if 'src' could be successfully converted.
  *
  * 'buf' should be at least DNS_NSEC3PARAM_BUFFERSIZE in size.
  */
@@ -248,7 +250,7 @@ dns_nsec3param_salttotext(dns_rdata_nsec3param_t *nsec3param, char *dst,
 
 isc_result_t
 dns_nsec3param_deletechains(dns_db_t *db, dns_dbversion_t *ver,
-                           dns_zone_t *zone, isc_boolean_t nonsec,
+                           dns_zone_t *zone, bool nonsec,
                            dns_diff_t *diff);
 
 /*%<
@@ -258,10 +260,10 @@ dns_nsec3param_deletechains(dns_db_t *db, dns_dbversion_t *ver,
 isc_result_t
 dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                        dns_name_t *nsec3name, dns_rdataset_t *nsec3set,
-                       dns_name_t *zonename, isc_boolean_t *exists,
-                       isc_boolean_t *data, isc_boolean_t *optout,
-                       isc_boolean_t *unknown, isc_boolean_t *setclosest,
-                       isc_boolean_t *setnearest, dns_name_t *closest,
+                       dns_name_t *zonename, bool *exists,
+                       bool *data, bool *optout,
+                       bool *unknown, bool *setclosest,
+                       bool *setnearest, dns_name_t *closest,
                        dns_name_t *nearest, dns_nseclog_t logit, void *arg);
 
 ISC_LANG_ENDDECLS
index 3de9d0fb272a5bfb4a4fa983a97ccdcbc3e0bb44..e3821adc8ac9ef5d05d2bc433b4875885d5cd214 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/lang.h>
@@ -117,11 +118,11 @@ dns_ntatable_detach(dns_ntatable_t **ntatablep);
 
 isc_result_t
 dns_ntatable_add(dns_ntatable_t *ntatable, dns_name_t *name,
-                isc_boolean_t force, isc_stdtime_t now,
+                bool force, isc_stdtime_t now,
                 uint32_t lifetime);
 /*%<
  * Add a negative trust anchor to 'ntatable' for name 'name',
- * which will expire at time 'now' + 'lifetime'.  If 'force' is ISC_FALSE,
+ * which will expire at time 'now' + 'lifetime'.  If 'force' is false,
  * then the name will be checked periodically to see if it's bogus;
  * if not, then the NTA will be allowed to expire early.
  *
@@ -161,14 +162,14 @@ dns_ntatable_delete(dns_ntatable_t *ntatable, dns_name_t *keyname);
  *\li  Any other result indicates failure.
  */
 
-isc_boolean_t
+bool
 dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
                     dns_name_t *name, dns_name_t *anchor);
 /*%<
- * Return ISC_TRUE if 'name' is below a non-expired negative trust
+ * Return true if 'name' is below a non-expired negative trust
  * anchor which in turn is at or below 'anchor'.
  *
- * If 'ntatable' has not been initialized, return ISC_FALSE.
+ * If 'ntatable' has not been initialized, return false.
  *
  * Requires:
  *
index 2c71032191c0bcae75b6337362f8a8c388f6dee6..58a1354f121e837d1cc553816794896a53eb7db7 100644 (file)
@@ -27,6 +27,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -61,17 +62,17 @@ struct dns_peer {
 
        isc_netaddr_t           address;
        unsigned int            prefixlen;
-       isc_boolean_t           bogus;
+       bool            bogus;
        dns_transfer_format_t   transfer_format;
        uint32_t                transfers;
-       isc_boolean_t           support_ixfr;
-       isc_boolean_t           provide_ixfr;
-       isc_boolean_t           request_ixfr;
-       isc_boolean_t           support_edns;
-       isc_boolean_t           request_nsid;
-       isc_boolean_t           send_cookie;
-       isc_boolean_t           request_expire;
-       isc_boolean_t           force_tcp;
+       bool            support_ixfr;
+       bool            provide_ixfr;
+       bool            request_ixfr;
+       bool            support_edns;
+       bool            request_nsid;
+       bool            send_cookie;
+       bool            request_expire;
+       bool            force_tcp;
        dns_name_t             *key;
        isc_sockaddr_t         *transfer_source;
        isc_dscp_t              transfer_dscp;
@@ -135,52 +136,52 @@ void
 dns_peer_detach(dns_peer_t **list);
 
 isc_result_t
-dns_peer_setbogus(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setbogus(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getbogus(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getbogus(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setrequestixfr(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setrequestixfr(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getrequestixfr(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getrequestixfr(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setprovideixfr(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setprovideixfr(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getprovideixfr(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getprovideixfr(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setrequestnsid(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setrequestnsid(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getrequestnsid(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getrequestnsid(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setsendcookie(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setsendcookie(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getsendcookie(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getsendcookie(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setrequestexpire(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setrequestexpire(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getrequestexpire(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getrequestexpire(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setsupportedns(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setsupportedns(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getforcetcp(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getforcetcp(dns_peer_t *peer, bool *retval);
 
 isc_result_t
-dns_peer_setforcetcp(dns_peer_t *peer, isc_boolean_t newval);
+dns_peer_setforcetcp(dns_peer_t *peer, bool newval);
 
 isc_result_t
-dns_peer_getsupportedns(dns_peer_t *peer, isc_boolean_t *retval);
+dns_peer_getsupportedns(dns_peer_t *peer, bool *retval);
 
 isc_result_t
 dns_peer_settransfers(dns_peer_t *peer, uint32_t newval);
index 7a30030ba4d948d94eb9e19258008787649b62c7..471db973a86fd62638d3cad5eebc784f50786919 100644 (file)
@@ -11,6 +11,8 @@
 
 /*! \file dns/portlist.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/net.h>
 #include <isc/types.h>
@@ -61,7 +63,7 @@ dns_portlist_remove(dns_portlist_t *portlist, int af, in_port_t port);
  *\li  'af' to be AF_INET or AF_INET6
  */
 
-isc_boolean_t
+bool
 dns_portlist_match(dns_portlist_t *portlist, int af, in_port_t port);
 /*%<
  * Find the given <port,af> tuple to the portlist.
@@ -71,7 +73,7 @@ dns_portlist_match(dns_portlist_t *portlist, int af, in_port_t port);
  *\li  'af' to be AF_INET or AF_INET6
  *
  * Returns
- * \li #ISC_TRUE if the tuple is found, ISC_FALSE otherwise.
+ * \li #true if the tuple is found, false otherwise.
  */
 
 void
index 3fc79d05815b3f3d6b7bd499eb4792595920bfab..86047468ed32157d323de33ac5e6fbbe23efd26a 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/types.h>
@@ -24,7 +25,7 @@ ISC_LANG_BEGINDECLS
 isc_result_t
 dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
                   dns_rdatatype_t privatetype,
-                  isc_boolean_t *build_nsec, isc_boolean_t *build_nsec3);
+                  bool *build_nsec, bool *build_nsec3);
 /*%<
  * Examine the NSEC, NSEC3PARAM and privatetype RRsets at the apex of the
  * database to determine which of NSEC or NSEC3 chains we are currently
@@ -36,8 +37,8 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
  * Requires:
  * \li 'db' is valid.
  * \li 'version' is valid or NULL.
- * \li 'build_nsec' is a pointer to a isc_boolean_t or NULL.
- * \li 'build_nsec3' is a pointer to a isc_boolean_t or NULL.
+ * \li 'build_nsec' is a pointer to a bool or NULL.
+ * \li 'build_nsec3' is a pointer to a bool or NULL.
  *
  * Returns:
  * \li         ISC_R_SUCCESS, 'build_nsec' and 'build_nsec3' will be valid.
index ed4c9a761d714cb0493cbb0b13f3679b4a321c51..67ac3e4d8a75afebd6fde72ef848f6e563f34de6 100644 (file)
@@ -16,6 +16,7 @@
 /*! \file dns/rbt.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/assertions.h>
 #include <isc/crc64.h>
@@ -58,7 +59,7 @@ ISC_LANG_BEGINDECLS
 #if DNS_RBT_USEMAGIC
 #define DNS_RBTNODE_VALID(n)            ISC_MAGIC_VALID(n, DNS_RBTNODE_MAGIC)
 #else
-#define DNS_RBTNODE_VALID(n)            ISC_TRUE
+#define DNS_RBTNODE_VALID(n)            true
 #endif
 
 /*%
@@ -538,12 +539,12 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
  */
 
 isc_result_t
-dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, isc_boolean_t recurse);
+dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, bool recurse);
 /*%<
  * Delete 'name' from the tree of trees.
  *
  * Notes:
- *\li   When 'name' is removed, if recurse is ISC_TRUE then all of its
+ *\li   When 'name' is removed, if recurse is true then all of its
  *      subnames are removed too.
  *
  * Requires:
@@ -581,12 +582,12 @@ dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, isc_boolean_t recurse);
  */
 
 isc_result_t
-dns_rbt_deletenode(dns_rbt_t *rbt, dns_rbtnode_t *node, isc_boolean_t recurse);
+dns_rbt_deletenode(dns_rbt_t *rbt, dns_rbtnode_t *node, bool recurse);
 /*%<
  * Delete 'node' from the tree of trees.
  *
  * Notes:
- *\li   When 'node' is removed, if recurse is ISC_TRUE then all nodes
+ *\li   When 'node' is removed, if recurse is true then all nodes
  *      in levels down from it are removed too.
  *
  * Requires:
@@ -775,7 +776,7 @@ dns_rbt_printtext(dns_rbt_t *rbt,
  */
 
 void
-dns_rbt_printdot(dns_rbt_t *rbt, isc_boolean_t show_pointers, FILE *f);
+dns_rbt_printdot(dns_rbt_t *rbt, bool show_pointers, FILE *f);
 /*%<
  * Print a GraphViz dot representation of the internal structure of the
  * red-black tree of trees to the passed stream.
@@ -820,7 +821,7 @@ dns__rbt_getheight(dns_rbt_t *rbt);
  * \li  rbt is a valid rbt manager.
  */
 
-isc_boolean_t
+bool
 dns__rbt_checkproperties(dns_rbt_t *rbt);
 /*%<
  * Check red-black properties of the forest.
index 29f4e69f84cbeb33635945b31d852c4b926fc3aa..25220cea7013320ae15ff30723c60b3ea7fa72ee 100644 (file)
@@ -83,6 +83,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/types.h>
@@ -128,7 +130,7 @@ struct dns_rdata {
 #define DNS_RDATA_INITIALIZED(rdata) \
        (!ISC_LINK_LINKED((rdata), link))
 #else
-#define DNS_RDATA_INITIALIZED(rdata) ISC_TRUE
+#define DNS_RDATA_INITIALIZED(rdata) true
 #endif
 #endif
 
@@ -527,14 +529,14 @@ dns_rdata_freestruct(void *source);
  *     dns_rdata_tostruct().
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_ismeta(dns_rdatatype_t type);
 /*%<
  * Return true iff the rdata type 'type' is a meta-type
  * like ANY or AXFR.
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_issingleton(dns_rdatatype_t type);
 /*%<
  * Return true iff the rdata type 'type' is a singleton type,
@@ -545,14 +547,14 @@ dns_rdatatype_issingleton(dns_rdatatype_t type);
  *
  */
 
-isc_boolean_t
+bool
 dns_rdataclass_ismeta(dns_rdataclass_t rdclass);
 /*%<
  * Return true iff the rdata class 'rdclass' is a meta-class
  * like ANY or NONE.
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_isdnssec(dns_rdatatype_t type);
 /*%<
  * Return true iff 'type' is one of the DNSSEC
@@ -562,7 +564,7 @@ dns_rdatatype_isdnssec(dns_rdatatype_t type);
  * \li 'type' is a valid rdata type.
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_iszonecutauth(dns_rdatatype_t type);
 /*%<
  * Return true iff rdata of type 'type' is considered authoritative
@@ -574,7 +576,7 @@ dns_rdatatype_iszonecutauth(dns_rdatatype_t type);
  *
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_isknown(dns_rdatatype_t type);
 /*%<
  * Return true iff the rdata type 'type' is known.
@@ -644,7 +646,7 @@ dns_rdata_digest(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg);
  *\li  Many other results are possible if not successful.
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_questiononly(dns_rdatatype_t type);
 /*%<
  * Return true iff rdata of type 'type' can only appear in the question
@@ -655,7 +657,7 @@ dns_rdatatype_questiononly(dns_rdatatype_t type);
  *
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_notquestion(dns_rdatatype_t type);
 /*%<
  * Return true iff rdata of type 'type' can not appear in the question
@@ -666,7 +668,7 @@ dns_rdatatype_notquestion(dns_rdatatype_t type);
  *
  */
 
-isc_boolean_t
+bool
 dns_rdatatype_atparent(dns_rdatatype_t type);
 /*%<
  * Return true iff rdata of type 'type' should appear at the parent of
@@ -724,9 +726,9 @@ dns_rdata_covers(dns_rdata_t *rdata);
  *\li  The type covered.
  */
 
-isc_boolean_t
+bool
 dns_rdata_checkowner(dns_name_t* name, dns_rdataclass_t rdclass,
-                    dns_rdatatype_t type, isc_boolean_t wildcard);
+                    dns_rdatatype_t type, bool wildcard);
 /*
  * Returns whether this is a valid ownername for this <type,class>.
  * If wildcard is true allow the first label to be a wildcard if
@@ -736,7 +738,7 @@ dns_rdata_checkowner(dns_name_t* name, dns_rdataclass_t rdclass,
  *     'name' is a valid name.
  */
 
-isc_boolean_t
+bool
 dns_rdata_checknames(dns_rdata_t *rdata, dns_name_t *owner, dns_name_t *bad);
 /*
  * Returns whether 'rdata' contains valid domain names.  The checks are
index 334c84c11095bd526f748509b046e13b0d900d29..5295d8e4d7f5baf8d12d061e448802dbfee2ebc6 100644 (file)
@@ -44,6 +44,7 @@
  */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -253,7 +254,7 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset);
  *\li  'rdataset' is a valid, disassociated rdataset.
  */
 
-isc_boolean_t
+bool
 dns_rdataset_isassociated(dns_rdataset_t *rdataset);
 /*%<
  * Is 'rdataset' associated?
@@ -262,8 +263,8 @@ dns_rdataset_isassociated(dns_rdataset_t *rdataset);
  *\li  'rdataset' is a valid rdataset.
  *
  * Returns:
- *\li  #ISC_TRUE                       'rdataset' is associated.
- *\li  #ISC_FALSE                      'rdataset' is not associated.
+ *\li  #true                   'rdataset' is associated.
+ *\li  #false                  'rdataset' is not associated.
  */
 
 void
@@ -360,8 +361,8 @@ dns_rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
 isc_result_t
 dns_rdataset_totext(dns_rdataset_t *rdataset,
                    dns_name_t *owner_name,
-                   isc_boolean_t omit_final_dot,
-                   isc_boolean_t question,
+                   bool omit_final_dot,
+                   bool question,
                    isc_buffer_t *target);
 /*%<
  * Convert 'rdataset' to text format, storing the result in 'target'.
@@ -369,8 +370,8 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
  * Notes:
  *\li  The rdata cursor position will be changed.
  *
- *\li  The 'question' flag should normally be #ISC_FALSE.  If it is
- *     #ISC_TRUE, the TTL and rdata fields are not printed.  This is
+ *\li  The 'question' flag should normally be #false.  If it is
+ *     #true, the TTL and rdata fields are not printed.  This is
  *     for use when printing an rdata representing a question section.
  *
  *\li  This interface is deprecated; use dns_master_rdatasettottext()
@@ -682,7 +683,7 @@ dns_rdataset_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name);
 void
 dns_rdataset_trimttl(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
                     dns_rdata_rrsig_t *rrsig, isc_stdtime_t now,
-                    isc_boolean_t acceptexpired);
+                    bool acceptexpired);
 /*%<
  * Trim the ttl of 'rdataset' and 'sigrdataset' so that they will expire
  * at or before 'rrsig->expiretime'.  If 'acceptexpired' is true and the
index 575bc99d54ab9e7850086d9bf1e34341bbc292c5..2e0d0e1b30aea7cd7b37d16d94b777bf548daa4c 100644 (file)
@@ -41,6 +41,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/types.h>
@@ -144,7 +146,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
  * valid flags are DNS_RDATASLAB_EXACT
  */
 
-isc_boolean_t
+bool
 dns_rdataslab_equal(unsigned char *slab1, unsigned char *slab2,
                    unsigned int reservelen);
 /*%<
@@ -155,9 +157,9 @@ dns_rdataslab_equal(unsigned char *slab1, unsigned char *slab2,
  *\li  'slab1' and 'slab2' point to slabs.
  *
  * Returns:
- *\li  ISC_TRUE if the slabs are equal, ISC_FALSE otherwise.
+ *\li  true if the slabs are equal, false otherwise.
  */
-isc_boolean_t
+bool
 dns_rdataslab_equalx(unsigned char *slab1, unsigned char *slab2,
                     unsigned int reservelen, dns_rdataclass_t rdclass,
                     dns_rdatatype_t type);
@@ -168,7 +170,7 @@ dns_rdataslab_equalx(unsigned char *slab1, unsigned char *slab2,
  *\li  'slab1' and 'slab2' point to slabs.
  *
  * Returns:
- *\li  ISC_TRUE if the slabs are equal, #ISC_FALSE otherwise.
+ *\li  true if the slabs are equal, #false otherwise.
  */
 
 ISC_LANG_ENDDECLS
index 6015e832bdfb414c5d556ecc8d5b899870bae160..672d3e9d389b162f2035469cec2e060bc7c145a9 100644 (file)
@@ -34,6 +34,7 @@
  *\li  No anticipated impact.
  */
 
+#include <stdbool.h>
 #include <isc/lang.h>
 #include <isc/event.h>
 
@@ -367,19 +368,19 @@ dns_request_getresponse(dns_request_t *request, dns_message_t *message,
  *\li  Any result that dns_message_parse() can return.
  */
 
-isc_boolean_t
+bool
 dns_request_usedtcp(dns_request_t *request);
 /*%<
  * Return whether this query used TCP or not.  Setting #DNS_REQUESTOPT_TCP
  * in the call to dns_request_create() will cause the function to return
- * #ISC_TRUE, otherwise the result is based on the query message size.
+ * #true, otherwise the result is based on the query message size.
  *
  * Requires:
  *\li  'request' is a valid request.
  *
  * Returns:
- *\li  ISC_TRUE        if TCP was used.
- *\li  ISC_FALSE       if UDP was used.
+ *\li  true    if TCP was used.
+ *\li  false   if UDP was used.
  */
 
 void
index 9ad08a269f73fadf8832ee504cca65e7fece7aa0..c09107f057fca86b2db5b793c0e7af3d0cbd467f 100644 (file)
@@ -45,6 +45,7 @@
  */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/socket.h>
@@ -393,7 +394,7 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp);
 void
 dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
                      isc_logcategory_t *category, isc_logmodule_t *module,
-                     int level, isc_boolean_t duplicateok);
+                     int level, bool duplicateok);
 /*%<
  * Dump a log message on internal state at the completion of given 'fetch'.
  * 'lctx', 'category', 'module', and 'level' are used to write the log message.
@@ -512,7 +513,7 @@ dns_resolver_disable_ds_digest(dns_resolver_t *resolver, dns_name_t *name,
  *\li  #ISC_R_NOMEMORY
  */
 
-isc_boolean_t
+bool
 dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
                                 unsigned int alg);
 /*%<
@@ -522,7 +523,7 @@ dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
  * crypto libraries if it was not specifically disabled.
  */
 
-isc_boolean_t
+bool
 dns_resolver_ds_digest_supported(dns_resolver_t *resolver, dns_name_t *name,
                                 unsigned int digest_type);
 /*%<
@@ -537,9 +538,9 @@ dns_resolver_resetmustbesecure(dns_resolver_t *resolver);
 
 isc_result_t
 dns_resolver_setmustbesecure(dns_resolver_t *resolver, dns_name_t *name,
-                            isc_boolean_t value);
+                            bool value);
 
-isc_boolean_t
+bool
 dns_resolver_getmustbesecure(dns_resolver_t *resolver, dns_name_t *name);
 
 
@@ -573,11 +574,11 @@ void
 dns_resolver_getclientsperquery(dns_resolver_t *resolver, uint32_t *cur,
                                uint32_t *min, uint32_t *max);
 
-isc_boolean_t
+bool
 dns_resolver_getzeronosoattl(dns_resolver_t *resolver);
 
 void
-dns_resolver_setzeronosoattl(dns_resolver_t *resolver, isc_boolean_t state);
+dns_resolver_setzeronosoattl(dns_resolver_t *resolver, bool state);
 
 unsigned int
 dns_resolver_getoptions(dns_resolver_t *resolver);
@@ -593,7 +594,7 @@ dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name,
  * \li name to be valid.
  */
 
-isc_boolean_t
+bool
 dns_resolver_getbadcache(dns_resolver_t *resolver, dns_name_t *name,
                         dns_rdatatype_t type, isc_time_t *now);
 /*%<
index 4f13fced3c37f791da75ed5ed8ac24513fe89246..78f34435b9467247e7c7bc1f1500c4c52da467f0 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef DNS_RPZ_H
 #define DNS_RPZ_H 1
 
+#include <stdbool.h>
+
 #include <isc/deprecated.h>
 #include <isc/event.h>
 #include <isc/ht.h>
@@ -172,9 +174,9 @@ typedef struct dns_rpz_popt dns_rpz_popt_t;
 struct dns_rpz_popt {
        dns_rpz_zbits_t     no_rd_ok;
        dns_rpz_zbits_t     no_log;
-       isc_boolean_t       break_dnssec;
-       isc_boolean_t       qname_wait_recurse;
-       isc_boolean_t       nsip_wait_recurse;
+       bool        break_dnssec;
+       bool        qname_wait_recurse;
+       bool        nsip_wait_recurse;
        unsigned int        min_ns_labels;
        dns_rpz_num_t       num_zones;
 };
@@ -282,8 +284,8 @@ typedef struct {
         */
        struct {
                isc_result_t            result;
-               isc_boolean_t           is_zone;
-               isc_boolean_t           authoritative;
+               bool            is_zone;
+               bool            authoritative;
                dns_zone_t              *zone;
                dns_db_t                *db;
                dns_dbnode_t            *node;
index b577e9b4b257619d471db53d69deeb63e2a48d28..0301ed8d46ca509823deb8c8b615f7ff15197051 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 
@@ -204,7 +205,7 @@ struct dns_rrl {
        isc_mutex_t     lock;
        isc_mem_t       *mctx;
 
-       isc_boolean_t   log_only;
+       bool    log_only;
        dns_rrl_rate_t  responses_per_second;
        dns_rrl_rate_t  referrals_per_second;
        dns_rrl_rate_t  nodata_per_second;
@@ -260,10 +261,10 @@ typedef enum {
 
 dns_rrl_result_t
 dns_rrl(dns_view_t *view,
-       const isc_sockaddr_t *client_addr, isc_boolean_t is_tcp,
+       const isc_sockaddr_t *client_addr, bool is_tcp,
        dns_rdataclass_t rdclass, dns_rdatatype_t qtype,
        dns_name_t *qname, isc_result_t resp_result, isc_stdtime_t now,
-       isc_boolean_t wouldlog, char *log_buf, unsigned int log_buf_len);
+       bool wouldlog, char *log_buf, unsigned int log_buf_len);
 
 void
 dns_rrl_view_destroy(dns_view_t *view);
index f92ac24910c0e033e80dcb707e3eafb2ee9a9f3d..5b6bc3e75537a7892af72d492f88222aed9323ac 100644 (file)
@@ -51,6 +51,7 @@
 #define SDLZ_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <dns/clientinfo.h>
 #include <dns/dlz.h>
@@ -211,14 +212,14 @@ typedef isc_result_t (*dns_sdlznewversion_t)(const char *zone,
  * closeversion function will be called to close the transaction.
  */
 
-typedef void (*dns_sdlzcloseversion_t)(const char *zone, isc_boolean_t commit,
+typedef void (*dns_sdlzcloseversion_t)(const char *zone, bool commit,
                                       void *driverarg, void *dbdata,
                                       void **versionp);
 /*%<
  * Method prototype.  Drivers implementing the SDLZ interface must
  * supply a closeversion method if they supply a newversion method.
  * When implemented, the driver should close the given transaction,
- * committing changes if 'commit' is ISC_TRUE. If 'commit' is not true
+ * committing changes if 'commit' is true. If 'commit' is not true
  * then all changes should be discarded and the database rolled back.
  * If the call is successful then *versionp should be set to NULL
  */
@@ -234,7 +235,7 @@ typedef isc_result_t (*dns_sdlzconfigure_t)(dns_view_t *view,
  */
 
 
-typedef isc_boolean_t (*dns_sdlzssumatch_t)(const char *signer,
+typedef bool (*dns_sdlzssumatch_t)(const char *signer,
                                            const char *name,
                                            const char *tcpaddr,
                                            const char *type,
@@ -248,7 +249,7 @@ typedef isc_boolean_t (*dns_sdlzssumatch_t)(const char *signer,
  * Method prototype.  Drivers implementing the SDLZ interface may
  * supply a ssumatch method. If supplied, then ssumatch will be
  * called to authorize any zone updates. The driver should return
- * ISC_TRUE to allow the update, and ISC_FALSE to deny it. For a DLZ
+ * true to allow the update, and false to deny it. For a DLZ
  * controlled zone, this is the only access control on updates.
  */
 
index 1962491e539a87ac85ad4c1695e08165d9943cd0..da6e3432bd8f0a68269e4662387368b0876d378c 100644 (file)
@@ -14,6 +14,8 @@
 
 /*! \file dns/ssu.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/acl.h>
@@ -113,7 +115,7 @@ dns_ssutable_detach(dns_ssutable_t **tablep);
  */
 
 isc_result_t
-dns_ssutable_addrule(dns_ssutable_t *table, isc_boolean_t grant,
+dns_ssutable_addrule(dns_ssutable_t *table, bool grant,
                     dns_name_t *identity, unsigned int matchtype,
                     dns_name_t *name, unsigned int ntypes,
                     dns_rdatatype_t *types);
@@ -145,14 +147,14 @@ dns_ssutable_addrule(dns_ssutable_t *table, isc_boolean_t grant,
  *\li          ISC_R_NOMEMORY
  */
 
-isc_boolean_t
+bool
 dns_ssutable_checkrules(dns_ssutable_t *table, dns_name_t *signer,
                        dns_name_t *name, isc_netaddr_t *addr,
                        dns_rdatatype_t type, const dst_key_t *key);
-isc_boolean_t
+bool
 dns_ssutable_checkrules2(dns_ssutable_t *table, dns_name_t *signer,
                        dns_name_t *name, isc_netaddr_t *addr,
-                       isc_boolean_t tcp, const dns_aclenv_t *env,
+                       bool tcp, const dns_aclenv_t *env,
                        dns_rdatatype_t type, const dst_key_t *key);
 /*%<
  *     Checks that the attempted update of (name, type) is allowed according
@@ -196,7 +198,7 @@ dns_ssutable_checkrules2(dns_ssutable_t *table, dns_name_t *signer,
 
 
 /*% Accessor functions to extract rule components */
-isc_boolean_t  dns_ssurule_isgrant(const dns_ssurule_t *rule);
+bool   dns_ssurule_isgrant(const dns_ssurule_t *rule);
 /*% Accessor functions to extract rule components */
 dns_name_t *   dns_ssurule_identity(const dns_ssurule_t *rule);
 /*% Accessor functions to extract rule components */
@@ -227,7 +229,7 @@ isc_result_t        dns_ssutable_nextrule(dns_ssurule_t *rule,
  *\li  #ISC_R_NOMORE
  */
 
-isc_boolean_t
+bool
 dns_ssu_external_match(dns_name_t *identity, dns_name_t *signer,
                       dns_name_t *name, isc_netaddr_t *tcpaddr,
                       dns_rdatatype_t type, const dst_key_t *key,
index 4b8fcd344befba12a1e86ab3b489f7bc005607d6..845cf6c148e3b7d11cbbe755e3714d1cc03c1f37 100644 (file)
@@ -19,6 +19,8 @@
  ***   Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/buffer.h>
 #include <isc/lang.h>
 
@@ -30,14 +32,14 @@ ISC_LANG_BEGINDECLS
 
 isc_result_t
 dns_timer_setidle(isc_timer_t *timer, unsigned int maxtime,
-                 unsigned int idletime, isc_boolean_t purge);
+                 unsigned int idletime, bool purge);
 /*%<
  * Convenience function for setting up simple, one-second-granularity
  * idle timers as used by zone transfers.
  * \brief
  * Set the timer 'timer' to go off after 'idletime' seconds of inactivity,
  * or after 'maxtime' at the very latest.  Events are purged iff
- * 'purge' is ISC_TRUE.
+ * 'purge' is true.
  */
 
 ISC_LANG_ENDDECLS
index a9fb4f27097039b06d6301fc7b4722595b5b49d6..f2500faccd2952d62dbe4dba35844a094b04df85 100644 (file)
@@ -16,6 +16,7 @@
 /*! \file dns/tkey.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 
@@ -119,7 +120,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
 isc_result_t
 dns_tkey_buildgssquery(dns_message_t *msg, dns_name_t *name, dns_name_t *gname,
                       isc_buffer_t *intoken, uint32_t lifetime,
-                      gss_ctx_id_t *context, isc_boolean_t win2k,
+                      gss_ctx_id_t *context, bool win2k,
                       isc_mem_t *mctx, char **err_message);
 /*%<
  *     Builds a query containing a TKEY that will generate a GSSAPI context.
@@ -213,7 +214,7 @@ isc_result_t
 dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
                      dns_name_t *server, gss_ctx_id_t *context,
                      dns_tsigkey_t **outkey, dns_tsig_keyring_t *ring,
-                     isc_boolean_t win2k, char **err_message);
+                     bool win2k, char **err_message);
 
 /*
  *     Client side negotiation of GSS-TSIG.  Process the response
index 56ea7e066173be8c82bd22424cb7c874ed76fe66..a7b7bc2aa2b8bb3a70719e6cd39a35d487b151d0 100644 (file)
@@ -15,6 +15,8 @@
 
 /*! \file dns/tsig.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/refcount.h>
 #include <isc/rwlock.h>
@@ -78,7 +80,7 @@ struct dns_tsigkey {
        dns_name_t              name;           /*%< Key name */
        dns_name_t              *algorithm;     /*%< Algorithm name */
        dns_name_t              *creator;       /*%< name that created secret */
-       isc_boolean_t           generated;      /*%< was this generated? */
+       bool            generated;      /*%< was this generated? */
        isc_stdtime_t           inception;      /*%< start of validity period */
        isc_stdtime_t           expire;         /*%< end of validity period */
        dns_tsig_keyring_t      *ring;          /*%< the enclosing keyring */
@@ -95,14 +97,14 @@ ISC_LANG_BEGINDECLS
 
 isc_result_t
 dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm,
-                  unsigned char *secret, int length, isc_boolean_t generated,
+                  unsigned char *secret, int length, bool generated,
                   dns_name_t *creator, isc_stdtime_t inception,
                   isc_stdtime_t expire, isc_mem_t *mctx,
                   dns_tsig_keyring_t *ring, dns_tsigkey_t **key);
 
 isc_result_t
 dns_tsigkey_createfromkey(dns_name_t *name, dns_name_t *algorithm,
-                         dst_key_t *dstkey, isc_boolean_t generated,
+                         dst_key_t *dstkey, bool generated,
                          dns_name_t *creator, isc_stdtime_t inception,
                          isc_stdtime_t expire, isc_mem_t *mctx,
                          dns_tsig_keyring_t *ring, dns_tsigkey_t **key);
index 8a5b4f6dea2a17b8275b48823fdac23934795079..9241f109fc6bb6e6d28d491439ef25b65a756e34 100644 (file)
@@ -19,6 +19,8 @@
  ***   Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/types.h>
 
@@ -29,26 +31,26 @@ ISC_LANG_BEGINDECLS
  ***/
 
 isc_result_t
-dns_ttl_totext(uint32_t src, isc_boolean_t verbose,
+dns_ttl_totext(uint32_t src, bool verbose,
               isc_buffer_t *target);
 isc_result_t
-dns_ttl_totext2(uint32_t src, isc_boolean_t verbose,
-               isc_boolean_t upcase, isc_buffer_t *target);
+dns_ttl_totext2(uint32_t src, bool verbose,
+               bool upcase, isc_buffer_t *target);
 /*%<
  * Output a TTL or other time interval in a human-readable form.
  * The time interval is given as a count of seconds in 'src'.
  * The text representation is appended to 'target'.
  *
- * If 'verbose' is ISC_FALSE, use the terse BIND 8 style, like "1w2d3h4m5s".
+ * If 'verbose' is false, use the terse BIND 8 style, like "1w2d3h4m5s".
  *
- * If 'verbose' is ISC_TRUE, use a verbose style like the SOA comments
+ * If 'verbose' is true, use a verbose style like the SOA comments
  * in "dig", like "1 week 2 days 3 hours 4 minutes 5 seconds".
  *
- * If 'upcase' is ISC_TRUE, we conform to the BIND 8 style in which
+ * If 'upcase' is true, we conform to the BIND 8 style in which
  * the unit letter is capitalized if there is only a single unit
  * letter to print (for example, "1m30s", but "2M")
  *
- * If 'upcase' is ISC_FALSE, unit letters are always in lower case.
+ * If 'upcase' is false, unit letters are always in lower case.
  *
  * Returns:
  * \li ISC_R_SUCCESS
index c1336810c248a38f225df38593d32cc5b16115a1..6754d1684678de3ad81c79037e4a1848b50dd087 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/types.h>
 
@@ -413,17 +414,17 @@ typedef void
 typedef int
 (*dns_rdatasetorderfunc_t)(const dns_rdata_t *, const void *);
 
-typedef isc_boolean_t
+typedef bool
 (*dns_checkmxfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *);
 
-typedef isc_boolean_t
+typedef bool
 (*dns_checksrvfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *);
 
-typedef isc_boolean_t
+typedef bool
 (*dns_checknsfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *,
                     dns_rdataset_t *, dns_rdataset_t *);
 
-typedef isc_boolean_t
+typedef bool
 (*dns_isselffunc_t)(dns_view_t *, dns_tsigkey_t *, isc_sockaddr_t *,
                    isc_sockaddr_t *, dns_rdataclass_t, void *);
 
index 100eab7a6f4d63cf3e48f6752fa7c4e12661ca4d..81e46d8fd38093a945dda7382d99614164b0bea4 100644 (file)
@@ -48,6 +48,8 @@
  *\li  RFCs:   1034, 1035, 2181, 4033, 4034, 4035.
  */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/event.h>
 #include <isc/mutex.h>
@@ -96,11 +98,11 @@ typedef struct dns_validatorevent {
        /*
         * Optout proof seen.
         */
-       isc_boolean_t                   optout;
+       bool                    optout;
        /*
         * Answer is secure.
         */
-       isc_boolean_t                   secure;
+       bool                    secure;
 } dns_validatorevent_t;
 
 #define DNS_VALIDATOR_NOQNAMEPROOF 0
@@ -136,7 +138,7 @@ struct dns_validator {
        void *                          arg;
        unsigned int                    labels;
        dns_rdataset_t *                currentset;
-       isc_boolean_t                   seensig;
+       bool                    seensig;
        dns_rdataset_t *                keyset;
        dns_rdataset_t *                dsset;
        dns_rdataset_t *                soaset;
@@ -152,8 +154,8 @@ struct dns_validator {
        ISC_LINK(dns_validator_t)       link;
        dns_rdataset_t                  dlv;
        dns_fixedname_t                 dlvsep;
-       isc_boolean_t                   havedlvsep;
-       isc_boolean_t                   mustbesecure;
+       bool                    havedlvsep;
+       bool                    mustbesecure;
        unsigned int                    dlvlabels;
        unsigned int                    depth;
        unsigned int                    authcount;
index 9f79e07c8a84875975b53d33668ea07e12ba90fe..ee9f6e36851cd86d02f64326aff33c683058ea20 100644 (file)
@@ -54,6 +54,7 @@
 
 #include <stdio.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -100,7 +101,7 @@ struct dns_view {
        dns_ntatable_t *                ntatable_priv;
 
        isc_mutex_t                     lock;
-       isc_boolean_t                   frozen;
+       bool                    frozen;
        isc_task_t *                    task;
        isc_event_t                     resevent;
        isc_event_t                     adbevent;
@@ -108,7 +109,7 @@ struct dns_view {
        isc_stats_t *                   adbstats;
        isc_stats_t *                   resstats;
        dns_stats_t *                   resquerystats;
-       isc_boolean_t                   cacheshared;
+       bool                    cacheshared;
 
        /* Configurable data. */
        dns_tsig_keyring_t *            statickeys;
@@ -116,18 +117,18 @@ struct dns_view {
        dns_peerlist_t *                peers;
        dns_order_t *                   order;
        dns_fwdtable_t *                fwdtable;
-       isc_boolean_t                   recursion;
-       isc_boolean_t                   auth_nxdomain;
-       isc_boolean_t                   additionalfromcache;
-       isc_boolean_t                   additionalfromauth;
-       isc_boolean_t                   minimal_any;
+       bool                    recursion;
+       bool                    auth_nxdomain;
+       bool                    additionalfromcache;
+       bool                    additionalfromauth;
+       bool                    minimal_any;
        dns_minimaltype_t               minimalresponses;
-       isc_boolean_t                   enablednssec;
-       isc_boolean_t                   enablevalidation;
-       isc_boolean_t                   acceptexpired;
-       isc_boolean_t                   requireservercookie;
-       isc_boolean_t                   trust_anchor_telemetry;
-       isc_boolean_t                   root_key_sentinel;
+       bool                    enablednssec;
+       bool                    enablevalidation;
+       bool                    acceptexpired;
+       bool                    requireservercookie;
+       bool                    trust_anchor_telemetry;
+       bool                    root_key_sentinel;
        dns_transfer_format_t           transfer_format;
        dns_acl_t *                     cacheacl;
        dns_acl_t *                     cacheonacl;
@@ -142,14 +143,14 @@ struct dns_view {
        dns_acl_t *                     upfwdacl;
        dns_acl_t *                     denyansweracl;
        dns_acl_t *                     nocasecompress;
-       isc_boolean_t                   msgcompression;
+       bool                    msgcompression;
        dns_rbt_t *                     answeracl_exclude;
        dns_rbt_t *                     denyanswernames;
        dns_rbt_t *                     answernames_exclude;
        dns_rrl_t *                     rrl;
-       isc_boolean_t                   provideixfr;
-       isc_boolean_t                   requestnsid;
-       isc_boolean_t                   sendcookie;
+       bool                    provideixfr;
+       bool                    requestnsid;
+       bool                    sendcookie;
        dns_ttl_t                       maxcachettl;
        dns_ttl_t                       maxncachettl;
        uint32_t                        nta_lifetime;
@@ -160,11 +161,11 @@ struct dns_view {
        in_port_t                       dstport;
        dns_aclenv_t                    aclenv;
        dns_rdatatype_t                 preferred_glue;
-       isc_boolean_t                   flush;
+       bool                    flush;
        dns_namelist_t *                delonly;
-       isc_boolean_t                   rootdelonly;
+       bool                    rootdelonly;
        dns_namelist_t *                rootexclude;
-       isc_boolean_t                   checknames;
+       bool                    checknames;
        dns_name_t *                    dlv;
        dns_fixedname_t                 dlv_fixed;
        uint16_t                        maxudp;
@@ -188,7 +189,7 @@ struct dns_view {
         */
        dns_acl_t *                     matchclients;
        dns_acl_t *                     matchdestinations;
-       isc_boolean_t                   matchrecursiveonly;
+       bool                    matchrecursiveonly;
 
        /* Locked by themselves. */
        isc_refcount_t                  references;
@@ -415,11 +416,11 @@ dns_view_createresolver(dns_view_t *view,
 void
 dns_view_setcache(dns_view_t *view, dns_cache_t *cache);
 void
-dns_view_setcache2(dns_view_t *view, dns_cache_t *cache, isc_boolean_t shared);
+dns_view_setcache2(dns_view_t *view, dns_cache_t *cache, bool shared);
 /*%<
  * Set the view's cache database.  If 'shared' is true, this means the cache
  * is created by another view and is shared with that view.  dns_view_setcache()
- * is a backward compatible version equivalent to setcache2(..., ISC_FALSE).
+ * is a backward compatible version equivalent to setcache2(..., false).
  *
  * Requires:
  *
@@ -545,13 +546,13 @@ dns_view_thaw(dns_view_t *view);
  */
 isc_result_t
 dns_view_find(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
-             isc_stdtime_t now, unsigned int options, isc_boolean_t use_hints,
+             isc_stdtime_t now, unsigned int options, bool use_hints,
              dns_db_t **dbp, dns_dbnode_t **nodep, dns_name_t *foundname,
              dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 isc_result_t
 dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
               isc_stdtime_t now, unsigned int options,
-              isc_boolean_t use_hints, isc_boolean_t use_static_stub,
+              bool use_hints, bool use_static_stub,
               dns_db_t **dbp, dns_dbnode_t **nodep, dns_name_t *foundname,
               dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 /*%<
@@ -559,13 +560,13 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
  * 'type'.
  * In general, this function first searches view's zone and cache DBs for the
  * best match data against 'name'.  If nothing found there, and if 'use_hints'
- * is ISC_TRUE, the view's hint DB (if configured) is searched.
+ * is true, the view's hint DB (if configured) is searched.
  * If the view is configured with a static-stub zone which gives the longest
  * match for 'name' among the zones, however, the cache DB is not consulted
- * unless 'use_static_stub' is ISC_FALSE (see below about this argument).
+ * unless 'use_static_stub' is false (see below about this argument).
  *
  * dns_view_find() is a backward compatible version equivalent to
- * dns_view_find2() with use_static_stub argument being ISC_FALSE.
+ * dns_view_find2() with use_static_stub argument being false.
  *
  * Notes:
  *
@@ -575,16 +576,16 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
  *
  *\li  If 'now' is zero, then the current time will be used.
  *
- *\li  If 'use_hints' is ISC_TRUE, and the view has a hints database, then
+ *\li  If 'use_hints' is true, and the view has a hints database, then
  *     it will be searched last.  If the answer is found in the hints
  *     database, the result code will be DNS_R_HINT.  If the name is found
  *     in the hints database but not the type, the result code will be
  *     #DNS_R_HINTNXRRSET.
  *
- *\li  If 'use_static_stub' is ISC_FALSE and the longest match zone for 'name'
+ *\li  If 'use_static_stub' is false and the longest match zone for 'name'
  *     is a static-stub zone, it's ignored and the cache and/or hints will be
  *     searched.  In the majority of the cases this argument should be
- *     ISC_FALSE.  The only known usage of this argument being ISC_TRUE is
+ *     false.  The only known usage of this argument being true is
  *     if this search is for a "bailiwick" glue A or AAAA RRset that may
  *     best match a static-stub zone.  Consider the following example:
  *     this view is configured with a static-stub zone "example.com",
@@ -642,7 +643,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
 isc_result_t
 dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                    isc_stdtime_t now, unsigned int options,
-                   isc_boolean_t use_hints,
+                   bool use_hints,
                    dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 /*%<
  * Find an rdataset whose owner name is 'name', and whose type is
@@ -660,7 +661,7 @@ dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
  *
  *\li  If 'now' is zero, then the current time will be used.
  *
- *\li  If 'use_hints' is ISC_TRUE, and the view has a hints database, then
+ *\li  If 'use_hints' is true, and the view has a hints database, then
  *     it will be searched last.  If the answer is found in the hints
  *     database, the result code will be DNS_R_HINT.  If the name is found
  *     in the hints database but not the type, the result code will be
@@ -704,13 +705,13 @@ dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
 isc_result_t
 dns_view_findzonecut(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                     isc_stdtime_t now, unsigned int options,
-                    isc_boolean_t use_hints,
+                    bool use_hints,
                     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 
 isc_result_t
 dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                      isc_stdtime_t now, unsigned int options,
-                     isc_boolean_t use_hints, isc_boolean_t use_cache,
+                     bool use_hints, bool use_cache,
                      dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
 /*%<
  * Find the best known zonecut containing 'name'.
@@ -722,10 +723,10 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
  *
  *\li  If 'now' is zero, then the current time will be used.
  *
- *\li  If 'use_hints' is ISC_TRUE, and the view has a hints database, then
+ *\li  If 'use_hints' is true, and the view has a hints database, then
  *     it will be searched last.
  *
- *\li  If 'use_cache' is ISC_TRUE, and the view has a cache, then it will be
+ *\li  If 'use_cache' is true, and the view has a cache, then it will be
  *     searched.
  *
  *\li  If 'sigrdataset' is not NULL, and there is a SIG rdataset which
@@ -769,7 +770,7 @@ dns_viewlist_find(dns_viewlist_t *list, const char *name,
  */
 
 isc_result_t
-dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name, isc_boolean_t allclasses,
+dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name, bool allclasses,
                      dns_rdataclass_t rdclass, dns_zone_t **zonep);
 
 /*%<
@@ -800,10 +801,10 @@ dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep);
  */
 
 isc_result_t
-dns_view_load(dns_view_t *view, isc_boolean_t stop);
+dns_view_load(dns_view_t *view, bool stop);
 
 isc_result_t
-dns_view_loadnew(dns_view_t *view, isc_boolean_t stop);
+dns_view_loadnew(dns_view_t *view, bool stop);
 
 isc_result_t
 dns_view_asyncload(dns_view_t *view, dns_zt_allloaded_t callback, void *arg);
@@ -817,8 +818,8 @@ dns_view_asyncload(dns_view_t *view, dns_zt_allloaded_t callback, void *arg);
  * in the view have finished loading, 'callback' is called with argument
  * 'arg' to inform the caller.
  *
- * If 'stop' is ISC_TRUE, stop on the first error and return it.
- * If 'stop' is ISC_FALSE (or we are loading asynchronously), ignore errors.
+ * If 'stop' is true, stop on the first error and return it.
+ * If 'stop' is false (or we are loading asynchronously), ignore errors.
  *
  * Requires:
  *
@@ -903,7 +904,7 @@ dns_view_dumpdbtostream(dns_view_t *view, FILE *fp);
 isc_result_t
 dns_view_flushcache(dns_view_t *view);
 isc_result_t
-dns_view_flushcache2(dns_view_t *view, isc_boolean_t fixuponly);
+dns_view_flushcache2(dns_view_t *view, bool fixuponly);
 /*%<
  * Flush the view's cache (and ADB).  If 'fixuponly' is true, it only updates
  * the internal reference to the cache DB with omitting actual flush operation.
@@ -922,7 +923,7 @@ dns_view_flushcache2(dns_view_t *view, isc_boolean_t fixuponly);
  */
 
 isc_result_t
-dns_view_flushnode(dns_view_t *view, dns_name_t *name, isc_boolean_t tree);
+dns_view_flushnode(dns_view_t *view, dns_name_t *name, bool tree);
 /*%<
  * Flush the given name from the view's cache (and optionally ADB/badcache).
  *
@@ -942,7 +943,7 @@ isc_result_t
 dns_view_flushname(dns_view_t *view, dns_name_t *name);
 /*%<
  * Flush the given name from the view's cache, ADB and badcache.
- * Equivalent to dns_view_flushnode(view, name, ISC_FALSE).
+ * Equivalent to dns_view_flushnode(view, name, false).
  *
  *
  * Requires:
@@ -983,7 +984,7 @@ dns_view_excludedelegationonly(dns_view_t *view, dns_name_t *name);
  *\li  #ISC_R_NOMEMORY
  */
 
-isc_boolean_t
+bool
 dns_view_isdelegationonly(dns_view_t *view, dns_name_t *name);
 /*%<
  * Check if 'name' is in the delegation only table or if
@@ -994,12 +995,12 @@ dns_view_isdelegationonly(dns_view_t *view, dns_name_t *name);
  *\li  'name' is valid.
  *
  * Returns:
- *\li  #ISC_TRUE if the name is the table.
- *\li  #ISC_FALSE otherwise.
+ *\li  #true if the name is the table.
+ *\li  #false otherwise.
  */
 
 void
-dns_view_setrootdelonly(dns_view_t *view, isc_boolean_t value);
+dns_view_setrootdelonly(dns_view_t *view, bool value);
 /*%<
  * Set the root delegation only flag.
  *
@@ -1007,7 +1008,7 @@ dns_view_setrootdelonly(dns_view_t *view, isc_boolean_t value);
  *\li  'view' is valid.
  */
 
-isc_boolean_t
+bool
 dns_view_getrootdelonly(dns_view_t *view);
 /*%<
  * Get the root delegation only flag.
@@ -1017,7 +1018,7 @@ dns_view_getrootdelonly(dns_view_t *view);
  */
 
 isc_result_t
-dns_view_freezezones(dns_view_t *view, isc_boolean_t freeze);
+dns_view_freezezones(dns_view_t *view, bool freeze);
 /*%<
  * Freeze/thaw updates to master zones.
  *
@@ -1101,7 +1102,7 @@ dns_view_getresquerystats(dns_view_t *view, dns_stats_t **statsp);
  *\li  'statsp' != NULL && '*statsp' != NULL
  */
 
-isc_boolean_t
+bool
 dns_view_iscacheshared(dns_view_t *view);
 /*%<
  * Check if the view shares the cache created by another view.
@@ -1110,8 +1111,8 @@ dns_view_iscacheshared(dns_view_t *view);
  * \li 'view' is valid.
  *
  * Returns:
- *\li  #ISC_TRUE if the cache is shared.
- *\li  #ISC_FALSE otherwise.
+ *\li  #true if the cache is shared.
+ *\li  #false otherwise.
  */
 
 isc_result_t
@@ -1184,13 +1185,13 @@ dns_view_getsecroots(dns_view_t *view, dns_keytable_t **ktp);
 
 isc_result_t
 dns_view_issecuredomain(dns_view_t *view, dns_name_t *name,
-                       isc_stdtime_t now, isc_boolean_t checknta,
-                       isc_boolean_t *secure_domain);
+                       isc_stdtime_t now, bool checknta,
+                       bool *secure_domain);
 /*%<
  * Is 'name' at or beneath a trusted key, and not covered by a valid
  * negative trust anchor?  Put answer in '*secure_domain'.
  *
- * If 'checknta' is ISC_FALSE, ignore the NTA table in determining
+ * If 'checknta' is false, ignore the NTA table in determining
  * whether this is a secure domain.
  *
  * Requires:
@@ -1201,7 +1202,7 @@ dns_view_issecuredomain(dns_view_t *view, dns_name_t *name,
  *\li  Any other value indicates failure
  */
 
-isc_boolean_t
+bool
 dns_view_ntacovers(dns_view_t *view, isc_stdtime_t now,
                   dns_name_t *name, dns_name_t *anchor);
 /*%<
@@ -1236,12 +1237,12 @@ dns_view_untrust(dns_view_t *view, dns_name_t *keyname,
  */
 
 isc_result_t
-dns_view_setnewzones(dns_view_t *view, isc_boolean_t allow, void *cfgctx,
+dns_view_setnewzones(dns_view_t *view, bool allow, void *cfgctx,
                     void (*cfg_destroy)(void **), uint64_t mapsize);
 /*%<
  * Set whether or not to allow zones to be created or deleted at runtime.
  *
- * If 'allow' is ISC_TRUE, determines the filename into which new zone
+ * If 'allow' is true, determines the filename into which new zone
  * configuration will be written.  Preserves the configuration context
  * (a pointer to which is passed in 'cfgctx') for use when parsing new
  * zone configuration.  'cfg_destroy' points to a callback routine to
@@ -1249,7 +1250,7 @@ dns_view_setnewzones(dns_view_t *view, isc_boolean_t allow, void *cfgctx,
  * roundabout method is used in order to avoid libdns having a dependency
  * on libisccfg and libbind9.)
  *
- * If 'allow' is ISC_FALSE, removes any existing references to
+ * If 'allow' is false, removes any existing references to
  * configuration context and frees any memory.
  *
  * Requires:
index b06716aa68e87890b72bc48fe94495b1a888fd30..b61d7a2b7dad2f7df64ecb39727bc3c1c36093e9 100644 (file)
@@ -19,6 +19,7 @@
  ***/
 
 #include <stdio.h>
+#include <stdbool.h>
 
 #include <isc/formatcheck.h>
 #include <isc/lang.h>
@@ -421,7 +422,7 @@ dns_zone_asyncload(dns_zone_t *zone, dns_zt_zoneloaded_t done, void *arg);
  *\li  #ISC_R_NOMEMORY
  */
 
-isc_boolean_t
+bool
 dns__zone_loadpending(dns_zone_t *zone);
 /*%<
  * Indicates whether the zone is waiting to be loaded asynchronously.
@@ -478,9 +479,9 @@ dns_zone_idetach(dns_zone_t **zonep);
  */
 
 void
-dns_zone_setflag(dns_zone_t *zone, unsigned int flags, isc_boolean_t value);
+dns_zone_setflag(dns_zone_t *zone, unsigned int flags, bool value);
 /*%<
- *     Sets ('value' == 'ISC_TRUE') / clears ('value' == 'IS_FALSE')
+ *     Sets ('value' == 'true') / clears ('value' == 'IS_FALSE')
  *     zone flags.  Valid flag bits are DNS_ZONE_F_*.
  *
  * Requires
@@ -719,13 +720,13 @@ dns_zone_unload(dns_zone_t *zone);
 
 void
 dns_zone_setoption(dns_zone_t *zone, unsigned int option,
-                  isc_boolean_t value);
+                  bool value);
 void
 dns_zone_setoption2(dns_zone_t *zone, unsigned int option,
-                   isc_boolean_t value);
+                   bool value);
 /*%<
- *     Set the given options on ('value' == ISC_TRUE) or off
- *     ('value' == #ISC_FALSE).
+ *     Set the given options on ('value' == true) or off
+ *     ('value' == #false).
  *
  *     dns_zone_setoption2() has been introduced because the number
  *     of options needed now exceeds the 32 bits in the zone->options
@@ -754,10 +755,10 @@ dns_zone_getoptions2(dns_zone_t *zone);
  */
 
 void
-dns_zone_setkeyopt(dns_zone_t *zone, unsigned int option, isc_boolean_t value);
+dns_zone_setkeyopt(dns_zone_t *zone, unsigned int option, bool value);
 /*%<
- *     Set key options on ('value' == ISC_TRUE) or off ('value' ==
- *     #ISC_FALSE).
+ *     Set key options on ('value' == true) or off ('value' ==
+ *     #false).
  *
  * Require:
  *\li  'zone' to be a valid zone.
@@ -1199,7 +1200,7 @@ dns_zone_clearxfracl(dns_zone_t *zone);
  *\li  'zone' to be a valid zone.
  */
 
-isc_boolean_t
+bool
 dns_zone_getupdatedisabled(dns_zone_t *zone);
 /*%<
  * Return update disabled.
@@ -1207,7 +1208,7 @@ dns_zone_getupdatedisabled(dns_zone_t *zone);
  */
 
 void
-dns_zone_setupdatedisabled(dns_zone_t *zone, isc_boolean_t state);
+dns_zone_setupdatedisabled(dns_zone_t *zone, bool state);
 /*%<
  * Set update disabled.
  * Should only be called only when running in isc_task_exclusive() mode.
@@ -1215,14 +1216,14 @@ dns_zone_setupdatedisabled(dns_zone_t *zone, isc_boolean_t state);
  * call has been made.
  */
 
-isc_boolean_t
+bool
 dns_zone_getzeronosoattl(dns_zone_t *zone);
 /*%<
  * Return zero-no-soa-ttl status.
  */
 
 void
-dns_zone_setzeronosoattl(dns_zone_t *zone, isc_boolean_t state);
+dns_zone_setzeronosoattl(dns_zone_t *zone, bool state);
 /*%<
  * Set zero-no-soa-ttl status.
  */
@@ -1395,15 +1396,15 @@ dns_zone_notify(dns_zone_t *zone);
  */
 
 isc_result_t
-dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump);
+dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump);
 /*%<
  * Replace the database of "zone" with a new database "db".
  *
- * If "dump" is ISC_TRUE, then the new zone contents are dumped
+ * If "dump" is true, then the new zone contents are dumped
  * into to the zone's master file for persistence.  When replacing
  * a zone database by one just loaded from a master file, set
- * "dump" to ISC_FALSE to avoid a redundant redump of the data just
- * loaded.  Otherwise, it should be set to ISC_TRUE.
+ * "dump" to false to avoid a redundant redump of the data just
+ * loaded.  Otherwise, it should be set to true.
  *
  * If the "diff-on-reload" option is enabled in the configuration file,
  * the differences between the old and the new database are added to the
@@ -1877,11 +1878,11 @@ dns_zonemgr_unreachableadd(dns_zonemgr_t *zmgr, isc_sockaddr_t *remote,
  *\li  'local' to be a valid sockaddr.
  */
 
-isc_boolean_t
+bool
 dns_zonemgr_unreachable(dns_zonemgr_t *zmgr, isc_sockaddr_t *remote,
                        isc_sockaddr_t *local, isc_time_t *now);
 /*%<
- *     Returns ISC_TRUE if the given local/remote address pair
+ *     Returns true if the given local/remote address pair
  *     is found in the zone maanger's unreachable cache.
  *
  * Requires:
@@ -1912,7 +1913,7 @@ dns_zone_forcereload(dns_zone_t *zone);
  *\li      'zone' to be a valid zone.
  */
 
-isc_boolean_t
+bool
 dns_zone_isforced(dns_zone_t *zone);
 /*%<
  *      Check if the zone is waiting a forced reload.
@@ -1922,7 +1923,7 @@ dns_zone_isforced(dns_zone_t *zone);
  */
 
 isc_result_t
-dns_zone_setstatistics(dns_zone_t *zone, isc_boolean_t on);
+dns_zone_setstatistics(dns_zone_t *zone, bool on);
 /*%<
  * This function is obsoleted by dns_zone_setrequeststats().
  */
@@ -2125,11 +2126,11 @@ dns_zone_setisself(dns_zone_t *zone, dns_isselffunc_t isself, void *arg);
 /*%<
  * Set the isself callback function and argument.
  *
- * isc_boolean_t
+ * bool
  * isself(dns_view_t *myview, dns_tsigkey_t *mykey, isc_netaddr_t *srcaddr,
  *       isc_netaddr_t *destaddr, dns_rdataclass_t rdclass, void *arg);
  *
- * 'isself' returns ISC_TRUE if a non-recursive query from 'srcaddr' to
+ * 'isself' returns true if a non-recursive query from 'srcaddr' to
  * 'destaddr' with optional key 'mykey' for class 'rdclass' would be
  * delivered to 'myview'.
  */
@@ -2154,7 +2155,7 @@ dns_zone_getsignatures(dns_zone_t *zone);
 
 isc_result_t
 dns_zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm,
-                    uint16_t keyid, isc_boolean_t deleteit);
+                    uint16_t keyid, bool deleteit);
 /*%<
  * Initiate/resume signing of the entire zone with the zone DNSKEY(s)
  * that match the given algorithm and keyid.
@@ -2176,7 +2177,7 @@ dns_zone_getprivatetype(dns_zone_t *zone);
  */
 
 void
-dns_zone_rekey(dns_zone_t *zone, isc_boolean_t fullsign);
+dns_zone_rekey(dns_zone_t *zone, bool fullsign);
 /*%<
  * Update the zone's DNSKEY set from the key repository.
  *
@@ -2222,19 +2223,19 @@ dns_zone_cdscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version);
  */
 
 void
-dns_zone_setadded(dns_zone_t *zone, isc_boolean_t added);
+dns_zone_setadded(dns_zone_t *zone, bool added);
 /*%
- * Sets the value of zone->added, which should be ISC_TRUE for
+ * Sets the value of zone->added, which should be true for
  * zones that were originally added by "rndc addzone".
  *
  * Requires:
  * \li 'zone' to be valid.
  */
 
-isc_boolean_t
+bool
 dns_zone_getadded(dns_zone_t *zone);
 /*%
- * Returns ISC_TRUE if the zone was originally added at runtime
+ * Returns true if the zone was originally added at runtime
  * using "rndc addzone".
  *
  * Requires:
@@ -2242,19 +2243,19 @@ dns_zone_getadded(dns_zone_t *zone);
  */
 
 void
-dns_zone_setautomatic(dns_zone_t *zone, isc_boolean_t automatic);
+dns_zone_setautomatic(dns_zone_t *zone, bool automatic);
 /*%
- * Sets the value of zone->automatic, which should be ISC_TRUE for
+ * Sets the value of zone->automatic, which should be true for
  * zones that were automatically added by named.
  *
  * Requires:
  * \li 'zone' to be valid.
  */
 
-isc_boolean_t
+bool
 dns_zone_getautomatic(dns_zone_t *zone);
 /*%
- * Returns ISC_TRUE if the zone was added automatically by named.
+ * Returns true if the zone was added automatically by named.
  *
  * Requires:
  * \li 'zone' to be valid.
@@ -2266,8 +2267,8 @@ dns_zone_dlzpostload(dns_zone_t *zone, dns_db_t *db);
  * Load the origin names for a writeable DLZ database.
  */
 
-isc_boolean_t
-dns_zone_isdynamic(dns_zone_t *zone, isc_boolean_t ignore_freeze);
+bool
+dns_zone_isdynamic(dns_zone_t *zone, bool ignore_freeze);
 /*%
  * Return true iff the zone is "dynamic", in the sense that the zone's
  * master file (if any) is written by the server, rather than being
@@ -2296,7 +2297,7 @@ dns_zone_setrefreshkeyinterval(dns_zone_t *zone, uint32_t interval);
  * \li 'zone' to be valid.
  */
 
-isc_boolean_t
+bool
 dns_zone_getrequestexpire(dns_zone_t *zone);
 /*%
  * Returns the true/false value of the request-expire option in the zone.
@@ -2306,7 +2307,7 @@ dns_zone_getrequestexpire(dns_zone_t *zone);
  */
 
 void
-dns_zone_setrequestexpire(dns_zone_t *zone, isc_boolean_t flag);
+dns_zone_setrequestexpire(dns_zone_t *zone, bool flag);
 /*%
  * Sets the request-expire option for the zone. Either true or false. The
  * default value is determined by the setting of this option in the view.
@@ -2316,7 +2317,7 @@ dns_zone_setrequestexpire(dns_zone_t *zone, isc_boolean_t flag);
  */
 
 
-isc_boolean_t
+bool
 dns_zone_getrequestixfr(dns_zone_t *zone);
 /*%
  * Returns the true/false value of the request-ixfr option in the zone.
@@ -2326,7 +2327,7 @@ dns_zone_getrequestixfr(dns_zone_t *zone);
  */
 
 void
-dns_zone_setrequestixfr(dns_zone_t *zone, isc_boolean_t flag);
+dns_zone_setrequestixfr(dns_zone_t *zone, bool flag);
 /*%
  * Sets the request-ixfr option for the zone. Either true or false. The
  * default value is determined by the setting of this option in the view.
@@ -2368,11 +2369,11 @@ dns_zone_keydone(dns_zone_t *zone, const char *data);
 isc_result_t
 dns_zone_setnsec3param(dns_zone_t *zone, uint8_t hash, uint8_t flags,
                       uint16_t iter, uint8_t saltlen,
-                      unsigned char *salt, isc_boolean_t replace);
+                      unsigned char *salt, bool replace);
 /*%
  * Set the NSEC3 parameters for the zone.
  *
- * If 'replace' is ISC_TRUE, then the existing NSEC3 chain, if any, will
+ * If 'replace' is true, then the existing NSEC3 chain, if any, will
  * be replaced with the new one.  If 'hash' is zero, then the replacement
  * chain will be NSEC rather than NSEC3.
  *
index acba890cfc0ae347c524c66266ec0776132aa568..01a0369ee5f52311db39e56aec6178683bed9148 100644 (file)
 
 /*! \file dns/zonekey.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/types.h>
 
 ISC_LANG_BEGINDECLS
 
-isc_boolean_t
+bool
 dns_zonekey_iszonekey(dns_rdata_t *keyrdata);
 /*%<
  *     Determines if the key record contained in the rdata is a zone key.
index cc17743d9928be43ece809ce162bc71728de92ff..dabd56787a94e7d421f0ea72f3d4cad7fb5d8d80 100644 (file)
@@ -15,6 +15,8 @@
 
 /*! \file dns/zt.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 
 #include <dns/types.h>
@@ -138,17 +140,17 @@ dns_zt_attach(dns_zt_t *zt, dns_zt_t **ztp);
  */
 
 isc_result_t
-dns_zt_load(dns_zt_t *zt, isc_boolean_t stop);
+dns_zt_load(dns_zt_t *zt, bool stop);
 
 isc_result_t
-dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop);
+dns_zt_loadnew(dns_zt_t *zt, bool stop);
 
 isc_result_t
 dns_zt_asyncload(dns_zt_t *zt, dns_zt_allloaded_t alldone, void *arg);
 /*%<
- * Load all zones in the table.  If 'stop' is ISC_TRUE,
+ * Load all zones in the table.  If 'stop' is true,
  * stop on the first error and return it.  If 'stop'
- * is ISC_FALSE, ignore errors.
+ * is false, ignore errors.
  *
  * dns_zt_loadnew() only loads zones that are not yet loaded.
  * dns_zt_load() also loads zones that are already loaded and
@@ -163,7 +165,7 @@ dns_zt_asyncload(dns_zt_t *zt, dns_zt_allloaded_t alldone, void *arg);
  */
 
 isc_result_t
-dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze);
+dns_zt_freezezones(dns_zt_t *zt, bool freeze);
 /*%<
  * Freeze/thaw updates to master zones.
  * Any pending updates will be flushed.
@@ -171,15 +173,15 @@ dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze);
  */
 
 isc_result_t
-dns_zt_apply(dns_zt_t *zt, isc_boolean_t stop,
+dns_zt_apply(dns_zt_t *zt, bool stop,
             isc_result_t (*action)(dns_zone_t *, void *), void *uap);
 
 isc_result_t
-dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
+dns_zt_apply2(dns_zt_t *zt, bool stop, isc_result_t *sub,
              isc_result_t (*action)(dns_zone_t *, void *), void *uap);
 /*%<
  * Apply a given 'action' to all zone zones in the table.
- * If 'stop' is 'ISC_TRUE' then walking the zone tree will stop if
+ * If 'stop' is 'true' then walking the zone tree will stop if
  * 'action' does not return ISC_R_SUCCESS.
  *
  * Requires:
@@ -188,15 +190,15 @@ dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
  *
  * Returns:
  * \li ISC_R_SUCCESS if action was applied to all nodes.  If 'stop' is
- *     ISC_FALSE and 'sub' is non NULL then the first error (if any)
+ *     false and 'sub' is non NULL then the first error (if any)
  *     reported by 'action' is returned in '*sub';
  *     any error code from 'action'.
  */
 
-isc_boolean_t
+bool
 dns_zt_loadspending(dns_zt_t *zt);
 /*%<
- * Returns ISC_TRUE if and only if there are zones still waiting to
+ * Returns true if and only if there are zones still waiting to
  * be loaded in zone table 'zt'.
  *
  * Requires:
index 3092c50a42b408050d353cca15db0c64549aa357..32b07423bb01d65a3e01b896202c698abe1ef929 100644 (file)
@@ -15,6 +15,7 @@
 /*! \file dst/dst.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/stdtime.h>
@@ -159,24 +160,24 @@ dst_lib_destroy(void);
  * Releases all resources allocated by DST.
  */
 
-isc_boolean_t
+bool
 dst_algorithm_supported(unsigned int alg);
 /*%<
  * Checks that a given algorithm is supported by DST.
  *
  * Returns:
- * \li ISC_TRUE
- * \li ISC_FALSE
+ * \li true
+ * \li false
  */
 
-isc_boolean_t
+bool
 dst_ds_digest_supported(unsigned int digest_type);
 /*%<
  * Checks that a given digest algorithm is supported by DST.
  *
  * Returns:
- * \li ISC_TRUE
- * \li ISC_FALSE
+ * \li true
+ * \li false
  */
 
 isc_result_t
@@ -188,12 +189,12 @@ dst_context_create2(dst_key_t *key, isc_mem_t *mctx,
 
 isc_result_t
 dst_context_create3(dst_key_t *key, isc_mem_t *mctx,
-                   isc_logcategory_t *category, isc_boolean_t useforsigning,
+                   isc_logcategory_t *category, bool useforsigning,
                    dst_context_t **dctxp);
 
 isc_result_t
 dst_context_create4(dst_key_t *key, isc_mem_t *mctx,
-                   isc_logcategory_t *category, isc_boolean_t useforsigning,
+                   isc_logcategory_t *category, bool useforsigning,
                    int maxbits, dst_context_t **dctxp);
 /*%<
  * Creates a context to be used for a sign or verify operation.
@@ -606,7 +607,7 @@ dst_key_generate2(dns_name_t *name, unsigned int alg,
  *\li  If successful, *keyp will contain a valid key.
  */
 
-isc_boolean_t
+bool
 dst_key_compare(const dst_key_t *key1, const dst_key_t *key2);
 /*%<
  * Compares two DST keys.  Returns true if they match, false otherwise.
@@ -619,13 +620,13 @@ dst_key_compare(const dst_key_t *key1, const dst_key_t *key2);
  *\li  "key2" is a valid key.
  *
  * Returns:
- *\li  ISC_TRUE
- * \li ISC_FALSE
+ *\li  true
+ * \li false
  */
 
-isc_boolean_t
+bool
 dst_key_pubcompare(const dst_key_t *key1, const dst_key_t *key2,
-                  isc_boolean_t match_revoked_key);
+                  bool match_revoked_key);
 /*%<
  * Compares only the public portions of two DST keys.  Returns true
  * if they match, false otherwise.  This allows us, for example, to
@@ -640,11 +641,11 @@ dst_key_pubcompare(const dst_key_t *key1, const dst_key_t *key2,
  *\li  "key2" is a valid key.
  *
  * Returns:
- *\li  ISC_TRUE
- * \li ISC_FALSE
+ *\li  true
+ * \li false
  */
 
-isc_boolean_t
+bool
 dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2);
 /*%<
  * Compares the parameters of two DST keys.  This is used to determine if
@@ -655,8 +656,8 @@ dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2);
  *\li  "key2" is a valid key.
  *
  * Returns:
- *\li  ISC_TRUE
- * \li ISC_FALSE
+ *\li  true
+ * \li false
  */
 
 void
@@ -714,13 +715,13 @@ dst_key_rid(const dst_key_t *key);
 dns_rdataclass_t
 dst_key_class(const dst_key_t *key);
 
-isc_boolean_t
+bool
 dst_key_isprivate(const dst_key_t *key);
 
-isc_boolean_t
+bool
 dst_key_iszonekey(const dst_key_t *key);
 
-isc_boolean_t
+bool
 dst_key_isnullkey(const dst_key_t *key);
 
 isc_result_t
@@ -966,7 +967,7 @@ dst_key_restore(dns_name_t *name, unsigned int alg, unsigned int flags,
                unsigned int protocol, dns_rdataclass_t rdclass,
                isc_mem_t *mctx, const char *keystr, dst_key_t **keyp);
 
-isc_boolean_t
+bool
 dst_key_inactive(const dst_key_t *key);
 /*%<
  * Determines if the private key is missing due the key being deemed inactive.
@@ -976,7 +977,7 @@ dst_key_inactive(const dst_key_t *key);
  */
 
 void
-dst_key_setinactive(dst_key_t *key, isc_boolean_t inactive);
+dst_key_setinactive(dst_key_t *key, bool inactive);
 /*%<
  * Set key inactive state.
  *
@@ -985,9 +986,9 @@ dst_key_setinactive(dst_key_t *key, isc_boolean_t inactive);
  */
 
 void
-dst_key_setexternal(dst_key_t *key, isc_boolean_t value);
+dst_key_setexternal(dst_key_t *key, bool value);
 
-isc_boolean_t
+bool
 dst_key_isexternal(dst_key_t *key);
 
 ISC_LANG_ENDDECLS
index 808b479d9ff7a22dee2173898a45b7127d0195c7..40257d479615e141372547eef50679235fcf9883 100644 (file)
@@ -16,6 +16,7 @@
 /*! \file dst/gssapi.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/formatcheck.h>
 #include <isc/lang.h>
@@ -52,7 +53,7 @@ ISC_LANG_BEGINDECLS
  ***/
 
 isc_result_t
-dst_gssapi_acquirecred(dns_name_t *name, isc_boolean_t initiate,
+dst_gssapi_acquirecred(dns_name_t *name, bool initiate,
                       gss_cred_id_t *cred);
 /*
  *     Acquires GSS credentials.
@@ -185,7 +186,7 @@ gss_error_tostring(uint32_t major, uint32_t minor,
  *             Users should copy the string if they wish to keep it.
  */
 
-isc_boolean_t
+bool
 dst_gssapi_identitymatchesrealmkrb5(dns_name_t *signer, dns_name_t *name,
                              dns_name_t *realm);
 /*
@@ -195,7 +196,7 @@ dst_gssapi_identitymatchesrealmkrb5(dns_name_t *signer, dns_name_t *name,
  *
  */
 
-isc_boolean_t
+bool
 dst_gssapi_identitymatchesrealmms(dns_name_t *signer, dns_name_t *name,
                            dns_name_t *realm);
 /*
index 89d8c1434f8354d3dc7b1a58c32faf369a96191a..10713a09d995de71327efb1cd6a440cb8c966380 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/radix.h>
@@ -50,23 +51,23 @@ dns_iptable_create(isc_mem_t *mctx, dns_iptable_t **target) {
        return (result);
 }
 
-static isc_boolean_t dns_iptable_neg = ISC_FALSE;
-static isc_boolean_t dns_iptable_pos = ISC_TRUE;
+static bool dns_iptable_neg = false;
+static bool dns_iptable_pos = true;
 
 /*
  * Add an IP prefix to an existing IP table
  */
 isc_result_t
 dns_iptable_addprefix(dns_iptable_t *tab, isc_netaddr_t *addr,
-                     uint16_t bitlen, isc_boolean_t pos)
+                     uint16_t bitlen, bool pos)
 {
-       return(dns_iptable_addprefix2(tab, addr, bitlen, pos, ISC_FALSE));
+       return(dns_iptable_addprefix2(tab, addr, bitlen, pos, false));
 }
 
 isc_result_t
 dns_iptable_addprefix2(dns_iptable_t *tab, isc_netaddr_t *addr,
-                      uint16_t bitlen, isc_boolean_t pos,
-                      isc_boolean_t is_ecs)
+                      uint16_t bitlen, bool pos,
+                      bool is_ecs)
 {
        isc_result_t result;
        isc_prefix_t pfx;
@@ -74,7 +75,7 @@ dns_iptable_addprefix2(dns_iptable_t *tab, isc_netaddr_t *addr,
        int i;
 
        INSIST(DNS_IPTABLE_VALID(tab));
-       INSIST(tab->radix);
+       INSIST(tab->radix != NULL);
 
        NETADDR_TO_PREFIX_T(addr, pfx, bitlen, is_ecs);
 
@@ -111,7 +112,7 @@ dns_iptable_addprefix2(dns_iptable_t *tab, isc_netaddr_t *addr,
  * Merge one IP table into another one.
  */
 isc_result_t
-dns_iptable_merge(dns_iptable_t *tab, dns_iptable_t *source, isc_boolean_t pos)
+dns_iptable_merge(dns_iptable_t *tab, dns_iptable_t *source, bool pos)
 {
        isc_result_t result;
        isc_radix_node_t *node, *new_node;
@@ -135,7 +136,7 @@ dns_iptable_merge(dns_iptable_t *tab, dns_iptable_t *source, isc_boolean_t pos)
                for (i = 0; i < RADIX_FAMILIES; i++) {
                        if (!pos) {
                                if (node->data[i] &&
-                                   *(isc_boolean_t *) node->data[i])
+                                   *(bool *) node->data[i])
                                        new_node->data[i] = &dns_iptable_neg;
                        }
                        if (node->node_num[i] > max_node)
index 9e2892fdedebe521ddb4f01a757a1b3269bb2f1f..bdbc459cbf9f7ea17fd5fe11c113c3e0488473d3 100644 (file)
@@ -12,6 +12,8 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -77,7 +79,7 @@
  * SOA serial number does not change (BIND 8 sends such
  * sequences).
  */
-static isc_boolean_t bind8_compat = ISC_TRUE; /* XXX config */
+static bool bind8_compat = true; /* XXX config */
 
 /**************************************************************************/
 /*
@@ -140,7 +142,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
        dns_name_copy(dns_db_origin(db), zonename, NULL);
 
        node = NULL;
-       result = dns_db_findnode(db, zonename, ISC_FALSE, &node);
+       result = dns_db_findnode(db, zonename, false, &node);
        if (result != ISC_R_SUCCESS)
                goto nonode;
 
@@ -255,7 +257,7 @@ typedef struct {
        journal_pos_t   end;
        uint32_t        index_size;
        uint32_t        sourceserial;
-       isc_boolean_t   serialset;
+       bool    serialset;
 } journal_header_t;
 
 /*%
@@ -359,7 +361,7 @@ journal_header_decode(journal_rawheader_t *raw, journal_header_t *cooked) {
        journal_pos_decode(&raw->h.end, &cooked->end);
        cooked->index_size = decode_uint32(raw->h.index_size);
        cooked->sourceserial = decode_uint32(raw->h.sourceserial);
-       cooked->serialset = ISC_TF(raw->h.flags & JOURNAL_SERIALSET);
+       cooked->serialset = (raw->h.flags & JOURNAL_SERIALSET);
 }
 
 static void
@@ -553,8 +555,8 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
 }
 
 static isc_result_t
-journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t writable,
-            isc_boolean_t create, dns_journal_t **journalp)
+journal_open(isc_mem_t *mctx, const char *filename, bool writable,
+            bool create, dns_journal_t **journalp)
 {
        FILE *fp = NULL;
        isc_result_t result;
@@ -695,10 +697,10 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, unsigned int mode,
        isc_result_t result;
        size_t namelen;
        char backup[1024];
-       isc_boolean_t writable, create;
+       bool writable, create;
 
-       create = ISC_TF(mode & DNS_JOURNAL_CREATE);
-       writable = ISC_TF(mode & (DNS_JOURNAL_WRITE|DNS_JOURNAL_CREATE));
+       create = (mode & DNS_JOURNAL_CREATE);
+       writable = (mode & (DNS_JOURNAL_WRITE|DNS_JOURNAL_CREATE));
 
        result = journal_open(mctx, filename, writable, create, journalp);
        if (result == ISC_R_NOTFOUND) {
@@ -1403,7 +1405,7 @@ roll_forward(dns_journal_t *j, dns_db_t *db, unsigned int options) {
  failure:
        if (ver != NULL)
                dns_db_closeversion(db, &ver, result == ISC_R_SUCCESS ?
-                                   ISC_TRUE : ISC_FALSE);
+                                   true : false);
 
        if (source.base != NULL)
                isc_mem_put(j->mctx, source.base, source.length);
@@ -1576,19 +1578,19 @@ dns_journal_set_sourceserial(dns_journal_t *j, uint32_t sourceserial) {
                j->state == JOURNAL_STATE_TRANSACTION);
 
        j->header.sourceserial = sourceserial;
-       j->header.serialset = ISC_TRUE;
+       j->header.serialset = true;
        if (j->state == JOURNAL_STATE_WRITE)
                j->state = JOURNAL_STATE_INLINE;
 }
 
-isc_boolean_t
+bool
 dns_journal_get_sourceserial(dns_journal_t *j, uint32_t *sourceserial) {
        REQUIRE(sourceserial != NULL);
 
        if (!j->header.serialset)
-               return (ISC_FALSE);
+               return (false);
        *sourceserial = j->header.sourceserial;
-       return (ISC_TRUE);
+       return (true);
 }
 
 /**************************************************************************/
@@ -1901,7 +1903,7 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) {
        isc_result_t result;
        dns_difftuple_t *p[2];
        int i, t;
-       isc_boolean_t append;
+       bool append;
 
        CHECK(dns_diff_sort(&diff[0], rdata_order));
        CHECK(dns_diff_sort(&diff[1], rdata_order));
@@ -1934,7 +1936,7 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) {
                 * Identical RRs in both databases; skip them both
                 * if the ttl differs.
                 */
-               append = ISC_TF(p[0]->ttl != p[1]->ttl);
+               append = (p[0]->ttl != p[1]->ttl);
                for (i = 0; i < 2; i++) {
                        ISC_LIST_UNLINK(diff[i].tuples, p[i], link);
                        if (append) {
@@ -1958,7 +1960,7 @@ diff_namespace(dns_db_t *dba, dns_dbversion_t *dbvera,
        dns_db_t *db[2];
        dns_dbversion_t *ver[2];
        dns_dbiterator_t *dbit[2] = { NULL, NULL };
-       isc_boolean_t have[2] = { ISC_FALSE, ISC_FALSE };
+       bool have[2] = { false, false };
        dns_fixedname_t fixname[2];
        isc_result_t result, itresult[2];
        dns_diff_t diff[2];
@@ -1993,7 +1995,7 @@ diff_namespace(dns_db_t *dba, dns_dbversion_t *dbvera,
                                            DNS_DIFFOP_DEL,
                                            &diff[i]));
                                itresult[i] = dns_dbiterator_next(dbit[i]);
-                               have[i] = ISC_TRUE;
+                               have[i] = true;
                        }
                }
 
@@ -2008,7 +2010,7 @@ diff_namespace(dns_db_t *dba, dns_dbversion_t *dbvera,
                                ISC_LIST_APPENDLIST(resultdiff->tuples,
                                                    diff[i].tuples, link);
                                INSIST(ISC_LIST_EMPTY(diff[i].tuples));
-                               have[i] = ISC_FALSE;
+                               have[i] = false;
                                goto next;
                        }
                }
@@ -2019,21 +2021,21 @@ diff_namespace(dns_db_t *dba, dns_dbversion_t *dbvera,
                        ISC_LIST_APPENDLIST(resultdiff->tuples,
                                            diff[0].tuples, link);
                        INSIST(ISC_LIST_EMPTY(diff[0].tuples));
-                       have[0] = ISC_FALSE;
+                       have[0] = false;
                        continue;
                }
                if (t > 0) {
                        ISC_LIST_APPENDLIST(resultdiff->tuples,
                                            diff[1].tuples, link);
                        INSIST(ISC_LIST_EMPTY(diff[1].tuples));
-                       have[1] = ISC_FALSE;
+                       have[1] = false;
                        continue;
                }
                INSIST(t == 0);
                CHECK(dns_diff_subtract(diff, resultdiff));
                INSIST(ISC_LIST_EMPTY(diff[0].tuples));
                INSIST(ISC_LIST_EMPTY(diff[1].tuples));
-               have[0] = have[1] = ISC_FALSE;
+               have[0] = have[1] = false;
        next: ;
        }
        if (itresult[0] != ISC_R_NOMORE)
@@ -2124,7 +2126,7 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
        unsigned int indexend;
        char newname[1024];
        char backup[1024];
-       isc_boolean_t is_backup = ISC_FALSE;
+       bool is_backup = false;
 
        REQUIRE(filename != NULL);
 
@@ -2142,10 +2144,10 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       result = journal_open(mctx, filename, ISC_FALSE, ISC_FALSE, &j1);
+       result = journal_open(mctx, filename, false, false, &j1);
        if (result == ISC_R_NOTFOUND) {
-               is_backup = ISC_TRUE;
-               result = journal_open(mctx, backup, ISC_FALSE, ISC_FALSE, &j1);
+               is_backup = true;
+               result = journal_open(mctx, backup, false, false, &j1);
        }
        if (result != ISC_R_SUCCESS)
                return (result);
@@ -2177,7 +2179,7 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
                return (ISC_R_SUCCESS);
        }
 
-       CHECK(journal_open(mctx, newname, ISC_TRUE, ISC_TRUE, &j2));
+       CHECK(journal_open(mctx, newname, true, true, &j2));
 
        /*
         * Remove overhead so space test below can succeed.
index 2e664a3679dc5dd2ca7c4b375885cbcf91df30ce..16dadf89b8beeda162036b0b9630585679c2c1a6 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <stddef.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/region.h>
@@ -125,32 +126,32 @@ dst_key_class(const dst_key_t *key) {
        return (key->key_class);
 }
 
-isc_boolean_t
+bool
 dst_key_iszonekey(const dst_key_t *key) {
        REQUIRE(VALID_KEY(key));
 
        if ((key->key_flags & DNS_KEYTYPE_NOAUTH) != 0)
-               return (ISC_FALSE);
+               return (false);
        if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
-               return (ISC_FALSE);
+               return (false);
        if (key->key_proto != DNS_KEYPROTO_DNSSEC &&
            key->key_proto != DNS_KEYPROTO_ANY)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dst_key_isnullkey(const dst_key_t *key) {
        REQUIRE(VALID_KEY(key));
 
        if ((key->key_flags & DNS_KEYFLAG_TYPEMASK) != DNS_KEYTYPE_NOKEY)
-               return (ISC_FALSE);
+               return (false);
        if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
-               return (ISC_FALSE);
+               return (false);
        if (key->key_proto != DNS_KEYPROTO_DNSSEC &&
            key->key_proto != DNS_KEYPROTO_ANY)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 void
index 71f3f680da02516572879c0b5563b95f71fa2486..57b8608855da14e0d425a7d5026959e778cc3a55 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/print.h>
 #include <isc/refcount.h>
@@ -47,7 +49,7 @@ struct dns_keynode {
        unsigned int            magic;
        isc_refcount_t          refcount;
        dst_key_t *             key;
-       isc_boolean_t           managed;
+       bool           managed;
        struct dns_keynode *    next;
 };
 
@@ -161,7 +163,7 @@ dns_keytable_detach(dns_keytable_t **keytablep) {
 }
 
 static isc_result_t
-insert(dns_keytable_t *keytable, isc_boolean_t managed,
+insert(dns_keytable_t *keytable, bool managed,
        dns_name_t *keyname, dst_key_t **keyp)
 {
        isc_result_t result;
@@ -192,7 +194,7 @@ insert(dns_keytable_t *keytable, isc_boolean_t managed,
                                        *keyp = NULL; /* transfer ownership */
                                        break;
                                }
-                               if (dst_key_compare(k->key, *keyp) == ISC_TRUE)
+                               if (dst_key_compare(k->key, *keyp) == true)
                                        break;
                        }
 
@@ -227,7 +229,7 @@ insert(dns_keytable_t *keytable, isc_boolean_t managed,
 }
 
 isc_result_t
-dns_keytable_add(dns_keytable_t *keytable, isc_boolean_t managed,
+dns_keytable_add(dns_keytable_t *keytable, bool managed,
                 dst_key_t **keyp)
 {
        REQUIRE(keyp != NULL && *keyp != NULL);
@@ -236,7 +238,7 @@ dns_keytable_add(dns_keytable_t *keytable, isc_boolean_t managed,
 
 isc_result_t
 dns_keytable_marksecure(dns_keytable_t *keytable, dns_name_t *name) {
-       return (insert(keytable, ISC_TRUE, name, NULL));
+       return (insert(keytable, true, name, NULL));
 }
 
 isc_result_t
@@ -253,7 +255,7 @@ dns_keytable_delete(dns_keytable_t *keytable, dns_name_t *keyname) {
        if (result == ISC_R_SUCCESS) {
                if (node->data != NULL)
                        result = dns_rbt_deletenode(keytable->table,
-                                                   node, ISC_FALSE);
+                                                   node, false);
                else
                        result = ISC_R_NOTFOUND;
        } else if (result == DNS_R_PARTIALMATCH)
@@ -291,16 +293,16 @@ dns_keytable_deletekeynode(dns_keytable_t *keytable, dst_key_t *dstkey) {
 
        knode = node->data;
        if (knode->next == NULL && knode->key != NULL &&
-           dst_key_compare(knode->key, dstkey) == ISC_TRUE)
+           dst_key_compare(knode->key, dstkey) == true)
        {
-               result = dns_rbt_deletenode(keytable->table, node, ISC_FALSE);
+               result = dns_rbt_deletenode(keytable->table, node, false);
                goto finish;
        }
 
        kprev = (dns_keynode_t **) &node->data;
        while (knode != NULL) {
                if (knode->key != NULL &&
-                   dst_key_compare(knode->key, dstkey) == ISC_TRUE)
+                   dst_key_compare(knode->key, dstkey) == true)
                        break;
                kprev = &knode->next;
                knode = knode->next;
@@ -526,7 +528,7 @@ dns_keytable_detachkeynode(dns_keytable_t *keytable, dns_keynode_t **keynodep)
 
 isc_result_t
 dns_keytable_issecuredomain(dns_keytable_t *keytable, dns_name_t *name,
-                           dns_name_t *foundname, isc_boolean_t *wantdnssecp)
+                           dns_name_t *foundname, bool *wantdnssecp)
 {
        isc_result_t result;
        dns_rbtnode_t *node = NULL;
@@ -545,10 +547,10 @@ dns_keytable_issecuredomain(dns_keytable_t *keytable, dns_name_t *name,
                                  NULL, DNS_RBTFIND_NOOPTIONS, NULL, NULL);
        if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
                INSIST(node->data != NULL);
-               *wantdnssecp = ISC_TRUE;
+               *wantdnssecp = true;
                result = ISC_R_SUCCESS;
        } else if (result == ISC_R_NOTFOUND) {
-               *wantdnssecp = ISC_FALSE;
+               *wantdnssecp = false;
                result = ISC_R_SUCCESS;
        }
 
@@ -697,7 +699,7 @@ dns_keynode_key(dns_keynode_t *keynode) {
        return (keynode->key);
 }
 
-isc_boolean_t
+bool
 dns_keynode_managed(dns_keynode_t *keynode) {
        /*
         * Is this a managed key?
@@ -719,7 +721,7 @@ dns_keynode_create(isc_mem_t *mctx, dns_keynode_t **target) {
                return (ISC_R_NOMEMORY);
 
        knode->magic = KEYNODE_MAGIC;
-       knode->managed = ISC_FALSE;
+       knode->managed = false;
        knode->key = NULL;
        knode->next = NULL;
 
index 53237d587e34d37d8678b8677b8cab1cc4c2915c..304814bb65058a263c0c96524f3abc9d9feceddb 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stddef.h>
 
 #include <isc/hash.h>
@@ -70,7 +71,7 @@ dns_lib_initmsgcat(void) {
 static isc_once_t init_once = ISC_ONCE_INIT;
 static isc_mem_t *dns_g_mctx = NULL;
 static dns_dbimplementation_t *dbimp = NULL;
-static isc_boolean_t initialize_done = ISC_FALSE;
+static bool initialize_done = false;
 static isc_mutex_t reflock;
 static unsigned int references = 0;
 
@@ -78,7 +79,7 @@ static void
 initialize(void) {
        isc_result_t result;
 
-       REQUIRE(initialize_done == ISC_FALSE);
+       REQUIRE(initialize_done == false);
 
        result = isc_mem_create(0, 0, &dns_g_mctx);
        if (result != ISC_R_SUCCESS)
@@ -99,7 +100,7 @@ initialize(void) {
        if (result != ISC_R_SUCCESS)
                goto cleanup_dst;
 
-       initialize_done = ISC_TRUE;
+       initialize_done = true;
        return;
 
   cleanup_dst:
@@ -139,11 +140,11 @@ dns_lib_init(void) {
 
 void
 dns_lib_shutdown(void) {
-       isc_boolean_t cleanup_ok = ISC_FALSE;
+       bool cleanup_ok = false;
 
        LOCK(&reflock);
        if (--references == 0)
-               cleanup_ok = ISC_TRUE;
+               cleanup_ok = true;
        UNLOCK(&reflock);
 
        if (!cleanup_ok)
index 43e26621d77dd3d39d1f933749414158e7035321..acd9c344fe8d1e6dfd624e9278bf2f1bc4157f4f 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/netaddr.h>
 #include <isc/string.h>                /* Required for HP/UX (and others?) */
@@ -44,7 +46,7 @@ struct dns_lookup {
        dns_lookupevent_t *     event;
        dns_fetch_t *           fetch;
        unsigned int            restarts;
-       isc_boolean_t           canceled;
+       bool            canceled;
        dns_rdataset_t          rdataset;
        dns_rdataset_t          sigrdataset;
 };
@@ -163,7 +165,7 @@ view_find(dns_lookup_t *lookup, dns_name_t *foundname) {
        else
                type = lookup->type;
 
-       result = dns_view_find(lookup->view, name, type, 0, 0, ISC_FALSE,
+       result = dns_view_find(lookup->view, name, type, 0, 0, false,
                               &lookup->event->db, &lookup->event->node,
                               foundname, &lookup->rdataset,
                               &lookup->sigrdataset);
@@ -173,8 +175,8 @@ view_find(dns_lookup_t *lookup, dns_name_t *foundname) {
 static void
 lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
        isc_result_t result;
-       isc_boolean_t want_restart;
-       isc_boolean_t send_event;
+       bool want_restart;
+       bool send_event;
        dns_name_t *name, *fname, *prefix;
        dns_fixedname_t foundname, fixed;
        dns_rdata_t rdata = DNS_RDATA_INIT;
@@ -193,8 +195,8 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
 
        do {
                lookup->restarts++;
-               want_restart = ISC_FALSE;
-               send_event = ISC_TRUE;
+               want_restart = false;
+               send_event = true;
 
                if (event == NULL && !lookup->canceled) {
                        fname = dns_fixedname_initname(&foundname);
@@ -225,7 +227,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
                                        dns_db_detach(&lookup->event->db);
                                result = start_fetch(lookup);
                                if (result == ISC_R_SUCCESS)
-                                       send_event = ISC_FALSE;
+                                       send_event = false;
                                goto done;
                        }
                } else if (event != NULL) {
@@ -271,8 +273,8 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
                        result = dns_name_copy(&cname.cname, name, NULL);
                        dns_rdata_freestruct(&cname);
                        if (result == ISC_R_SUCCESS) {
-                               want_restart = ISC_TRUE;
-                               send_event = ISC_FALSE;
+                               want_restart = true;
+                               send_event = false;
                        }
                        break;
                case DNS_R_DNAME:
@@ -299,12 +301,12 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
                                                      name, NULL);
                        dns_rdata_freestruct(&dname);
                        if (result == ISC_R_SUCCESS) {
-                               want_restart = ISC_TRUE;
-                               send_event = ISC_FALSE;
+                               want_restart = true;
+                               send_event = false;
                        }
                        break;
                default:
-                       send_event = ISC_TRUE;
+                       send_event = true;
                }
 
                if (dns_rdataset_isassociated(&lookup->rdataset))
@@ -325,9 +327,9 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
                 * Limit the number of restarts.
                 */
                if (want_restart && lookup->restarts == MAX_RESTARTS) {
-                       want_restart = ISC_FALSE;
+                       want_restart = false;
                        result = ISC_R_QUOTA;
-                       send_event = ISC_TRUE;
+                       send_event = true;
                }
 
        } while (want_restart);
@@ -422,7 +424,7 @@ dns_lookup_create(isc_mem_t *mctx, dns_name_t *name, dns_rdatatype_t type,
        dns_view_attach(view, &lookup->view);
        lookup->fetch = NULL;
        lookup->restarts = 0;
-       lookup->canceled = ISC_FALSE;
+       lookup->canceled = false;
        dns_rdataset_init(&lookup->rdataset);
        dns_rdataset_init(&lookup->sigrdataset);
        lookup->magic = LOOKUP_MAGIC;
@@ -456,7 +458,7 @@ dns_lookup_cancel(dns_lookup_t *lookup) {
        LOCK(&lookup->lock);
 
        if (!lookup->canceled) {
-               lookup->canceled = ISC_TRUE;
+               lookup->canceled = true;
                if (lookup->fetch != NULL) {
                        INSIST(lookup->view != NULL);
                        dns_resolver_cancelfetch(lookup->fetch);
index cb104fab4021a1794cfb1d547b65a73357db02b3..082e63feff0bd72a9eaf2152250c832be90c9410 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/event.h>
 #include <isc/lex.h>
 #include <isc/magic.h>
@@ -113,14 +115,14 @@ struct dns_loadctx {
 
        /* Members specific to the text format: */
        isc_lex_t               *lex;
-       isc_boolean_t           keep_lex;
+       bool            keep_lex;
        unsigned int            options;
-       isc_boolean_t           ttl_known;
-       isc_boolean_t           default_ttl_known;
-       isc_boolean_t           warn_1035;
-       isc_boolean_t           warn_tcr;
-       isc_boolean_t           warn_sigexpired;
-       isc_boolean_t           seen_include;
+       bool            ttl_known;
+       bool            default_ttl_known;
+       bool            warn_1035;
+       bool            warn_tcr;
+       bool            warn_sigexpired;
+       bool            seen_include;
        uint32_t                ttl;
        uint32_t                default_ttl;
        dns_rdataclass_t        zclass;
@@ -129,13 +131,13 @@ struct dns_loadctx {
 
        /* Members specific to the raw format: */
        FILE                    *f;
-       isc_boolean_t           first;
+       bool            first;
        dns_masterrawheader_t   header;
 
        /* Which fixed buffers we are using? */
        unsigned int            loop_cnt;               /*% records per quantum,
                                                         * 0 => all. */
-       isc_boolean_t           canceled;
+       bool            canceled;
        isc_mutex_t             lock;
        isc_result_t            result;
        /* locked by lock */
@@ -158,8 +160,8 @@ struct dns_incctx {
        int                     glue_in_use;
        int                     current_in_use;
        int                     origin_in_use;
-       isc_boolean_t           origin_changed;
-       isc_boolean_t           drop;
+       bool            origin_changed;
+       bool            drop;
        unsigned int            glue_line;
        unsigned int            current_line;
 };
@@ -194,7 +196,7 @@ static isc_result_t
 commit(dns_rdatacallbacks_t *, dns_loadctx_t *, rdatalist_head_t *,
        dns_name_t *, const char *, unsigned int);
 
-static isc_boolean_t
+static bool
 is_glue(rdatalist_head_t *, dns_name_t *);
 
 static dns_rdatalist_t *
@@ -226,7 +228,7 @@ loadctx_destroy(dns_loadctx_t *lctx);
                        if (MANYERRS(lctx, result)) { \
                                SETRESULT(lctx, result); \
                                LOGIT(result); \
-                               read_till_eol = ISC_TRUE; \
+                               read_till_eol = true; \
                                err \
                                goto next_line; \
                        } else \
@@ -237,7 +239,7 @@ loadctx_destroy(dns_loadctx_t *lctx);
                        if (MANYERRS(lctx, result)) { \
                                SETRESULT(lctx, result); \
                                LOGIT(result); \
-                               read_till_eol = ISC_TRUE; \
+                               read_till_eol = true; \
                                goto next_line; \
                        } else \
                                goto log_and_cleanup; \
@@ -277,14 +279,14 @@ loadctx_destroy(dns_loadctx_t *lctx);
 
 #define EXPECTEOL \
        do { \
-               GETTOKEN(lctx->lex, 0, &token, ISC_TRUE); \
+               GETTOKEN(lctx->lex, 0, &token, true); \
                if (token.type != isc_tokentype_eol) { \
                        isc_lex_ungettoken(lctx->lex, &token); \
                        result = DNS_R_EXTRATOKEN; \
                        if (MANYERRS(lctx, result)) { \
                                SETRESULT(lctx, result); \
                                LOGIT(result); \
-                               read_till_eol = ISC_TRUE; \
+                               read_till_eol = true; \
                                break; \
                        } else if (result != ISC_R_SUCCESS) \
                                goto log_and_cleanup; \
@@ -338,7 +340,7 @@ static dns_name_t const ip6_arpa =
 
 static inline isc_result_t
 gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
-        isc_boolean_t eol, dns_rdatacallbacks_t *callbacks)
+        bool eol, dns_rdatacallbacks_t *callbacks)
 {
        isc_result_t result;
 
@@ -360,7 +362,7 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
                }
                /*NOTREACHED*/
        }
-       if (eol != ISC_TRUE)
+       if (eol != true)
                if (token->type == isc_tokentype_eol ||
                    token->type == isc_tokentype_eof) {
                        unsigned long int line;
@@ -400,7 +402,7 @@ dns_loadctx_attach(dns_loadctx_t *source, dns_loadctx_t **target) {
 void
 dns_loadctx_detach(dns_loadctx_t **lctxp) {
        dns_loadctx_t *lctx;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(lctxp != NULL);
        lctx = *lctxp;
@@ -410,7 +412,7 @@ dns_loadctx_detach(dns_loadctx_t **lctxp) {
        INSIST(lctx->references > 0);
        lctx->references--;
        if (lctx->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&lctx->lock);
 
        if (need_destroy)
@@ -480,12 +482,12 @@ incctx_create(isc_mem_t *mctx, dns_name_t *origin, dns_incctx_t **ictxp) {
 
        for (i = 0; i < NBUFS; i++) {
                dns_fixedname_init(&ictx->fixed[i]);
-               ictx->in_use[i] = ISC_FALSE;
+               ictx->in_use[i] = false;
        }
 
        ictx->origin_in_use = 0;
        ictx->origin = dns_fixedname_name(&ictx->fixed[ictx->origin_in_use]);
-       ictx->in_use[ictx->origin_in_use] = ISC_TRUE;
+       ictx->in_use[ictx->origin_in_use] = true;
        dns_name_toregion(origin, &r);
        dns_name_fromregion(ictx->origin, &r);
 
@@ -494,10 +496,10 @@ incctx_create(isc_mem_t *mctx, dns_name_t *origin, dns_incctx_t **ictxp) {
        ictx->glue_in_use = -1;
        ictx->current_in_use = -1;
        ictx->parent = NULL;
-       ictx->drop = ISC_FALSE;
+       ictx->drop = false;
        ictx->glue_line = 0;
        ictx->current_line = 0;
-       ictx->origin_changed = ISC_TRUE;
+       ictx->origin_changed = true;
 
        *ictxp = ictx;
        return (ISC_R_SUCCESS);
@@ -564,13 +566,13 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
 
        if (lex != NULL) {
                lctx->lex = lex;
-               lctx->keep_lex = ISC_TRUE;
+               lctx->keep_lex = true;
        } else {
                lctx->lex = NULL;
                result = isc_lex_create(mctx, TOKENSIZ, &lctx->lex);
                if (result != ISC_R_SUCCESS)
                        goto cleanup_inc;
-               lctx->keep_lex = ISC_FALSE;
+               lctx->keep_lex = false;
                memset(specials, 0, sizeof(specials));
                specials[0] = 1;
                specials['('] = 1;
@@ -580,15 +582,15 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
                isc_lex_setcomments(lctx->lex, ISC_LEXCOMMENT_DNSMASTERFILE);
        }
 
-       lctx->ttl_known = ISC_TF((options & DNS_MASTER_NOTTL) != 0);
+       lctx->ttl_known = (options & DNS_MASTER_NOTTL);
        lctx->ttl = 0;
        lctx->default_ttl_known = lctx->ttl_known;
        lctx->default_ttl = 0;
-       lctx->warn_1035 = ISC_TRUE;     /* XXX Argument? */
-       lctx->warn_tcr = ISC_TRUE;      /* XXX Argument? */
-       lctx->warn_sigexpired = ISC_TRUE;       /* XXX Argument? */
+       lctx->warn_1035 = true; /* XXX Argument? */
+       lctx->warn_tcr = true;  /* XXX Argument? */
+       lctx->warn_sigexpired = true;   /* XXX Argument? */
        lctx->options = options;
-       lctx->seen_include = ISC_FALSE;
+       lctx->seen_include = false;
        lctx->zclass = zclass;
        lctx->resign = resign;
        lctx->result = ISC_R_SUCCESS;
@@ -601,7 +603,7 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
        dns_name_fromregion(lctx->top, &r);
 
        lctx->f = NULL;
-       lctx->first = ISC_TRUE;
+       lctx->first = true;
        dns_master_initrawheader(&lctx->header);
 
        lctx->loop_cnt = (done != NULL) ? 100 : 0;
@@ -611,7 +613,7 @@ loadctx_create(dns_masterformat_t format, isc_mem_t *mctx,
                isc_task_attach(task, &lctx->task);
        lctx->done = done;
        lctx->done_arg = done_arg;
-       lctx->canceled = ISC_FALSE;
+       lctx->canceled = false;
        lctx->mctx = NULL;
        isc_mem_attach(mctx, &lctx->mctx);
        lctx->references = 1;                   /* Implicit attach. */
@@ -687,7 +689,7 @@ genname(char *name, int it, char *buffer, size_t length) {
        isc_textregion_t r;
        unsigned int n;
        unsigned int width;
-       isc_boolean_t nibblemode;
+       bool nibblemode;
 
        r.base = buffer;
        r.length = (unsigned int)length;
@@ -702,7 +704,7 @@ genname(char *name, int it, char *buffer, size_t length) {
                                isc_textregion_consume(&r, 1);
                                continue;
                        }
-                       nibblemode = ISC_FALSE;
+                       nibblemode = false;
                        strlcpy(fmt, "%d", sizeof(fmt));
                        /* Get format specifier. */
                        if (*name == '{' ) {
@@ -717,7 +719,7 @@ genname(char *name, int it, char *buffer, size_t length) {
                                        break;
                                case 3:
                                        if (mode[0] == 'n' || mode[0] == 'N')
-                                               nibblemode = ISC_TRUE;
+                                               nibblemode = true;
                                        n = snprintf(fmt, sizeof(fmt),
                                                     "%%0%u%c", width, mode[0]);
                                        break;
@@ -1028,12 +1030,12 @@ load_text(dns_loadctx_t *lctx) {
        dns_rdatatype_t type, covers;
        uint32_t ttl_offset = 0;
        dns_name_t *new_name;
-       isc_boolean_t current_has_delegation = ISC_FALSE;
-       isc_boolean_t done = ISC_FALSE;
-       isc_boolean_t finish_origin = ISC_FALSE;
-       isc_boolean_t finish_include = ISC_FALSE;
-       isc_boolean_t read_till_eol = ISC_FALSE;
-       isc_boolean_t initialws;
+       bool current_has_delegation = false;
+       bool done = false;
+       bool finish_origin = false;
+       bool finish_include = false;
+       bool read_till_eol = false;
+       bool initialws;
        char *include_file = NULL;
        isc_token_t token;
        isc_result_t result = ISC_R_UNEXPECTED;
@@ -1067,7 +1069,7 @@ load_text(dns_loadctx_t *lctx) {
        char *rhs = NULL;
        const char *source = "";
        unsigned long line = 0;
-       isc_boolean_t explicit_ttl;
+       bool explicit_ttl;
        char classname1[DNS_RDATACLASS_FORMATSIZE];
        char classname2[DNS_RDATACLASS_FORMATSIZE];
        unsigned int options = 0;
@@ -1103,10 +1105,10 @@ load_text(dns_loadctx_t *lctx) {
                options |= DNS_RDATA_CHECKMXFAIL;
        source = isc_lex_getsourcename(lctx->lex);
        do {
-               initialws = ISC_FALSE;
+               initialws = false;
                line = isc_lex_getsourceline(lctx->lex);
                GETTOKEN(lctx->lex, ISC_LEXOPT_INITIALWS | ISC_LEXOPT_QSTRING,
-                        &token, ISC_TRUE);
+                        &token, true);
                line = isc_lex_getsourceline(lctx->lex);
 
                if (token.type == isc_tokentype_eof) {
@@ -1125,12 +1127,12 @@ load_text(dns_loadctx_t *lctx) {
                                ictx = lctx->inc;
                                continue;
                        }
-                       done = ISC_TRUE;
+                       done = true;
                        continue;
                }
 
                if (token.type == isc_tokentype_eol) {
-                       read_till_eol = ISC_FALSE;
+                       read_till_eol = false;
                        continue;               /* blank line */
                }
 
@@ -1141,7 +1143,7 @@ load_text(dns_loadctx_t *lctx) {
                        /*
                         * Still working on the same name.
                         */
-                       initialws = ISC_TRUE;
+                       initialws = true;
                } else if (token.type == isc_tokentype_string ||
                           token.type == isc_tokentype_qstring) {
 
@@ -1154,13 +1156,13 @@ load_text(dns_loadctx_t *lctx) {
                         */
 
                        if (strcasecmp(DNS_AS_STR(token), "$ORIGIN") == 0) {
-                               GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
-                               finish_origin = ISC_TRUE;
+                               GETTOKEN(lctx->lex, 0, &token, false);
+                               finish_origin = true;
                        } else if (strcasecmp(DNS_AS_STR(token),
                                              "$TTL") == 0) {
-                               GETTOKENERR(lctx->lex, 0, &token, ISC_FALSE,
+                               GETTOKENERR(lctx->lex, 0, &token, false,
                                            lctx->ttl = 0;
-                                           lctx->default_ttl_known = ISC_TRUE;);
+                                           lctx->default_ttl_known = true;);
                                result =
                                   dns_ttl_fromtext(&token.value.as_textregion,
                                                    &lctx->ttl);
@@ -1171,7 +1173,7 @@ load_text(dns_loadctx_t *lctx) {
                                        goto insist_and_cleanup;
                                limit_ttl(callbacks, source, line, &lctx->ttl);
                                lctx->default_ttl = lctx->ttl;
-                               lctx->default_ttl_known = ISC_TRUE;
+                               lctx->default_ttl_known = true;
                                EXPECTEOL;
                                continue;
                        } else if (strcasecmp(DNS_AS_STR(token),
@@ -1197,7 +1199,7 @@ load_text(dns_loadctx_t *lctx) {
                                        goto insist_and_cleanup;
                                }
                                GETTOKEN(lctx->lex, ISC_LEXOPT_QSTRING, &token,
-                                        ISC_FALSE);
+                                        false);
                                if (include_file != NULL)
                                        isc_mem_free(mctx, include_file);
                                include_file = isc_mem_strdup(mctx,
@@ -1206,7 +1208,7 @@ load_text(dns_loadctx_t *lctx) {
                                        result = ISC_R_NOMEMORY;
                                        goto log_and_cleanup;
                                }
-                               GETTOKEN(lctx->lex, 0, &token, ISC_TRUE);
+                               GETTOKEN(lctx->lex, 0, &token, true);
 
                                if (token.type == isc_tokentype_eol ||
                                    token.type == isc_tokentype_eof) {
@@ -1237,12 +1239,12 @@ load_text(dns_loadctx_t *lctx) {
                                 * to domain name processing code and do
                                 * the actual inclusion later.
                                 */
-                               finish_include = ISC_TRUE;
+                               finish_include = true;
                        } else if (strcasecmp(DNS_AS_STR(token),
                                              "$DATE") == 0) {
                                int64_t dump_time64;
                                isc_stdtime_t dump_time, current_time;
-                               GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                               GETTOKEN(lctx->lex, 0, &token, false);
                                isc_stdtime_get(&current_time);
                                result = dns_time64_fromtext(DNS_AS_STR(token),
                                                             &dump_time64);
@@ -1285,7 +1287,7 @@ load_text(dns_loadctx_t *lctx) {
                                        isc_mem_free(mctx, rhs);
                                range = lhs = gtype = rhs = NULL;
                                /* RANGE */
-                               GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                               GETTOKEN(lctx->lex, 0, &token, false);
                                range = isc_mem_strdup(mctx,
                                                     DNS_AS_STR(token));
                                if (range == NULL) {
@@ -1293,21 +1295,21 @@ load_text(dns_loadctx_t *lctx) {
                                        goto log_and_cleanup;
                                }
                                /* LHS */
-                               GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                               GETTOKEN(lctx->lex, 0, &token, false);
                                lhs = isc_mem_strdup(mctx, DNS_AS_STR(token));
                                if (lhs == NULL) {
                                        result = ISC_R_NOMEMORY;
                                        goto log_and_cleanup;
                                }
                                rdclass = 0;
-                               explicit_ttl = ISC_FALSE;
+                               explicit_ttl = false;
                                /* CLASS? */
-                               GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                               GETTOKEN(lctx->lex, 0, &token, false);
                                if (dns_rdataclass_fromtext(&rdclass,
                                            &token.value.as_textregion)
                                                == ISC_R_SUCCESS) {
                                        GETTOKEN(lctx->lex, 0, &token,
-                                                ISC_FALSE);
+                                                false);
                                }
                                /* TTL? */
                                if (dns_ttl_fromtext(&token.value.as_textregion,
@@ -1315,10 +1317,10 @@ load_text(dns_loadctx_t *lctx) {
                                                == ISC_R_SUCCESS) {
                                        limit_ttl(callbacks, source, line,
                                                  &lctx->ttl);
-                                       lctx->ttl_known = ISC_TRUE;
-                                       explicit_ttl = ISC_TRUE;
+                                       lctx->ttl_known = true;
+                                       explicit_ttl = true;
                                        GETTOKEN(lctx->lex, 0, &token,
-                                                ISC_FALSE);
+                                                false);
                                }
                                /* CLASS? */
                                if (rdclass == 0 &&
@@ -1326,7 +1328,7 @@ load_text(dns_loadctx_t *lctx) {
                                                    &token.value.as_textregion)
                                                == ISC_R_SUCCESS)
                                        GETTOKEN(lctx->lex, 0, &token,
-                                                ISC_FALSE);
+                                                false);
                                /* TYPE */
                                gtype = isc_mem_strdup(mctx,
                                                       DNS_AS_STR(token));
@@ -1336,7 +1338,7 @@ load_text(dns_loadctx_t *lctx) {
                                }
                                /* RHS */
                                GETTOKEN(lctx->lex, ISC_LEXOPT_QSTRING,
-                                        &token, ISC_FALSE);
+                                        &token, false);
                                rhs = isc_mem_strdup(mctx, DNS_AS_STR(token));
                                if (rhs == NULL) {
                                        result = ISC_R_NOMEMORY;
@@ -1405,7 +1407,7 @@ load_text(dns_loadctx_t *lctx) {
                        if (MANYERRS(lctx, result)) {
                                SETRESULT(lctx, result);
                                LOGIT(result);
-                               read_till_eol = ISC_TRUE;
+                               read_till_eol = true;
                                continue;
                        } else if (result != ISC_R_SUCCESS)
                                goto log_and_cleanup;
@@ -1416,17 +1418,17 @@ load_text(dns_loadctx_t *lctx) {
                        if (finish_origin) {
                                if (ictx->origin_in_use != -1)
                                        ictx->in_use[ictx->origin_in_use] =
-                                               ISC_FALSE;
+                                               false;
                                ictx->origin_in_use = new_in_use;
-                               ictx->in_use[ictx->origin_in_use] = ISC_TRUE;
+                               ictx->in_use[ictx->origin_in_use] = true;
                                ictx->origin = new_name;
-                               ictx->origin_changed = ISC_TRUE;
-                               finish_origin = ISC_FALSE;
+                               ictx->origin_changed = true;
+                               finish_origin = false;
                                EXPECTEOL;
                                continue;
                        }
                        if (finish_include) {
-                               finish_include = ISC_FALSE;
+                               finish_include = false;
                                EXPECTEOL;
                                result = pushfile(include_file, new_name, lctx);
                                if (MANYERRS(lctx, result)) {
@@ -1438,7 +1440,7 @@ load_text(dns_loadctx_t *lctx) {
                                        goto insist_and_cleanup;
                                }
                                ictx = lctx->inc;
-                               ictx->origin_changed = ISC_TRUE;
+                               ictx->origin_changed = true;
                                source = isc_lex_getsourcename(lctx->lex);
                                line = isc_lex_getsourceline(lctx->lex);
                                POST(line);
@@ -1466,7 +1468,7 @@ load_text(dns_loadctx_t *lctx) {
                                        goto insist_and_cleanup;
                                if (ictx->glue_in_use != -1)
                                        ictx->in_use[ictx->glue_in_use] =
-                                               ISC_FALSE;
+                                               false;
                                ictx->glue_in_use = -1;
                                ictx->glue = NULL;
                                rdcount = rdcount_save;
@@ -1491,7 +1493,7 @@ load_text(dns_loadctx_t *lctx) {
                                        ictx->glue = new_name;
                                        ictx->glue_in_use = new_in_use;
                                        ictx->in_use[ictx->glue_in_use] =
-                                               ISC_TRUE;
+                                               true;
                                } else {
                                        result = commit(callbacks, lctx,
                                                        &current_list,
@@ -1506,12 +1508,12 @@ load_text(dns_loadctx_t *lctx) {
                                        rdlcount = 0;
                                        if (ictx->current_in_use != -1)
                                            ictx->in_use[ictx->current_in_use] =
-                                               ISC_FALSE;
+                                               false;
                                        ictx->current_in_use = new_in_use;
                                        ictx->in_use[ictx->current_in_use] =
-                                               ISC_TRUE;
+                                               true;
                                        ictx->current = new_name;
-                                       current_has_delegation = ISC_FALSE;
+                                       current_has_delegation = false;
                                        isc_buffer_init(&target, target_mem,
                                                        target_size);
                                }
@@ -1539,9 +1541,9 @@ load_text(dns_loadctx_t *lctx) {
                                       "%s:%lu: "
                                       "ignoring out-of-zone data (%s)",
                                       source, line, namebuf);
-                               ictx->drop = ISC_TRUE;
+                               ictx->drop = true;
                        } else
-                               ictx->drop = ISC_FALSE;
+                               ictx->drop = false;
                } else {
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "%s:%lu: isc_lex_gettoken() returned "
@@ -1573,13 +1575,13 @@ load_text(dns_loadctx_t *lctx) {
 
                if (initialws) {
                        if (token.type == isc_tokentype_eol) {
-                               read_till_eol = ISC_FALSE;
+                               read_till_eol = false;
                                continue;               /* blank line */
                        }
 
                        if (token.type == isc_tokentype_eof) {
                                WARNUNEXPECTEDEOF(lctx->lex);
-                               read_till_eol = ISC_FALSE;
+                               read_till_eol = false;
                                isc_lex_ungettoken(lctx->lex, &token);
                                continue;
                        }
@@ -1591,7 +1593,7 @@ load_text(dns_loadctx_t *lctx) {
                                result = DNS_R_NOOWNER;
                                if (MANYERRS(lctx, result)) {
                                        SETRESULT(lctx, result);
-                                       read_till_eol = ISC_TRUE;
+                                       read_till_eol = true;
                                        continue;
                                } else {
                                        goto insist_and_cleanup;
@@ -1613,21 +1615,21 @@ load_text(dns_loadctx_t *lctx) {
                        }
                }
 
-               ictx->origin_changed = ISC_FALSE;
+               ictx->origin_changed = false;
 
                if (dns_rdataclass_fromtext(&rdclass,
                                            &token.value.as_textregion)
                                == ISC_R_SUCCESS)
-                       GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                       GETTOKEN(lctx->lex, 0, &token, false);
 
-               explicit_ttl = ISC_FALSE;
+               explicit_ttl = false;
                result = dns_ttl_fromtext(&token.value.as_textregion,
                                          &lctx->ttl);
                if (result == ISC_R_SUCCESS) {
                        limit_ttl(callbacks, source, line, &lctx->ttl);
-                       explicit_ttl = ISC_TRUE;
-                       lctx->ttl_known = ISC_TRUE;
-                       GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                       explicit_ttl = true;
+                       lctx->ttl_known = true;
+                       GETTOKEN(lctx->lex, 0, &token, false);
                }
 
                if (token.type != isc_tokentype_string) {
@@ -1636,7 +1638,7 @@ load_text(dns_loadctx_t *lctx) {
                        result = ISC_R_UNEXPECTED;
                        if (MANYERRS(lctx, result)) {
                                SETRESULT(lctx, result);
-                               read_till_eol = ISC_TRUE;
+                               read_till_eol = true;
                                continue;
                        } else {
                                goto insist_and_cleanup;
@@ -1647,7 +1649,7 @@ load_text(dns_loadctx_t *lctx) {
                    dns_rdataclass_fromtext(&rdclass,
                                            &token.value.as_textregion)
                                == ISC_R_SUCCESS)
-                       GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                       GETTOKEN(lctx->lex, 0, &token, false);
 
                if (token.type != isc_tokentype_string) {
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -1655,7 +1657,7 @@ load_text(dns_loadctx_t *lctx) {
                        result = ISC_R_UNEXPECTED;
                        if (MANYERRS(lctx, result)) {
                                SETRESULT(lctx, result);
-                               read_till_eol = ISC_TRUE;
+                               read_till_eol = true;
                                continue;
                        } else {
                                goto insist_and_cleanup;
@@ -1672,7 +1674,7 @@ load_text(dns_loadctx_t *lctx) {
                                   token.value.as_textregion.base);
                        if (MANYERRS(lctx, result)) {
                                SETRESULT(lctx, result);
-                               read_till_eol = ISC_TRUE;
+                               read_till_eol = true;
                                continue;
                        } else if (result != ISC_R_SUCCESS)
                                goto insist_and_cleanup;
@@ -1697,7 +1699,7 @@ load_text(dns_loadctx_t *lctx) {
                        result = DNS_R_BADCLASS;
                        if (MANYERRS(lctx, result)) {
                                SETRESULT(lctx, result);
-                               read_till_eol = ISC_TRUE;
+                               read_till_eol = true;
                                continue;
                        } else {
                                goto insist_and_cleanup;
@@ -1705,7 +1707,7 @@ load_text(dns_loadctx_t *lctx) {
                }
 
                if (type == dns_rdatatype_ns && ictx->glue == NULL)
-                       current_has_delegation = ISC_TRUE;
+                       current_has_delegation = true;
 
                /*
                 * RFC1123: MD and MF are not allowed to be loaded from
@@ -1776,7 +1778,7 @@ load_text(dns_loadctx_t *lctx) {
                    lctx->zclass == dns_rdataclass_in &&
                    (lctx->options & DNS_MASTER_CHECKNS) != 0) {
 
-                       GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
+                       GETTOKEN(lctx->lex, 0, &token, false);
                        result = check_ns(lctx, &token, source, line);
                        isc_lex_ungettoken(lctx->lex, &token);
                        if ((lctx->options & DNS_MASTER_FATALNS) != 0) {
@@ -1792,13 +1794,13 @@ load_text(dns_loadctx_t *lctx) {
                 */
                options &= ~DNS_RDATA_CHECKREVERSE;
                if ((lctx->options & DNS_MASTER_CHECKNAMES) != 0) {
-                       isc_boolean_t ok;
+                       bool ok;
                        dns_name_t *name;
 
                        name = (ictx->glue != NULL) ? ictx->glue :
                                                      ictx->current;
                        ok = dns_rdata_checkowner(name, lctx->zclass, type,
-                                                 ISC_TRUE);
+                                                 true);
                        if (!ok) {
                                char namebuf[DNS_NAME_FORMATSIZE];
                                const char *desc;
@@ -1863,7 +1865,7 @@ load_text(dns_loadctx_t *lctx) {
                        result = DNS_R_NOTZONETOP;
                        if (MANYERRS(lctx, result)) {
                                SETRESULT(lctx, result);
-                               read_till_eol = ISC_TRUE;
+                               read_till_eol = true;
                                target = target_ft;
                                continue;
                        } else {
@@ -1886,14 +1888,14 @@ load_text(dns_loadctx_t *lctx) {
                                lctx->ttl = dns_soa_getminimum(&rdata[rdcount]);
                                limit_ttl(callbacks, source, line, &lctx->ttl);
                                lctx->default_ttl = lctx->ttl;
-                               lctx->default_ttl_known = ISC_TRUE;
+                               lctx->default_ttl_known = true;
                        } else if ((lctx->options & DNS_MASTER_HINT) != 0) {
                                /*
                                 * Zero TTL's are fine for hints.
                                 */
                                lctx->ttl = 0;
                                lctx->default_ttl = lctx->ttl;
-                               lctx->default_ttl_known = ISC_TRUE;
+                               lctx->default_ttl_known = true;
                        } else {
                                (*callbacks->warn)(callbacks,
                                                   "%s:%lu: no TTL specified; "
@@ -1914,7 +1916,7 @@ load_text(dns_loadctx_t *lctx) {
                                           "%s:%lu: "
                                           "using RFC1035 TTL semantics",
                                           source, line);
-                       lctx->warn_1035 = ISC_FALSE;
+                       lctx->warn_1035 = false;
                }
 
                if (type == dns_rdatatype_rrsig && lctx->warn_sigexpired) {
@@ -1927,7 +1929,7 @@ load_text(dns_loadctx_t *lctx) {
                                                   "%s:%lu: "
                                                   "signature has expired",
                                                   source, line);
-                               lctx->warn_sigexpired = ISC_FALSE;
+                               lctx->warn_sigexpired = false;
                        }
                }
 
@@ -1936,7 +1938,7 @@ load_text(dns_loadctx_t *lctx) {
                    (lctx->options & DNS_MASTER_SLAVE) == 0) {
                        (*callbacks->warn)(callbacks, "%s:%lu: old style DNSSEC "
                                           " zone detected", source, line);
-                       lctx->warn_tcr = ISC_FALSE;
+                       lctx->warn_tcr = false;
                }
 
                if ((lctx->options & DNS_MASTER_AGETTL) != 0) {
@@ -2095,7 +2097,7 @@ pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx) {
        REQUIRE(DNS_LCTX_VALID(lctx));
 
        ictx = lctx->inc;
-       lctx->seen_include = ISC_TRUE;
+       lctx->seen_include = true;
 
        result = incctx_create(lctx->mctx, origin, &newctx);
        if (result != ISC_R_SUCCESS)
@@ -2111,7 +2113,7 @@ pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx) {
                newctx->current_in_use = find_free_name(newctx);
                newctx->current =
                        dns_fixedname_name(&newctx->fixed[newctx->current_in_use]);
-               newctx->in_use[newctx->current_in_use] = ISC_TRUE;
+               newctx->in_use[newctx->current_in_use] = true;
                dns_name_toregion((ictx->glue != NULL) ?
                                   ictx->glue : ictx->current, &r);
                dns_name_fromregion(newctx->current, &r);
@@ -2138,7 +2140,7 @@ pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx) {
  * read when incrementally filling the buffer.
  */
 static inline isc_result_t
-read_and_check(isc_boolean_t do_read, isc_buffer_t *buffer,
+read_and_check(bool do_read, isc_buffer_t *buffer,
               size_t len, FILE *f, uint32_t *totallen)
 {
        isc_result_t result;
@@ -2234,7 +2236,7 @@ load_header(dns_loadctx_t *lctx) {
                header.lastxfrin = isc_buffer_getuint32(&target);
        }
 
-       lctx->first = ISC_FALSE;
+       lctx->first = false;
        lctx->header = header;
 
        return (ISC_R_SUCCESS);
@@ -2296,7 +2298,7 @@ openfile_raw(dns_loadctx_t *lctx, const char *master_file) {
 static isc_result_t
 load_raw(dns_loadctx_t *lctx) {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
        unsigned int loop_cnt = 0;
        dns_rdatacallbacks_t *callbacks;
        unsigned char namebuf[DNS_NAME_MAXWIRE];
@@ -2352,7 +2354,7 @@ load_raw(dns_loadctx_t *lctx) {
                uint16_t namelen;
                uint32_t totallen;
                size_t minlen, readlen;
-               isc_boolean_t sequential_read = ISC_FALSE;
+               bool sequential_read = false;
 
                /* Read the data length */
                isc_buffer_clear(&target);
@@ -2362,7 +2364,7 @@ load_raw(dns_loadctx_t *lctx) {
                                        lctx->f, NULL);
                if (result == ISC_R_EOF) {
                        result = ISC_R_SUCCESS;
-                       done = ISC_TRUE;
+                       done = true;
                        break;
                }
                if (result != ISC_R_SUCCESS)
@@ -2397,7 +2399,7 @@ load_raw(dns_loadctx_t *lctx) {
                         * enough to store the "header part", owner name, and
                         * at least one rdata (however large it is).
                         */
-                       sequential_read = ISC_TRUE;
+                       sequential_read = true;
                        readlen = minlen - sizeof(totallen);
                } else {
                        /*
@@ -3155,10 +3157,10 @@ commit(dns_rdatacallbacks_t *callbacks, dns_loadctx_t *lctx,
 }
 
 /*
- * Returns ISC_TRUE if one of the NS rdata's contains 'owner'.
+ * Returns true if one of the NS rdata's contains 'owner'.
  */
 
-static isc_boolean_t
+static bool
 is_glue(rdatalist_head_t *head, dns_name_t *owner) {
        dns_rdatalist_t *this;
        dns_rdata_t *rdata;
@@ -3175,7 +3177,7 @@ is_glue(rdatalist_head_t *head, dns_name_t *owner) {
                this = ISC_LIST_NEXT(this, link);
        }
        if (this == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        rdata = ISC_LIST_HEAD(this->rdata);
        while (rdata != NULL) {
@@ -3183,10 +3185,10 @@ is_glue(rdatalist_head_t *head, dns_name_t *owner) {
                dns_rdata_toregion(rdata, &region);
                dns_name_fromregion(&name, &region);
                if (dns_name_compare(&name, owner) == 0)
-                       return (ISC_TRUE);
+                       return (true);
                rdata = ISC_LIST_NEXT(rdata, link);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -3230,7 +3232,7 @@ dns_loadctx_cancel(dns_loadctx_t *lctx) {
        REQUIRE(DNS_LCTX_VALID(lctx));
 
        LOCK(&lctx->lock);
-       lctx->canceled = ISC_TRUE;
+       lctx->canceled = true;
        UNLOCK(&lctx->lock);
 }
 
index 67f05800be96bc2a41a8353fd67d719b63b0228b..4d09d16c62422d64d98692f30d299ea01e882a26 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -85,14 +86,14 @@ struct dns_master_style {
  */
 typedef struct dns_totext_ctx {
        dns_master_style_t      style;
-       isc_boolean_t           class_printed;
+       bool            class_printed;
        char *                  linebreak;
        char                    linebreak_buf[DNS_TOTEXT_LINEBREAK_MAXLEN];
        dns_name_t *            origin;
        dns_name_t *            neworigin;
        dns_fixedname_t         origin_fixname;
        uint32_t                current_ttl;
-       isc_boolean_t           current_ttl_valid;
+       bool            current_ttl_valid;
 } dns_totext_ctx_t;
 
 LIBDNS_EXTERNAL_DATA const dns_master_style_t
@@ -219,9 +220,9 @@ struct dns_dumpctx {
        isc_mem_t               *mctx;
        isc_mutex_t             lock;
        unsigned int            references;
-       isc_boolean_t           canceled;
-       isc_boolean_t           first;
-       isc_boolean_t           do_date;
+       bool            canceled;
+       bool            first;
+       bool            do_date;
        isc_stdtime_t           now;
        FILE                    *f;
        dns_db_t                *db;
@@ -317,7 +318,7 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) {
        REQUIRE(style->tab_width != 0);
 
        ctx->style = *style;
-       ctx->class_printed = ISC_FALSE;
+       ctx->class_printed = false;
 
        dns_fixedname_init(&ctx->origin_fixname);
 
@@ -384,7 +385,7 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) {
        ctx->origin = NULL;
        ctx->neworigin = NULL;
        ctx->current_ttl = 0;
-       ctx->current_ttl_valid = ISC_FALSE;
+       ctx->current_ttl_valid = false;
 
        return (ISC_R_SUCCESS);
 }
@@ -419,7 +420,7 @@ str_totext(const char *source, isc_buffer_t *target) {
 }
 
 static isc_result_t
-ncache_summary(dns_rdataset_t *rdataset, isc_boolean_t omit_final_dot,
+ncache_summary(dns_rdataset_t *rdataset, bool omit_final_dot,
               isc_buffer_t *target)
 {
        isc_result_t result = ISC_R_SUCCESS;
@@ -475,14 +476,14 @@ static isc_result_t
 rdataset_totext(dns_rdataset_t *rdataset,
                dns_name_t *owner_name,
                dns_totext_ctx_t *ctx,
-               isc_boolean_t omit_final_dot,
+               bool omit_final_dot,
                isc_buffer_t *target)
 {
        isc_result_t result;
        unsigned int column;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
        uint32_t current_ttl;
-       isc_boolean_t current_ttl_valid;
+       bool current_ttl_valid;
        dns_rdatatype_t type;
        unsigned int type_start;
        dns_fixedname_t fixed;
@@ -556,7 +557,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
                        if ((ctx->style.flags & DNS_STYLEFLAG_TTL_UNITS) != 0) {
                                length = target->used;
                                result = dns_ttl_totext2(rdataset->ttl,
-                                                       ISC_FALSE, ISC_FALSE,
+                                                       false, false,
                                                        target);
                                if (result != ISC_R_SUCCESS)
                                        return (result);
@@ -579,7 +580,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
                         */
                        if ((ctx->style.flags & DNS_STYLEFLAG_TTL) == 0) {
                                current_ttl = rdataset->ttl;
-                               current_ttl_valid = ISC_TRUE;
+                               current_ttl_valid = true;
                        }
                }
 
@@ -588,7 +589,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
                 */
                if ((ctx->style.flags & DNS_STYLEFLAG_NO_CLASS) == 0 &&
                    ((ctx->style.flags & DNS_STYLEFLAG_OMIT_CLASS) == 0 ||
-                    ctx->class_printed == ISC_FALSE))
+                    ctx->class_printed == false))
                {
                        unsigned int class_start;
                        INDENT_TO(class_column);
@@ -685,7 +686,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
                        isc_buffer_add(target, 1);
                }
 
-               first = ISC_FALSE;
+               first = false;
                result = dns_rdataset_next(rdataset);
        }
 
@@ -699,7 +700,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
         * times with increasing buffer sizes until it succeeds,
         * and failed attempts must not update the state prematurely.
         */
-       ctx->class_printed = ISC_TRUE;
+       ctx->class_printed = true;
        ctx->current_ttl= current_ttl;
        ctx->current_ttl_valid = current_ttl_valid;
 
@@ -715,7 +716,7 @@ static isc_result_t
 question_totext(dns_rdataset_t *rdataset,
                dns_name_t *owner_name,
                dns_totext_ctx_t *ctx,
-               isc_boolean_t omit_final_dot,
+               bool omit_final_dot,
                isc_buffer_t *target)
 {
        unsigned int column;
@@ -781,8 +782,8 @@ question_totext(dns_rdataset_t *rdataset,
 isc_result_t
 dns_rdataset_totext(dns_rdataset_t *rdataset,
                    dns_name_t *owner_name,
-                   isc_boolean_t omit_final_dot,
-                   isc_boolean_t question,
+                   bool omit_final_dot,
+                   bool question,
                    isc_buffer_t *target)
 {
        dns_totext_ctx_t ctx;
@@ -827,7 +828,7 @@ dns_master_rdatasettotext(dns_name_t *owner_name,
        }
 
        return (rdataset_totext(rdataset, owner_name, &ctx,
-                               ISC_FALSE, target));
+                               false, target));
 }
 
 isc_result_t
@@ -846,7 +847,7 @@ dns_master_questiontotext(dns_name_t *owner_name,
        }
 
        return (question_totext(rdataset, owner_name, &ctx,
-                               ISC_FALSE, target));
+                               false, target));
 }
 
 /*
@@ -871,14 +872,14 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
         */
 
        if ((ctx->style.flags & DNS_STYLEFLAG_TTL) != 0) {
-               if (ctx->current_ttl_valid == ISC_FALSE ||
+               if (ctx->current_ttl_valid == false ||
                    ctx->current_ttl != rdataset->ttl)
                {
                        if ((ctx->style.flags & DNS_STYLEFLAG_COMMENT) != 0)
                        {
                                isc_buffer_clear(buffer);
                                result = dns_ttl_totext(rdataset->ttl,
-                                                       ISC_TRUE, buffer);
+                                                       true, buffer);
                                INSIST(result == ISC_R_SUCCESS);
                                isc_buffer_usedregion(buffer, &r);
                                fprintf(f, "$TTL %u\t; %.*s\n", rdataset->ttl,
@@ -887,7 +888,7 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
                                fprintf(f, "$TTL %u\n", rdataset->ttl);
                        }
                        ctx->current_ttl = rdataset->ttl;
-                       ctx->current_ttl_valid = ISC_TRUE;
+                       ctx->current_ttl_valid = true;
                }
        }
 
@@ -901,7 +902,7 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
                int newlength;
                void *newmem;
                result = rdataset_totext(rdataset, name, ctx,
-                                        ISC_FALSE, buffer);
+                                        false, buffer);
                if (result != ISC_R_NOSPACE)
                        break;
 
@@ -999,7 +1000,7 @@ dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
 
        if (itresult == ISC_R_SUCCESS && ctx->neworigin != NULL) {
                isc_buffer_clear(buffer);
-               itresult = dns_name_totext(ctx->neworigin, ISC_FALSE, buffer);
+               itresult = dns_name_totext(ctx->neworigin, false, buffer);
                RUNTIME_CHECK(itresult == ISC_R_SUCCESS);
                isc_buffer_usedregion(buffer, &r);
                fprintf(f, "$ORIGIN %.*s\n", (int) r.length, (char *) r.base);
@@ -1258,7 +1259,7 @@ dumpctx_destroy(dns_dumpctx_t *dctx) {
        DESTROYLOCK(&dctx->lock);
        dns_dbiterator_destroy(&dctx->dbiter);
        if (dctx->version != NULL)
-               dns_db_closeversion(dctx->db, &dctx->version, ISC_FALSE);
+               dns_db_closeversion(dctx->db, &dctx->version, false);
        dns_db_detach(&dctx->db);
        if (dctx->task != NULL)
                isc_task_detach(&dctx->task);
@@ -1287,7 +1288,7 @@ dns_dumpctx_attach(dns_dumpctx_t *source, dns_dumpctx_t **target) {
 void
 dns_dumpctx_detach(dns_dumpctx_t **dctxp) {
        dns_dumpctx_t *dctx;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(dctxp != NULL);
        dctx = *dctxp;
@@ -1299,7 +1300,7 @@ dns_dumpctx_detach(dns_dumpctx_t **dctxp) {
        INSIST(dctx->references != 0);
        dctx->references--;
        if (dctx->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&dctx->lock);
        if (need_destroy)
                dumpctx_destroy(dctx);
@@ -1322,13 +1323,13 @@ dns_dumpctx_cancel(dns_dumpctx_t *dctx) {
        REQUIRE(DNS_DCTX_VALID(dctx));
 
        LOCK(&dctx->lock);
-       dctx->canceled = ISC_TRUE;
+       dctx->canceled = true;
        UNLOCK(&dctx->lock);
 }
 
 static isc_result_t
 flushandsync(FILE *f, isc_result_t result, const char *temp) {
-       isc_boolean_t logit = ISC_TF(result == ISC_R_SUCCESS);
+       bool logit = (result == ISC_R_SUCCESS);
 
        if (result == ISC_R_SUCCESS)
                result = isc_stdio_flush(f);
@@ -1343,7 +1344,7 @@ flushandsync(FILE *f, isc_result_t result, const char *temp) {
                                      DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
                                      "dumping to stream: flush: %s",
                                      isc_result_totext(result));
-               logit = ISC_FALSE;
+               logit = false;
        }
 
        if (result == ISC_R_SUCCESS)
@@ -1367,11 +1368,11 @@ static isc_result_t
 closeandrename(FILE *f, isc_result_t result, const char *temp, const char *file)
 {
        isc_result_t tresult;
-       isc_boolean_t logit = ISC_TF(result == ISC_R_SUCCESS);
+       bool logit = (result == ISC_R_SUCCESS);
 
        result = flushandsync(f, result, temp);
        if (result != ISC_R_SUCCESS)
-               logit = ISC_FALSE;
+               logit = false;
 
        tresult = isc_stdio_close(f);
        if (result == ISC_R_SUCCESS)
@@ -1381,7 +1382,7 @@ closeandrename(FILE *f, isc_result_t result, const char *temp, const char *file)
                              DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
                              "dumping master file: %s: fclose: %s",
                              temp, isc_result_totext(result));
-               logit = ISC_FALSE;
+               logit = false;
        }
        if (result == ISC_R_SUCCESS)
                result = isc_file_rename(temp, file);
@@ -1461,8 +1462,8 @@ dumpctx_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
        dctx->done_arg = NULL;
        dctx->task = NULL;
        dctx->nodes = 0;
-       dctx->first = ISC_TRUE;
-       dctx->canceled = ISC_FALSE;
+       dctx->first = true;
+       dctx->canceled = false;
        dctx->file = NULL;
        dctx->tmpfile = NULL;
        dctx->format = format;
@@ -1654,7 +1655,7 @@ dumptostreaminc(dns_dumpctx_t *dctx) {
                if (result != ISC_R_SUCCESS && result != ISC_R_NOMORE)
                        goto cleanup;
 
-               dctx->first = ISC_FALSE;
+               dctx->first = false;
        } else
                result = ISC_R_SUCCESS;
 
index f68adabdaf341d07c9da453af09677dc8cd35e58..ac637a25883d8b126b5d739866a93a039f2a23ff 100644 (file)
@@ -18,6 +18,7 @@
 #include <config.h>
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/mem.h>
@@ -479,7 +480,7 @@ msgresetopt(dns_message_t *msg)
 }
 
 static void
-msgresetsigs(dns_message_t *msg, isc_boolean_t replying) {
+msgresetsigs(dns_message_t *msg, bool replying) {
        if (msg->sig_reserved > 0) {
                dns_message_renderrelease(msg, msg->sig_reserved);
                msg->sig_reserved = 0;
@@ -527,7 +528,7 @@ msgresetsigs(dns_message_t *msg, isc_boolean_t replying) {
  * both dns_message_reset() and dns_message_destroy().
  */
 static void
-msgreset(dns_message_t *msg, isc_boolean_t everything) {
+msgreset(dns_message_t *msg, bool everything) {
        dns_msgblock_t *msgblock, *next_msgblock;
        isc_buffer_t *dynbuf, *next_dynbuf;
        dns_rdata_t *rdata;
@@ -535,7 +536,7 @@ msgreset(dns_message_t *msg, isc_boolean_t everything) {
 
        msgresetnames(msg, 0);
        msgresetopt(msg);
-       msgresetsigs(msg, ISC_FALSE);
+       msgresetsigs(msg, false);
 
        /*
         * Clean up linked lists.
@@ -792,7 +793,7 @@ dns_message_reset(dns_message_t *msg, unsigned int intent) {
        REQUIRE(intent == DNS_MESSAGE_INTENTPARSE
                || intent == DNS_MESSAGE_INTENTRENDER);
 
-       msgreset(msg, ISC_FALSE);
+       msgreset(msg, false);
        msg->from_to_wire = intent;
 }
 
@@ -806,7 +807,7 @@ dns_message_destroy(dns_message_t **msgp) {
        msg = *msgp;
        *msgp = NULL;
 
-       msgreset(msg, ISC_TRUE);
+       msgreset(msg, true);
        isc_mempool_destroy(&msg->namepool);
        isc_mempool_destroy(&msg->rdspool);
        msg->magic = 0;
@@ -897,7 +898,7 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
         */
        tries = 0;
        while (tries < 2) {
-               result = dns_name_fromwire(name, source, dctx, ISC_FALSE,
+               result = dns_name_fromwire(name, source, dctx, false,
                                           scratch);
 
                if (result == ISC_R_NOSPACE) {
@@ -974,7 +975,7 @@ getrdata(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
 #define DO_ERROR(r)                                    \
        do {                                            \
                if (best_effort)                        \
-                       seen_problem = ISC_TRUE;        \
+                       seen_problem = true;    \
                else {                                  \
                        result = r;                     \
                        goto cleanup;                   \
@@ -996,14 +997,14 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
        dns_namelist_t *section;
-       isc_boolean_t free_name;
-       isc_boolean_t best_effort;
-       isc_boolean_t seen_problem;
+       bool free_name;
+       bool best_effort;
+       bool seen_problem;
 
        section = &msg->sections[DNS_SECTION_QUESTION];
 
-       best_effort = ISC_TF(options & DNS_MESSAGEPARSE_BESTEFFORT);
-       seen_problem = ISC_FALSE;
+       best_effort = (options & DNS_MESSAGEPARSE_BESTEFFORT);
+       seen_problem = false;
 
        name = NULL;
        rdataset = NULL;
@@ -1013,7 +1014,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                name = isc_mempool_get(msg->namepool);
                if (name == NULL)
                        return (ISC_R_NOMEMORY);
-               free_name = ISC_TRUE;
+               free_name = true;
 
                offsets = newoffsets(msg);
                if (offsets == NULL) {
@@ -1053,12 +1054,12 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                        if (!ISC_LIST_EMPTY(*section))
                                DO_ERROR(DNS_R_FORMERR);
                        ISC_LIST_APPEND(*section, name, link);
-                       free_name = ISC_FALSE;
+                       free_name = false;
                } else {
                        isc_mempool_put(msg->namepool, name);
                        name = name2;
                        name2 = NULL;
-                       free_name = ISC_FALSE;
+                       free_name = false;
                }
 
                /*
@@ -1146,21 +1147,21 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 update(dns_section_t section, dns_rdataclass_t rdclass) {
        if (section == DNS_SECTION_PREREQUISITE)
-               return (ISC_TF(rdclass == dns_rdataclass_any ||
-                              rdclass == dns_rdataclass_none));
+               return (rdclass == dns_rdataclass_any ||
+                        rdclass == dns_rdataclass_none);
        if (section == DNS_SECTION_UPDATE)
-               return (ISC_TF(rdclass == dns_rdataclass_any));
-       return (ISC_FALSE);
+               return (rdclass == dns_rdataclass_any);
+       return (false);
 }
 
 /*
  * Check to confirm that all DNSSEC records (DS, NSEC, NSEC3) have
  * covering RRSIGs.
  */
-static isc_boolean_t
+static bool
 auth_signed(dns_namelist_t *section) {
        dns_name_t *name;
 
@@ -1207,10 +1208,10 @@ auth_signed(dns_namelist_t *section) {
                }
 
                if (auth_dnssec != auth_rrsig)
-                       return (ISC_FALSE);
+                       return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -1230,28 +1231,28 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
        dns_rdata_t *rdata;
        dns_ttl_t ttl;
        dns_namelist_t *section;
-       isc_boolean_t free_name = ISC_FALSE, free_rdataset = ISC_FALSE;
-       isc_boolean_t preserve_order, best_effort, seen_problem;
-       isc_boolean_t issigzero;
+       bool free_name = false, free_rdataset = false;
+       bool preserve_order, best_effort, seen_problem;
+       bool issigzero;
 
-       preserve_order = ISC_TF(options & DNS_MESSAGEPARSE_PRESERVEORDER);
-       best_effort = ISC_TF(options & DNS_MESSAGEPARSE_BESTEFFORT);
-       seen_problem = ISC_FALSE;
+       preserve_order = (options & DNS_MESSAGEPARSE_PRESERVEORDER);
+       best_effort = (options & DNS_MESSAGEPARSE_BESTEFFORT);
+       seen_problem = false;
 
        section = &msg->sections[sectionid];
 
        for (count = 0; count < msg->counts[sectionid]; count++) {
                int recstart = source->current;
-               isc_boolean_t skip_name_search, skip_type_search;
+               bool skip_name_search, skip_type_search;
 
-               skip_name_search = ISC_FALSE;
-               skip_type_search = ISC_FALSE;
-               free_rdataset = ISC_FALSE;
+               skip_name_search = false;
+               skip_type_search = false;
+               free_rdataset = false;
 
                name = isc_mempool_get(msg->namepool);
                if (name == NULL)
                        return (ISC_R_NOMEMORY);
-               free_name = ISC_TRUE;
+               free_name = true;
 
                offsets = newoffsets(msg);
                if (offsets == NULL) {
@@ -1331,8 +1332,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                            count != msg->counts[sectionid]  - 1)
                                DO_ERROR(DNS_R_BADTSIG);
                        msg->sigstart = recstart;
-                       skip_name_search = ISC_TRUE;
-                       skip_type_search = ISC_TRUE;
+                       skip_name_search = true;
+                       skip_type_search = true;
                } else if (rdtype == dns_rdatatype_opt) {
                        /*
                         * The name of an OPT record must be ".", it
@@ -1343,8 +1344,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                            sectionid != DNS_SECTION_ADDITIONAL ||
                            msg->opt != NULL)
                                DO_ERROR(DNS_R_FORMERR);
-                       skip_name_search = ISC_TRUE;
-                       skip_type_search = ISC_TRUE;
+                       skip_name_search = true;
+                       skip_type_search = true;
                } else if (rdtype == dns_rdatatype_tkey) {
                        /*
                         * A TKEY must be in the additional section if this
@@ -1416,7 +1417,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                if (result != ISC_R_SUCCESS)
                        goto cleanup;
                rdata->rdclass = rdclass;
-               issigzero = ISC_FALSE;
+               issigzero = false;
                if (rdtype == dns_rdatatype_rrsig &&
                    rdata->flags == 0) {
                        covers = dns_rdata_covers(rdata);
@@ -1430,9 +1431,9 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                                    count != msg->counts[sectionid]  - 1)
                                        DO_ERROR(DNS_R_BADSIG0);
                                msg->sigstart = recstart;
-                               skip_name_search = ISC_TRUE;
-                               skip_type_search = ISC_TRUE;
-                               issigzero = ISC_TRUE;
+                               skip_name_search = true;
+                               skip_type_search = true;
+                               issigzero = true;
                        } else {
                                if (msg->rdclass != dns_rdataclass_any &&
                                    msg->rdclass != rdclass)
@@ -1446,7 +1447,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                 */
                if (rdtype == dns_rdatatype_nsec3 &&
                    !dns_rdata_checkowner(name, msg->rdclass, rdtype,
-                                         ISC_FALSE)) {
+                                         false)) {
                        result = DNS_R_BADOWNERNAME;
                        goto cleanup;
                }
@@ -1463,7 +1464,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                            !issigzero)
                        {
                                ISC_LIST_APPEND(*section, name, link);
-                               free_name = ISC_FALSE;
+                               free_name = false;
                        }
                } else {
                        /*
@@ -1483,7 +1484,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                        } else {
                                ISC_LIST_APPEND(*section, name, link);
                        }
-                       free_name = ISC_FALSE;
+                       free_name = false;
                }
 
                /*
@@ -1535,7 +1536,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                                result = ISC_R_NOMEMORY;
                                goto cleanup;
                        }
-                       free_rdataset = ISC_TRUE;
+                       free_rdataset = true;
 
                        rdatalist = newrdatalist(msg);
                        if (rdatalist == NULL) {
@@ -1559,7 +1560,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                            !issigzero)
                        {
                                ISC_LIST_APPEND(name->list, rdataset, link);
-                               free_rdataset = ISC_FALSE;
+                               free_rdataset = false;
                        }
                }
 
@@ -1594,27 +1595,27 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
 
                        msg->opt = rdataset;
                        rdataset = NULL;
-                       free_rdataset = ISC_FALSE;
+                       free_rdataset = false;
                        ercode = (dns_rcode_t)
                                ((msg->opt->ttl & DNS_MESSAGE_EDNSRCODE_MASK)
                                 >> 20);
                        msg->rcode |= ercode;
                        isc_mempool_put(msg->namepool, name);
-                       free_name = ISC_FALSE;
+                       free_name = false;
                } else if (issigzero && msg->sig0 == NULL) {
                        msg->sig0 = rdataset;
                        msg->sig0name = name;
                        rdataset = NULL;
-                       free_rdataset = ISC_FALSE;
-                       free_name = ISC_FALSE;
+                       free_rdataset = false;
+                       free_name = false;
                } else if (rdtype == dns_rdatatype_tsig && msg->tsig == NULL) {
                        msg->tsig = rdataset;
                        msg->tsigname = name;
                        /* Windows doesn't like TSIG names to be compressed. */
                        msg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
                        rdataset = NULL;
-                       free_rdataset = ISC_FALSE;
-                       free_name = ISC_FALSE;
+                       free_rdataset = false;
+                       free_name = false;
                }
 
                if (seen_problem) {
@@ -1622,10 +1623,10 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                                isc_mempool_put(msg->namepool, name);
                        if (free_rdataset)
                                isc_mempool_put(msg->rdspool, rdataset);
-                       free_name = free_rdataset = ISC_FALSE;
+                       free_name = free_rdataset = false;
                }
-               INSIST(free_name == ISC_FALSE);
-               INSIST(free_rdataset == ISC_FALSE);
+               INSIST(free_name == false);
+               INSIST(free_rdataset == false);
        }
 
        /*
@@ -1663,15 +1664,15 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
        isc_result_t ret;
        uint16_t tmpflags;
        isc_buffer_t origsource;
-       isc_boolean_t seen_problem;
-       isc_boolean_t ignore_tc;
+       bool seen_problem;
+       bool ignore_tc;
 
        REQUIRE(DNS_MESSAGE_VALID(msg));
        REQUIRE(source != NULL);
        REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTPARSE);
 
-       seen_problem = ISC_FALSE;
-       ignore_tc = ISC_TF(options & DNS_MESSAGEPARSE_IGNORETRUNCATION);
+       seen_problem = false;
+       ignore_tc = (options & DNS_MESSAGEPARSE_IGNORETRUNCATION);
 
        origsource = *source;
 
@@ -1707,7 +1708,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
        if (ret == ISC_R_UNEXPECTEDEND && ignore_tc)
                goto truncated;
        if (ret == DNS_R_RECOVERABLE) {
-               seen_problem = ISC_TRUE;
+               seen_problem = true;
                ret = ISC_R_SUCCESS;
        }
        if (ret != ISC_R_SUCCESS)
@@ -1718,7 +1719,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
        if (ret == ISC_R_UNEXPECTEDEND && ignore_tc)
                goto truncated;
        if (ret == DNS_R_RECOVERABLE) {
-               seen_problem = ISC_TRUE;
+               seen_problem = true;
                ret = ISC_R_SUCCESS;
        }
        if (ret != ISC_R_SUCCESS)
@@ -1728,7 +1729,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
        if (ret == ISC_R_UNEXPECTEDEND && ignore_tc)
                goto truncated;
        if (ret == DNS_R_RECOVERABLE) {
-               seen_problem = ISC_TRUE;
+               seen_problem = true;
                ret = ISC_R_SUCCESS;
        }
        if (ret != ISC_R_SUCCESS)
@@ -1738,7 +1739,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
        if (ret == ISC_R_UNEXPECTEDEND && ignore_tc)
                goto truncated;
        if (ret == DNS_R_RECOVERABLE) {
-               seen_problem = ISC_TRUE;
+               seen_problem = true;
                ret = ISC_R_SUCCESS;
        }
        if (ret != ISC_R_SUCCESS)
@@ -1767,7 +1768,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
 
        if (ret == ISC_R_UNEXPECTEDEND && ignore_tc)
                return (DNS_R_RECOVERABLE);
-       if (seen_problem == ISC_TRUE)
+       if (seen_problem == true)
                return (DNS_R_RECOVERABLE);
        return (ISC_R_SUCCESS);
 }
@@ -1865,7 +1866,7 @@ dns_message_renderreserve(dns_message_t *msg, unsigned int space) {
        return (ISC_R_SUCCESS);
 }
 
-static inline isc_boolean_t
+static inline bool
 wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) {
        int pass_needed;
 
@@ -1873,7 +1874,7 @@ wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) {
         * If we are not rendering class IN, this ordering is bogus.
         */
        if (rds->rdclass != dns_rdataclass_in)
-               return (ISC_FALSE);
+               return (false);
 
        switch (rds->type) {
        case dns_rdatatype_a:
@@ -1892,52 +1893,52 @@ wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) {
        }
 
        if (pass_needed >= pass)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 #ifdef ALLOW_FILTER_AAAA
 /*
  * Decide whether to not answer with an AAAA record and its RRSIG
  */
-static inline isc_boolean_t
+static inline bool
 norender_rdataset(const dns_rdataset_t *rdataset, unsigned int options,
                  dns_section_t sectionid)
 {
        if (sectionid == DNS_SECTION_QUESTION)
-               return (ISC_FALSE);
+               return (false);
 
        switch (rdataset->type) {
        case dns_rdatatype_ns:
                if ((options & DNS_MESSAGERENDER_FILTER_AAAA) == 0 ||
                    sectionid != DNS_SECTION_AUTHORITY)
-                       return (ISC_FALSE);
+                       return (false);
                break;
 
        case dns_rdatatype_aaaa:
                if ((options & DNS_MESSAGERENDER_FILTER_AAAA) == 0)
-                       return (ISC_FALSE);
+                       return (false);
                break;
 
        case dns_rdatatype_rrsig:
                if ((options & DNS_MESSAGERENDER_FILTER_AAAA) == 0 ||
                    (rdataset->covers != dns_rdatatype_ns &&
                     rdataset->covers != dns_rdatatype_aaaa))
-                       return (ISC_FALSE);
+                       return (false);
                if ((rdataset->covers == dns_rdatatype_ns) &&
                    (sectionid != DNS_SECTION_AUTHORITY))
-                       return (ISC_FALSE);
+                       return (false);
                break;
 
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (rdataset->rdclass != dns_rdataclass_in)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 #endif
 
@@ -1982,7 +1983,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
        isc_result_t result;
        isc_buffer_t st; /* for rollbacks */
        int pass;
-       isc_boolean_t partial = ISC_FALSE;
+       bool partial = false;
        unsigned int rd_options;
        dns_rdatatype_t preferred_glue = 0;
 
@@ -2019,7 +2020,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
 
        total = 0;
        if (msg->reserved == 0 && (options & DNS_MESSAGERENDER_PARTIAL) != 0)
-               partial = ISC_TRUE;
+               partial = true;
 
        /*
         * Render required glue first.  Set TC if it won't fit.
@@ -2650,7 +2651,7 @@ dns_message_peekheader(isc_buffer_t *source, dns_messageid_t *idp,
 }
 
 isc_result_t
-dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) {
+dns_message_reply(dns_message_t *msg, bool want_question_section) {
        unsigned int clear_from;
        isc_result_t result;
 
@@ -2661,7 +2662,7 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) {
                return (DNS_R_FORMERR);
        if (msg->opcode != dns_opcode_query &&
            msg->opcode != dns_opcode_notify)
-               want_question_section = ISC_FALSE;
+               want_question_section = false;
        if (msg->opcode == dns_opcode_update)
                clear_from = DNS_SECTION_PREREQUISITE;
        else if (want_question_section) {
@@ -2673,7 +2674,7 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) {
        msg->from_to_wire = DNS_MESSAGE_INTENTRENDER;
        msgresetnames(msg, clear_from);
        msgresetopt(msg);
-       msgresetsigs(msg, ISC_TRUE);
+       msgresetsigs(msg, true);
        msginitprivate(msg);
        /*
         * We now clear most flags and then set QR, ensuring that the
@@ -3203,7 +3204,7 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view) {
                        return (DNS_R_KEYUNAUTHORIZED);
                result = dns_view_simplefind(view, &sig.signer,
                                             dns_rdatatype_key /* SIG(0) */,
-                                            0, 0, ISC_FALSE, &keyset, NULL);
+                                            0, 0, false, &keyset, NULL);
 
                if (result != ISC_R_SUCCESS) {
                        /* XXXBEW Should possibly create a fetch here */
@@ -3275,7 +3276,7 @@ dns_message_sectiontotext(dns_message_t *msg, dns_section_t section,
        dns_name_t *name, empty_name;
        dns_rdataset_t *rdataset;
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t seensoa = ISC_FALSE;
+       bool seensoa = false;
        unsigned int saveindent;
        dns_masterstyle_flags_t sflags;
 
@@ -3328,7 +3329,7 @@ dns_message_sectiontotext(dns_message_t *msg, dns_section_t section,
                                if (seensoa &&
                                    (flags & DNS_MESSAGETEXTFLAG_ONESOA) != 0)
                                        continue;
-                               seensoa = ISC_TRUE;
+                               seensoa = true;
                        }
                        if (section == DNS_SECTION_QUESTION) {
                                INDENT(style);
@@ -3549,7 +3550,7 @@ dns_message_pseudosectiontoyaml(dns_message_t *msg,
                                        ADD_STRING(target, buf);
                                        ADD_STRING(target, " (");
                                        result = dns_ttl_totext(secs,
-                                                               ISC_TRUE,
+                                                               true,
                                                                target);
                                        if (result != ISC_R_SUCCESS)
                                                goto cleanup;
@@ -3799,7 +3800,7 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
                                        ADD_STRING(target, buf);
                                        ADD_STRING(target, " (");
                                        result = dns_ttl_totext(secs,
-                                                               ISC_TRUE,
+                                                               true,
                                                                target);
                                        if (result != ISC_R_SUCCESS)
                                                return (result);
index 584f1db2cc3b23ec8c3a18753a68e142dd39f994..66040fbaea3384ff37f41a24eff4acfeafafd111 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -163,7 +164,7 @@ static dns_name_t wild =
 LIBDNS_EXTERNAL_DATA dns_name_t *dns_wildcardname = &wild;
 
 unsigned int
-dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive);
+dns_fullname_hash(dns_name_t *name, bool case_sensitive);
 
 /*
  * dns_name_t to text post-conversion procedure.
@@ -216,16 +217,16 @@ dns_name_invalidate(dns_name_t *name) {
        ISC_LINK_INIT(name, link);
 }
 
-isc_boolean_t
+bool
 dns_name_isvalid(const dns_name_t *name) {
        unsigned char *ndata, *offsets;
        unsigned int offset, count, length, nlabels;
 
        if (!VALID_NAME(name))
-               return (ISC_FALSE);
+               return (false);
 
        if (name->length > 255U || name->labels > 127U)
-               return (ISC_FALSE);
+               return (false);
 
        ndata = name->ndata;
        length = name->length;
@@ -236,24 +237,24 @@ dns_name_isvalid(const dns_name_t *name) {
        while (offset != length) {
                count = *ndata;
                if (count > 63U)
-                       return (ISC_FALSE);
+                       return (false);
                if (offsets != NULL && offsets[nlabels] != offset)
-                       return (ISC_FALSE);
+                       return (false);
 
                nlabels++;
                offset += count + 1;
                ndata += count + 1;
                if (offset > length)
-                       return (ISC_FALSE);
+                       return (false);
 
                if (count == 0)
                        break;
        }
 
        if (nlabels != name->labels || offset != name->length)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 void
@@ -269,7 +270,7 @@ dns_name_setbuffer(dns_name_t *name, isc_buffer_t *buffer) {
        name->buffer = buffer;
 }
 
-isc_boolean_t
+bool
 dns_name_hasbuffer(const dns_name_t *name) {
        /*
         * Does 'name' have a dedicated buffer?
@@ -278,12 +279,12 @@ dns_name_hasbuffer(const dns_name_t *name) {
        REQUIRE(VALID_NAME(name));
 
        if (name->buffer != NULL)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_name_isabsolute(const dns_name_t *name) {
 
        /*
@@ -293,8 +294,8 @@ dns_name_isabsolute(const dns_name_t *name) {
        REQUIRE(VALID_NAME(name));
 
        if ((name->attributes & DNS_NAMEATTR_ABSOLUTE) != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 #define hyphenchar(c) ((c) == 0x2d)
@@ -306,11 +307,11 @@ dns_name_isabsolute(const dns_name_t *name) {
 #define middlechar(c) (borderchar(c) || hyphenchar(c))
 #define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
 
-isc_boolean_t
+bool
 dns_name_ismailbox(const dns_name_t *name) {
        unsigned char *ndata, ch;
        unsigned int n;
-       isc_boolean_t first;
+       bool first;
 
        REQUIRE(VALID_NAME(name));
        REQUIRE(name->labels > 0);
@@ -320,7 +321,7 @@ dns_name_ismailbox(const dns_name_t *name) {
         * Root label.
         */
        if (name->length == 1)
-               return (ISC_TRUE);
+               return (true);
 
        ndata = name->ndata;
        n = *ndata++;
@@ -328,11 +329,11 @@ dns_name_ismailbox(const dns_name_t *name) {
        while (n--) {
                ch = *ndata++;
                if (!domainchar(ch))
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        if (ndata == name->ndata + name->length)
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * RFC292/RFC1123 hostname.
@@ -340,27 +341,27 @@ dns_name_ismailbox(const dns_name_t *name) {
        while (ndata < (name->ndata + name->length)) {
                n = *ndata++;
                INSIST(n <= 63);
-               first = ISC_TRUE;
+               first = true;
                while (n--) {
                        ch = *ndata++;
                        if (first || n == 0) {
                                if (!borderchar(ch))
-                                       return (ISC_FALSE);
+                                       return (false);
                        } else {
                                if (!middlechar(ch))
-                                       return (ISC_FALSE);
+                                       return (false);
                        }
-                       first = ISC_FALSE;
+                       first = false;
                }
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
-dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard) {
+bool
+dns_name_ishostname(const dns_name_t *name, bool wildcard) {
        unsigned char *ndata, ch;
        unsigned int n;
-       isc_boolean_t first;
+       bool first;
 
        REQUIRE(VALID_NAME(name));
        REQUIRE(name->labels > 0);
@@ -370,7 +371,7 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard) {
         * Root label.
         */
        if (name->length == 1)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Skip wildcard if this is a ownername.
@@ -385,23 +386,23 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard) {
        while (ndata < (name->ndata + name->length)) {
                n = *ndata++;
                INSIST(n <= 63);
-               first = ISC_TRUE;
+               first = true;
                while (n--) {
                        ch = *ndata++;
                        if (first || n == 0) {
                                if (!borderchar(ch))
-                                       return (ISC_FALSE);
+                                       return (false);
                        } else {
                                if (!middlechar(ch))
-                                       return (ISC_FALSE);
+                                       return (false);
                        }
-                       first = ISC_FALSE;
+                       first = false;
                }
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dns_name_iswildcard(const dns_name_t *name) {
        unsigned char *ndata;
 
@@ -415,13 +416,13 @@ dns_name_iswildcard(const dns_name_t *name) {
        if (name->length >= 2) {
                ndata = name->ndata;
                if (ndata[0] == 1 && ndata[1] == '*')
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_name_internalwildcard(const dns_name_t *name) {
        unsigned char *ndata;
        unsigned int count;
@@ -449,15 +450,15 @@ dns_name_internalwildcard(const dns_name_t *name) {
                count = *ndata++;
                INSIST(count <= 63);
                if (count == 1 && *ndata == '*')
-                       return (ISC_TRUE);
+                       return (true);
                ndata += count;
                label++;
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 unsigned int
-dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
+dns_name_hash(dns_name_t *name, bool case_sensitive) {
        unsigned int length;
 
        /*
@@ -477,7 +478,7 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
 }
 
 unsigned int
-dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive) {
+dns_name_fullhash(dns_name_t *name, bool case_sensitive) {
        /*
         * Provide a hash value for 'name'.
         */
@@ -491,7 +492,7 @@ dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive) {
 }
 
 unsigned int
-dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
+dns_fullname_hash(dns_name_t *name, bool case_sensitive) {
        /*
         * This function was deprecated due to the breakage of the name space
         * convention.  We only keep this internally to provide binary backward
@@ -501,7 +502,7 @@ dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
 }
 
 unsigned int
-dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive) {
+dns_name_hashbylabel(dns_name_t *name, bool case_sensitive) {
        unsigned char *offsets;
        dns_offsets_t odata;
        dns_name_t tname;
@@ -695,7 +696,7 @@ dns_name_compare(const dns_name_t *name1, const dns_name_t *name2) {
        return (order);
 }
 
-isc_boolean_t
+bool
 dns_name_equal(const dns_name_t *name1, const dns_name_t *name2) {
        unsigned int l, count;
        unsigned char c;
@@ -719,22 +720,22 @@ dns_name_equal(const dns_name_t *name1, const dns_name_t *name2) {
                (name2->attributes & DNS_NAMEATTR_ABSOLUTE));
 
        if (ISC_UNLIKELY(name1 == name2))
-               return (ISC_TRUE);
+               return (true);
 
        if (name1->length != name2->length)
-               return (ISC_FALSE);
+               return (false);
 
        l = name1->labels;
 
        if (l != name2->labels)
-               return (ISC_FALSE);
+               return (false);
 
        label1 = name1->ndata;
        label2 = name2->ndata;
        while (ISC_LIKELY(l-- > 0)) {
                count = *label1++;
                if (count != *label2++)
-                       return (ISC_FALSE);
+                       return (false);
 
                INSIST(count <= 63); /* no bitstring support */
 
@@ -742,16 +743,16 @@ dns_name_equal(const dns_name_t *name1, const dns_name_t *name2) {
                while (ISC_LIKELY(count > 3)) {
                        c = maptolower[label1[0]];
                        if (c != maptolower[label2[0]])
-                               return (ISC_FALSE);
+                               return (false);
                        c = maptolower[label1[1]];
                        if (c != maptolower[label2[1]])
-                               return (ISC_FALSE);
+                               return (false);
                        c = maptolower[label1[2]];
                        if (c != maptolower[label2[2]])
-                               return (ISC_FALSE);
+                               return (false);
                        c = maptolower[label1[3]];
                        if (c != maptolower[label2[3]])
-                               return (ISC_FALSE);
+                               return (false);
                        count -= 4;
                        label1 += 4;
                        label2 += 4;
@@ -759,14 +760,14 @@ dns_name_equal(const dns_name_t *name1, const dns_name_t *name2) {
                while (ISC_LIKELY(count-- > 0)) {
                        c = maptolower[*label1++];
                        if (c != maptolower[*label2++])
-                               return (ISC_FALSE);
+                               return (false);
                }
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dns_name_caseequal(const dns_name_t *name1, const dns_name_t *name2) {
 
        /*
@@ -787,12 +788,12 @@ dns_name_caseequal(const dns_name_t *name1, const dns_name_t *name2) {
                (name2->attributes & DNS_NAMEATTR_ABSOLUTE));
 
        if (name1->length != name2->length)
-               return (ISC_FALSE);
+               return (false);
 
        if (memcmp(name1->ndata, name2->ndata, name1->length) != 0)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 int
@@ -853,7 +854,7 @@ dns_name_rdatacompare(const dns_name_t *name1, const dns_name_t *name2) {
        return (0);
 }
 
-isc_boolean_t
+bool
 dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2) {
        int order;
        unsigned int nlabels;
@@ -871,12 +872,12 @@ dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2) {
        namereln = dns_name_fullcompare(name1, name2, &order, &nlabels);
        if (namereln == dns_namereln_subdomain ||
            namereln == dns_namereln_equal)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname) {
        int order;
        unsigned int nlabels, labels;
@@ -897,8 +898,8 @@ dns_name_matcheswildcard(const dns_name_t *name, const dns_name_t *wname) {
        dns_name_getlabelsequence(wname, 1, labels - 1, &tname);
        if (dns_name_fullcompare(name, &tname, &order, &nlabels) ==
            dns_namereln_subdomain)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 unsigned int
@@ -1093,10 +1094,10 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
        unsigned int value = 0, count = 0;
        unsigned int n1 = 0, n2 = 0;
        unsigned int tlen, nrem, nused, digits = 0, labels, tused;
-       isc_boolean_t done;
+       bool done;
        unsigned char *offsets;
        dns_offsets_t odata;
-       isc_boolean_t downcase;
+       bool downcase;
 
        /*
         * Convert the textual representation of a DNS name at source
@@ -1113,7 +1114,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
        REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
                (target == NULL && ISC_BUFFER_VALID(name->buffer)));
 
-       downcase = ISC_TF((options & DNS_NAME_DOWNCASE) != 0);
+       downcase = (options & DNS_NAME_DOWNCASE);
 
        if (target == NULL && name->buffer != NULL) {
                target = name->buffer;
@@ -1142,7 +1143,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                nrem = 255;
        nused = 0;
        labels = 0;
-       done = ISC_FALSE;
+       done = false;
        state = ft_init;
 
        while (nrem > 0 && tlen > 0 && !done) {
@@ -1162,7 +1163,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                                *ndata++ = 0;
                                nrem--;
                                nused++;
-                               done = ISC_TRUE;
+                               done = true;
                                break;
                        }
                        if (c == '@' && tlen == 0) {
@@ -1198,7 +1199,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
                                        *ndata++ = 0;
                                        nrem--;
                                        nused++;
-                                       done = ISC_TRUE;
+                                       done = true;
                                }
                                state = ft_start;
                        } else if (c == '\\') {
@@ -1359,7 +1360,7 @@ totext_filter_proc_key_init(void) {
                if (result != ISC_R_SUCCESS)
                        goto unlock;
                isc_mem_setname(thread_key_mctx, "threadkey", NULL);
-               isc_mem_setdestroycheck(thread_key_mctx, ISC_FALSE);
+               isc_mem_setdestroycheck(thread_key_mctx, false);
 
                if (!thread_key_initialized &&
                     isc_thread_key_create(&totext_filter_proc_key,
@@ -1376,7 +1377,7 @@ totext_filter_proc_key_init(void) {
 #endif
 
 isc_result_t
-dns_name_totext(const dns_name_t *name, isc_boolean_t omit_final_dot,
+dns_name_totext(const dns_name_t *name, bool omit_final_dot,
                isc_buffer_t *target)
 {
        unsigned int options = DNS_NAME_MASTERFILE;
@@ -1401,15 +1402,14 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
        unsigned char c;
        unsigned int trem, count;
        unsigned int labels;
-       isc_boolean_t saw_root = ISC_FALSE;
+       bool saw_root = false;
        unsigned int oused = target->used;
 #ifdef ISC_PLATFORM_USETHREADS
        dns_name_totextfilter_t *mem;
        dns_name_totextfilter_t totext_filter_proc = NULL;
        isc_result_t result;
 #endif
-       isc_boolean_t omit_final_dot =
-               ISC_TF(options & DNS_NAME_OMITFINALDOT);
+       bool omit_final_dot = (options & DNS_NAME_OMITFINALDOT);
 
        /*
         * This function assumes the name is in proper uncompressed
@@ -1445,8 +1445,8 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
                 * They need to be set this way, though, to keep the "@"
                 * from being trounced.
                 */
-               saw_root = ISC_TRUE;
-               omit_final_dot = ISC_FALSE;
+               saw_root = true;
+               omit_final_dot = false;
                *tdata++ = '@';
                trem--;
 
@@ -1461,8 +1461,8 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
                if (trem == 0)
                        return (ISC_R_NOSPACE);
 
-               saw_root = ISC_TRUE;
-               omit_final_dot = ISC_FALSE;
+               saw_root = true;
+               omit_final_dot = false;
                *tdata++ = '.';
                trem--;
 
@@ -1477,7 +1477,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
                count = *ndata++;
                nlen--;
                if (count == 0) {
-                       saw_root = ISC_TRUE;
+                       saw_root = true;
                        break;
                }
                if (count < 64) {
@@ -1574,7 +1574,7 @@ dns_name_totext2(const dns_name_t *name, unsigned int options,
 }
 
 isc_result_t
-dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot,
+dns_name_tofilenametext(dns_name_t *name, bool omit_final_dot,
                        isc_buffer_t *target)
 {
        unsigned char *ndata;
@@ -1607,7 +1607,7 @@ dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot,
                if (trem == 0)
                        return (ISC_R_NOSPACE);
 
-               omit_final_dot = ISC_FALSE;
+               omit_final_dot = false;
                *tdata++ = '.';
                trem--;
 
@@ -1762,13 +1762,13 @@ set_offsets(const dns_name_t *name, unsigned char *offsets,
 {
        unsigned int offset, count, length, nlabels;
        unsigned char *ndata;
-       isc_boolean_t absolute;
+       bool absolute;
 
        ndata = name->ndata;
        length = name->length;
        offset = 0;
        nlabels = 0;
-       absolute = ISC_FALSE;
+       absolute = false;
        while (ISC_LIKELY(offset != length)) {
                INSIST(nlabels < 128);
                offsets[nlabels++] = offset;
@@ -1778,7 +1778,7 @@ set_offsets(const dns_name_t *name, unsigned char *offsets,
                ndata += count + 1;
                INSIST(offset <= length);
                if (ISC_UNLIKELY(count == 0)) {
-                       absolute = ISC_TRUE;
+                       absolute = true;
                        break;
                }
        }
@@ -1805,13 +1805,13 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
        unsigned int cused; /* Bytes of compressed name data used */
        unsigned int nused, labels, n, nmax;
        unsigned int current, new_current, biggest_pointer;
-       isc_boolean_t done;
+       bool done;
        fw_state state = fw_start;
        unsigned int c;
        unsigned char *offsets;
        dns_offsets_t odata;
-       isc_boolean_t downcase;
-       isc_boolean_t seen_pointer;
+       bool downcase;
+       bool seen_pointer;
 
        /*
         * Copy the possibly-compressed name at source into target,
@@ -1823,7 +1823,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
        REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
                (target == NULL && ISC_BUFFER_VALID(name->buffer)));
 
-       downcase = ISC_TF((options & DNS_NAME_DOWNCASE) != 0);
+       downcase = (options & DNS_NAME_DOWNCASE);
 
        if (target == NULL && name->buffer != NULL) {
                target = name->buffer;
@@ -1850,11 +1850,11 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
         * Set up.
         */
        labels = 0;
-       done = ISC_FALSE;
+       done = false;
 
        ndata = isc_buffer_used(target);
        nused = 0;
-       seen_pointer = ISC_FALSE;
+       seen_pointer = false;
 
        /*
         * Find the maximum number of uncompressed target name
@@ -1893,7 +1893,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
                                nused += c + 1;
                                *ndata++ = c;
                                if (c == 0)
-                                       done = ISC_TRUE;
+                                       done = true;
                                n = c;
                                state = fw_ordinary;
                        } else if (c >= 128 && c < 192) {
@@ -1931,7 +1931,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
                        biggest_pointer = new_current;
                        current = new_current;
                        cdata = (unsigned char *)source->base + current;
-                       seen_pointer = ISC_TRUE;
+                       seen_pointer = true;
                        state = fw_start;
                        break;
                default:
@@ -1976,7 +1976,7 @@ dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
        unsigned int methods;
        uint16_t offset;
        dns_name_t gp;  /* Global compression prefix */
-       isc_boolean_t gf;       /* Global compression target found */
+       bool gf;        /* Global compression target found */
        uint16_t go;    /* Global compression offset */
        dns_offsets_t clo;
        dns_name_t clname;
@@ -2013,20 +2013,20 @@ dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
            (methods & DNS_COMPRESS_GLOBAL14) != 0)
                gf = dns_compress_findglobal(cctx, name, &gp, &go);
        else
-               gf = ISC_FALSE;
+               gf = false;
 
        /*
         * If the offset is too high for 14 bit global compression, we're
         * out of luck.
         */
        if (gf && go >= 0x4000)
-               gf = ISC_FALSE;
+               gf = false;
 
        /*
         * Will the compression pointer reduce the message size?
         */
        if (gf && (gp.length + 2) >= name->length)
-               gf = ISC_FALSE;
+               gf = false;
 
        if (gf) {
                if (target->length - target->used < gp.length)
@@ -2063,9 +2063,9 @@ dns_name_concatenate(dns_name_t *prefix, dns_name_t *suffix, dns_name_t *name,
 {
        unsigned char *ndata, *offsets;
        unsigned int nrem, labels, prefix_length, length;
-       isc_boolean_t copy_prefix = ISC_TRUE;
-       isc_boolean_t copy_suffix = ISC_TRUE;
-       isc_boolean_t absolute = ISC_FALSE;
+       bool copy_prefix = true;
+       bool copy_suffix = true;
+       bool absolute = false;
        dns_name_t tmp_name;
        dns_offsets_t odata;
 
@@ -2079,12 +2079,12 @@ dns_name_concatenate(dns_name_t *prefix, dns_name_t *suffix, dns_name_t *name,
        REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
                (target == NULL && name != NULL && ISC_BUFFER_VALID(name->buffer)));
        if (prefix == NULL || prefix->labels == 0)
-               copy_prefix = ISC_FALSE;
+               copy_prefix = false;
        if (suffix == NULL || suffix->labels == 0)
-               copy_suffix = ISC_FALSE;
+               copy_suffix = false;
        if (copy_prefix &&
            (prefix->attributes & DNS_NAMEATTR_ABSOLUTE) != 0) {
-               absolute = ISC_TRUE;
+               absolute = true;
                REQUIRE(!copy_suffix);
        }
        if (name == NULL) {
@@ -2129,7 +2129,7 @@ dns_name_concatenate(dns_name_t *prefix, dns_name_t *suffix, dns_name_t *name,
 
        if (copy_suffix) {
                if ((suffix->attributes & DNS_NAMEATTR_ABSOLUTE) != 0)
-                       absolute = ISC_TRUE;
+                       absolute = true;
                memmove(ndata + prefix_length, suffix->ndata, suffix->length);
        }
 
@@ -2320,7 +2320,7 @@ dns_name_digest(dns_name_t *name, dns_digestfunc_t digest, void *arg) {
        return ((digest)(arg, &r));
 }
 
-isc_boolean_t
+bool
 dns_name_dynamic(dns_name_t *name) {
        REQUIRE(VALID_NAME(name));
 
@@ -2329,7 +2329,7 @@ dns_name_dynamic(dns_name_t *name) {
         */
 
        return ((name->attributes & DNS_NAMEATTR_DYNAMIC) != 0 ?
-               ISC_TRUE : ISC_FALSE);
+               true : false);
 }
 
 isc_result_t
@@ -2346,7 +2346,7 @@ dns_name_print(dns_name_t *name, FILE *stream) {
        REQUIRE(VALID_NAME(name));
 
        isc_buffer_init(&b, t, sizeof(t));
-       result = dns_name_totext(name, ISC_FALSE, &b);
+       result = dns_name_totext(name, false, &b);
        if (result != ISC_R_SUCCESS)
                return (result);
        isc_buffer_usedregion(&b, &r);
@@ -2410,7 +2410,7 @@ dns_name_format(const dns_name_t *name, char *cp, unsigned int size) {
         * Leave room for null termination after buffer.
         */
        isc_buffer_init(&buf, cp, size - 1);
-       result = dns_name_totext(name, ISC_TRUE, &buf);
+       result = dns_name_totext(name, true, &buf);
        if (result == ISC_R_SUCCESS) {
                /*
                 * Null terminate.
@@ -2438,7 +2438,7 @@ dns_name_tostring(dns_name_t *name, char **target, isc_mem_t *mctx) {
        REQUIRE(target != NULL && *target == NULL);
 
        isc_buffer_init(&buf, txt, sizeof(txt));
-       result = dns_name_totext(name, ISC_FALSE, &buf);
+       result = dns_name_totext(name, false, &buf);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -2583,7 +2583,7 @@ static dns_name_t const dns_sd[] = {
        DNS_NAME_INITNONABSOLUTE(lb_dns_sd_udp_data, lb_dns_sd_udp_offsets)
 };
 
-isc_boolean_t
+bool
 dns_name_isdnssd(const dns_name_t *name) {
        size_t i;
        dns_name_t prefix;
@@ -2593,10 +2593,10 @@ dns_name_isdnssd(const dns_name_t *name) {
                dns_name_getlabelsequence(name, 0, 3, &prefix);
                for (i = 0; i < (sizeof(dns_sd)/sizeof(dns_sd[0])); i++)
                        if (dns_name_equal(&prefix, &dns_sd[i]))
-                               return (ISC_TRUE);
+                               return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static unsigned char inaddr10_offsets[] = { 0, 3, 11, 16 };
@@ -2645,14 +2645,14 @@ static dns_name_t const rfc1918names[] = {
        DNS_NAME_INITABSOLUTE(inaddr168192, inaddr192_offsets)
 };
 
-isc_boolean_t
+bool
 dns_name_isrfc1918(const dns_name_t *name) {
        size_t i;
 
        for (i = 0; i < (sizeof(rfc1918names)/sizeof(*rfc1918names)); i++)
                if (dns_name_issubdomain(name, &rfc1918names[i]))
-                       return (ISC_TRUE);
-       return (ISC_FALSE);
+                       return (true);
+       return (false);
 }
 
 static unsigned char ulaoffsets[] = { 0, 2, 4, 8, 13 };
@@ -2664,14 +2664,14 @@ static dns_name_t const ulanames[] = {
        DNS_NAME_INITABSOLUTE(ip6fd, ulaoffsets)
 };
 
-isc_boolean_t
+bool
 dns_name_isula(const dns_name_t *name) {
        size_t i;
 
        for (i = 0; i < (sizeof(ulanames)/sizeof(*ulanames)); i++)
                if (dns_name_issubdomain(name, &ulanames[i]))
-                       return (ISC_TRUE);
-       return (ISC_FALSE);
+                       return (true);
+       return (false);
 }
 
 /*
@@ -2690,7 +2690,7 @@ ishex[256] = {
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
-isc_boolean_t
+bool
 dns_name_istat(const dns_name_t *name) {
        unsigned char len;
        const unsigned char *ndata;
@@ -2698,7 +2698,7 @@ dns_name_istat(const dns_name_t *name) {
        REQUIRE(VALID_NAME(name));
 
        if (name->labels < 1)
-               return (ISC_FALSE);
+               return (false);
 
        ndata = name->ndata;
        len = ndata[0];
@@ -2710,13 +2710,13 @@ dns_name_istat(const dns_name_t *name) {
         * label length consistent with a trust-anchor-telemetry label.
         */
        if ((len < 8) || (len - 3) % 5 != 0) {
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (ndata[0] != '_' ||
            maptolower[ndata[1]] != 't' ||
            maptolower[ndata[2]] != 'a') {
-               return (ISC_FALSE);
+               return (false);
        }
        ndata += 3;
        len -= 3;
@@ -2725,10 +2725,10 @@ dns_name_istat(const dns_name_t *name) {
                INSIST(len >= 5);
                if (ndata[0] != '-' || !ishex[ndata[1]] || !ishex[ndata[2]] ||
                    !ishex[ndata[3]] || !ishex[ndata[4]]) {
-                       return (ISC_FALSE);
+                       return (false);
                }
                ndata += 5;
                len -= 5;
        }
-       return (ISC_TRUE);
+       return (true);
 }
index 5115fb0dda2f5b1b85d402fae626f7fe950b3f8d..c5078dedfbac988b981d0e1559bd43a4232382f0 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/util.h>
@@ -45,7 +46,7 @@
 static isc_result_t
 addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
          dns_rdatatype_t covers, isc_stdtime_t now, dns_ttl_t maxttl,
-         isc_boolean_t optout, isc_boolean_t secure,
+         bool optout, bool secure,
          dns_rdataset_t *addedrdataset);
 
 static inline isc_result_t
@@ -98,23 +99,23 @@ dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
               dns_rdataset_t *addedrdataset)
 {
        return (addoptout(message, cache, node, covers, now, maxttl,
-                         ISC_FALSE, ISC_FALSE, addedrdataset));
+                         false, false, addedrdataset));
 }
 
 isc_result_t
 dns_ncache_addoptout(dns_message_t *message, dns_db_t *cache,
                     dns_dbnode_t *node, dns_rdatatype_t covers,
                     isc_stdtime_t now, dns_ttl_t maxttl,
-                    isc_boolean_t optout, dns_rdataset_t *addedrdataset)
+                    bool optout, dns_rdataset_t *addedrdataset)
 {
        return (addoptout(message, cache, node, covers, now, maxttl,
-                         optout, ISC_TRUE, addedrdataset));
+                         optout, true, addedrdataset));
 }
 
 static isc_result_t
 addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
          dns_rdatatype_t covers, isc_stdtime_t now, dns_ttl_t maxttl,
-         isc_boolean_t optout, isc_boolean_t secure,
+         bool optout, bool secure,
          dns_rdataset_t *addedrdataset)
 {
        isc_result_t result;
index dbe511383b9e9fbc5125a98062b13ff0aafcd9ee..d0f0705fe7f49990912340892c1919b18dba4389 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/log.h>
 #include <isc/string.h>
 #include <isc/util.h>
@@ -48,7 +50,7 @@ dns_nsec_setbit(unsigned char *array, unsigned int type, unsigned int bit) {
                array[type / 8] &= (~mask & 0xFF);
 }
 
-isc_boolean_t
+bool
 dns_nsec_isset(const unsigned char *array, unsigned int type) {
        unsigned int byte, shift, mask;
 
@@ -56,7 +58,7 @@ dns_nsec_isset(const unsigned char *array, unsigned int type) {
        shift = 7 - (type % 8);
        mask = 1 << shift;
 
-       return (ISC_TF(byte & mask));
+       return (byte & mask);
 }
 
 unsigned int
@@ -199,11 +201,11 @@ dns_nsec_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type) {
        dns_rdata_nsec_t nsecstruct;
        isc_result_t result;
-       isc_boolean_t present;
+       bool present;
        unsigned int i, len, window;
 
        REQUIRE(nsec != NULL);
@@ -213,7 +215,7 @@ dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type) {
        result = dns_rdata_tostruct(nsec, &nsecstruct, NULL);
        INSIST(result == ISC_R_SUCCESS);
 
-       present = ISC_FALSE;
+       present = false;
        for (i = 0; i < nsecstruct.len; i += len) {
                INSIST(i + 2 <= nsecstruct.len);
                window = nsecstruct.typebits[i];
@@ -226,8 +228,8 @@ dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type) {
                if ((window + 1) * 256 <= type)
                        continue;
                if (type < (window * 256) + len * 8)
-                       present = ISC_TF(dns_nsec_isset(&nsecstruct.typebits[i],
-                                                       type % 256));
+                       present = dns_nsec_isset(&nsecstruct.typebits[i],
+                                                type % 256);
                break;
        }
        dns_rdata_freestruct(&nsecstruct);
@@ -236,7 +238,7 @@ dns_nsec_typepresent(dns_rdata_t *nsec, dns_rdatatype_t type) {
 
 isc_result_t
 dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version,
-                 isc_boolean_t *answer)
+                 bool *answer)
 {
        dns_dbnode_t *node = NULL;
        dns_rdataset_t rdataset;
@@ -256,7 +258,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version,
        dns_db_detachnode(db, &node);
 
        if (result == ISC_R_NOTFOUND)
-               *answer = ISC_FALSE;
+               *answer = false;
        if (result != ISC_R_SUCCESS)
                return (result);
        for (result = dns_rdataset_first(&rdataset);
@@ -276,9 +278,9 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version,
        }
        dns_rdataset_disassociate(&rdataset);
        if (result == ISC_R_SUCCESS)
-               *answer = ISC_TRUE;
+               *answer = true;
        if (result == ISC_R_NOMORE) {
-               *answer = ISC_FALSE;
+               *answer = false;
                result = ISC_R_SUCCESS;
        }
        return (result);
@@ -294,7 +296,7 @@ dns_nsec_nseconly(dns_db_t *db, dns_dbversion_t *version,
 isc_result_t
 dns_nsec_noexistnodata(dns_rdatatype_t type, dns_name_t *name,
                       dns_name_t *nsecname, dns_rdataset_t *nsecset,
-                      isc_boolean_t *exists, isc_boolean_t *data,
+                      bool *exists, bool *data,
                       dns_name_t *wild, dns_nseclog_t logit, void *arg)
 {
        int order;
@@ -303,9 +305,9 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, dns_name_t *name,
        dns_namereln_t relation;
        unsigned int olabels, nlabels, labels;
        dns_rdata_nsec_t nsec;
-       isc_boolean_t atparent;
-       isc_boolean_t ns;
-       isc_boolean_t soa;
+       bool atparent;
+       bool ns;
+       bool soa;
 
        REQUIRE(exists != NULL);
        REQUIRE(data != NULL);
@@ -362,7 +364,7 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, dns_name_t *name,
                if (type == dns_rdatatype_cname || type == dns_rdatatype_nxt ||
                    type == dns_rdatatype_nsec || type == dns_rdatatype_key ||
                    !dns_nsec_typepresent(&rdata, dns_rdatatype_cname)) {
-                       *exists = ISC_TRUE;
+                       *exists = true;
                        *data = dns_nsec_typepresent(&rdata, type);
                        (*logit)(arg, ISC_LOG_DEBUG(3),
                                      "nsec proves name exists (owner) data=%d",
@@ -411,8 +413,8 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, dns_name_t *name,
                (*logit)(arg, ISC_LOG_DEBUG(3),
                              "nsec proves name exist (empty)");
                dns_rdata_freestruct(&nsec);
-               *exists = ISC_TRUE;
-               *data = ISC_FALSE;
+               *exists = true;
+               *data = false;
                return (ISC_R_SUCCESS);
        }
        if (wild != NULL) {
@@ -438,6 +440,6 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, dns_name_t *name,
        }
        dns_rdata_freestruct(&nsec);
        (*logit)(arg, ISC_LOG_DEBUG(3), "nsec range ok");
-       *exists = ISC_FALSE;
+       *exists = false;
        return (ISC_R_SUCCESS);
 }
index 74fcbc43128a2c9ad6b9fb20fff1401a56d2cf68..e1278935a511df2a465a55b8b890cf3c26c404ac 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/base32.h>
 #include <isc/buffer.h>
@@ -63,9 +64,9 @@ dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version,
        dns_rdataset_t rdataset;
        isc_region_t r;
        unsigned int i;
-       isc_boolean_t found;
-       isc_boolean_t found_ns;
-       isc_boolean_t need_rrsig;
+       bool found;
+       bool found_ns;
+       bool need_rrsig;
 
        unsigned char *nsec_bits, *bm;
        unsigned int max_type;
@@ -119,7 +120,7 @@ dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version,
        result = dns_db_allrdatasets(db, node, version, 0, &rdsiter);
        if (result != ISC_R_SUCCESS)
                return (result);
-       found = found_ns = need_rrsig = ISC_FALSE;
+       found = found_ns = need_rrsig = false;
        for (result = dns_rdatasetiter_first(rdsiter);
             result == ISC_R_SUCCESS;
             result = dns_rdatasetiter_next(rdsiter))
@@ -142,11 +143,11 @@ dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version,
                         */
                        if (rdataset.type == dns_rdatatype_soa ||
                            rdataset.type == dns_rdatatype_ds)
-                               need_rrsig = ISC_TRUE;
+                               need_rrsig = true;
                        else if (rdataset.type == dns_rdatatype_ns)
-                               found_ns = ISC_TRUE;
+                               found_ns = true;
                        else
-                               found = ISC_TRUE;
+                               found = true;
                }
                dns_rdataset_disassociate(&rdataset);
        }
@@ -181,11 +182,11 @@ dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version,
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 dns_nsec3_typepresent(dns_rdata_t *rdata, dns_rdatatype_t type) {
        dns_rdata_nsec3_t nsec3;
        isc_result_t result;
-       isc_boolean_t present;
+       bool present;
        unsigned int i, len, window;
 
        REQUIRE(rdata != NULL);
@@ -195,7 +196,7 @@ dns_nsec3_typepresent(dns_rdata_t *rdata, dns_rdatatype_t type) {
        result = dns_rdata_tostruct(rdata, &nsec3, NULL);
        INSIST(result == ISC_R_SUCCESS);
 
-       present = ISC_FALSE;
+       present = false;
        for (i = 0; i < nsec3.len; i += len) {
                INSIST(i + 2 <= nsec3.len);
                window = nsec3.typebits[i];
@@ -208,8 +209,8 @@ dns_nsec3_typepresent(dns_rdata_t *rdata, dns_rdatatype_t type) {
                if ((window + 1) * 256 <= type)
                        continue;
                if (type < (window * 256) + len * 8)
-                       present = ISC_TF(dns_nsec_isset(&nsec3.typebits[i],
-                                                       type % 256));
+                       present = dns_nsec_isset(&nsec3.typebits[i],
+                                                type % 256);
                break;
        }
        dns_rdata_freestruct(&nsec3);
@@ -271,13 +272,13 @@ dns_nsec3_hashlength(dns_hash_t hash) {
        return (0);
 }
 
-isc_boolean_t
+bool
 dns_nsec3_supportedhash(dns_hash_t hash) {
        switch (hash) {
        case dns_hash_sha1:
-               return (ISC_TRUE);
+               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%
@@ -327,15 +328,15 @@ do_one_tuple(dns_difftuple_t **tuple, dns_db_t *db, dns_dbversion_t *ver,
  */
 static isc_result_t
 name_exists(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
-           isc_boolean_t *exists)
+           bool *exists)
 {
        isc_result_t result;
        dns_dbnode_t *node = NULL;
        dns_rdatasetiter_t *iter = NULL;
 
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND) {
-               *exists = ISC_FALSE;
+               *exists = false;
                return (ISC_R_SUCCESS);
        }
        if (result != ISC_R_SUCCESS)
@@ -348,12 +349,12 @@ name_exists(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
        result = dns_rdatasetiter_first(iter);
        if (result == ISC_R_SUCCESS) {
-               *exists = ISC_TRUE;
+               *exists = true;
        } else if (result == ISC_R_NOMORE) {
-               *exists = ISC_FALSE;
+               *exists = false;
                result = ISC_R_SUCCESS;
        } else
-               *exists = ISC_FALSE;
+               *exists = false;
        dns_rdatasetiter_destroy(&iter);
 
  cleanup_node:
@@ -361,7 +362,7 @@ name_exists(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 match_nsec3param(const dns_rdata_nsec3_t *nsec3,
                 const dns_rdata_nsec3param_t *nsec3param)
 {
@@ -369,8 +370,8 @@ match_nsec3param(const dns_rdata_nsec3_t *nsec3,
            nsec3->iterations == nsec3param->iterations &&
            nsec3->salt_length == nsec3param->salt_length &&
            !memcmp(nsec3->salt, nsec3param->salt, nsec3->salt_length))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 /*%
@@ -387,7 +388,7 @@ delnsec3(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        dns_rdataset_t rdataset;
        isc_result_t result;
 
-       result = dns_db_findnsec3node(db, name, ISC_FALSE, &node);
+       result = dns_db_findnsec3node(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -435,13 +436,13 @@ delnsec3(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 better_param(dns_rdataset_t *nsec3paramset, dns_rdata_t *param) {
        dns_rdataset_t rdataset;
        isc_result_t result;
 
        if (REMOVE(param->data[1]))
-               return (ISC_TRUE);
+               return (true);
 
        dns_rdataset_init(&rdataset);
        dns_rdataset_clone(nsec3paramset, &rdataset);
@@ -471,11 +472,11 @@ better_param(dns_rdataset_t *nsec3paramset, dns_rdata_t *param) {
                        continue;
                if (CREATE(rdata.data[1]) && !CREATE(param->data[1])) {
                        dns_rdataset_disassociate(&rdataset);
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
        dns_rdataset_disassociate(&rdataset);
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -501,7 +502,7 @@ find_nsec3(dns_rdata_nsec3_t *nsec3, dns_rdataset_t *rdataset,
 isc_result_t
 dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
                   dns_name_t *name, const dns_rdata_nsec3param_t *nsec3param,
-                  dns_ttl_t nsecttl, isc_boolean_t unsecure, dns_diff_t *diff)
+                  dns_ttl_t nsecttl, bool unsecure, dns_diff_t *diff)
 {
        dns_dbiterator_t *dbit = NULL;
        dns_dbnode_t *node = NULL;
@@ -518,8 +519,8 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdataset_t rdataset;
        int pass;
-       isc_boolean_t exists = ISC_FALSE;
-       isc_boolean_t maybe_remove_unsecure = ISC_FALSE;
+       bool exists = false;
+       bool maybe_remove_unsecure = false;
        uint8_t flags;
        isc_buffer_t buffer;
        isc_result_t result;
@@ -567,7 +568,7 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
         * Create the node if it doesn't exist and hold
         * a reference to it until we have added the NSEC3.
         */
-       CHECK(dns_db_findnsec3node(db, hashname, ISC_TRUE, &newnode));
+       CHECK(dns_db_findnsec3node(db, hashname, true, &newnode));
 
        /*
         * Seek the iterator to the 'newnode'.
@@ -604,7 +605,7 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
                                                            nsec3param, diff);
                                goto failure;
                        } else
-                               maybe_remove_unsecure = ISC_TRUE;
+                               maybe_remove_unsecure = true;
                } else {
                        dns_rdataset_disassociate(&rdataset);
                        if (result != ISC_R_NOMORE)
@@ -697,7 +698,7 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
        /*
         * Create the NSEC3 RDATA.
         */
-       CHECK(dns_db_findnode(db, name, ISC_FALSE, &node));
+       CHECK(dns_db_findnode(db, name, false, &node));
        CHECK(dns_nsec3_buildrdata(db, version, node, hash, flags, iterations,
                                   salt, salt_length, nexthash, next_length,
                                   nsec3buf, &rdata));
@@ -739,7 +740,7 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
                 * a reference to it until we have added the NSEC3
                 * or we discover we don't need to add make a change.
                 */
-               CHECK(dns_db_findnsec3node(db, hashname, ISC_TRUE, &newnode));
+               CHECK(dns_db_findnsec3node(db, hashname, true, &newnode));
                result = dns_db_findrdataset(db, newnode, version,
                                             dns_rdatatype_nsec3, 0,
                                             (isc_stdtime_t) 0, &rdataset,
@@ -861,7 +862,7 @@ dns_nsec3_addnsec3(dns_db_t *db, dns_dbversion_t *version,
 isc_result_t
 dns_nsec3_addnsec3s(dns_db_t *db, dns_dbversion_t *version,
                    dns_name_t *name, dns_ttl_t nsecttl,
-                   isc_boolean_t unsecure, dns_diff_t *diff)
+                   bool unsecure, dns_diff_t *diff)
 {
        dns_dbnode_t *node = NULL;
        dns_rdata_nsec3param_t nsec3param;
@@ -917,7 +918,7 @@ dns_nsec3_addnsec3s(dns_db_t *db, dns_dbversion_t *version,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_nsec3param_fromprivate(dns_rdata_t *src, dns_rdata_t *target,
                           unsigned char *buf, size_t buflen)
 {
@@ -931,7 +932,7 @@ dns_nsec3param_fromprivate(dns_rdata_t *src, dns_rdata_t *target,
         * NSEC3PARAM records from DNSKEY pointers.
         */
        if (src->length < 1 || src->data[0] != 0)
-               return (ISC_FALSE);
+               return (false);
 
        isc_buffer_init(&buf1, src->data + 1, src->length - 1);
        isc_buffer_add(&buf1, src->length - 1);
@@ -943,7 +944,7 @@ dns_nsec3param_fromprivate(dns_rdata_t *src, dns_rdata_t *target,
                                    &buf1, &dctx, 0, &buf2);
        dns_decompress_invalidate(&dctx);
 
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
 void
@@ -967,7 +968,7 @@ dns_nsec3param_toprivate(dns_rdata_t *src, dns_rdata_t *target,
 
 static isc_result_t
 rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-         const dns_rdata_t *rdata, isc_boolean_t *flag)
+         const dns_rdata_t *rdata, bool *flag)
 {
        dns_rdataset_t rdataset;
        dns_dbnode_t *node = NULL;
@@ -975,13 +976,13 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
 
        dns_rdataset_init(&rdataset);
        if (rdata->type == dns_rdatatype_nsec3)
-               CHECK(dns_db_findnsec3node(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnsec3node(db, name, false, &node));
        else
-               CHECK(dns_db_findnode(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnode(db, name, false, &node));
        result = dns_db_findrdataset(db, node, ver, rdata->type, 0,
                                     (isc_stdtime_t) 0, &rdataset, NULL);
        if (result == ISC_R_NOTFOUND) {
-               *flag = ISC_FALSE;
+               *flag = false;
                result = ISC_R_SUCCESS;
                goto failure;
        }
@@ -996,9 +997,9 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        }
        dns_rdataset_disassociate(&rdataset);
        if (result == ISC_R_SUCCESS) {
-               *flag = ISC_TRUE;
+               *flag = true;
        } else if (result == ISC_R_NOMORE) {
-               *flag = ISC_FALSE;
+               *flag = false;
                result = ISC_R_SUCCESS;
        }
 
@@ -1046,7 +1047,7 @@ dns_nsec3param_salttotext(dns_rdata_nsec3param_t *nsec3param, char *dst,
 
 isc_result_t
 dns_nsec3param_deletechains(dns_db_t *db, dns_dbversion_t *ver,
-                           dns_zone_t *zone, isc_boolean_t nonsec,
+                           dns_zone_t *zone, bool nonsec,
                            dns_diff_t *diff)
 {
        dns_dbnode_t *node = NULL;
@@ -1054,7 +1055,7 @@ dns_nsec3param_deletechains(dns_db_t *db, dns_dbversion_t *ver,
        dns_name_t next;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdataset_t rdataset;
-       isc_boolean_t flag;
+       bool flag;
        isc_result_t result = ISC_R_SUCCESS;
        unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE + 1];
        dns_name_t *origin = dns_zone_getorigin(zone);
@@ -1172,7 +1173,7 @@ dns_nsec3param_deletechains(dns_db_t *db, dns_dbversion_t *ver,
 isc_result_t
 dns_nsec3_addnsec3sx(dns_db_t *db, dns_dbversion_t *version,
                     dns_name_t *name, dns_ttl_t nsecttl,
-                    isc_boolean_t unsecure, dns_rdatatype_t type,
+                    bool unsecure, dns_rdatatype_t type,
                     dns_diff_t *diff)
 {
        dns_dbnode_t *node = NULL;
@@ -1276,12 +1277,12 @@ dns_nsec3_addnsec3sx(dns_db_t *db, dns_dbversion_t *version,
 /*%
  * Determine whether any NSEC3 records that were associated with
  * 'name' should be deleted or if they should continue to exist.
- * ISC_TRUE indicates they should be deleted.
- * ISC_FALSE indicates they should be retained.
+ * true indicates they should be deleted.
+ * false indicates they should be retained.
  */
 static isc_result_t
 deleteit(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-        isc_boolean_t *yesno)
+        bool *yesno)
 {
        isc_result_t result;
        dns_fixedname_t foundname;
@@ -1294,18 +1295,18 @@ deleteit(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                             NULL, NULL);
        if (result == DNS_R_EMPTYNAME || result == ISC_R_SUCCESS ||
            result ==  DNS_R_ZONECUT) {
-               *yesno = ISC_FALSE;
+               *yesno = false;
                return (ISC_R_SUCCESS);
        }
        if (result == DNS_R_GLUE || result == DNS_R_DNAME ||
            result == DNS_R_DELEGATION || result == DNS_R_NXDOMAIN) {
-               *yesno = ISC_TRUE;
+               *yesno = true;
                return (ISC_R_SUCCESS);
        }
        /*
         * Silence compiler.
         */
-       *yesno = ISC_TRUE;
+       *yesno = true;
        return (result);
 }
 
@@ -1327,7 +1328,7 @@ dns_nsec3_delnsec3(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdataset_t rdataset;
        int pass;
-       isc_boolean_t yesno;
+       bool yesno;
        isc_buffer_t buffer;
        isc_result_t result;
        unsigned char *salt;
@@ -1672,15 +1673,15 @@ dns_nsec3_delnsec3sx(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
 isc_result_t
 dns_nsec3_active(dns_db_t *db, dns_dbversion_t *version,
-                isc_boolean_t complete, isc_boolean_t *answer)
+                bool complete, bool *answer)
 {
        return (dns_nsec3_activex(db, version, complete, 0, answer));
 }
 
 isc_result_t
 dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version,
-                 isc_boolean_t complete, dns_rdatatype_t privatetype,
-                 isc_boolean_t *answer)
+                 bool complete, dns_rdatatype_t privatetype,
+                 bool *answer)
 {
        dns_dbnode_t *node = NULL;
        dns_rdataset_t rdataset;
@@ -1721,15 +1722,15 @@ dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version,
        dns_rdataset_disassociate(&rdataset);
        if (result == ISC_R_SUCCESS) {
                dns_db_detachnode(db, &node);
-               *answer = ISC_TRUE;
+               *answer = true;
                return (ISC_R_SUCCESS);
        }
        if (result == ISC_R_NOMORE)
-               *answer = ISC_FALSE;
+               *answer = false;
 
  try_private:
        if (privatetype == 0 || complete) {
-               *answer = ISC_FALSE;
+               *answer = false;
                return (ISC_R_SUCCESS);
        }
        result = dns_db_findrdataset(db, node, version, privatetype, 0, 0,
@@ -1737,7 +1738,7 @@ dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version,
 
        dns_db_detachnode(db, &node);
        if (result == ISC_R_NOTFOUND) {
-               *answer = ISC_FALSE;
+               *answer = false;
                return (ISC_R_SUCCESS);
        }
        if (result != ISC_R_SUCCESS)
@@ -1762,11 +1763,11 @@ dns_nsec3_activex(dns_db_t *db, dns_dbversion_t *version,
        }
        dns_rdataset_disassociate(&rdataset);
        if (result == ISC_R_SUCCESS) {
-               *answer = ISC_TRUE;
+               *answer = true;
                result = ISC_R_SUCCESS;
        }
        if (result == ISC_R_NOMORE) {
-               *answer = ISC_FALSE;
+               *answer = false;
                result = ISC_R_SUCCESS;
        }
 
@@ -1834,10 +1835,10 @@ dns_nsec3_maxiterations(dns_db_t *db, dns_dbversion_t *version,
 isc_result_t
 dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                        dns_name_t *nsec3name, dns_rdataset_t *nsec3set,
-                       dns_name_t *zonename, isc_boolean_t *exists,
-                       isc_boolean_t *data, isc_boolean_t *optout,
-                       isc_boolean_t *unknown, isc_boolean_t *setclosest,
-                       isc_boolean_t *setnearest, dns_name_t *closest,
+                       dns_name_t *zonename, bool *exists,
+                       bool *data, bool *optout,
+                       bool *unknown, bool *setclosest,
+                       bool *setnearest, dns_name_t *closest,
                        dns_name_t *nearest, dns_nseclog_t logit, void *arg)
 {
        char namebuf[DNS_NAME_FORMATSIZE];
@@ -1850,10 +1851,10 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        int order;
        int scope;
-       isc_boolean_t atparent;
-       isc_boolean_t first;
-       isc_boolean_t ns;
-       isc_boolean_t soa;
+       bool atparent;
+       bool first;
+       bool ns;
+       bool soa;
        isc_buffer_t buffer;
        isc_result_t answer = ISC_R_IGNORE;
        isc_result_t result;
@@ -1928,7 +1929,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
         */
        if (!dns_nsec3_supportedhash(nsec3.hash)) {
                if (unknown != NULL)
-                       *unknown = ISC_TRUE;
+                       *unknown = true;
                return (ISC_R_IGNORE);
        }
 
@@ -1960,7 +1961,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
        qname = dns_fixedname_initname(&qfixed);
        dns_name_downcase(name, qname, NULL);
        qlabels = dns_name_countlabels(qname);
-       first = ISC_TRUE;
+       first = true;
 
        while (qlabels >= zlabels) {
                length = isc_iterated_hash(hash, nsec3.hash, nsec3.iterations,
@@ -2010,7 +2011,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                            type == dns_rdatatype_nsec ||
                            type == dns_rdatatype_key ||
                            !dns_nsec3_typepresent(&rdata, dns_rdatatype_cname)) {
-                               *exists = ISC_TRUE;
+                               *exists = true;
                                *data = dns_nsec3_typepresent(&rdata, type);
                                (*logit)(arg, ISC_LOG_DEBUG(3),
                                         "NSEC3 proves name exists (owner) "
@@ -2055,7 +2056,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                                         "NSEC3 indicates potential closest "
                                         "encloser: '%s'", namebuf);
                                dns_name_copy(qname, closest, NULL);
-                               *setclosest = ISC_TRUE;
+                               *setclosest = true;
                        }
                        dns_name_format(qname, namebuf, sizeof(namebuf));
                        (*logit)(arg, ISC_LOG_DEBUG(3),
@@ -2086,11 +2087,11 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                            (dns_name_countlabels(nearest) == 0 ||
                             dns_name_issubdomain(nearest, qname))) {
                                dns_name_copy(qname, nearest, NULL);
-                               *setnearest = ISC_TRUE;
+                               *setnearest = true;
                        }
 
-                       *exists = ISC_FALSE;
-                       *data = ISC_FALSE;
+                       *exists = false;
+                       *data = false;
                        if (optout != NULL) {
                                if ((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) != 0)
                                        (*logit)(arg, ISC_LOG_DEBUG(3),
@@ -2098,8 +2099,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                                else
                                        (*logit)(arg, ISC_LOG_DEBUG(3),
                                                 "NSEC3 indicates secure range");
-                               *optout =
-                                   ISC_TF(nsec3.flags & DNS_NSEC3FLAG_OPTOUT);
+                               *optout = (nsec3.flags & DNS_NSEC3FLAG_OPTOUT);
                        }
                        answer = ISC_R_SUCCESS;
                }
@@ -2107,7 +2107,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, dns_name_t* name,
                qlabels--;
                if (qlabels > 0)
                        dns_name_split(qname, qlabels, NULL, qname);
-               first = ISC_FALSE;
+               first = false;
        }
        return (answer);
 }
index b4385d0b5a0b6b4b0a1a50fd34bb5cd65afe237a..41e219bfb14939a5f23d66b40438f74628d853b5 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/log.h>
@@ -41,7 +42,7 @@ struct dns_nta {
        unsigned int            magic;
        isc_refcount_t          refcount;
        dns_ntatable_t          *ntatable;
-       isc_boolean_t           forced;
+       bool            forced;
        isc_timer_t             *timer;
        dns_fetch_t             *fetch;
        dns_rdataset_t          rdataset;
@@ -77,7 +78,7 @@ nta_detach(isc_mem_t *mctx, dns_nta_t **ntap) {
                if (nta->timer != NULL) {
                        (void) isc_timer_reset(nta->timer,
                                               isc_timertype_inactive,
-                                              NULL, NULL, ISC_TRUE);
+                                              NULL, NULL, true);
                        isc_timer_detach(&nta->timer);
                }
                isc_refcount_destroy(&nta->refcount);
@@ -172,7 +173,7 @@ dns_ntatable_attach(dns_ntatable_t *source, dns_ntatable_t **targetp) {
 
 void
 dns_ntatable_detach(dns_ntatable_t **ntatablep) {
-       isc_boolean_t destroy = ISC_FALSE;
+       bool destroy = false;
        dns_ntatable_t *ntatable;
 
        REQUIRE(ntatablep != NULL && VALID_NTATABLE(*ntatablep));
@@ -184,7 +185,7 @@ dns_ntatable_detach(dns_ntatable_t **ntatablep) {
        INSIST(ntatable->references > 0);
        ntatable->references--;
        if (ntatable->references == 0)
-               destroy = ISC_TRUE;
+               destroy = true;
        RWUNLOCK(&ntatable->rwlock, isc_rwlocktype_write);
 
        if (destroy) {
@@ -245,7 +246,7 @@ fetch_done(isc_task_t *task, isc_event_t *event) {
         */
        if (nta->timer != NULL && nta->expiry - now < view->nta_recheck)
                (void) isc_timer_reset(nta->timer, isc_timertype_inactive,
-                                      NULL, NULL, ISC_TRUE);
+                                      NULL, NULL, true);
        nta_detach(view->mctx, &nta);
 }
 
@@ -342,7 +343,7 @@ nta_create(dns_ntatable_t *ntatable, dns_name_t *name, dns_nta_t **target) {
 
 isc_result_t
 dns_ntatable_add(dns_ntatable_t *ntatable, dns_name_t *name,
-                isc_boolean_t force, isc_stdtime_t now,
+                bool force, isc_stdtime_t now,
                 uint32_t lifetime)
 {
        isc_result_t result;
@@ -408,7 +409,7 @@ deletenode(dns_ntatable_t *ntatable, const dns_name_t *name) {
        if (result == ISC_R_SUCCESS) {
                if (node->data != NULL)
                        result = dns_rbt_deletenode(ntatable->table,
-                                                   node, ISC_FALSE);
+                                                   node, false);
                else
                        result = ISC_R_NOTFOUND;
        } else if (result == DNS_R_PARTIALMATCH)
@@ -428,7 +429,7 @@ dns_ntatable_delete(dns_ntatable_t *ntatable, dns_name_t *name) {
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
                     dns_name_t *name, dns_name_t *anchor)
 {
@@ -437,14 +438,14 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
        dns_rbtnode_t *node;
        dns_name_t *foundname;
        dns_nta_t *nta = NULL;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
        isc_rwlocktype_t locktype = isc_rwlocktype_read;
 
        REQUIRE(ntatable == NULL || VALID_NTATABLE(ntatable));
        REQUIRE(dns_name_isabsolute(name));
 
        if (ntatable == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        foundname = dns_fixedname_initname(&fn);
 
@@ -460,7 +461,7 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
        }
        if (result == ISC_R_SUCCESS) {
                nta = (dns_nta_t *) node->data;
-               answer = ISC_TF(nta->expiry > now);
+               answer = (nta->expiry > now);
        }
 
        /* Deal with expired NTA */
@@ -481,7 +482,7 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
                if (nta->timer != NULL) {
                        (void) isc_timer_reset(nta->timer,
                                               isc_timertype_inactive,
-                                              NULL, NULL, ISC_TRUE);
+                                              NULL, NULL, true);
                        isc_timer_detach(&nta->timer);
                }
 
@@ -516,7 +517,7 @@ dns_ntatable_totext(dns_ntatable_t *ntatable, isc_buffer_t **buf) {
        isc_result_t result;
        dns_rbtnode_t *node;
        dns_rbtnodechain_t chain;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
        isc_stdtime_t now;
 
        REQUIRE(VALID_NTATABLE(ntatable));
@@ -554,7 +555,7 @@ dns_ntatable_totext(dns_ntatable_t *ntatable, isc_buffer_t **buf) {
                                 first ? "" : "\n", nbuf,
                                 n->expiry <= now ? "expired" : "expiry",
                                 tbuf);
-                       first = ISC_FALSE;
+                       first = false;
                        result = putstr(buf, obuf);
                        if (result != ISC_R_SUCCESS)
                                goto cleanup;
@@ -656,7 +657,7 @@ dns_ntatable_save(dns_ntatable_t *ntatable, FILE *fp) {
        dns_rbtnode_t *node;
        dns_rbtnodechain_t chain;
        isc_stdtime_t now;
-       isc_boolean_t written = ISC_FALSE;
+       bool written = false;
 
        REQUIRE(VALID_NTATABLE(ntatable));
 
@@ -682,7 +683,7 @@ dns_ntatable_save(dns_ntatable_t *ntatable, FILE *fp) {
                                dns_rbt_fullnamefromnode(node, name);
 
                                isc_buffer_init(&b, nbuf, sizeof(nbuf));
-                               result = dns_name_totext(name, ISC_FALSE, &b);
+                               result = dns_name_totext(name, false, &b);
                                if (result != ISC_R_SUCCESS)
                                        goto skip;
 
@@ -698,7 +699,7 @@ dns_ntatable_save(dns_ntatable_t *ntatable, FILE *fp) {
                                fprintf(fp, "%s %s %s\n", nbuf,
                                        n->forced ? "forced" : "regular",
                                        tbuf);
-                               written = ISC_TRUE;
+                               written = true;
                        }
                }
        skip:
index ec6dc7f945464be50b8fd77ba35593c4a8468a9f..10ce0ba535d22e5aeec76f01eea14748d723fb31 100644 (file)
@@ -62,7 +62,7 @@ entropy_get(unsigned char *buf, int num) {
        isc_result_t result;
        if (num < 0)
                return (-1);
-       result = dst__entropy_getdata(buf, (unsigned int) num, ISC_FALSE);
+       result = dst__entropy_getdata(buf, (unsigned int) num, false);
        return (result == ISC_R_SUCCESS ? 1 : -1);
 }
 
@@ -76,7 +76,7 @@ entropy_getpseudo(unsigned char *buf, int num) {
        isc_result_t result;
        if (num < 0)
                return (-1);
-       result = dst__entropy_getdata(buf, (unsigned int) num, ISC_TRUE);
+       result = dst__entropy_getdata(buf, (unsigned int) num, true);
        return (result == ISC_R_SUCCESS ? 1 : -1);
 }
 
index e6791c83459d529a0fe73556984f59f7409e3a41..e8a3f7e5e60c3006d1b88e9cc969dfc308359f7c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -183,7 +184,7 @@ openssldh_computesecret(const dst_key_t *pub, const dst_key_t *priv,
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 openssldh_compare(const dst_key_t *key1, const dst_key_t *key2) {
        DH *dh1, *dh2;
        const BIGNUM *pub_key1 = NULL, *pub_key2 = NULL;
@@ -194,9 +195,9 @@ openssldh_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dh2 = key2->keydata.dh;
 
        if (dh1 == NULL && dh2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (dh1 == NULL || dh2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        DH_get0_key(dh1, &pub_key1, &priv_key1);
        DH_get0_key(dh2, &pub_key2, &priv_key2);
@@ -205,18 +206,18 @@ openssldh_compare(const dst_key_t *key1, const dst_key_t *key2) {
 
        if (BN_cmp(p1, p2) != 0 || BN_cmp(g1, g2) != 0 ||
            BN_cmp(pub_key1, pub_key2) != 0)
-               return (ISC_FALSE);
+               return (false);
 
        if (priv_key1 != NULL || priv_key2 != NULL) {
                if (priv_key1 == NULL || priv_key2 == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                if (BN_cmp(priv_key1, priv_key2) != 0)
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 openssldh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
        DH *dh1, *dh2;
        const BIGNUM *p1 = NULL, *g1 = NULL, *p2 = NULL, *g2 = NULL;
@@ -225,16 +226,16 @@ openssldh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
        dh2 = key2->keydata.dh;
 
        if (dh1 == NULL && dh2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (dh1 == NULL || dh2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        DH_get0_pqg(dh1, &p1, NULL, &g1);
        DH_get0_pqg(dh2, &p2, NULL, &g2);
 
        if (BN_cmp(p1, p2) != 0 || BN_cmp(g1, g2) != 0)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 #if OPENSSL_VERSION_NUMBER > 0x00908000L
@@ -349,13 +350,13 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 openssldh_isprivate(const dst_key_t *key) {
        DH *dh = key->keydata.dh;
        const BIGNUM *priv_key = NULL;
 
        DH_get0_key(dh, NULL, &priv_key);
-       return (ISC_TF(dh != NULL && priv_key != NULL));
+       return (dh != NULL && priv_key != NULL);
 }
 
 static void
index dfbd484247855bcc411fa323fe216040476ea60e..8abf4bb02d6ebf334796cb87229bc839e8fb9125 100644 (file)
@@ -34,6 +34,7 @@
 
 #ifndef PK11_DSA_DISABLE
 
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/entropy.h>
@@ -382,7 +383,7 @@ openssldsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        }
 }
 
-static isc_boolean_t
+static bool
 openssldsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        DSA *dsa1, *dsa2;
        const BIGNUM *pub_key1 = NULL, *priv_key1 = NULL;
@@ -394,9 +395,9 @@ openssldsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dsa2 = key2->keydata.dsa;
 
        if (dsa1 == NULL && dsa2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (dsa1 == NULL || dsa2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        DSA_get0_key(dsa1, &pub_key1, &priv_key1);
        DSA_get0_key(dsa2, &pub_key2, &priv_key2);
@@ -405,15 +406,15 @@ openssldsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
 
        if (BN_cmp(p1, p2) != 0 || BN_cmp(q1, q2) != 0 ||
            BN_cmp(g1, g2) != 0 || BN_cmp(pub_key1, pub_key2) != 0)
-               return (ISC_FALSE);
+               return (false);
 
        if (priv_key1 != NULL || priv_key2 != NULL) {
                if (priv_key1 == NULL || priv_key2 == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                if (BN_cmp(priv_key1, priv_key2))
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 #if OPENSSL_VERSION_NUMBER > 0x00908000L
@@ -455,7 +456,7 @@ openssldsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        UNUSED(unused);
 
        result = dst__entropy_getdata(rand_array, sizeof(rand_array),
-                                     ISC_FALSE);
+                                     false);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -510,13 +511,13 @@ openssldsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 openssldsa_isprivate(const dst_key_t *key) {
        DSA *dsa = key->keydata.dsa;
        const BIGNUM *priv_key = NULL;
 
        DSA_get0_key(dsa, NULL, &priv_key);
-       return (ISC_TF(dsa != NULL && priv_key != NULL));
+       return (dsa != NULL && priv_key != NULL);
 }
 
 static void
index 2e474592492741480281c76d14403a6e642b3d91..e9ea5eada6bc6235d9901d53e42e818ba1715268 100644 (file)
@@ -17,6 +17,9 @@
 #error "ECDSA without EVP for SHA2?"
 #endif
 
+#include <stdbool.h>
+
+
 #include <isc/entropy.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -260,9 +263,9 @@ opensslecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 opensslecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
-       isc_boolean_t ret;
+       bool ret;
        int status;
        EVP_PKEY *pkey1 = key1->keydata.pkey;
        EVP_PKEY *pkey2 = key2->keydata.pkey;
@@ -271,30 +274,30 @@ opensslecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        const BIGNUM *priv1, *priv2;
 
        if (pkey1 == NULL && pkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (pkey1 == NULL || pkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        eckey1 = EVP_PKEY_get1_EC_KEY(pkey1);
        eckey2 = EVP_PKEY_get1_EC_KEY(pkey2);
        if (eckey1 == NULL && eckey2 == NULL) {
-               DST_RET (ISC_TRUE);
+               DST_RET (true);
        } else if (eckey1 == NULL || eckey2 == NULL)
-               DST_RET (ISC_FALSE);
+               DST_RET (false);
 
        status = EVP_PKEY_cmp(pkey1, pkey2);
        if (status != 1)
-               DST_RET (ISC_FALSE);
+               DST_RET (false);
 
        priv1 = EC_KEY_get0_private_key(eckey1);
        priv2 = EC_KEY_get0_private_key(eckey2);
        if (priv1 != NULL || priv2 != NULL) {
                if (priv1 == NULL || priv2 == NULL)
-                       DST_RET (ISC_FALSE);
+                       DST_RET (false);
                if (BN_cmp(priv1, priv2) != 0)
-                       DST_RET (ISC_FALSE);
+                       DST_RET (false);
        }
-       ret = ISC_TRUE;
+       ret = true;
 
  err:
        if (eckey1 != NULL)
@@ -349,13 +352,13 @@ opensslecdsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 opensslecdsa_isprivate(const dst_key_t *key) {
-       isc_boolean_t ret;
+       bool ret;
        EVP_PKEY *pkey = key->keydata.pkey;
        EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
 
-       ret = ISC_TF(eckey != NULL && EC_KEY_get0_private_key(eckey) != NULL);
+       ret = (eckey != NULL && EC_KEY_get0_private_key(eckey) != NULL);
        if (eckey != NULL)
                EC_KEY_free(eckey);
        return (ret);
index 3ba8bce424b58e45e2dd76794bf3abcd72b68692..b76fac918bc3cbfc3bc7b4850908128b59f60d58 100644 (file)
@@ -14,6 +14,8 @@
 #if defined(OPENSSL) && \
     (defined(HAVE_OPENSSL_ED25519) || defined(HAVE_OPENSSL_ED448))
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -358,21 +360,21 @@ openssleddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 openssleddsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        int status;
        EVP_PKEY *pkey1 = key1->keydata.pkey;
        EVP_PKEY *pkey2 = key2->keydata.pkey;
 
        if (pkey1 == NULL && pkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (pkey1 == NULL || pkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        status = EVP_PKEY_cmp(pkey1, pkey2);
        if (status == 1)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 static isc_result_t
@@ -419,23 +421,23 @@ openssleddsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 openssleddsa_isprivate(const dst_key_t *key) {
        EVP_PKEY *pkey = key->keydata.pkey;
        int len;
        unsigned long err;
 
        if (pkey == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        len = i2d_PrivateKey(pkey, NULL);
        if (len > 0)
-               return (ISC_TRUE);
+               return (true);
        /* can check if first error is EC_R_INVALID_PRIVATE_KEY */
        while ((err = ERR_get_error()) != 0)
                /**/;
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
index f9545117d57e0464c70a6ba50a0188914578b145..481b91c9df7c78a7abf4ebdf28b0afbd5eb4db98 100644 (file)
@@ -13,6 +13,8 @@
 
 #if defined(OPENSSL) && defined(HAVE_OPENSSL_GOST)
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -194,7 +196,7 @@ opensslgost_verify(dst_context_t *dctx, const isc_region_t *sig) {
        }
 }
 
-static isc_boolean_t
+static bool
 opensslgost_compare(const dst_key_t *key1, const dst_key_t *key2) {
        EVP_PKEY *pkey1, *pkey2;
 
@@ -202,13 +204,13 @@ opensslgost_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pkey2 = key2->keydata.pkey;
 
        if (pkey1 == NULL && pkey2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (pkey1 == NULL || pkey2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        if (EVP_PKEY_cmp(pkey1, pkey2) != 1)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 static int
@@ -269,7 +271,7 @@ err:
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 opensslgost_isprivate(const dst_key_t *key) {
        EVP_PKEY *pkey = key->keydata.pkey;
        EC_KEY *ec;
@@ -277,7 +279,7 @@ opensslgost_isprivate(const dst_key_t *key) {
        INSIST(pkey != NULL);
 
        ec = EVP_PKEY_get0(pkey);
-       return (ISC_TF(ec != NULL && EC_KEY_get0_private_key(ec) != NULL));
+       return (ec != NULL && EC_KEY_get0_private_key(ec) != NULL);
 }
 
 static void
index ae1dcde1cd3416619c9e8638891e32e7a7f882d7..c03fd7238804ac205e68ac5ff1bc7cd1ecfd5937 100644 (file)
@@ -20,6 +20,7 @@
 #endif
 #endif
 
+#include <stdbool.h>
 
 #include <isc/entropy.h>
 #include <isc/md5.h>
@@ -890,7 +891,7 @@ opensslrsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (opensslrsa_verify2(dctx, 0, sig));
 }
 
-static isc_boolean_t
+static bool
 opensslrsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        int status;
        RSA *rsa1 = NULL, *rsa2 = NULL;
@@ -924,41 +925,41 @@ opensslrsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
 #endif
 
        if (rsa1 == NULL && rsa2 == NULL)
-               return (ISC_TRUE);
+               return (true);
        else if (rsa1 == NULL || rsa2 == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        RSA_get0_key(rsa1, &n1, &e1, &d1);
        RSA_get0_key(rsa2, &n2, &e2, &d2);
        status = BN_cmp(n1, n2) || BN_cmp(e1, e2);
 
        if (status != 0)
-               return (ISC_FALSE);
+               return (false);
 
 #if USE_EVP
        if (RSA_test_flags(rsa1, RSA_FLAG_EXT_PKEY) != 0 ||
            RSA_test_flags(rsa2, RSA_FLAG_EXT_PKEY) != 0) {
                if (RSA_test_flags(rsa1, RSA_FLAG_EXT_PKEY) == 0 ||
                    RSA_test_flags(rsa2, RSA_FLAG_EXT_PKEY) == 0)
-                       return (ISC_FALSE);
+                       return (false);
                /*
                 * Can't compare private parameters, BTW does it make sense?
                 */
-               return (ISC_TRUE);
+               return (true);
        }
 #endif
 
        if (d1 != NULL || d2 != NULL) {
                if (d1 == NULL || d2 == NULL)
-                       return (ISC_FALSE);
+                       return (false);
                RSA_get0_factors(rsa1, &p1, &q1);
                RSA_get0_factors(rsa2, &p2, &q2);
                status = BN_cmp(d1, d2) || BN_cmp(p1, p1) || BN_cmp(q1, q2);
 
                if (status != 0)
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 #if OPENSSL_VERSION_NUMBER > 0x00908000L
@@ -1129,7 +1130,7 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
 #endif
 }
 
-static isc_boolean_t
+static bool
 opensslrsa_isprivate(const dst_key_t *key) {
        const BIGNUM *d = NULL;
 #if USE_EVP
@@ -1141,9 +1142,9 @@ opensslrsa_isprivate(const dst_key_t *key) {
        RSA *rsa = key->keydata.rsa;
 #endif
        if (rsa != NULL && RSA_test_flags(rsa, RSA_FLAG_EXT_PKEY) != 0)
-               return (ISC_TRUE);
+               return (true);
        RSA_get0_key(rsa, NULL, NULL, &d);
-       return (ISC_TF(rsa != NULL && d != NULL));
+       return (rsa != NULL && d != NULL);
 }
 
 static void
index aa5a02ce2b0ec7aae4165c0db08461c1260e502a..6ffc4a0f9a79088aa5e56fce721cba0bf607888a 100644 (file)
@@ -15,6 +15,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/magic.h>
 #include <isc/mem.h>
 #include <isc/types.h>
@@ -100,7 +102,7 @@ dns_order_add(dns_order_t *order, dns_name_t *name,
        return (ISC_R_SUCCESS);
 }
 
-static inline isc_boolean_t
+static inline bool
 match(dns_name_t *name1, dns_name_t *name2) {
 
        if (dns_name_iswildcard(name2))
index d4ef505d2a2600329194c885578da4ba813ae3c7..3a781d20415bebb716acad4b54edb52e657465db 100644 (file)
@@ -16,6 +16,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/string.h>
@@ -230,11 +231,11 @@ dns_peer_newprefix(isc_mem_t *mem, isc_netaddr_t *addr, unsigned int prefixlen,
        peer->address = *addr;
        peer->prefixlen = prefixlen;
        peer->mem = mem;
-       peer->bogus = ISC_FALSE;
+       peer->bogus = false;
        peer->transfer_format = dns_one_answer;
        peer->transfers = 0;
-       peer->request_ixfr = ISC_FALSE;
-       peer->provide_ixfr = ISC_FALSE;
+       peer->request_ixfr = false;
+       peer->provide_ixfr = false;
        peer->key = NULL;
        peer->refs = 1;
        peer->transfer_source = NULL;
@@ -319,8 +320,8 @@ peer_delete(dns_peer_t **peer) {
 }
 
 isc_result_t
-dns_peer_setbogus(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setbogus(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -333,7 +334,7 @@ dns_peer_setbogus(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getbogus(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getbogus(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -346,8 +347,8 @@ dns_peer_getbogus(dns_peer_t *peer, isc_boolean_t *retval) {
 
 
 isc_result_t
-dns_peer_setprovideixfr(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setprovideixfr(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -360,7 +361,7 @@ dns_peer_setprovideixfr(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getprovideixfr(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getprovideixfr(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -373,8 +374,8 @@ dns_peer_getprovideixfr(dns_peer_t *peer, isc_boolean_t *retval) {
 }
 
 isc_result_t
-dns_peer_setrequestixfr(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setrequestixfr(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -387,7 +388,7 @@ dns_peer_setrequestixfr(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getrequestixfr(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getrequestixfr(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -399,8 +400,8 @@ dns_peer_getrequestixfr(dns_peer_t *peer, isc_boolean_t *retval) {
 }
 
 isc_result_t
-dns_peer_setsupportedns(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setsupportedns(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -413,7 +414,7 @@ dns_peer_setsupportedns(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getsupportedns(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getsupportedns(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -425,8 +426,8 @@ dns_peer_getsupportedns(dns_peer_t *peer, isc_boolean_t *retval) {
 }
 
 isc_result_t
-dns_peer_setrequestnsid(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setrequestnsid(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -439,7 +440,7 @@ dns_peer_setrequestnsid(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getrequestnsid(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getrequestnsid(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -451,8 +452,8 @@ dns_peer_getrequestnsid(dns_peer_t *peer, isc_boolean_t *retval) {
 }
 
 isc_result_t
-dns_peer_setsendcookie(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setsendcookie(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -465,7 +466,7 @@ dns_peer_setsendcookie(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getsendcookie(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getsendcookie(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -477,8 +478,8 @@ dns_peer_getsendcookie(dns_peer_t *peer, isc_boolean_t *retval) {
 }
 
 isc_result_t
-dns_peer_setrequestexpire(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setrequestexpire(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -491,7 +492,7 @@ dns_peer_setrequestexpire(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getrequestexpire(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getrequestexpire(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -503,8 +504,8 @@ dns_peer_getrequestexpire(dns_peer_t *peer, isc_boolean_t *retval) {
 }
 
 isc_result_t
-dns_peer_setforcetcp(dns_peer_t *peer, isc_boolean_t newval) {
-       isc_boolean_t existed;
+dns_peer_setforcetcp(dns_peer_t *peer, bool newval) {
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -517,7 +518,7 @@ dns_peer_setforcetcp(dns_peer_t *peer, isc_boolean_t newval) {
 }
 
 isc_result_t
-dns_peer_getforcetcp(dns_peer_t *peer, isc_boolean_t *retval) {
+dns_peer_getforcetcp(dns_peer_t *peer, bool *retval) {
        REQUIRE(DNS_PEER_VALID(peer));
        REQUIRE(retval != NULL);
 
@@ -530,7 +531,7 @@ dns_peer_getforcetcp(dns_peer_t *peer, isc_boolean_t *retval) {
 
 isc_result_t
 dns_peer_settransfers(dns_peer_t *peer, uint32_t newval) {
-       isc_boolean_t existed;
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -557,7 +558,7 @@ dns_peer_gettransfers(dns_peer_t *peer, uint32_t *retval) {
 
 isc_result_t
 dns_peer_settransferformat(dns_peer_t *peer, dns_transfer_format_t newval) {
-       isc_boolean_t existed;
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -597,12 +598,12 @@ dns_peer_getkey(dns_peer_t *peer, dns_name_t **retval) {
 
 isc_result_t
 dns_peer_setkey(dns_peer_t *peer, dns_name_t **keyval) {
-       isc_boolean_t exists = ISC_FALSE;
+       bool exists = false;
 
        if (peer->key != NULL) {
                dns_name_free(peer->key, peer->mem);
                isc_mem_put(peer->mem, peer->key, sizeof(dns_name_t));
-               exists = ISC_TRUE;
+               exists = true;
        }
 
        peer->key = *keyval;
@@ -743,7 +744,7 @@ dns_peer_getquerysource(dns_peer_t *peer, isc_sockaddr_t *query_source) {
 
 isc_result_t
 dns_peer_setudpsize(dns_peer_t *peer, uint16_t udpsize) {
-       isc_boolean_t existed;
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
@@ -771,7 +772,7 @@ dns_peer_getudpsize(dns_peer_t *peer, uint16_t *udpsize) {
 
 isc_result_t
 dns_peer_setmaxudp(dns_peer_t *peer, uint16_t maxudp) {
-       isc_boolean_t existed;
+       bool existed;
 
        REQUIRE(DNS_PEER_VALID(peer));
 
index 113ff3a22814993f54977b667b15ead477f7c33e..e2b60ea7c5441b7ca3f51b52ba029208ea97dd18 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef PK11_DH_DISABLE
 
 #include <ctype.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -194,7 +195,7 @@ pkcs11dh_computesecret(const dst_key_t *pub, const dst_key_t *priv,
        if (attr == NULL)
                return (DST_R_INVALIDPUBLICKEY);
 
-       ret = pk11_get_session(&ctx, OP_DH, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(&ctx, OP_DH, true, false,
                               priv->keydata.pkey->reqlogon, NULL,
                               pk11_get_best_token(OP_DH));
        if (ret != ISC_R_SUCCESS)
@@ -259,7 +260,7 @@ pkcs11dh_computesecret(const dst_key_t *pub, const dst_key_t *priv,
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11dh_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *dh1, *dh2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -268,39 +269,39 @@ pkcs11dh_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dh2 = key2->keydata.pkey;
 
        if ((dh1 == NULL) && (dh2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((dh1 == NULL) || (dh2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dh1, CKA_PRIME);
        attr2 = pk11_attribute_bytype(dh2, CKA_PRIME);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dh1, CKA_BASE);
        attr2 = pk11_attribute_bytype(dh2, CKA_BASE);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dh1, CKA_VALUE);
        attr2 = pk11_attribute_bytype(dh2, CKA_VALUE);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dh1, CKA_VALUE2);
        attr2 = pk11_attribute_bytype(dh2, CKA_VALUE2);
@@ -309,18 +310,18 @@ pkcs11dh_compare(const dst_key_t *key1, const dst_key_t *key2) {
             (attr1->ulValueLen != attr2->ulValueLen) ||
             !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                attr1->ulValueLen)))
-               return (ISC_FALSE);
+               return (false);
 
        if (!dh1->ontoken && !dh2->ontoken)
-               return (ISC_TRUE);
+               return (true);
        else if (dh1->ontoken || dh2->ontoken ||
                 (dh1->object != dh2->object))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 pkcs11dh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *dh1, *dh2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -329,31 +330,31 @@ pkcs11dh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
        dh2 = key2->keydata.pkey;
 
        if ((dh1 == NULL) && (dh2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((dh1 == NULL) || (dh2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dh1, CKA_PRIME);
        attr2 = pk11_attribute_bytype(dh2, CKA_PRIME);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dh1, CKA_BASE);
        attr2 = pk11_attribute_bytype(dh2, CKA_BASE);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -411,8 +412,8 @@ pkcs11dh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_DH, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, pk11_get_best_token(OP_DH));
+       ret = pk11_get_session(pk11_ctx, OP_DH, true, false,
+                              false, NULL, pk11_get_best_token(OP_DH));
        if (ret != ISC_R_SUCCESS)
                goto err;
 
@@ -594,15 +595,15 @@ pkcs11dh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11dh_isprivate(const dst_key_t *key) {
        pk11_object_t *dh = key->keydata.pkey;
        CK_ATTRIBUTE *attr;
 
        if (dh == NULL)
-               return (ISC_FALSE);
+               return (false);
        attr = pk11_attribute_bytype(dh, CKA_VALUE2);
-       return (ISC_TF((attr != NULL) || dh->ontoken));
+       return (attr != NULL || dh->ontoken);
 }
 
 static void
index 8d0fc62b8b626b279b1c1bbecf03f4c39e9d2a24..12d707a1125217dce3db4bdbf08d0d8b55e52496 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef PK11_DSA_DISABLE
 
 #include <string.h>
+#include <stdbool.h>
 
 #include <isc/entropy.h>
 #include <isc/mem.h>
@@ -106,7 +107,7 @@ pkcs11dsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_DSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_DSA, true, false,
                               dsa->reqlogon, NULL,
                               pk11_get_best_token(OP_DSA));
        if (ret != ISC_R_SUCCESS)
@@ -164,7 +165,7 @@ pkcs11dsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 10,
@@ -238,7 +239,7 @@ pkcs11dsa_createctx_verify(dst_key_t *key, dst_context_t *dctx) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_DSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_DSA, true, false,
                               dsa->reqlogon, NULL,
                               pk11_get_best_token(OP_DSA));
        if (ret != ISC_R_SUCCESS)
@@ -296,7 +297,7 @@ pkcs11dsa_createctx_verify(dst_key_t *key, dst_context_t *dctx) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 9,
@@ -428,7 +429,7 @@ pkcs11dsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11dsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *dsa1, *dsa2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -437,49 +438,49 @@ pkcs11dsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        dsa2 = key2->keydata.pkey;
 
        if ((dsa1 == NULL) && (dsa2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((dsa1 == NULL) || (dsa2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dsa1, CKA_PRIME);
        attr2 = pk11_attribute_bytype(dsa2, CKA_PRIME);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dsa1, CKA_SUBPRIME);
        attr2 = pk11_attribute_bytype(dsa2, CKA_SUBPRIME);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dsa1, CKA_BASE);
        attr2 = pk11_attribute_bytype(dsa2, CKA_BASE);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dsa1, CKA_VALUE);
        attr2 = pk11_attribute_bytype(dsa2, CKA_VALUE);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(dsa1, CKA_VALUE2);
        attr2 = pk11_attribute_bytype(dsa2, CKA_VALUE2);
@@ -488,15 +489,15 @@ pkcs11dsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
             (attr1->ulValueLen != attr2->ulValueLen) ||
             !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                attr1->ulValueLen)))
-               return (ISC_FALSE);
+               return (false);
 
        if (!dsa1->ontoken && !dsa2->ontoken)
-               return (ISC_TRUE);
+               return (true);
        else if (dsa1->ontoken || dsa2->ontoken ||
                 (dsa1->object != dsa2->object))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -553,8 +554,8 @@ pkcs11dsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_DSA, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, pk11_get_best_token(OP_DSA));
+       ret = pk11_get_session(pk11_ctx, OP_DSA, true, false,
+                              false, NULL, pk11_get_best_token(OP_DSA));
        if (ret != ISC_R_SUCCESS)
                goto err;
 
@@ -660,15 +661,15 @@ pkcs11dsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11dsa_isprivate(const dst_key_t *key) {
        pk11_object_t *dsa = key->keydata.pkey;
        CK_ATTRIBUTE *attr;
 
        if (dsa == NULL)
-               return (ISC_FALSE);
+               return (false);
        attr = pk11_attribute_bytype(dsa, CKA_VALUE2);
-       return (ISC_TF((attr != NULL) || dsa->ontoken));
+       return (attr != NULL || dsa->ontoken);
 }
 
 static void
index 8f3ee4c4d675f3501f2ff73b4d68bd65c7ae4f09..4a39cc4683fca69c2ca6fcef89120b6481bb0fc1 100644 (file)
@@ -13,6 +13,8 @@
 
 #if defined(PKCS11CRYPTO) && defined(HAVE_PKCS11_ECDSA)
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -95,7 +97,7 @@ pkcs11ecdsa_createctx(dst_key_t *key, dst_context_t *dctx) {
                slotid = ec->slot;
        else
                slotid = pk11_get_best_token(OP_EC);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, slotid);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -229,7 +231,7 @@ pkcs11ecdsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 7,
@@ -336,7 +338,7 @@ pkcs11ecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 7,
@@ -373,7 +375,7 @@ pkcs11ecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11ecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *ec1, *ec2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -382,29 +384,29 @@ pkcs11ecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        ec2 = key2->keydata.pkey;
 
        if ((ec1 == NULL) && (ec2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((ec1 == NULL) || (ec2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(ec1, CKA_EC_PARAMS);
        attr2 = pk11_attribute_bytype(ec2, CKA_EC_PARAMS);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(ec1, CKA_EC_POINT);
        attr2 = pk11_attribute_bytype(ec2, CKA_EC_POINT);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(ec1, CKA_VALUE);
        attr2 = pk11_attribute_bytype(ec2, CKA_VALUE);
@@ -413,15 +415,15 @@ pkcs11ecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
             (attr1->ulValueLen != attr2->ulValueLen) ||
             !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                attr1->ulValueLen)))
-               return (ISC_FALSE);
+               return (false);
 
        if (!ec1->ontoken && !ec2->ontoken)
-               return (ISC_TRUE);
+               return (true);
        else if (ec1->ontoken || ec2->ontoken ||
                 (ec1->object != ec2->object))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 #define SETCURVE() \
@@ -492,8 +494,8 @@ pkcs11ecdsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, pk11_get_best_token(OP_EC));
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
+                              false, NULL, pk11_get_best_token(OP_EC));
        if (ret != ISC_R_SUCCESS)
                goto err;
 
@@ -579,15 +581,15 @@ pkcs11ecdsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11ecdsa_isprivate(const dst_key_t *key) {
        pk11_object_t *ec = key->keydata.pkey;
        CK_ATTRIBUTE *attr;
 
        if (ec == NULL)
-               return (ISC_FALSE);
+               return (false);
        attr = pk11_attribute_bytype(ec, CKA_VALUE);
-       return (ISC_TF((attr != NULL) || ec->ontoken));
+       return (attr != NULL || ec->ontoken);
 }
 
 static void
@@ -825,8 +827,8 @@ pkcs11ecdsa_fetch(dst_key_t *key, const char *engine, const char *label,
        pubec = pub->keydata.pkey;
 
        ec->object = CK_INVALID_HANDLE;
-       ec->ontoken = ISC_TRUE;
-       ec->reqlogon = ISC_TRUE;
+       ec->ontoken = true;
+       ec->reqlogon = true;
        ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
        if (ec->repr == NULL)
                return (ISC_R_NOMEMORY);
@@ -859,7 +861,7 @@ pkcs11ecdsa_fetch(dst_key_t *key, const char *engine, const char *label,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                DST_RET(ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, ec->slot);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -1051,8 +1053,8 @@ pkcs11ecdsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
                return (ISC_R_NOMEMORY);
        memset(ec, 0, sizeof(*ec));
        ec->object = CK_INVALID_HANDLE;
-       ec->ontoken = ISC_TRUE;
-       ec->reqlogon = ISC_TRUE;
+       ec->ontoken = true;
+       ec->reqlogon = true;
        key->keydata.pkey = ec;
 
        ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
@@ -1072,7 +1074,7 @@ pkcs11ecdsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                DST_RET(ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, ec->slot);
        if (ret != ISC_R_SUCCESS)
                goto err;
index ac7f2bb0d55d073b6716a32dbb8a2b90849959ef..015d0e8669fdbfa58d9725485e8450ce459db1c1 100644 (file)
@@ -14,6 +14,8 @@
 #if defined(PKCS11CRYPTO) && \
     defined(HAVE_PKCS11_ED25519) || defined(HAVE_PKCS11_ED448)
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -76,7 +78,7 @@ pkcs11eddsa_createctx(dst_key_t *key, dst_context_t *dctx) {
                dctx->key->key_alg == DST_ALG_ED448);
 
        result = isc_buffer_allocate(dctx->mctx, &buf, 16);
-       isc_buffer_setautorealloc(buf, ISC_TRUE);
+       isc_buffer_setautorealloc(buf, true);
        dctx->ctxdata.generic = buf;
 
        return (result);
@@ -168,7 +170,7 @@ pkcs11eddsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                slotid = ec->slot;
        else
                slotid = pk11_get_best_token(OP_EC);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, slotid);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -209,7 +211,7 @@ pkcs11eddsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 7,
@@ -294,7 +296,7 @@ pkcs11eddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
                slotid = ec->slot;
        else
                slotid = pk11_get_best_token(OP_EC);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, slotid);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -325,7 +327,7 @@ pkcs11eddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 7,
@@ -365,7 +367,7 @@ pkcs11eddsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11eddsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *ec1, *ec2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -374,29 +376,29 @@ pkcs11eddsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        ec2 = key2->keydata.pkey;
 
        if ((ec1 == NULL) && (ec2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((ec1 == NULL) || (ec2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(ec1, CKA_EC_PARAMS);
        attr2 = pk11_attribute_bytype(ec2, CKA_EC_PARAMS);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(ec1, CKA_EC_POINT);
        attr2 = pk11_attribute_bytype(ec2, CKA_EC_POINT);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(ec1, CKA_VALUE);
        attr2 = pk11_attribute_bytype(ec2, CKA_VALUE);
@@ -405,15 +407,15 @@ pkcs11eddsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
             (attr1->ulValueLen != attr2->ulValueLen) ||
             !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                attr1->ulValueLen)))
-               return (ISC_FALSE);
+               return (false);
 
        if (!ec1->ontoken && !ec2->ontoken)
-               return (ISC_TRUE);
+               return (true);
        else if (ec1->ontoken || ec2->ontoken ||
                 (ec1->object != ec2->object))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 #define SETCURVE() \
@@ -484,8 +486,8 @@ pkcs11eddsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, pk11_get_best_token(OP_EC));
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
+                              false, NULL, pk11_get_best_token(OP_EC));
        if (ret != ISC_R_SUCCESS)
                goto err;
 
@@ -572,15 +574,15 @@ pkcs11eddsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11eddsa_isprivate(const dst_key_t *key) {
        pk11_object_t *ec = key->keydata.pkey;
        CK_ATTRIBUTE *attr;
 
        if (ec == NULL)
-               return (ISC_FALSE);
+               return (false);
        attr = pk11_attribute_bytype(ec, CKA_VALUE);
-       return (ISC_TF((attr != NULL) || ec->ontoken));
+       return (attr != NULL || ec->ontoken);
 }
 
 static void
@@ -811,8 +813,8 @@ pkcs11eddsa_fetch(dst_key_t *key, const char *engine, const char *label,
        pubec = pub->keydata.pkey;
 
        ec->object = CK_INVALID_HANDLE;
-       ec->ontoken = ISC_TRUE;
-       ec->reqlogon = ISC_TRUE;
+       ec->ontoken = true;
+       ec->reqlogon = true;
        ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
        if (ec->repr == NULL)
                return (ISC_R_NOMEMORY);
@@ -845,7 +847,7 @@ pkcs11eddsa_fetch(dst_key_t *key, const char *engine, const char *label,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                DST_RET(ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, ec->slot);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -1037,8 +1039,8 @@ pkcs11eddsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
                return (ISC_R_NOMEMORY);
        memset(ec, 0, sizeof(*ec));
        ec->object = CK_INVALID_HANDLE;
-       ec->ontoken = ISC_TRUE;
-       ec->reqlogon = ISC_TRUE;
+       ec->ontoken = true;
+       ec->reqlogon = true;
        key->keydata.pkey = ec;
 
        ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
@@ -1058,7 +1060,7 @@ pkcs11eddsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                DST_RET(ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_EC, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_EC, true, false,
                               ec->reqlogon, NULL, ec->slot);
        if (ret != ISC_R_SUCCESS)
                goto err;
index 55121cf9360caa01123ce8fd59201d6ff619c10d..b5c98f40d70014763d4b3828426607e4381e66cc 100644 (file)
@@ -13,6 +13,8 @@
 
 #if defined(PKCS11CRYPTO) && defined(HAVE_PKCS11_GOST)
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -77,8 +79,8 @@ isc_gost_init(isc_gost_t *ctx) {
        CK_MECHANISM mech = { CKM_GOSTR3411, NULL, 0 };
        int ret = ISC_R_SUCCESS;
 
-       ret = pk11_get_session(ctx, OP_GOST, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, 0);
+       ret = pk11_get_session(ctx, OP_GOST, true, false,
+                              false, NULL, 0);
        if (ret != ISC_R_SUCCESS)
                return (ret);
        PK11_CALL(pkcs_C_DigestInit, (ctx->session, &mech), ISC_R_FAILURE);
@@ -167,7 +169,7 @@ pkcs11gost_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_GOST, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_GOST, true, false,
                               gost->reqlogon, NULL,
                               pk11_get_best_token(OP_GOST));
        if (ret != ISC_R_SUCCESS)
@@ -195,7 +197,7 @@ pkcs11gost_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 9,
@@ -272,7 +274,7 @@ pkcs11gost_createctx_verify(dst_key_t *key, dst_context_t *dctx) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_GOST, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_GOST, true, false,
                               gost->reqlogon, NULL,
                               pk11_get_best_token(OP_GOST));
        if (ret != ISC_R_SUCCESS)
@@ -300,7 +302,7 @@ pkcs11gost_createctx_verify(dst_key_t *key, dst_context_t *dctx) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 8,
@@ -427,7 +429,7 @@ pkcs11gost_verify(dst_context_t *dctx, const isc_region_t *sig) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11gost_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *gost1, *gost2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -436,19 +438,19 @@ pkcs11gost_compare(const dst_key_t *key1, const dst_key_t *key2) {
        gost2 = key2->keydata.pkey;
 
        if ((gost1 == NULL) && (gost2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((gost1 == NULL) || (gost2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(gost1, CKA_VALUE);
        attr2 = pk11_attribute_bytype(gost2, CKA_VALUE);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(gost1, CKA_VALUE2);
        attr2 = pk11_attribute_bytype(gost2, CKA_VALUE2);
@@ -457,15 +459,15 @@ pkcs11gost_compare(const dst_key_t *key1, const dst_key_t *key2) {
             (attr1->ulValueLen != attr2->ulValueLen) ||
             !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                attr1->ulValueLen)))
-               return (ISC_FALSE);
+               return (false);
 
        if (!gost1->ontoken && !gost2->ontoken)
-               return (ISC_TRUE);
+               return (true);
        else if (gost1->ontoken || gost2->ontoken ||
                 (gost1->object != gost2->object))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -511,8 +513,8 @@ pkcs11gost_generate(dst_key_t *key, int unused, void (*callback)(int)) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_GOST, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, pk11_get_best_token(OP_GOST));
+       ret = pk11_get_session(pk11_ctx, OP_GOST, true, false,
+                              false, NULL, pk11_get_best_token(OP_GOST));
        if (ret != ISC_R_SUCCESS)
                goto err;
 
@@ -587,15 +589,15 @@ pkcs11gost_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11gost_isprivate(const dst_key_t *key) {
        pk11_object_t *gost = key->keydata.pkey;
        CK_ATTRIBUTE *attr;
 
        if (gost == NULL)
-               return (ISC_FALSE);
+               return (false);
        attr = pk11_attribute_bytype(gost, CKA_VALUE2);
-       return (ISC_TF((attr != NULL) || gost->ontoken));
+       return (attr != NULL || gost->ontoken);
 }
 
 static void
index 2d0b409435d3e42f83f966616dd3d4950243161b..eb782c85bd5aee22eabd69a7a3d7af2fc801baa1 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/md5.h>
 #include <isc/sha1.h>
@@ -131,7 +133,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                slotid = rsa->slot;
        else
                slotid = pk11_get_best_token(OP_RSA);
-       ret = pk11_get_session(pk11_ctx, OP_RSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_RSA, true, false,
                               rsa->reqlogon, NULL, slotid);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -228,7 +230,7 @@ pkcs11rsa_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 14,
@@ -362,7 +364,7 @@ pkcs11rsa_createctx_verify(dst_key_t *key, unsigned int maxbits,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_RSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_RSA, true, false,
                               rsa->reqlogon, NULL,
                               pk11_get_best_token(OP_RSA));
        if (ret != ISC_R_SUCCESS)
@@ -398,7 +400,7 @@ pkcs11rsa_createctx_verify(dst_key_t *key, unsigned int maxbits,
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 7,
@@ -660,7 +662,7 @@ pkcs11rsa_createctx(dst_key_t *key, dst_context_t *dctx) {
                slotid = rsa->slot;
        else
                slotid = pk11_get_best_token(OP_RSA);
-       ret = pk11_get_session(pk11_ctx, OP_RSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_RSA, true, false,
                               rsa->reqlogon, NULL, slotid);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -918,7 +920,7 @@ pkcs11rsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 14,
@@ -1076,7 +1078,7 @@ pkcs11rsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
                        break;
                }
        pk11_ctx->object = CK_INVALID_HANDLE;
-       pk11_ctx->ontoken = ISC_FALSE;
+       pk11_ctx->ontoken = false;
        PK11_RET(pkcs_C_CreateObject,
                 (pk11_ctx->session,
                  keyTemplate, (CK_ULONG) 7,
@@ -1113,7 +1115,7 @@ pkcs11rsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
 }
 #endif
 
-static isc_boolean_t
+static bool
 pkcs11rsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        pk11_object_t *rsa1, *rsa2;
        CK_ATTRIBUTE *attr1, *attr2;
@@ -1122,29 +1124,29 @@ pkcs11rsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
        rsa2 = key2->keydata.pkey;
 
        if ((rsa1 == NULL) && (rsa2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((rsa1 == NULL) || (rsa2 == NULL))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(rsa1, CKA_MODULUS);
        attr2 = pk11_attribute_bytype(rsa2, CKA_MODULUS);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(rsa1, CKA_PUBLIC_EXPONENT);
        attr2 = pk11_attribute_bytype(rsa2, CKA_PUBLIC_EXPONENT);
        if ((attr1 == NULL) && (attr2 == NULL))
-               return (ISC_TRUE);
+               return (true);
        else if ((attr1 == NULL) || (attr2 == NULL) ||
                 (attr1->ulValueLen != attr2->ulValueLen) ||
                 !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                    attr1->ulValueLen))
-               return (ISC_FALSE);
+               return (false);
 
        attr1 = pk11_attribute_bytype(rsa1, CKA_PRIVATE_EXPONENT);
        attr2 = pk11_attribute_bytype(rsa2, CKA_PRIVATE_EXPONENT);
@@ -1153,15 +1155,15 @@ pkcs11rsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
             (attr1->ulValueLen != attr2->ulValueLen) ||
             !isc_safe_memequal(attr1->pValue, attr2->pValue,
                                attr1->ulValueLen)))
-               return (ISC_FALSE);
+               return (false);
 
        if (!rsa1->ontoken && !rsa2->ontoken)
-               return (ISC_TRUE);
+               return (true);
        else if (rsa1->ontoken || rsa2->ontoken ||
                 (rsa1->object != rsa2->object))
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -1234,8 +1236,8 @@ pkcs11rsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                return (ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_RSA, ISC_TRUE, ISC_FALSE,
-                              ISC_FALSE, NULL, pk11_get_best_token(OP_RSA));
+       ret = pk11_get_session(pk11_ctx, OP_RSA, true, false,
+                              false, NULL, pk11_get_best_token(OP_RSA));
        if (ret != ISC_R_SUCCESS)
                goto err;
 
@@ -1332,15 +1334,15 @@ pkcs11rsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
        return (ret);
 }
 
-static isc_boolean_t
+static bool
 pkcs11rsa_isprivate(const dst_key_t *key) {
        pk11_object_t *rsa = key->keydata.pkey;
        CK_ATTRIBUTE *attr;
 
        if (rsa == NULL)
-               return (ISC_FALSE);
+               return (false);
        attr = pk11_attribute_bytype(rsa, CKA_PRIVATE_EXPONENT);
-       return (ISC_TF((attr != NULL) || rsa->ontoken));
+       return (attr != NULL || rsa->ontoken);
 }
 
 static void
@@ -1725,8 +1727,8 @@ pkcs11rsa_fetch(dst_key_t *key, const char *engine, const char *label,
        pubrsa = pub->keydata.pkey;
 
        rsa->object = CK_INVALID_HANDLE;
-       rsa->ontoken = ISC_TRUE;
-       rsa->reqlogon = ISC_TRUE;
+       rsa->ontoken = true;
+       rsa->reqlogon = true;
        rsa->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
        if (rsa->repr == NULL)
                return (ISC_R_NOMEMORY);
@@ -1759,7 +1761,7 @@ pkcs11rsa_fetch(dst_key_t *key, const char *engine, const char *label,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                DST_RET(ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_RSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_RSA, true, false,
                               rsa->reqlogon, NULL, rsa->slot);
        if (ret != ISC_R_SUCCESS)
                goto err;
@@ -2078,8 +2080,8 @@ pkcs11rsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
                return (ISC_R_NOMEMORY);
        memset(rsa, 0, sizeof(*rsa));
        rsa->object = CK_INVALID_HANDLE;
-       rsa->ontoken = ISC_TRUE;
-       rsa->reqlogon = ISC_TRUE;
+       rsa->ontoken = true;
+       rsa->reqlogon = true;
        key->keydata.pkey = rsa;
 
        rsa->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
@@ -2099,7 +2101,7 @@ pkcs11rsa_fromlabel(dst_key_t *key, const char *engine, const char *label,
                                                  sizeof(*pk11_ctx));
        if (pk11_ctx == NULL)
                DST_RET(ISC_R_NOMEMORY);
-       ret = pk11_get_session(pk11_ctx, OP_RSA, ISC_TRUE, ISC_FALSE,
+       ret = pk11_get_session(pk11_ctx, OP_RSA, true, false,
                               rsa->reqlogon, NULL, rsa->slot);
        if (ret != ISC_R_SUCCESS)
                goto err;
index 625d3e58b6e3bc53fdbfb0d00ce68d0b283d1c3b..7de71785bb0c74877d52a19037d5c6fab332a43c 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/magic.h>
@@ -205,10 +206,10 @@ dns_portlist_remove(dns_portlist_t *portlist, int af, in_port_t port) {
        UNLOCK(&portlist->lock);
 }
 
-isc_boolean_t
+bool
 dns_portlist_match(dns_portlist_t *portlist, int af, in_port_t port) {
        dns_element_t *el;
-       isc_boolean_t result = ISC_FALSE;
+       bool result = false;
 
        REQUIRE(DNS_VALID_PORTLIST(portlist));
        REQUIRE(af == AF_INET || af == AF_INET6);
@@ -217,9 +218,9 @@ dns_portlist_match(dns_portlist_t *portlist, int af, in_port_t port) {
                el = find_port(portlist->list, portlist->active, port);
                if (el != NULL) {
                        if (af == AF_INET && (el->flags & DNS_PL_INET) != 0)
-                               result = ISC_TRUE;
+                               result = true;
                        if (af == AF_INET6 && (el->flags & DNS_PL_INET6) != 0)
-                               result = ISC_TRUE;
+                               result = true;
                }
        }
        UNLOCK(&portlist->lock);
index f700693491e6c8c3d07fb668871f8bcd09f96091..b694f8cd151f3ad3254dca9bbb9e8e49d0687615 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+
 #include <isc/base64.h>
 #include <isc/print.h>
 #include <isc/result.h>
@@ -56,7 +58,7 @@
  * record and keep the param record in this case.
  */
 
-static isc_boolean_t
+static bool
 ignore(dns_rdata_t *param, dns_rdataset_t *privateset) {
        isc_result_t result;
 
@@ -76,7 +78,7 @@ ignore(dns_rdata_t *param, dns_rdataset_t *privateset) {
                 * doesn't matter if we are removing this one.
                 */
                if (CREATE(rdata.data[1]))
-                       return (ISC_FALSE);
+                       return (false);
                if (rdata.data[0] != param->data[0] ||
                    rdata.data[2] != param->data[2] ||
                    rdata.data[3] != param->data[3] ||
@@ -89,21 +91,21 @@ ignore(dns_rdata_t *param, dns_rdataset_t *privateset) {
                 * the caller that it will be removed.
                 */
                if (NONSEC(rdata.data[1]))
-                       return (ISC_FALSE);
-               return (ISC_TRUE);
+                       return (false);
+               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
 dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
                   dns_rdatatype_t privatetype,
-                  isc_boolean_t *build_nsec, isc_boolean_t *build_nsec3)
+                  bool *build_nsec, bool *build_nsec3)
 {
        dns_dbnode_t *node;
        dns_rdataset_t nsecset, nsec3paramset, privateset;
-       isc_boolean_t nsec3chain;
-       isc_boolean_t signing;
+       bool nsec3chain;
+       bool signing;
        isc_result_t result;
        unsigned char buf[DNS_NSEC3PARAM_BUFFERSIZE];
        unsigned int count;
@@ -130,9 +132,9 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
        if (dns_rdataset_isassociated(&nsecset) &&
            dns_rdataset_isassociated(&nsec3paramset)) {
                if (build_nsec != NULL)
-                       *build_nsec = ISC_TRUE;
+                       *build_nsec = true;
                if (build_nsec3 != NULL)
-                       *build_nsec3 = ISC_TRUE;
+                       *build_nsec3 = true;
                goto success;
        }
 
@@ -149,9 +151,9 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
         */
        if (dns_rdataset_isassociated(&nsecset)) {
                if (build_nsec != NULL)
-                       *build_nsec = ISC_TRUE;
+                       *build_nsec = true;
                if (build_nsec3 != NULL)
-                       *build_nsec3 = ISC_FALSE;
+                       *build_nsec3 = false;
                if (!dns_rdataset_isassociated(&privateset))
                        goto success;
                for (result = dns_rdataset_first(&privateset);
@@ -167,7 +169,7 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
                        if (REMOVE(rdata.data[1]))
                                continue;
                        if (build_nsec3 != NULL)
-                               *build_nsec3 = ISC_TRUE;
+                               *build_nsec3 = true;
                        break;
                }
                goto success;
@@ -175,9 +177,9 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
 
        if (dns_rdataset_isassociated(&nsec3paramset)) {
                if (build_nsec3 != NULL)
-                       *build_nsec3 = ISC_TRUE;
+                       *build_nsec3 = true;
                if (build_nsec != NULL)
-                       *build_nsec = ISC_FALSE;
+                       *build_nsec = false;
                if (!dns_rdataset_isassociated(&privateset))
                        goto success;
                /*
@@ -229,19 +231,19 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
                 * have NONSEC set.
                 */
                if (build_nsec != NULL)
-                       *build_nsec = ISC_TRUE;
+                       *build_nsec = true;
                goto success;
        }
 
        if (build_nsec != NULL)
-               *build_nsec = ISC_FALSE;
+               *build_nsec = false;
        if (build_nsec3 != NULL)
-               *build_nsec3 = ISC_FALSE;
+               *build_nsec3 = false;
        if (!dns_rdataset_isassociated(&privateset))
                goto success;
 
-       signing = ISC_FALSE;
-       nsec3chain = ISC_FALSE;
+       signing = false;
+       nsec3chain = false;
 
        for (result = dns_rdataset_first(&privateset);
             result == ISC_R_SUCCESS;
@@ -258,20 +260,20 @@ dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
                         */
                        if (private.length == 5 && private.data[0] != 0 &&
                            private.data[3] == 0 && private.data[4] == 0)
-                               signing = ISC_TRUE;
+                               signing = true;
                } else {
                        if (CREATE(rdata.data[1]))
-                               nsec3chain = ISC_TRUE;
+                               nsec3chain = true;
                }
        }
 
        if (signing) {
                if (nsec3chain) {
                        if (build_nsec3 != NULL)
-                               *build_nsec3 = ISC_TRUE;
+                               *build_nsec3 = true;
                } else {
                        if (build_nsec != NULL)
-                               *build_nsec = ISC_TRUE;
+                               *build_nsec = true;
                }
        }
 
@@ -301,7 +303,7 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
                unsigned char newbuf[DNS_NSEC3PARAM_BUFFERSIZE];
                dns_rdata_t rdata = DNS_RDATA_INIT;
                dns_rdata_nsec3param_t nsec3param;
-               isc_boolean_t del, init, nonsec;
+               bool del, init, nonsec;
                isc_buffer_t b;
 
                if (!dns_nsec3param_fromprivate(private, &rdata, nsec3buf,
@@ -310,9 +312,9 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
 
                CHECK(dns_rdata_tostruct(&rdata, &nsec3param, NULL));
 
-               del = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_REMOVE) != 0);
-               init = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_INITIAL) != 0);
-               nonsec = ISC_TF((nsec3param.flags & DNS_NSEC3FLAG_NONSEC) != 0);
+               del = (nsec3param.flags & DNS_NSEC3FLAG_REMOVE);
+               init = (nsec3param.flags & DNS_NSEC3FLAG_INITIAL);
+               nonsec = (nsec3param.flags & DNS_NSEC3FLAG_NONSEC);
 
                nsec3param.flags &= ~(DNS_NSEC3FLAG_CREATE|
                                      DNS_NSEC3FLAG_REMOVE|
@@ -340,8 +342,8 @@ dns_private_totext(dns_rdata_t *private, isc_buffer_t *buf) {
                unsigned char alg = private->data[0];
                dns_keytag_t keyid = (private->data[2] | private->data[1] << 8);
                char keybuf[BUFSIZ], algbuf[DNS_SECALG_FORMATSIZE];
-               isc_boolean_t del = ISC_TF(private->data[3] != 0);
-               isc_boolean_t complete = ISC_TF(private->data[4] != 0);
+               bool del = (private->data[3] != 0);
+               bool complete = (private->data[4] != 0);
 
                if (del && complete)
                        isc_buffer_putstr(buf, "Done removing signatures for ");
index 4ece983c496b3867d918d496053a67ccd36657da..62d0826e0f281007d2f094ae26984c52fd772430 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <sys/stat.h>
 #include <inttypes.h> /* uintptr_t */
+#include <stdbool.h>
 
 #include <isc/crc64.h>
 #include <isc/file.h>
@@ -138,7 +139,7 @@ static isc_result_t
 write_header(FILE *file, dns_rbt_t *rbt, uint64_t first_node_offset,
             uint64_t crc);
 
-static isc_boolean_t
+static bool
 match_header_version(file_header_t *header);
 
 static isc_result_t
@@ -214,8 +215,8 @@ getdata(dns_rbtnode_t *node, file_header_t *header) {
 #define OLDNAMELEN(node)        ((node)->oldnamelen)
 #define OFFSETLEN(node)         ((node)->offsetlen)
 #define ATTRS(node)             ((node)->attributes)
-#define IS_ROOT(node)           ISC_TF((node)->is_root == 1)
-#define FINDCALLBACK(node)      ISC_TF((node)->find_callback == 1)
+#define IS_ROOT(node)           ((node)->is_root == 1)
+#define FINDCALLBACK(node)      ((node)->find_callback == 1)
 
 /*%
  * Structure elements from the rbtdb.c, not
@@ -455,11 +456,11 @@ treefix(dns_rbt_t *rbt, void *base, size_t size,
        uint64_t *crc);
 
 static void
-deletetreeflat(dns_rbt_t *rbt, unsigned int quantum, isc_boolean_t unhash,
+deletetreeflat(dns_rbt_t *rbt, unsigned int quantum, bool unhash,
               dns_rbtnode_t **nodep);
 
 static void
-printnodename(dns_rbtnode_t *node, isc_boolean_t quoted, FILE *f);
+printnodename(dns_rbtnode_t *node, bool quoted, FILE *f);
 
 static void
 freenode(dns_rbt_t *rbt, dns_rbtnode_t **nodep);
@@ -545,7 +546,7 @@ write_header(FILE *file, dns_rbt_t *rbt, uint64_t first_node_offset,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 match_header_version(file_header_t *header) {
        RUNTIME_CHECK(isc_once_do(&once, init_file_version) == ISC_R_SUCCESS);
 
@@ -554,10 +555,10 @@ match_header_version(file_header_t *header) {
            memcmp(header->version2, FILE_VERSION,
                   sizeof(header->version1)) != 0)
        {
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -1042,7 +1043,7 @@ dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum) {
 
        rbt = *rbtp;
 
-       deletetreeflat(rbt, quantum, ISC_FALSE, &rbt->root);
+       deletetreeflat(rbt, quantum, false, &rbt->root);
        if (rbt->root != NULL)
                return (ISC_R_QUOTA);
 
@@ -1079,7 +1080,7 @@ dns_rbt_hashsize(dns_rbt_t *rbt) {
 
 static inline isc_result_t
 chain_name(dns_rbtnodechain_t *chain, dns_name_t *name,
-          isc_boolean_t include_chain_end)
+          bool include_chain_end)
 {
        dns_name_t nodename;
        isc_result_t result = ISC_R_SUCCESS;
@@ -1604,7 +1605,7 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
                                                  nlabels - tlabels,
                                                  hlabels + tlabels,
                                                  &hash_name);
-                       hash = dns_name_fullhash(&hash_name, ISC_FALSE);
+                       hash = dns_name_fullhash(&hash_name, false);
                        dns_name_getlabelsequence(search_name,
                                                  nlabels - tlabels,
                                                  tlabels, &hash_name);
@@ -1732,7 +1733,7 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
                                    FINDCALLBACK(current)) {
                                        result = chain_name(chain,
                                                            callback_name,
-                                                           ISC_FALSE);
+                                                           false);
                                        if (result != ISC_R_SUCCESS) {
                                                dns_rbtnodechain_reset(chain);
                                                return (result);
@@ -1786,7 +1787,7 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
                chain->level_matches = chain->level_count;
 
                if (foundname != NULL)
-                       result = chain_name(chain, foundname, ISC_TRUE);
+                       result = chain_name(chain, foundname, true);
                else
                        result = ISC_R_SUCCESS;
 
@@ -1823,7 +1824,7 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
                                chain->level_count = chain->level_matches + 1;
 
                                result = chain_name(chain, foundname,
-                                                   ISC_FALSE);
+                                                   false);
 
                                chain->level_count = saved_count;
                        } else
@@ -2028,7 +2029,7 @@ dns_rbt_findname(dns_rbt_t *rbt, const dns_name_t *name, unsigned int options,
  * Delete a name from the tree of trees.
  */
 isc_result_t
-dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, isc_boolean_t recurse) {
+dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, bool recurse) {
        dns_rbtnode_t *node = NULL;
        isc_result_t result;
 
@@ -2101,7 +2102,7 @@ dns_rbt_deletename(dns_rbt_t *rbt, dns_name_t *name, isc_boolean_t recurse) {
  * succeeds. It still returns isc_result_t, though, so the API wouldn't change.
  */
 isc_result_t
-dns_rbt_deletenode(dns_rbt_t *rbt, dns_rbtnode_t *node, isc_boolean_t recurse)
+dns_rbt_deletenode(dns_rbt_t *rbt, dns_rbtnode_t *node, bool recurse)
 {
        dns_rbtnode_t *parent;
 
@@ -2112,7 +2113,7 @@ dns_rbt_deletenode(dns_rbt_t *rbt, dns_rbtnode_t *node, isc_boolean_t recurse)
        if (DOWN(node) != NULL) {
                if (recurse) {
                        PARENT(DOWN(node)) = NULL;
-                       deletetreeflat(rbt, 0, ISC_TRUE, &DOWN(node));
+                       deletetreeflat(rbt, 0, true, &DOWN(node));
                } else {
                        if (DATA(node) != NULL && rbt->data_deleter != NULL)
                                rbt->data_deleter(DATA(node), rbt->deleter_arg);
@@ -2307,7 +2308,7 @@ hash_add_node(dns_rbt_t *rbt, dns_rbtnode_t *node, dns_name_t *name) {
 
        REQUIRE(name != NULL);
 
-       HASHVAL(node) = dns_name_fullhash(name, ISC_FALSE);
+       HASHVAL(node) = dns_name_fullhash(name, false);
 
        hash = HASHVAL(node) % rbt->hashsize;
        HASHNEXT(node) = rbt->hashtable[hash];
@@ -2652,8 +2653,8 @@ deletefromlevel(dns_rbtnode_t *item, dns_rbtnode_t **rootp) {
 
                if (IS_ROOT(item)) {
                        *rootp = successor;
-                       successor->is_root = ISC_TRUE;
-                       item->is_root = ISC_FALSE;
+                       successor->is_root = true;
+                       item->is_root = false;
 
                } else
                        if (LEFT(PARENT(item)) == item)
@@ -2823,7 +2824,7 @@ freenode(dns_rbt_t *rbt, dns_rbtnode_t **nodep) {
 }
 
 static void
-deletetreeflat(dns_rbt_t *rbt, unsigned int quantum, isc_boolean_t unhash,
+deletetreeflat(dns_rbt_t *rbt, unsigned int quantum, bool unhash,
               dns_rbtnode_t **nodep)
 {
        dns_rbtnode_t *root = *nodep;
@@ -2896,31 +2897,31 @@ dns__rbt_getheight(dns_rbt_t *rbt) {
        return (getheight_helper(rbt->root));
 }
 
-static isc_boolean_t
+static bool
 check_properties_helper(dns_rbtnode_t *node) {
        if (node == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        if (IS_RED(node)) {
                /* Root nodes must be BLACK. */
                if (IS_ROOT(node))
-                       return (ISC_FALSE);
+                       return (false);
 
                /* Both children of RED nodes must be BLACK. */
                if (IS_RED(LEFT(node)) || IS_RED(RIGHT(node)))
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        if ((DOWN(node) != NULL) && (!IS_ROOT(DOWN(node))))
-               return (ISC_FALSE);
+               return (false);
 
        if (IS_ROOT(node)) {
                if ((PARENT(node) != NULL) &&
                    (DOWN(PARENT(node)) != node))
-                       return (ISC_FALSE);
+                       return (false);
 
                if (get_upper_node(node) != PARENT(node))
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        /* If node is assigned to the down_ pointer of its parent, it is
@@ -2930,7 +2931,7 @@ check_properties_helper(dns_rbtnode_t *node) {
             (DOWN(PARENT(node)) == node)) &&
            (!IS_ROOT(node)))
        {
-               return (ISC_FALSE);
+               return (false);
        }
 
        /* Repeat tests with this node's children. */
@@ -2939,42 +2940,42 @@ check_properties_helper(dns_rbtnode_t *node) {
                check_properties_helper(DOWN(node)));
 }
 
-static isc_boolean_t
+static bool
 check_black_distance_helper(dns_rbtnode_t *node, size_t *distance) {
        size_t dl, dr, dd;
 
        if (node == NULL) {
                *distance = 1;
-               return (ISC_TRUE);
+               return (true);
        }
 
        if (!check_black_distance_helper(LEFT(node), &dl))
-               return (ISC_FALSE);
+               return (false);
 
        if (!check_black_distance_helper(RIGHT(node), &dr))
-               return (ISC_FALSE);
+               return (false);
 
        if (!check_black_distance_helper(DOWN(node), &dd))
-               return (ISC_FALSE);
+               return (false);
 
        /* Left and right side black node counts must match. */
        if (dl != dr)
-               return (ISC_FALSE);
+               return (false);
 
        if (IS_BLACK(node))
                dl++;
 
        *distance = dl;
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dns__rbt_checkproperties(dns_rbt_t *rbt) {
        size_t dd;
 
        if (!check_properties_helper(rbt->root))
-               return (ISC_FALSE);
+               return (false);
 
        /* Path from a given node to all its leaves must contain the
         * same number of BLACK child nodes. This is done separately
@@ -2997,7 +2998,7 @@ dns_rbt_indent(FILE *f, int depth) {
 void
 dns_rbt_printnodeinfo(dns_rbtnode_t *n, FILE *f) {
        fprintf(f, "Node info for nodename: ");
-       printnodename(n, ISC_TRUE, f);
+       printnodename(n, true, f);
        fprintf(f, "\n");
 
        fprintf(f, "n = %p\n", n);
@@ -3019,7 +3020,7 @@ dns_rbt_printnodeinfo(dns_rbtnode_t *n, FILE *f) {
 }
 
 static void
-printnodename(dns_rbtnode_t *node, isc_boolean_t quoted, FILE *f) {
+printnodename(dns_rbtnode_t *node, bool quoted, FILE *f) {
        isc_region_t r;
        dns_name_t name;
        char buffer[DNS_NAME_FORMATSIZE];
@@ -3047,7 +3048,7 @@ print_text_helper(dns_rbtnode_t *root, dns_rbtnode_t *parent,
        dns_rbt_indent(f, depth);
 
        if (root != NULL) {
-               printnodename(root, ISC_TRUE, f);
+               printnodename(root, true, f);
                fprintf(f, " (%s, %s", direction,
                        IS_RED(root) ? "RED" : "BLACK");
 
@@ -3057,7 +3058,7 @@ print_text_helper(dns_rbtnode_t *root, dns_rbtnode_t *parent,
 
                        fprintf(f, " (BAD parent pointer! -> ");
                        if (PARENT(root) != NULL)
-                               printnodename(PARENT(root), ISC_TRUE, f);
+                               printnodename(PARENT(root), true, f);
                        else
                                fprintf(f, "NULL");
                        fprintf(f, ")");
@@ -3101,7 +3102,7 @@ dns_rbt_printtext(dns_rbt_t *rbt,
 
 static int
 print_dot_helper(dns_rbtnode_t *node, unsigned int *nodecount,
-                isc_boolean_t show_pointers, FILE *f)
+                bool show_pointers, FILE *f)
 {
        unsigned int l, r, d;
 
@@ -3115,7 +3116,7 @@ print_dot_helper(dns_rbtnode_t *node, unsigned int *nodecount,
        *nodecount += 1;
 
        fprintf(f, "node%u[label = \"<f0> |<f1> ", *nodecount);
-       printnodename(node, ISC_FALSE, f);
+       printnodename(node, false, f);
        fprintf(f, "|<f2>");
 
        if (show_pointers)
@@ -3153,7 +3154,7 @@ print_dot_helper(dns_rbtnode_t *node, unsigned int *nodecount,
 }
 
 void
-dns_rbt_printdot(dns_rbt_t *rbt, isc_boolean_t show_pointers, FILE *f) {
+dns_rbt_printdot(dns_rbt_t *rbt, bool show_pointers, FILE *f) {
        unsigned int nodecount = 0;
 
        REQUIRE(VALID_RBT(rbt));
@@ -3220,7 +3221,7 @@ dns_rbtnodechain_current(dns_rbtnodechain_t *chain, dns_name_t *name,
 
        if (origin != NULL) {
                if (chain->level_count > 0)
-                       result = chain_name(chain, origin, ISC_FALSE);
+                       result = chain_name(chain, origin, false);
                else
                        result = dns_name_copy(dns_rootname, origin, NULL);
        }
@@ -3234,7 +3235,7 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name,
 {
        dns_rbtnode_t *current, *previous, *predecessor;
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t new_origin = ISC_FALSE;
+       bool new_origin = false;
 
        REQUIRE(VALID_CHAIN(chain) && chain->end != NULL);
 
@@ -3302,7 +3303,7 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name,
 
                        /* XXX DCL probably needs work on the concept */
                        if (origin != NULL)
-                               new_origin = ISC_TRUE;
+                               new_origin = true;
                }
 
        } else if (chain->level_count > 0) {
@@ -3323,7 +3324,7 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name,
                 */
                if (origin != NULL &&
                    (chain->level_count > 0 || OFFSETLEN(predecessor) > 1))
-                       new_origin = ISC_TRUE;
+                       new_origin = true;
        }
 
        if (predecessor != NULL) {
@@ -3351,7 +3352,7 @@ dns_rbtnodechain_down(dns_rbtnodechain_t *chain, dns_name_t *name,
 {
        dns_rbtnode_t *current, *successor;
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t new_origin = ISC_FALSE;
+       bool new_origin = false;
 
        REQUIRE(VALID_CHAIN(chain) && chain->end != NULL);
 
@@ -3367,7 +3368,7 @@ dns_rbtnodechain_down(dns_rbtnodechain_t *chain, dns_name_t *name,
                 */
                if (chain->level_count > 0 ||
                    OFFSETLEN(current) > 1)
-                       new_origin = ISC_TRUE;
+                       new_origin = true;
 
                ADD_LEVEL(chain, current);
                current = DOWN(current);
@@ -3395,7 +3396,7 @@ dns_rbtnodechain_down(dns_rbtnodechain_t *chain, dns_name_t *name,
 
                if (new_origin) {
                        if (origin != NULL)
-                               result = chain_name(chain, origin, ISC_FALSE);
+                               result = chain_name(chain, origin, false);
 
                        if (result == ISC_R_SUCCESS)
                                result = DNS_R_NEWORIGIN;
@@ -3458,7 +3459,7 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name,
 {
        dns_rbtnode_t *current, *previous, *successor;
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t new_origin = ISC_FALSE;
+       bool new_origin = false;
 
        REQUIRE(VALID_CHAIN(chain) && chain->end != NULL);
 
@@ -3478,7 +3479,7 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name,
                 */
                if (chain->level_count > 0 ||
                    OFFSETLEN(current) > 1)
-                       new_origin = ISC_TRUE;
+                       new_origin = true;
 
                ADD_LEVEL(chain, current);
                current = DOWN(current);
@@ -3533,7 +3534,7 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name,
                                }
 
                                current = chain->levels[--chain->level_count];
-                               new_origin = ISC_TRUE;
+                               new_origin = true;
 
                                if (RIGHT(current) != NULL)
                                        break;
@@ -3573,7 +3574,7 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name,
 
                if (new_origin) {
                        if (origin != NULL)
-                               result = chain_name(chain, origin, ISC_FALSE);
+                               result = chain_name(chain, origin, false);
 
                        if (result == ISC_R_SUCCESS)
                                result = DNS_R_NEWORIGIN;
index f3e2e7960e1992813bfbab397d3ec17885a87ffa..08611399acc85fd3fcb02e4dcac02c71512200cf 100644 (file)
@@ -16,6 +16,7 @@
 /* #define inline */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/crc64.h>
 #include <isc/event.h>
@@ -582,12 +583,12 @@ typedef struct {
        /* Protected in the refcount routines. */
        isc_refcount_t                  references;
        /* Locked by lock. */
-       isc_boolean_t                   exiting;
+       bool                   exiting;
 } rbtdb_nodelock_t;
 
 typedef struct rbtdb_changed {
        dns_rbtnode_t *                 node;
-       isc_boolean_t                   dirty;
+       bool                   dirty;
        ISC_LINK(struct rbtdb_changed)  link;
 } rbtdb_changed_t;
 
@@ -619,13 +620,13 @@ typedef struct rbtdb_version {
         */
        isc_refcount_t                  references;
        /* Locked by database lock. */
-       isc_boolean_t                   writer;
-       isc_boolean_t                   commit_ok;
+       bool                   writer;
+       bool                   commit_ok;
        rbtdb_changedlist_t             changed_list;
        rdatasetheaderlist_t            resigned_list;
        ISC_LINK(struct rbtdb_version)  link;
        dns_db_secure_t                 secure;
-       isc_boolean_t                   havensec3;
+       bool                    havensec3;
        /* NSEC3 parameters */
        dns_hash_t                      hash;
        uint8_t                 flags;
@@ -727,9 +728,9 @@ typedef struct {
        rbtdb_serial_t          serial;
        unsigned int            options;
        dns_rbtnodechain_t      chain;
-       isc_boolean_t           copy_name;
-       isc_boolean_t           need_cleanup;
-       isc_boolean_t           wild;
+       bool           copy_name;
+       bool           need_cleanup;
+       bool           wild;
        dns_rbtnode_t *         zonecut;
        rdatasetheader_t *      zonecut_rdataset;
        rdatasetheader_t *      zonecut_sigrdataset;
@@ -784,14 +785,14 @@ static isc_result_t rdataset_putadditional(dns_acache_t *acache,
                                           dns_rdataset_t *rdataset,
                                           dns_rdatasetadditional_t type,
                                           dns_rdatatype_t qtype);
-static inline isc_boolean_t need_headerupdate(rdatasetheader_t *header,
+static inline 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);
 static void expire_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
-                         isc_boolean_t tree_locked, expire_t reason);
+                         bool tree_locked, expire_t reason);
 static void overmem_purge(dns_rbtdb_t *rbtdb, unsigned int locknum_start,
-                         isc_stdtime_t now, isc_boolean_t tree_locked);
+                         isc_stdtime_t now, bool tree_locked);
 static isc_result_t resign_insert(dns_rbtdb_t *rbtdb, int idx,
                                  rdatasetheader_t *newheader);
 static void resign_delete(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
@@ -903,12 +904,12 @@ static dns_dbiteratormethods_t dbiterator_methods = {
 #define DELETION_BATCH_MAX 64
 
 /*
- * If 'paused' is ISC_TRUE, then the tree lock is not being held.
+ * If 'paused' is true, then the tree lock is not being held.
  */
 typedef struct rbtdb_dbiterator {
        dns_dbiterator_t                common;
-       isc_boolean_t                   paused;
-       isc_boolean_t                   new_origin;
+       bool                   paused;
+       bool                   new_origin;
        isc_rwlocktype_t                tree_locked;
        isc_result_t                    result;
        dns_fixedname_t                 name;
@@ -919,21 +920,21 @@ typedef struct rbtdb_dbiterator {
        dns_rbtnode_t                   *node;
        dns_rbtnode_t                   *deletions[DELETION_BATCH_MAX];
        int                             delcnt;
-       isc_boolean_t                   nsec3only;
-       isc_boolean_t                   nonsec3;
+       bool                    nsec3only;
+       bool                    nonsec3;
 } rbtdb_dbiterator_t;
 
 
 #define IS_STUB(rbtdb)  (((rbtdb)->common.attributes & DNS_DBATTR_STUB)  != 0)
 #define IS_CACHE(rbtdb) (((rbtdb)->common.attributes & DNS_DBATTR_CACHE) != 0)
 
-static void free_rbtdb(dns_rbtdb_t *rbtdb, isc_boolean_t log,
+static void free_rbtdb(dns_rbtdb_t *rbtdb, bool log,
                       isc_event_t *event);
-static void overmem(dns_db_t *db, isc_boolean_t over);
+static void overmem(dns_db_t *db, bool over);
 static void setnsec3parameters(dns_db_t *db, rbtdb_version_t *version);
 static void setownercase(rdatasetheader_t *header, const dns_name_t *name);
 
-static isc_boolean_t match_header_version(rbtdb_file_header_t *header);
+static bool match_header_version(rbtdb_file_header_t *header);
 
 /* Pad to 32 bytes */
 static char FILE_VERSION[32] = "\0";
@@ -1023,7 +1024,7 @@ free_rbtdb_callback(isc_task_t *task, isc_event_t *event) {
 
        UNUSED(task);
 
-       free_rbtdb(rbtdb, ISC_TRUE, event);
+       free_rbtdb(rbtdb, true, event);
 }
 
 static void
@@ -1051,7 +1052,7 @@ update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) {
 
 static void
 update_rrsetstats(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
-                 isc_boolean_t increment)
+                 bool increment)
 {
        dns_rdatastatstype_t statattributes = 0;
        dns_rdatastatstype_t base = 0;
@@ -1115,24 +1116,24 @@ set_ttl(dns_rbtdb_t *rbtdb, rdatasetheader_t *header, dns_ttl_t newttl) {
 
 /*%
  * These functions allow the heap code to rank the priority of each
- * element.  It returns ISC_TRUE if v1 happens "sooner" than v2.
+ * element.  It returns true if v1 happens "sooner" than v2.
  */
-static isc_boolean_t
+static bool
 ttl_sooner(void *v1, void *v2) {
        rdatasetheader_t *h1 = v1;
        rdatasetheader_t *h2 = v2;
 
-       return (ISC_TF(h1->rdh_ttl < h2->rdh_ttl));
+       return (h1->rdh_ttl < h2->rdh_ttl);
 }
 
-static isc_boolean_t
+static bool
 resign_sooner(void *v1, void *v2) {
        rdatasetheader_t *h1 = v1;
        rdatasetheader_t *h2 = v2;
 
-       return (ISC_TF(h1->resign < h2->resign ||
-                      (h1->resign == h2->resign &&
-                       h1->resign_lsb < h2->resign_lsb)));
+       return (h1->resign < h2->resign ||
+               (h1->resign == h2->resign &&
+                h1->resign_lsb < h2->resign_lsb));
 }
 
 /*%
@@ -1196,7 +1197,7 @@ adjust_quantum(unsigned int old, isc_time_t *start) {
 }
 
 static void
-free_rbtdb(dns_rbtdb_t *rbtdb, isc_boolean_t log, isc_event_t *event) {
+free_rbtdb(dns_rbtdb_t *rbtdb, bool log, isc_event_t *event) {
        unsigned int i;
        isc_ondestroy_t ondest;
        isc_result_t result;
@@ -1206,7 +1207,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb, isc_boolean_t log, isc_event_t *event) {
        dns_dbonupdatelistener_t *listener, *listener_next;
 
        if (IS_CACHE(rbtdb) && rbtdb->common.rdclass == dns_rdataclass_in)
-               overmem((dns_db_t *)rbtdb, (isc_boolean_t)-1);
+               overmem((dns_db_t *)rbtdb, (bool)-1);
 
        REQUIRE(rbtdb->current_version != NULL || EMPTY(rbtdb->open_versions));
        REQUIRE(rbtdb->future_version == NULL);
@@ -1379,7 +1380,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb, isc_boolean_t log, isc_event_t *event) {
 
 static inline void
 maybe_free_rbtdb(dns_rbtdb_t *rbtdb) {
-       isc_boolean_t want_free = ISC_FALSE;
+       bool want_free = false;
        unsigned int i;
        unsigned int inactive = 0;
 
@@ -1396,7 +1397,7 @@ maybe_free_rbtdb(dns_rbtdb_t *rbtdb) {
         */
        for (i = 0; i < rbtdb->node_lock_count; i++) {
                NODE_LOCK(&rbtdb->node_locks[i].lock, isc_rwlocktype_write);
-               rbtdb->node_locks[i].exiting = ISC_TRUE;
+               rbtdb->node_locks[i].exiting = true;
                NODE_UNLOCK(&rbtdb->node_locks[i].lock, isc_rwlocktype_write);
                if (isc_refcount_current(&rbtdb->node_locks[i].references)
                    == 0) {
@@ -1408,7 +1409,7 @@ maybe_free_rbtdb(dns_rbtdb_t *rbtdb) {
                RBTDB_LOCK(&rbtdb->lock, isc_rwlocktype_write);
                rbtdb->active -= inactive;
                if (rbtdb->active == 0)
-                       want_free = ISC_TRUE;
+                       want_free = true;
                RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
                if (want_free) {
                        char buf[DNS_NAME_FORMATSIZE];
@@ -1421,7 +1422,7 @@ maybe_free_rbtdb(dns_rbtdb_t *rbtdb) {
                        isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                                      "calling free_rbtdb(%s)", buf);
-                       free_rbtdb(rbtdb, ISC_TRUE, NULL);
+                       free_rbtdb(rbtdb, true, NULL);
                }
        }
 }
@@ -1459,7 +1460,7 @@ currentversion(dns_db_t *db, dns_dbversion_t **versionp) {
 
 static inline rbtdb_version_t *
 allocate_version(isc_mem_t *mctx, rbtdb_serial_t serial,
-                unsigned int references, isc_boolean_t writer)
+                unsigned int references, bool writer)
 {
        isc_result_t result;
        rbtdb_version_t *version;
@@ -1474,7 +1475,7 @@ allocate_version(isc_mem_t *mctx, rbtdb_serial_t serial,
                return (NULL);
        }
        version->writer = writer;
-       version->commit_ok = ISC_FALSE;
+       version->commit_ok = false;
        ISC_LIST_INIT(version->changed_list);
        ISC_LIST_INIT(version->resigned_list);
        ISC_LINK_INIT(version, link);
@@ -1495,10 +1496,10 @@ newversion(dns_db_t *db, dns_dbversion_t **versionp) {
        RBTDB_LOCK(&rbtdb->lock, isc_rwlocktype_write);
        RUNTIME_CHECK(rbtdb->next_serial != 0);         /* XXX Error? */
        version = allocate_version(rbtdb->common.mctx, rbtdb->next_serial, 1,
-                                  ISC_TRUE);
+                                  true);
        if (version != NULL) {
                version->rbtdb = rbtdb;
-               version->commit_ok = ISC_TRUE;
+               version->commit_ok = true;
                version->secure = rbtdb->current_version->secure;
                version->havensec3 = rbtdb->current_version->havensec3;
                if (version->havensec3) {
@@ -1584,10 +1585,10 @@ add_changed(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
                dns_rbtnode_refincrement(node, &refs);
                INSIST(refs != 0);
                changed->node = node;
-               changed->dirty = ISC_FALSE;
+               changed->dirty = false;
                ISC_LIST_INITANDAPPEND(version->changed_list, changed, link);
        } else
-               version->commit_ok = ISC_FALSE;
+               version->commit_ok = false;
 
        RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
 
@@ -1706,7 +1707,7 @@ free_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *rdataset) {
 
        if (EXISTS(rdataset) &&
            (rdataset->attributes & RDATASET_ATTR_STATCOUNT) != 0) {
-               update_rrsetstats(rbtdb, rdataset, ISC_FALSE);
+               update_rrsetstats(rbtdb, rdataset, false);
        }
 
        idx = rdataset->node->locknum;
@@ -1742,7 +1743,7 @@ free_rdataset(dns_rbtdb_t *rbtdb, isc_mem_t *mctx, rdatasetheader_t *rdataset) {
 static inline void
 rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) {
        rdatasetheader_t *header, *dcurrent;
-       isc_boolean_t make_dirty = ISC_FALSE;
+       bool make_dirty = false;
 
        /*
         * Caller must hold the node lock.
@@ -1756,14 +1757,14 @@ rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) {
        for (header = node->data; header != NULL; header = header->next) {
                if (header->serial == serial) {
                        header->attributes |= RDATASET_ATTR_IGNORE;
-                       make_dirty = ISC_TRUE;
+                       make_dirty = true;
                }
                for (dcurrent = header->down;
                     dcurrent != NULL;
                     dcurrent = dcurrent->down) {
                        if (dcurrent->serial == serial) {
                                dcurrent->attributes |= RDATASET_ATTR_IGNORE;
-                               make_dirty = ISC_TRUE;
+                               make_dirty = true;
                        }
                }
        }
@@ -1790,7 +1791,7 @@ mark_stale_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header) {
                return;
 
        if (EXISTS(header))
-               update_rrsetstats(rbtdb, header, ISC_TRUE);
+               update_rrsetstats(rbtdb, header, true);
 }
 
 static inline void
@@ -1841,7 +1842,7 @@ clean_zone_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
        rdatasetheader_t *current, *dcurrent, *down_next, *dparent;
        rdatasetheader_t *top_prev, *top_next;
        isc_mem_t *mctx = rbtdb->common.mctx;
-       isc_boolean_t still_dirty = ISC_FALSE;
+       bool still_dirty = false;
 
        /*
         * Caller must be holding the node lock.
@@ -1940,7 +1941,7 @@ clean_zone_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                 * rdataset.
                 */
                if (current->down != NULL) {
-                       still_dirty = ISC_TRUE;
+                       still_dirty = true;
                        top_prev = current;
                } else {
                        /*
@@ -1999,7 +2000,7 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
                 */
                node_has_rpz = node->rpz;
                node->rpz = 0;
-               result = dns_rbt_deletenode(rbtdb->tree, node, ISC_FALSE);
+               result = dns_rbt_deletenode(rbtdb->tree, node, false);
                if (result == ISC_R_SUCCESS &&
                    rbtdb->rpzs != NULL && node_has_rpz)
                        dns_rpz_delete(rbtdb->rpzs, rbtdb->rpz_num, name);
@@ -2023,7 +2024,7 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
                                      isc_result_totext(result));
                } else {
                        result = dns_rbt_deletenode(rbtdb->nsec, nsecnode,
-                                                   ISC_FALSE);
+                                                   false);
                        if (result != ISC_R_SUCCESS) {
                                isc_log_write(dns_lctx,
                                              DNS_LOGCATEGORY_DATABASE,
@@ -2041,16 +2042,16 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
                 */
                node_has_rpz = node->rpz;
                node->rpz = 0;
-               result = dns_rbt_deletenode(rbtdb->tree, node, ISC_FALSE);
+               result = dns_rbt_deletenode(rbtdb->tree, node, false);
                if (result == ISC_R_SUCCESS &&
                    rbtdb->rpzs != NULL && node_has_rpz)
                        dns_rpz_delete(rbtdb->rpzs, rbtdb->rpz_num, name);
                break;
        case DNS_RBT_NSEC_NSEC:
-               result = dns_rbt_deletenode(rbtdb->nsec, node, ISC_FALSE);
+               result = dns_rbt_deletenode(rbtdb->nsec, node, false);
                break;
        case DNS_RBT_NSEC_NSEC3:
-               result = dns_rbt_deletenode(rbtdb->nsec3, node, ISC_FALSE);
+               result = dns_rbt_deletenode(rbtdb->nsec3, node, false);
                break;
        }
        if (result != ISC_R_SUCCESS) {
@@ -2151,7 +2152,7 @@ reactivate_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
 {
        isc_rwlocktype_t locktype = isc_rwlocktype_read;
        nodelock_t *nodelock = &rbtdb->node_locks[node->locknum].lock;
-       isc_boolean_t maybe_cleanup = ISC_FALSE;
+       bool maybe_cleanup = false;
 
        POST(locktype);
 
@@ -2164,7 +2165,7 @@ reactivate_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
         */
        if (!ISC_LIST_EMPTY(rbtdb->deadnodes[node->locknum]) &&
            treelocktype == isc_rwlocktype_write) {
-               maybe_cleanup = ISC_TRUE;
+               maybe_cleanup = true;
        }
 
        if (ISC_LINK_LINKED(node, deadlink) || maybe_cleanup) {
@@ -2196,24 +2197,24 @@ reactivate_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
  * threads are decreasing the reference to zero simultaneously and at least
  * one of them is going to free the node.
  *
- * This function returns ISC_TRUE if and only if the node reference decreases
+ * This function returns true if and only if the node reference decreases
  * to zero.
  *
  * NOTE: Decrementing the reference count of a node to zero does not mean it
  * will be immediately freed.
  */
-static isc_boolean_t
+static bool
 decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                    rbtdb_serial_t least_serial,
                    isc_rwlocktype_t nlock, isc_rwlocktype_t tlock,
-                   isc_boolean_t pruning)
+                   bool pruning)
 {
        isc_result_t result;
-       isc_boolean_t write_locked;
+       bool write_locked;
        rbtdb_nodelock_t *nodelock;
        unsigned int refs, nrefs;
        int bucket = node->locknum;
-       isc_boolean_t no_reference = ISC_TRUE;
+       bool no_reference = true;
 
        nodelock = &rbtdb->node_locks[bucket];
 
@@ -2229,7 +2230,7 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                        isc_refcount_decrement(&nodelock->references, &refs);
                        INSIST((int)refs >= 0);
                }
-               return ((nrefs == 0) ? ISC_TRUE : ISC_FALSE);
+               return ((nrefs == 0) ? true : false);
        }
 
        /* Upgrade the lock? */
@@ -2244,7 +2245,7 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                /* Restore the lock? */
                if (nlock == isc_rwlocktype_read)
                        NODE_WEAKDOWNGRADE(&nodelock->lock);
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (node->dirty) {
@@ -2284,9 +2285,9 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                RUNTIME_CHECK(result == ISC_R_SUCCESS ||
                              result == ISC_R_LOCKBUSY);
 
-               write_locked = ISC_TF(result == ISC_R_SUCCESS);
+               write_locked = (result == ISC_R_SUCCESS);
        } else
-               write_locked = ISC_TRUE;
+               write_locked = true;
 
        isc_refcount_decrement(&nodelock->references, &refs);
        INSIST((int)refs >= 0);
@@ -2333,7 +2334,7 @@ decrement_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                                attach((dns_db_t *)rbtdb, &db);
                                ev->ev_sender = db;
                                isc_task_send(rbtdb->task, &ev);
-                               no_reference = ISC_FALSE;
+                               no_reference = false;
                        } else {
                                /*
                                 * XXX: this is a weird situation.  We could
@@ -2407,7 +2408,7 @@ prune_tree(isc_task_t *task, isc_event_t *event) {
        do {
                parent = node->parent;
                decrement_reference(rbtdb, node, 0, isc_rwlocktype_write,
-                                   isc_rwlocktype_write, ISC_TRUE);
+                                   isc_rwlocktype_write, true);
 
                if (parent != NULL && parent->down == NULL) {
                        /*
@@ -2494,8 +2495,8 @@ static void
 iszonesecure(dns_db_t *db, rbtdb_version_t *version, dns_dbnode_t *origin) {
        dns_rdataset_t keyset;
        dns_rdataset_t nsecset, signsecset;
-       isc_boolean_t haszonekey = ISC_FALSE;
-       isc_boolean_t hasnsec = ISC_FALSE;
+       bool haszonekey = false;
+       bool hasnsec = false;
        isc_result_t result;
 
        dns_rdataset_init(&keyset);
@@ -2507,7 +2508,7 @@ iszonesecure(dns_db_t *db, rbtdb_version_t *version, dns_dbnode_t *origin) {
                        dns_rdata_t keyrdata = DNS_RDATA_INIT;
                        dns_rdataset_current(&keyset, &keyrdata);
                        if (dns_zonekey_iszonekey(&keyrdata)) {
-                               haszonekey = ISC_TRUE;
+                               haszonekey = true;
                                break;
                        }
                        result = dns_rdataset_next(&keyset);
@@ -2516,7 +2517,7 @@ iszonesecure(dns_db_t *db, rbtdb_version_t *version, dns_dbnode_t *origin) {
        }
        if (!haszonekey) {
                version->secure = dns_db_insecure;
-               version->havensec3 = ISC_FALSE;
+               version->havensec3 = false;
                return;
        }
 
@@ -2526,7 +2527,7 @@ iszonesecure(dns_db_t *db, rbtdb_version_t *version, dns_dbnode_t *origin) {
                                     0, 0, &nsecset, &signsecset);
        if (result == ISC_R_SUCCESS) {
                if (dns_rdataset_isassociated(&signsecset)) {
-                       hasnsec = ISC_TRUE;
+                       hasnsec = true;
                        dns_rdataset_disassociate(&signsecset);
                }
                dns_rdataset_disassociate(&nsecset);
@@ -2560,7 +2561,7 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
 
        RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
-       version->havensec3 = ISC_FALSE;
+       version->havensec3 = false;
        node = rbtdb->origin_node;
        NODE_LOCK(&(rbtdb->node_locks[node->locknum].lock),
                  isc_rwlocktype_read);
@@ -2623,7 +2624,7 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
                                version->salt_length = nsec3param.salt_length;
                                version->iterations = nsec3param.iterations;
                                version->flags = nsec3param.flags;
-                               version->havensec3 = ISC_TRUE;
+                               version->havensec3 = true;
                                /*
                                 * Look for a better algorithm than the
                                 * unknown test algorithm.
@@ -2642,7 +2643,7 @@ setnsec3parameters(dns_db_t *db, rbtdb_version_t *version) {
 static void
 cleanup_dead_nodes_callback(isc_task_t *task, isc_event_t *event) {
        dns_rbtdb_t *rbtdb = event->ev_arg;
-       isc_boolean_t again = ISC_FALSE;
+       bool again = false;
        unsigned int locknum;
        unsigned int refs;
 
@@ -2652,7 +2653,7 @@ cleanup_dead_nodes_callback(isc_task_t *task, isc_event_t *event) {
                          isc_rwlocktype_write);
                cleanup_dead_nodes(rbtdb, locknum);
                if (ISC_LIST_HEAD(rbtdb->deadnodes[locknum]) != NULL)
-                       again = ISC_TRUE;
+                       again = true;
                NODE_UNLOCK(&rbtdb->node_locks[locknum].lock,
                            isc_rwlocktype_write);
        }
@@ -2668,10 +2669,10 @@ cleanup_dead_nodes_callback(isc_task_t *task, isc_event_t *event) {
 }
 
 static void
-closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
+closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
        rbtdb_version_t *version, *cleanup_version, *least_greater;
-       isc_boolean_t rollback = ISC_FALSE;
+       bool rollback = false;
        rbtdb_changedlist_t cleanup_list;
        rdatasetheaderlist_t resigned_list;
        rbtdb_changed_t *changed, *next_changed;
@@ -2765,7 +2766,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
                        /*
                         * Become the current version.
                         */
-                       version->writer = ISC_FALSE;
+                       version->writer = false;
                        rbtdb->current_version = version;
                        rbtdb->current_serial = version->serial;
                        rbtdb->future_version = NULL;
@@ -2792,7 +2793,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
                        ISC_LIST_INIT(version->changed_list);
                        resigned_list = version->resigned_list;
                        ISC_LIST_INIT(version->resigned_list);
-                       rollback = ISC_TRUE;
+                       rollback = true;
                        cleanup_version = version;
                        rbtdb->future_version = NULL;
                }
@@ -2873,7 +2874,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
                }
                decrement_reference(rbtdb, header->node, least_serial,
                                    isc_rwlocktype_write, isc_rwlocktype_none,
-                                   ISC_FALSE);
+                                   false);
                NODE_UNLOCK(lock, isc_rwlocktype_write);
        }
 
@@ -2921,7 +2922,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
                                rollback_node(rbtnode, serial);
                        decrement_reference(rbtdb, rbtnode, least_serial,
                                            isc_rwlocktype_write, tlock,
-                                           ISC_FALSE);
+                                           false);
 
                        NODE_UNLOCK(lock, isc_rwlocktype_write);
 
@@ -3007,7 +3008,7 @@ add_empty_wildcards(dns_rbtdb_t *rbtdb, dns_name_t *name) {
 
 static isc_result_t
 findnodeintree(dns_rbtdb_t *rbtdb, dns_rbt_t *tree, dns_name_t *name,
-              isc_boolean_t create, dns_dbnode_t **nodep)
+              bool create, dns_dbnode_t **nodep)
 {
        dns_rbtnode_t *node = NULL;
        dns_name_t nodename;
@@ -3040,7 +3041,7 @@ findnodeintree(dns_rbtdb_t *rbtdb, dns_rbt_t *tree, dns_name_t *name,
 #ifdef DNS_RBT_USEHASH
                        node->locknum = node->hashval % rbtdb->node_lock_count;
 #else
-                       node->locknum = dns_name_hash(&nodename, ISC_TRUE) %
+                       node->locknum = dns_name_hash(&nodename, true) %
                                rbtdb->node_lock_count;
 #endif
                        if (tree == rbtdb->tree) {
@@ -3103,7 +3104,7 @@ findnodeintree(dns_rbtdb_t *rbtdb, dns_rbt_t *tree, dns_name_t *name,
 }
 
 static isc_result_t
-findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnode(dns_db_t *db, dns_name_t *name, bool create,
         dns_dbnode_t **nodep)
 {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
@@ -3114,7 +3115,7 @@ findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
 }
 
 static isc_result_t
-findnsec3node(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnsec3node(dns_db_t *db, dns_name_t *name, bool create,
              dns_dbnode_t **nodep)
 {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
@@ -3221,13 +3222,13 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
                new_reference(search->rbtdb, node);
                search->zonecut = node;
                search->zonecut_rdataset = found;
-               search->need_cleanup = ISC_TRUE;
+               search->need_cleanup = true;
                /*
                 * Since we've found a zonecut, anything beneath it is
                 * glue and is not subject to wildcard matching, so we
                 * may clear search->wild.
                 */
-               search->wild = ISC_FALSE;
+               search->wild = false;
                if ((search->options & DNS_DBFIND_GLUEOK) == 0) {
                        /*
                         * If the caller does not want to find glue, then
@@ -3246,7 +3247,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
                        zcname = dns_fixedname_name(&search->zonecut_name);
                        RUNTIME_CHECK(dns_name_copy(name, zcname, NULL) ==
                                      ISC_R_SUCCESS);
-                       search->copy_name = ISC_TRUE;
+                       search->copy_name = true;
                }
        } else {
                /*
@@ -3259,7 +3260,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
                 * later on.
                 */
                if (node->wild && (search->options & DNS_DBFIND_NOWILD) == 0)
-                       search->wild = ISC_TRUE;
+                       search->wild = true;
        }
 
        NODE_UNLOCK(&(search->rbtdb->node_locks[node->locknum].lock),
@@ -3375,7 +3376,7 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
                 * already have in the search block.
                 */
                *nodep = node;
-               search->need_cleanup = ISC_FALSE;
+               search->need_cleanup = false;
        }
        if (rdataset != NULL) {
                NODE_LOCK(&(search->rbtdb->node_locks[node->locknum].lock),
@@ -3395,14 +3396,14 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
        return (DNS_R_DELEGATION);
 }
 
-static inline isc_boolean_t
+static inline bool
 valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type,
           dns_rbtnode_t *node)
 {
        unsigned char *raw;     /* RDATASLAB */
        unsigned int count, size;
        dns_name_t ns_name;
-       isc_boolean_t valid = ISC_FALSE;
+       bool valid = false;
        dns_offsets_t offsets;
        isc_region_t region;
        rdatasetheader_t *header;
@@ -3417,12 +3418,12 @@ valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type,
         */
        if (type == dns_rdatatype_ns) {
                if (node != search->zonecut) {
-                       return (ISC_FALSE);
+                       return (false);
                }
        } else if (type != dns_rdatatype_a &&
                   type != dns_rdatatype_aaaa &&
                   type != dns_rdatatype_a6) {
-               return (ISC_FALSE);
+               return (false);
        }
 
        header = search->zonecut_rdataset;
@@ -3452,7 +3453,7 @@ valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type,
                dns_name_init(&ns_name, offsets);
                dns_name_fromregion(&ns_name, &region);
                if (dns_name_compare(&ns_name, name) == 0) {
-                       valid = ISC_TRUE;
+                       valid = true;
                        break;
                }
        }
@@ -3460,7 +3461,7 @@ valid_glue(rbtdb_search_t *search, dns_name_t *name, rbtdb_rdatatype_t type,
        return (valid);
 }
 
-static inline isc_boolean_t
+static inline bool
 activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain,
            dns_name_t *name)
 {
@@ -3472,7 +3473,7 @@ activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain,
        dns_rbtdb_t *rbtdb;
        dns_rbtnode_t *node;
        isc_result_t result;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
        rdatasetheader_t *header;
 
        rbtdb = search->rbtdb;
@@ -3506,11 +3507,11 @@ activeempty(rbtdb_search_t *search, dns_rbtnodechain_t *chain,
        if (result == ISC_R_SUCCESS)
                result = dns_name_concatenate(&prefix, origin, next, NULL);
        if (result == ISC_R_SUCCESS && dns_name_issubdomain(next, name))
-               answer = ISC_TRUE;
+               answer = true;
        return (answer);
 }
 
-static inline isc_boolean_t
+static inline bool
 activeemtpynode(rbtdb_search_t *search, dns_name_t *qname, dns_name_t *wname) {
        dns_fixedname_t fnext;
        dns_fixedname_t forigin;
@@ -3524,9 +3525,9 @@ activeemtpynode(rbtdb_search_t *search, dns_name_t *qname, dns_name_t *wname) {
        dns_rbtdb_t *rbtdb;
        dns_rbtnode_t *node;
        dns_rbtnodechain_t chain;
-       isc_boolean_t check_next = ISC_TRUE;
-       isc_boolean_t check_prev = ISC_TRUE;
-       isc_boolean_t answer = ISC_FALSE;
+       bool check_next = true;
+       bool check_prev = true;
+       bool answer = false;
        isc_result_t result;
        rdatasetheader_t *header;
        unsigned int n;
@@ -3570,7 +3571,7 @@ activeemtpynode(rbtdb_search_t *search, dns_name_t *qname, dns_name_t *wname) {
        if (result == ISC_R_SUCCESS)
                result = dns_name_concatenate(&name, origin, prev, NULL);
        if (result != ISC_R_SUCCESS)
-               check_prev = ISC_FALSE;
+               check_prev = false;
 
        result = dns_rbtnodechain_next(&chain, NULL, NULL);
        while (result == ISC_R_SUCCESS || result == DNS_R_NEWORIGIN) {
@@ -3597,7 +3598,7 @@ activeemtpynode(rbtdb_search_t *search, dns_name_t *qname, dns_name_t *wname) {
        if (result == ISC_R_SUCCESS)
                result = dns_name_concatenate(&name, origin, next, NULL);
        if (result != ISC_R_SUCCESS)
-               check_next = ISC_FALSE;
+               check_next = false;
 
        dns_name_clone(qname, &rname);
 
@@ -3610,7 +3611,7 @@ activeemtpynode(rbtdb_search_t *search, dns_name_t *qname, dns_name_t *wname) {
        do {
                if ((check_prev && dns_name_issubdomain(prev, &rname)) ||
                    (check_next && dns_name_issubdomain(next, &rname))) {
-                       answer = ISC_TRUE;
+                       answer = true;
                        break;
                }
                /*
@@ -3634,7 +3635,7 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep,
        dns_name_t *wname;
        dns_fixedname_t fwname;
        dns_rbtdb_t *rbtdb;
-       isc_boolean_t done, wild, active;
+       bool done, wild, active;
        dns_rbtnodechain_t wchain;
 
        /*
@@ -3654,7 +3655,7 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep,
 
        rbtdb = search->rbtdb;
        i = search->chain.level_matches;
-       done = ISC_FALSE;
+       done = false;
        node = *nodep;
        do {
                NODE_LOCK(&(rbtdb->node_locks[node->locknum].lock),
@@ -3674,14 +3675,14 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep,
                                break;
                }
                if (header != NULL)
-                       active = ISC_TRUE;
+                       active = true;
                else
-                       active = ISC_FALSE;
+                       active = false;
 
                if (node->wild)
-                       wild = ISC_TRUE;
+                       wild = true;
                else
-                       wild = ISC_FALSE;
+                       wild = false;
 
                NODE_UNLOCK(&(rbtdb->node_locks[node->locknum].lock),
                            isc_rwlocktype_read);
@@ -3771,13 +3772,13 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep,
                        i--;
                        node = search->chain.levels[i];
                } else
-                       done = ISC_TRUE;
+                       done = true;
        } while (!done);
 
        return (result);
 }
 
-static isc_boolean_t
+static bool
 matchparams(rdatasetheader_t *header, rbtdb_search_t *search)
 {
        dns_rdata_t rdata = DNS_RDATA_INIT;
@@ -3815,10 +3816,10 @@ matchparams(rdatasetheader_t *header, rbtdb_search_t *search)
                    nsec3.salt_length == search->rbtversion->salt_length &&
                    memcmp(nsec3.salt, search->rbtversion->salt,
                           nsec3.salt_length) == 0)
-                       return (ISC_TRUE);
+                       return (true);
                dns_rdata_reset(&rdata);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -3828,7 +3829,7 @@ static inline 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,
-                   isc_boolean_t *firstp)
+                   bool *firstp)
 {
        dns_fixedname_t ftarget;
        dns_name_t *target;
@@ -3854,7 +3855,7 @@ previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search,
                         * Construct the name of the second node to check.
                         * It is the first node sought in the NSEC tree.
                         */
-                       *firstp = ISC_FALSE;
+                       *firstp = false;
                        dns_rbtnodechain_init(nsecchain, NULL);
                        result = dns_name_concatenate(name, origin,
                                                      target, NULL);
@@ -3943,24 +3944,24 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
        dns_rbtnode_t *node, *prevnode;
        rdatasetheader_t *header, *header_next, *found, *foundsig;
        dns_rbtnodechain_t nsecchain;
-       isc_boolean_t empty_node;
+       bool empty_node;
        isc_result_t result;
        dns_fixedname_t fname, forigin;
        dns_name_t *name, *origin;
        dns_rdatatype_t type;
        rbtdb_rdatatype_t sigtype;
-       isc_boolean_t wraps;
-       isc_boolean_t first = ISC_TRUE;
-       isc_boolean_t need_sig = ISC_TF(secure == dns_db_secure);
+       bool wraps;
+       bool first = true;
+       bool need_sig = (secure == dns_db_secure);
 
        if (tree == search->rbtdb->nsec3) {
                type = dns_rdatatype_nsec3;
                sigtype = RBTDB_RDATATYPE_SIGNSEC3;
-               wraps = ISC_TRUE;
+               wraps = true;
        } else {
                type = dns_rdatatype_nsec;
                sigtype = RBTDB_RDATATYPE_SIGNSEC;
-               wraps = ISC_FALSE;
+               wraps = false;
        }
 
        /*
@@ -3980,7 +3981,7 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                          isc_rwlocktype_read);
                found = NULL;
                foundsig = NULL;
-               empty_node = ISC_TRUE;
+               empty_node = true;
                for (header = node->data;
                     header != NULL;
                     header = header_next) {
@@ -4006,7 +4007,7 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                                 * We now know that there is at least one
                                 * active rdataset at this node.
                                 */
-                               empty_node = ISC_FALSE;
+                               empty_node = false;
                                if (header->type == type) {
                                        found = header;
                                        if (foundsig != NULL)
@@ -4022,7 +4023,7 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                        if (found != NULL && search->rbtversion->havensec3 &&
                            found->type == dns_rdatatype_nsec3 &&
                            !matchparams(found, search)) {
-                               empty_node = ISC_TRUE;
+                               empty_node = true;
                                found = NULL;
                                foundsig = NULL;
                                result = previous_closest_nsec(type, search,
@@ -4066,7 +4067,7 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                                 * relevant for our search.  Treat the
                                 * node as if it were empty and keep looking.
                                 */
-                               empty_node = ISC_TRUE;
+                               empty_node = true;
                                result = previous_closest_nsec(type, search,
                                                               name, origin,
                                                               &prevnode,
@@ -4102,7 +4103,7 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                result = dns_rbtnodechain_last(&search->chain, tree,
                                               NULL, NULL);
                if (result == ISC_R_SUCCESS || result == DNS_R_NEWORIGIN) {
-                       wraps = ISC_FALSE;
+                       wraps = false;
                        goto again;
                }
        }
@@ -4127,16 +4128,16 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        dns_rbtnode_t *node = NULL;
        isc_result_t result;
        rbtdb_search_t search;
-       isc_boolean_t cname_ok = ISC_TRUE;
-       isc_boolean_t close_version = ISC_FALSE;
-       isc_boolean_t maybe_zonecut = ISC_FALSE;
-       isc_boolean_t at_zonecut = ISC_FALSE;
-       isc_boolean_t wild;
-       isc_boolean_t empty_node;
+       bool cname_ok = true;
+       bool close_version = false;
+       bool maybe_zonecut = false;
+       bool at_zonecut = false;
+       bool wild;
+       bool empty_node;
        rdatasetheader_t *header, *header_next, *found, *nsecheader;
        rdatasetheader_t *foundsig, *cnamesig, *nsecsig;
        rbtdb_rdatatype_t sigtype;
-       isc_boolean_t active;
+       bool active;
        dns_rbtnodechain_t chain;
        nodelock_t *lock;
        dns_rbt_t *tree;
@@ -4158,15 +4159,15 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
         */
        if (version == NULL) {
                currentversion(db, &version);
-               close_version = ISC_TRUE;
+               close_version = true;
        }
 
        search.rbtversion = version;
        search.serial = search.rbtversion->serial;
        search.options = options;
-       search.copy_name = ISC_FALSE;
-       search.need_cleanup = ISC_FALSE;
-       search.wild = ISC_FALSE;
+       search.copy_name = false;
+       search.need_cleanup = false;
+       search.wild = false;
        search.zonecut = NULL;
        dns_fixedname_init(&search.zonecut_name);
        dns_rbtnodechain_init(&search.chain, search.rbtdb->common.mctx);
@@ -4175,7 +4176,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        /*
         * 'wild' will be true iff. we've matched a wildcard.
         */
-       wild = ISC_FALSE;
+       wild = false;
 
        RWLOCK(&search.rbtdb->tree_lock, isc_rwlocktype_read);
 
@@ -4210,7 +4211,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                                result = dns_name_copy(name, foundname, NULL);
                                if (result != ISC_R_SUCCESS)
                                        goto tree_exit;
-                               wild = ISC_TRUE;
+                               wild = true;
                                goto found;
                        }
                        else if (result != ISC_R_NOTFOUND)
@@ -4252,7 +4253,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                 * If we're beneath a zone cut, we don't want to look for
                 * CNAMEs because they're not legitimate zone glue.
                 */
-               cname_ok = ISC_FALSE;
+               cname_ok = false;
        } else {
                /*
                 * The node may be a zone cut itself.  If it might be one,
@@ -4268,7 +4269,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                    ((node != search.rbtdb->origin_node &&
                      !dns_rdatatype_atparent(type)) ||
                     IS_STUB(search.rbtdb)))
-                       maybe_zonecut = ISC_TRUE;
+                       maybe_zonecut = true;
        }
 
        /*
@@ -4279,7 +4280,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
         * directly.
         */
        if (type == dns_rdatatype_key || type == dns_rdatatype_nsec)
-               cname_ok = ISC_FALSE;
+               cname_ok = false;
 
        /*
         * We now go looking for rdata...
@@ -4294,7 +4295,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        nsecheader = NULL;
        nsecsig = NULL;
        cnamesig = NULL;
-       empty_node = ISC_TRUE;
+       empty_node = true;
        for (header = node->data; header != NULL; header = header_next) {
                header_next = header->next;
                /*
@@ -4318,7 +4319,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                         * We now know that there is at least one active
                         * rdataset at this node.
                         */
-                       empty_node = ISC_FALSE;
+                       empty_node = false;
 
                        /*
                         * Do special zone cut handling, if requested.
@@ -4334,9 +4335,9 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                                search.zonecut = node;
                                search.zonecut_rdataset = header;
                                search.zonecut_sigrdataset = NULL;
-                               search.need_cleanup = ISC_TRUE;
-                               maybe_zonecut = ISC_FALSE;
-                               at_zonecut = ISC_TRUE;
+                               search.need_cleanup = true;
+                               maybe_zonecut = false;
+                               at_zonecut = true;
                                /*
                                 * It is not clear if KEY should still be
                                 * allowed at the parent side of the zone
@@ -4583,7 +4584,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                if (!at_zonecut)
                        new_reference(search.rbtdb, node);
                else
-                       search.need_cleanup = ISC_FALSE;
+                       search.need_cleanup = false;
                *nodep = node;
        }
 
@@ -4615,12 +4616,12 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                NODE_LOCK(lock, isc_rwlocktype_read);
                decrement_reference(search.rbtdb, node, 0,
                                    isc_rwlocktype_read, isc_rwlocktype_none,
-                                   ISC_FALSE);
+                                   false);
                NODE_UNLOCK(lock, isc_rwlocktype_read);
        }
 
        if (close_version)
-               closeversion(db, &version, ISC_FALSE);
+               closeversion(db, &version, false);
 
        dns_rbtnodechain_reset(&search.chain);
 
@@ -4648,7 +4649,7 @@ zone_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
        return (ISC_R_NOTIMPLEMENTED);
 }
 
-static isc_boolean_t
+static bool
 check_stale_header(dns_rbtnode_t *node, rdatasetheader_t *header,
                   isc_rwlocktype_t *locktype, nodelock_t *lock,
                   rbtdb_search_t *search, rdatasetheader_t **header_prev)
@@ -4703,9 +4704,9 @@ check_stale_header(dns_rbtnode_t *node, rdatasetheader_t *header,
                        }
                } else
                        *header_prev = header;
-               return (ISC_TRUE);
+               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -4766,7 +4767,7 @@ cache_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
                search->zonecut = node;
                search->zonecut_rdataset = dname_header;
                search->zonecut_sigrdataset = sigdname_header;
-               search->need_cleanup = ISC_TRUE;
+               search->need_cleanup = true;
                result = DNS_R_PARTIALMATCH;
        } else
                result = DNS_R_CONTINUE;
@@ -4788,7 +4789,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
        isc_result_t result = ISC_R_NOTFOUND;
        dns_name_t name;
        dns_rbtdb_t *rbtdb;
-       isc_boolean_t done;
+       bool done;
        nodelock_t *lock;
        isc_rwlocktype_t locktype;
 
@@ -4798,7 +4799,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
 
        rbtdb = search->rbtdb;
        i = search->chain.level_matches;
-       done = ISC_FALSE;
+       done = false;
        do {
                locktype = isc_rwlocktype_read;
                lock = &rbtdb->node_locks[node->locknum].lock;
@@ -4903,7 +4904,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
                        i--;
                        node = search->chain.levels[i];
                } else
-                       done = ISC_TRUE;
+                       done = true;
 
        } while (!done);
 
@@ -4918,7 +4919,7 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
        dns_rbtnode_t *node;
        rdatasetheader_t *header, *header_next, *header_prev;
        rdatasetheader_t *found, *foundsig;
-       isc_boolean_t empty_node;
+       bool empty_node;
        isc_result_t result;
        dns_fixedname_t fname, forigin;
        dns_name_t *name, *origin;
@@ -4943,7 +4944,7 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                NODE_LOCK(lock, locktype);
                found = NULL;
                foundsig = NULL;
-               empty_node = ISC_TRUE;
+               empty_node = true;
                header_prev = NULL;
                for (header = node->data; header != NULL; header = header_next) {
                        header_next = header->next;
@@ -4957,7 +4958,7 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
                                header_prev = header;
                                continue;
                        }
-                       empty_node = ISC_FALSE;
+                       empty_node = false;
                        if (header->type == matchtype)
                                found = header;
                        else if (header->type == sigmatchtype)
@@ -5037,8 +5038,8 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        dns_rbtnode_t *node = NULL;
        isc_result_t result;
        rbtdb_search_t search;
-       isc_boolean_t cname_ok = ISC_TRUE;
-       isc_boolean_t empty_node;
+       bool cname_ok = true;
+       bool empty_node;
        nodelock_t *lock;
        isc_rwlocktype_t locktype;
        rdatasetheader_t *header, *header_prev, *header_next;
@@ -5060,9 +5061,9 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        search.rbtversion = NULL;
        search.serial = 1;
        search.options = options;
-       search.copy_name = ISC_FALSE;
-       search.need_cleanup = ISC_FALSE;
-       search.wild = ISC_FALSE;
+       search.copy_name = false;
+       search.need_cleanup = false;
+       search.wild = false;
        search.zonecut = NULL;
        dns_fixedname_init(&search.zonecut_name);
        dns_rbtnodechain_init(&search.chain, search.rbtdb->common.mctx);
@@ -5111,7 +5112,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
         * directly.
         */
        if (type == dns_rdatatype_key || type == dns_rdatatype_nsec)
-               cname_ok = ISC_FALSE;
+               cname_ok = false;
 
        /*
         * We now go looking for rdata...
@@ -5128,7 +5129,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
        nsheader = NULL;
        nssig = NULL;
        cnamesig = NULL;
-       empty_node = ISC_TRUE;
+       empty_node = true;
        header_prev = NULL;
        for (header = node->data; header != NULL; header = header_next) {
                header_next = header->next;
@@ -5141,7 +5142,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                         * We now know that there is at least one active
                         * non-stale rdataset at this node.
                         */
-                       empty_node = ISC_FALSE;
+                       empty_node = false;
 
                        /*
                         * If we found a type we were looking for, remember
@@ -5332,7 +5333,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                NODE_LOCK(lock, isc_rwlocktype_read);
                decrement_reference(search.rbtdb, node, 0,
                                    isc_rwlocktype_read, isc_rwlocktype_none,
-                                   ISC_FALSE);
+                                   false);
                NODE_UNLOCK(lock, isc_rwlocktype_read);
        }
 
@@ -5367,9 +5368,9 @@ cache_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
        search.rbtversion = NULL;
        search.serial = 1;
        search.options = options;
-       search.copy_name = ISC_FALSE;
-       search.need_cleanup = ISC_FALSE;
-       search.wild = ISC_FALSE;
+       search.copy_name = false;
+       search.need_cleanup = false;
+       search.wild = false;
        search.zonecut = NULL;
        dns_fixedname_init(&search.zonecut_name);
        dns_rbtnodechain_init(&search.chain, search.rbtdb->common.mctx);
@@ -5506,8 +5507,8 @@ static void
 detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
        dns_rbtnode_t *node;
-       isc_boolean_t want_free = ISC_FALSE;
-       isc_boolean_t inactive = ISC_FALSE;
+       bool want_free = false;
+       bool inactive = false;
        rbtdb_nodelock_t *nodelock;
 
        REQUIRE(VALID_RBTDB(rbtdb));
@@ -5519,10 +5520,10 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
        NODE_LOCK(&nodelock->lock, isc_rwlocktype_read);
 
        if (decrement_reference(rbtdb, node, 0, isc_rwlocktype_read,
-                               isc_rwlocktype_none, ISC_FALSE)) {
+                               isc_rwlocktype_none, false)) {
                if (isc_refcount_current(&nodelock->references) == 0 &&
                    nodelock->exiting) {
-                       inactive = ISC_TRUE;
+                       inactive = true;
                }
        }
 
@@ -5534,7 +5535,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
                RBTDB_LOCK(&rbtdb->lock, isc_rwlocktype_write);
                rbtdb->active--;
                if (rbtdb->active == 0)
-                       want_free = ISC_TRUE;
+                       want_free = true;
                RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
                if (want_free) {
                        char buf[DNS_NAME_FORMATSIZE];
@@ -5546,7 +5547,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
                        isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                                      "calling free_rbtdb(%s)", buf);
-                       free_rbtdb(rbtdb, ISC_TRUE, NULL);
+                       free_rbtdb(rbtdb, true, NULL);
                }
        }
 }
@@ -5556,11 +5557,11 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
        dns_rbtnode_t *rbtnode = node;
        rdatasetheader_t *header;
-       isc_boolean_t force_expire = ISC_FALSE;
+       bool force_expire = false;
        /*
         * These are the category and module used by the cache cleaner.
         */
-       isc_boolean_t log = ISC_FALSE;
+       bool log = false;
        isc_logcategory_t *category = DNS_LOGCATEGORY_DATABASE;
        isc_logmodule_t *module = DNS_LOGMODULE_CACHE;
        int level = ISC_LOG_DEBUG(2);
@@ -5582,14 +5583,14 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
                /*
                 * XXXDCL Could stand to have a better policy, like LRU.
                 */
-               force_expire = ISC_TF(rbtnode->down == NULL && val % 4 == 0);
+               force_expire = (rbtnode->down == NULL && val % 4 == 0);
 
                /*
                 * Note that 'log' can be true IFF overmem is also true.
                 * overmem can currently only be true for cache
                 * databases -- hence all of the "overmem cache" log strings.
                 */
-               log = ISC_TF(isc_log_wouldlog(dns_lctx, level));
+               log = isc_log_wouldlog(dns_lctx, level);
                if (log)
                        isc_log_write(dns_lctx, category, module, level,
                                      "overmem cache: %s %s",
@@ -5640,7 +5641,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
 }
 
 static void
-overmem(dns_db_t *db, isc_boolean_t over) {
+overmem(dns_db_t *db, bool over) {
        /* This is an empty callback.  See adb.c:water() */
 
        UNUSED(db);
@@ -5653,7 +5654,7 @@ static void
 printnode(dns_db_t *db, dns_dbnode_t *node, FILE *out) {
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
        dns_rbtnode_t *rbtnode = node;
-       isc_boolean_t first;
+       bool first;
 
        REQUIRE(VALID_RBTDB(rbtdb));
 
@@ -5669,12 +5670,12 @@ printnode(dns_db_t *db, dns_dbnode_t *node, FILE *out) {
                for (current = rbtnode->data; current != NULL;
                     current = top_next) {
                        top_next = current->next;
-                       first = ISC_TRUE;
+                       first = true;
                        fprintf(out, "\ttype %u", current->type);
                        do {
                                if (!first)
                                        fprintf(out, "\t");
-                               first = ISC_FALSE;
+                               first = false;
                                fprintf(out,
                                        "\tserial = %lu, ttl = %u, "
                                        "trust = %u, attributes = %u, "
@@ -5710,19 +5711,18 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
        rbtdbiter->common.methods = &dbiterator_methods;
        rbtdbiter->common.db = NULL;
        dns_db_attach(db, &rbtdbiter->common.db);
-       rbtdbiter->common.relative_names =
-                       ISC_TF((options & DNS_DB_RELATIVENAMES) != 0);
+       rbtdbiter->common.relative_names = (options & DNS_DB_RELATIVENAMES);
        rbtdbiter->common.magic = DNS_DBITERATOR_MAGIC;
-       rbtdbiter->common.cleaning = ISC_FALSE;
-       rbtdbiter->paused = ISC_TRUE;
+       rbtdbiter->common.cleaning = false;
+       rbtdbiter->paused = true;
        rbtdbiter->tree_locked = isc_rwlocktype_none;
        rbtdbiter->result = ISC_R_SUCCESS;
        dns_fixedname_init(&rbtdbiter->name);
        dns_fixedname_init(&rbtdbiter->origin);
        rbtdbiter->node = NULL;
        rbtdbiter->delcnt = 0;
-       rbtdbiter->nsec3only = ISC_TF((options & DNS_DB_NSEC3ONLY) != 0);
-       rbtdbiter->nonsec3 = ISC_TF((options & DNS_DB_NONSEC3) != 0);
+       rbtdbiter->nsec3only = (options & DNS_DB_NSEC3ONLY);
+       rbtdbiter->nonsec3 = (options & DNS_DB_NONSEC3);
        memset(rbtdbiter->deletions, 0, sizeof(rbtdbiter->deletions));
        dns_rbtnodechain_init(&rbtdbiter->chain, db->mctx);
        dns_rbtnodechain_init(&rbtdbiter->nsec3chain, db->mctx);
@@ -5747,7 +5747,7 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
        rdatasetheader_t *header, *header_next, *found, *foundsig;
        rbtdb_serial_t serial;
        rbtdb_version_t *rbtversion = version;
-       isc_boolean_t close_version = ISC_FALSE;
+       bool close_version = false;
        rbtdb_rdatatype_t matchtype, sigmatchtype;
 
        REQUIRE(VALID_RBTDB(rbtdb));
@@ -5756,7 +5756,7 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
 
        if (rbtversion == NULL) {
                currentversion(db, (dns_dbversion_t **) (void *)(&rbtversion));
-               close_version = ISC_TRUE;
+               close_version = true;
        }
        serial = rbtversion->serial;
        now = 0;
@@ -5815,7 +5815,7 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
 
        if (close_version)
                closeversion(db, (dns_dbversion_t **) (void *)(&rbtversion),
-                            ISC_FALSE);
+                            false);
 
        if (found == NULL)
                return (ISC_R_NOTFOUND);
@@ -5973,10 +5973,10 @@ allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 cname_and_other_data(dns_rbtnode_t *node, rbtdb_serial_t serial) {
        rdatasetheader_t *header, *header_next;
-       isc_boolean_t cname, other_data;
+       bool cname, other_data;
        dns_rdatatype_t rdtype;
 
        /*
@@ -5986,8 +5986,8 @@ cname_and_other_data(dns_rbtnode_t *node, rbtdb_serial_t serial) {
        /*
         * Look for CNAME and "other data" rdatasets active in our version.
         */
-       cname = ISC_FALSE;
-       other_data = ISC_FALSE;
+       cname = false;
+       other_data = false;
        for (header = node->data; header != NULL; header = header_next) {
                header_next = header->next;
                if (header->type == dns_rdatatype_cname) {
@@ -6008,7 +6008,7 @@ cname_and_other_data(dns_rbtnode_t *node, rbtdb_serial_t serial) {
                                        header = header->down;
                        } while (header != NULL);
                        if (header != NULL)
-                               cname = ISC_TRUE;
+                               cname = true;
                } else {
                        /*
                         * Look for active extant "other data".
@@ -6038,15 +6038,15 @@ cname_and_other_data(dns_rbtnode_t *node, rbtdb_serial_t serial) {
                                                header = header->down;
                                } while (header != NULL);
                                if (header != NULL)
-                                       other_data = ISC_TRUE;
+                                       other_data = true;
                        }
                }
        }
 
        if (cname && other_data)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -6080,7 +6080,7 @@ resign_delete(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
 }
 
 static void
-update_recordsandbytes(isc_boolean_t add, rbtdb_version_t *rbtversion,
+update_recordsandbytes(bool add, rbtdb_version_t *rbtversion,
                       rdatasetheader_t *header)
 {
        unsigned char *hdr = (unsigned char *)header;
@@ -6097,16 +6097,16 @@ update_recordsandbytes(isc_boolean_t add, rbtdb_version_t *rbtversion,
 
 static isc_result_t
 add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
-      rdatasetheader_t *newheader, unsigned int options, isc_boolean_t loading,
+      rdatasetheader_t *newheader, unsigned int options, bool loading,
       dns_rdataset_t *addedrdataset, isc_stdtime_t now)
 {
        rbtdb_changed_t *changed = NULL;
        rdatasetheader_t *topheader, *topheader_prev, *header, *sigheader;
        unsigned char *merged;
        isc_result_t result;
-       isc_boolean_t header_nx;
-       isc_boolean_t newheader_nx;
-       isc_boolean_t merge;
+       bool header_nx;
+       bool newheader_nx;
+       bool merge;
        dns_rdatatype_t rdtype, covers;
        rbtdb_rdatatype_t negtype, sigtype;
        dns_trust_t trust;
@@ -6122,9 +6122,9 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
 
        if ((options & DNS_DBADD_MERGE) != 0) {
                REQUIRE(rbtversion != NULL);
-               merge = ISC_TRUE;
+               merge = true;
        } else
-               merge = ISC_FALSE;
+               merge = false;
 
        if ((options & DNS_DBADD_FORCE) != 0)
                trust = dns_trust_ultimate;
@@ -6144,7 +6144,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
                }
        }
 
-       newheader_nx = NONEXISTENT(newheader) ? ISC_TRUE : ISC_FALSE;
+       newheader_nx = NONEXISTENT(newheader) ? true : false;
        topheader_prev = NULL;
        sigheader = NULL;
        negtype = 0;
@@ -6256,7 +6256,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
        while (header != NULL && IGNORE(header))
                header = header->down;
        if (header != NULL) {
-               header_nx = NONEXISTENT(header) ? ISC_TRUE : ISC_FALSE;
+               header_nx = NONEXISTENT(header) ? true : false;
 
                /*
                 * Deleting an already non-existent rdataset has no effect.
@@ -6283,10 +6283,10 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
                 * Don't merge if a nonexistent rdataset is involved.
                 */
                if (merge && (header_nx || newheader_nx))
-                       merge = ISC_FALSE;
+                       merge = false;
 
                /*
-                * If 'merge' is ISC_TRUE, we'll try to create a new rdataset
+                * If 'merge' is true, we'll try to create a new rdataset
                 * that is the union of 'newheader' and 'header'.
                 */
                if (merge) {
@@ -6473,7 +6473,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
                        if (rbtversion != NULL && !header_nx) {
                                RWLOCK(&rbtversion->rwlock,
                                       isc_rwlocktype_write);
-                               update_recordsandbytes(ISC_FALSE, rbtversion,
+                               update_recordsandbytes(false, rbtversion,
                                                       header);
                                RWUNLOCK(&rbtversion->rwlock,
                                         isc_rwlocktype_write);
@@ -6516,7 +6516,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
                        topheader->next = newheader;
                        rbtnode->dirty = 1;
                        if (changed != NULL)
-                               changed->dirty = ISC_TRUE;
+                               changed->dirty = true;
                        if (rbtversion == NULL) {
                                set_ttl(rbtdb, header, 0);
                                mark_stale_header(rbtdb, header);
@@ -6528,7 +6528,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
                        if (rbtversion != NULL && !header_nx) {
                                RWLOCK(&rbtversion->rwlock,
                                       isc_rwlocktype_write);
-                               update_recordsandbytes(ISC_FALSE, rbtversion,
+                               update_recordsandbytes(false, rbtversion,
                                                       header);
                                RWUNLOCK(&rbtversion->rwlock,
                                         isc_rwlocktype_write);
@@ -6593,7 +6593,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
                        topheader->next = newheader;
                        rbtnode->dirty = 1;
                        if (changed != NULL)
-                               changed->dirty = ISC_TRUE;
+                               changed->dirty = true;
                } else {
                        /*
                         * No rdatasets of the given type exist at the node.
@@ -6606,7 +6606,7 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
 
        if (rbtversion != NULL && !newheader_nx) {
                RWLOCK(&rbtversion->rwlock, isc_rwlocktype_write);
-               update_recordsandbytes(ISC_TRUE, rbtversion, newheader);
+               update_recordsandbytes(true, rbtversion, newheader);
                RWUNLOCK(&rbtversion->rwlock, isc_rwlocktype_write);
        }
 
@@ -6623,20 +6623,20 @@ add32(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
        return (ISC_R_SUCCESS);
 }
 
-static inline isc_boolean_t
+static inline bool
 delegating_type(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
                rbtdb_rdatatype_t type)
 {
        if (IS_CACHE(rbtdb)) {
                if (type == dns_rdatatype_dname)
-                       return (ISC_TRUE);
+                       return (true);
                else
-                       return (ISC_FALSE);
+                       return (false);
        } else if (type == dns_rdatatype_dname ||
                   (type == dns_rdatatype_ns &&
                    (node != rbtdb->origin_node || IS_STUB(rbtdb))))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 static inline isc_result_t
@@ -6755,10 +6755,10 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
        rdatasetheader_t *newheader;
        rdatasetheader_t *header;
        isc_result_t result;
-       isc_boolean_t delegating;
-       isc_boolean_t newnsec;
-       isc_boolean_t tree_locked = ISC_FALSE;
-       isc_boolean_t cache_is_overmem = ISC_FALSE;
+       bool delegating;
+       bool newnsec;
+       bool tree_locked = false;
+       bool cache_is_overmem = false;
        dns_fixedname_t fixed;
        dns_name_t *name;
 
@@ -6856,18 +6856,18 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
         * on the node.
         */
        if (delegating_type(rbtdb, rbtnode, rdataset->type))
-               delegating = ISC_TRUE;
+               delegating = true;
        else
-               delegating = ISC_FALSE;
+               delegating = false;
 
        /*
         * Add to the auxiliary NSEC tree if we're adding an NSEC record.
         */
        if (rbtnode->nsec != DNS_RBT_NSEC_HAS_NSEC &&
            rdataset->type == dns_rdatatype_nsec)
-               newnsec = ISC_TRUE;
+               newnsec = true;
        else
-               newnsec = ISC_FALSE;
+               newnsec = false;
 
        /*
         * If we're adding a delegation type, adding to the auxiliary NSEC tree,
@@ -6876,9 +6876,9 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
         * be acquired but it will help purge stale entries more effectively.
         */
        if (IS_CACHE(rbtdb) && isc_mem_isovermem(rbtdb->common.mctx))
-               cache_is_overmem = ISC_TRUE;
+               cache_is_overmem = true;
        if (delegating || newnsec || cache_is_overmem) {
-               tree_locked = ISC_TRUE;
+               tree_locked = true;
                RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);
        }
 
@@ -6890,7 +6890,7 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
 
        if (rbtdb->rrsetstats != NULL) {
                newheader->attributes |= RDATASET_ATTR_STATCOUNT;
-               update_rrsetstats(rbtdb, newheader, ISC_TRUE);
+               update_rrsetstats(rbtdb, newheader, true);
        }
 
        if (IS_CACHE(rbtdb)) {
@@ -6909,7 +6909,7 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                 */
                if (tree_locked && !delegating && !newnsec) {
                        RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);
-                       tree_locked = ISC_FALSE;
+                       tree_locked = false;
                }
        }
 
@@ -6931,7 +6931,7 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
 
        if (result == ISC_R_SUCCESS)
                result = add32(rbtdb, rbtnode, rbtversion, newheader, options,
-                              ISC_FALSE, addedrdataset, now);
+                              false, addedrdataset, now);
        if (result == ISC_R_SUCCESS && delegating)
                rbtnode->find_callback = 1;
 
@@ -7081,7 +7081,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                         */
                        newheader->additional_auth = NULL;
                        newheader->additional_glue = NULL;
-                       update_recordsandbytes(ISC_TRUE, rbtversion, newheader);
+                       update_recordsandbytes(true, rbtversion, newheader);
                } else if (result == DNS_R_NXRRSET) {
                        /*
                         * This subtraction would remove all of the rdata;
@@ -7118,7 +7118,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                 * topheader.
                 */
                INSIST(rbtversion->serial >= topheader->serial);
-               update_recordsandbytes(ISC_FALSE, rbtversion, header);
+               update_recordsandbytes(false, rbtversion, header);
                if (topheader_prev != NULL)
                        topheader_prev->next = newheader;
                else
@@ -7127,7 +7127,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                newheader->down = topheader;
                topheader->next = newheader;
                rbtnode->dirty = 1;
-               changed->dirty = ISC_TRUE;
+               changed->dirty = true;
                resign_delete(rbtdb, rbtversion, header);
        } else {
                /*
@@ -7204,7 +7204,7 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                  isc_rwlocktype_write);
 
        result = add32(rbtdb, rbtnode, rbtversion, newheader, DNS_DBADD_FORCE,
-                      ISC_FALSE, NULL, 0);
+                      false, NULL, 0);
 
        NODE_UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
                    isc_rwlocktype_write);
@@ -7224,7 +7224,7 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
  */
 static isc_result_t
 loadnode(dns_rbtdb_t *rbtdb, dns_name_t *name, dns_rbtnode_t **nodep,
-        isc_boolean_t hasnsec)
+        bool hasnsec)
 {
        isc_result_t noderesult, rpzresult, nsecresult, tmpresult;
        dns_rbtnode_t *nsecnode = NULL, *node = NULL;
@@ -7241,7 +7241,7 @@ loadnode(dns_rbtdb_t *rbtdb, dns_name_t *name, dns_rbtnode_t **nodep,
                         * Remove the node we just added above.
                         */
                        tmpresult = dns_rbt_deletenode(rbtdb->tree, node,
-                                                      ISC_FALSE);
+                                                      false);
                        if (tmpresult != ISC_R_SUCCESS)
                                isc_log_write(dns_lctx,
                                              DNS_LOGCATEGORY_DATABASE,
@@ -7305,7 +7305,7 @@ loadnode(dns_rbtdb_t *rbtdb, dns_name_t *name, dns_rbtnode_t **nodep,
                 */
                node_has_rpz = node->rpz;
                node->rpz = 0;
-               tmpresult = dns_rbt_deletenode(rbtdb->tree, node, ISC_FALSE);
+               tmpresult = dns_rbt_deletenode(rbtdb->tree, node, false);
                if (tmpresult == ISC_R_SUCCESS) {
                        /*
                         * Clean rpz entries added above.
@@ -7389,9 +7389,9 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
                if (result == ISC_R_SUCCESS)
                        node->nsec = DNS_RBT_NSEC_NSEC3;
        } else if (rdataset->type == dns_rdatatype_nsec) {
-               result = loadnode(rbtdb, name, &node, ISC_TRUE);
+               result = loadnode(rbtdb, name, &node, true);
        } else {
-               result = loadnode(rbtdb, name, &node, ISC_FALSE);
+               result = loadnode(rbtdb, name, &node, false);
        }
        if (result != ISC_R_SUCCESS && result != ISC_R_EXISTS)
                return (result);
@@ -7402,7 +7402,7 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
 #ifdef DNS_RBT_USEHASH
                node->locknum = node->hashval % rbtdb->node_lock_count;
 #else
-               node->locknum = dns_name_hash(&foundname, ISC_TRUE) %
+               node->locknum = dns_name_hash(&foundname, true) %
                        rbtdb->node_lock_count;
 #endif
        }
@@ -7441,7 +7441,7 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
        }
 
        result = add32(rbtdb, node, rbtdb->current_version, newheader,
-                      DNS_DBADD_MERGE, ISC_TRUE, NULL, 0);
+                      DNS_DBADD_MERGE, true, NULL, 0);
        if (result == ISC_R_SUCCESS &&
            delegating_type(rbtdb, node, rdataset->type))
                node->find_callback = 1;
@@ -7866,7 +7866,7 @@ rbtdb_write_header(FILE *rbtfile, off_t tree_location, off_t nsec_location,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 match_header_version(rbtdb_file_header_t *header) {
        RUNTIME_CHECK(isc_once_do(&once, init_file_version) == ISC_R_SUCCESS);
 
@@ -7875,10 +7875,10 @@ match_header_version(rbtdb_file_header_t *header) {
            memcmp(header->version2, FILE_VERSION,
                   sizeof(header->version1)) != 0)
        {
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -7958,33 +7958,33 @@ delete_callback(void *data, void *arg) {
        NODE_UNLOCK(&rbtdb->node_locks[locknum].lock, isc_rwlocktype_write);
 }
 
-static isc_boolean_t
+static bool
 issecure(dns_db_t *db) {
        dns_rbtdb_t *rbtdb;
-       isc_boolean_t secure;
+       bool secure;
 
        rbtdb = (dns_rbtdb_t *)db;
 
        REQUIRE(VALID_RBTDB(rbtdb));
 
        RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
-       secure = ISC_TF(rbtdb->current_version->secure == dns_db_secure);
+       secure = (rbtdb->current_version->secure == dns_db_secure);
        RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
 
        return (secure);
 }
 
-static isc_boolean_t
+static bool
 isdnssec(dns_db_t *db) {
        dns_rbtdb_t *rbtdb;
-       isc_boolean_t dnssec;
+       bool dnssec;
 
        rbtdb = (dns_rbtdb_t *)db;
 
        REQUIRE(VALID_RBTDB(rbtdb));
 
        RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
-       dnssec = ISC_TF(rbtdb->current_version->secure != dns_db_insecure);
+       dnssec = (rbtdb->current_version->secure != dns_db_insecure);
        RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
 
        return (dnssec);
@@ -8038,10 +8038,10 @@ settask(dns_db_t *db, isc_task_t *task) {
        RBTDB_UNLOCK(&rbtdb->lock, isc_rwlocktype_write);
 }
 
-static isc_boolean_t
+static bool
 ispersistent(dns_db_t *db) {
        UNUSED(db);
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -8425,7 +8425,7 @@ dns_rbtdb_create
        isc_result_t result;
        int i;
        dns_name_t name;
-       isc_boolean_t (*sooner)(void *, void *);
+       bool (*sooner)(void *, void *);
        isc_mem_t *hmctx = mctx;
 
        /* Keep the compiler happy. */
@@ -8552,7 +8552,7 @@ dns_rbtdb_create
                        }
                        goto cleanup_deadnodes;
                }
-               rbtdb->node_locks[i].exiting = ISC_FALSE;
+               rbtdb->node_locks[i].exiting = false;
        }
 
        /*
@@ -8573,7 +8573,7 @@ dns_rbtdb_create
         */
        result = dns_name_dupwithoffsets(origin, mctx, &rbtdb->common.origin);
        if (result != ISC_R_SUCCESS) {
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (result);
        }
 
@@ -8582,19 +8582,19 @@ dns_rbtdb_create
         */
        result = dns_rbt_create(mctx, delete_callback, rbtdb, &rbtdb->tree);
        if (result != ISC_R_SUCCESS) {
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (result);
        }
 
        result = dns_rbt_create(mctx, delete_callback, rbtdb, &rbtdb->nsec);
        if (result != ISC_R_SUCCESS) {
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (result);
        }
 
        result = dns_rbt_create(mctx, delete_callback, rbtdb, &rbtdb->nsec3);
        if (result != ISC_R_SUCCESS) {
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (result);
        }
 
@@ -8617,7 +8617,7 @@ dns_rbtdb_create
                                         &rbtdb->origin_node);
                if (result != ISC_R_SUCCESS) {
                        INSIST(result != ISC_R_EXISTS);
-                       free_rbtdb(rbtdb, ISC_FALSE, NULL);
+                       free_rbtdb(rbtdb, false, NULL);
                        return (result);
                }
                INSIST(rbtdb->origin_node != NULL);
@@ -8633,7 +8633,7 @@ dns_rbtdb_create
                        rbtdb->node_lock_count;
 #else
                rbtdb->origin_node->locknum =
-                       dns_name_hash(&name, ISC_TRUE) %
+                       dns_name_hash(&name, true) %
                        rbtdb->node_lock_count;
 #endif
                /*
@@ -8646,7 +8646,7 @@ dns_rbtdb_create
                                         &rbtdb->nsec3_origin_node);
                if (result != ISC_R_SUCCESS) {
                        INSIST(result != ISC_R_EXISTS);
-                       free_rbtdb(rbtdb, ISC_FALSE, NULL);
+                       free_rbtdb(rbtdb, false, NULL);
                        return (result);
                }
                rbtdb->nsec3_origin_node->nsec = DNS_RBT_NSEC_NSEC3;
@@ -8661,7 +8661,7 @@ dns_rbtdb_create
                        rbtdb->node_lock_count;
 #else
                rbtdb->nsec3_origin_node->locknum =
-                       dns_name_hash(&name, ISC_TRUE) %
+                       dns_name_hash(&name, true) %
                        rbtdb->node_lock_count;
 #endif
        }
@@ -8671,7 +8671,7 @@ dns_rbtdb_create
         */
        result = isc_refcount_init(&rbtdb->references, 1);
        if (result != ISC_R_SUCCESS) {
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (result);
        }
        rbtdb->attributes = 0;
@@ -8686,15 +8686,15 @@ dns_rbtdb_create
        rbtdb->current_serial = 1;
        rbtdb->least_serial = 1;
        rbtdb->next_serial = 2;
-       rbtdb->current_version = allocate_version(mctx, 1, 1, ISC_FALSE);
+       rbtdb->current_version = allocate_version(mctx, 1, 1, false);
        if (rbtdb->current_version == NULL) {
                isc_refcount_decrement(&rbtdb->references, NULL);
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (ISC_R_NOMEMORY);
        }
        rbtdb->current_version->rbtdb = rbtdb;
        rbtdb->current_version->secure = dns_db_insecure;
-       rbtdb->current_version->havensec3 = ISC_FALSE;
+       rbtdb->current_version->havensec3 = false;
        rbtdb->current_version->flags = 0;
        rbtdb->current_version->iterations = 0;
        rbtdb->current_version->hash = 0;
@@ -8708,7 +8708,7 @@ dns_rbtdb_create
                            sizeof(*rbtdb->current_version));
                rbtdb->current_version = NULL;
                isc_refcount_decrement(&rbtdb->references, NULL);
-               free_rbtdb(rbtdb, ISC_FALSE, NULL);
+               free_rbtdb(rbtdb, false, NULL);
                return (result);
        }
 
@@ -9028,7 +9028,7 @@ rdataset_expire(dns_rdataset_t *rdataset) {
        header--;
        NODE_LOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
                  isc_rwlocktype_write);
-       expire_header(rbtdb, header, ISC_FALSE, expire_flush);
+       expire_header(rbtdb, header, false, expire_flush);
        NODE_UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
                  isc_rwlocktype_write);
 }
@@ -9059,7 +9059,7 @@ rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp) {
 
        if (rbtiterator->common.version != NULL)
                closeversion(rbtiterator->common.db,
-                            &rbtiterator->common.version, ISC_FALSE);
+                            &rbtiterator->common.version, false);
        detachnode(rbtiterator->common.db, &rbtiterator->common.node);
        isc_mem_put(rbtiterator->common.db->mctx, rbtiterator,
                    sizeof(*rbtiterator));
@@ -9249,7 +9249,7 @@ dereference_iter_node(rbtdb_dbiterator_t *rbtdbiter) {
        lock = &rbtdb->node_locks[node->locknum].lock;
        NODE_LOCK(lock, isc_rwlocktype_read);
        decrement_reference(rbtdb, node, 0, isc_rwlocktype_read,
-                           rbtdbiter->tree_locked, ISC_FALSE);
+                           rbtdbiter->tree_locked, false);
        NODE_UNLOCK(lock, isc_rwlocktype_read);
 
        rbtdbiter->node = NULL;
@@ -9259,7 +9259,7 @@ static void
 flush_deletions(rbtdb_dbiterator_t *rbtdbiter) {
        dns_rbtnode_t *node;
        dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db;
-       isc_boolean_t was_read_locked = ISC_FALSE;
+       bool was_read_locked = false;
        nodelock_t *lock;
        int i;
 
@@ -9278,7 +9278,7 @@ flush_deletions(rbtdb_dbiterator_t *rbtdbiter) {
 
                if (rbtdbiter->tree_locked == isc_rwlocktype_read) {
                        RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
-                       was_read_locked = ISC_TRUE;
+                       was_read_locked = true;
                }
                RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);
                rbtdbiter->tree_locked = isc_rwlocktype_write;
@@ -9290,7 +9290,7 @@ flush_deletions(rbtdb_dbiterator_t *rbtdbiter) {
                        NODE_LOCK(lock, isc_rwlocktype_read);
                        decrement_reference(rbtdb, node, 0,
                                            isc_rwlocktype_read,
-                                           rbtdbiter->tree_locked, ISC_FALSE);
+                                           rbtdbiter->tree_locked, false);
                        NODE_UNLOCK(lock, isc_rwlocktype_read);
                }
 
@@ -9317,7 +9317,7 @@ resume_iteration(rbtdb_dbiterator_t *rbtdbiter) {
        RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
        rbtdbiter->tree_locked = isc_rwlocktype_read;
 
-       rbtdbiter->paused = ISC_FALSE;
+       rbtdbiter->paused = false;
 }
 
 static void
@@ -9389,7 +9389,7 @@ dbiterator_first(dns_dbiterator_t *iterator) {
                result = dns_rbtnodechain_current(rbtdbiter->current, NULL,
                                                  NULL, &rbtdbiter->node);
                if (result == ISC_R_SUCCESS) {
-                       rbtdbiter->new_origin = ISC_TRUE;
+                       rbtdbiter->new_origin = true;
                        reference_iter_node(rbtdbiter);
                }
        } else {
@@ -9443,7 +9443,7 @@ dbiterator_last(dns_dbiterator_t *iterator) {
                result = dns_rbtnodechain_current(rbtdbiter->current, NULL,
                                                  NULL, &rbtdbiter->node);
                if (result == ISC_R_SUCCESS) {
-                       rbtdbiter->new_origin = ISC_TRUE;
+                       rbtdbiter->new_origin = true;
                        reference_iter_node(rbtdbiter);
                }
        } else {
@@ -9518,7 +9518,7 @@ dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name) {
                tresult = dns_rbtnodechain_current(rbtdbiter->current, iname,
                                                   origin, NULL);
                if (tresult == ISC_R_SUCCESS) {
-                       rbtdbiter->new_origin = ISC_TRUE;
+                       rbtdbiter->new_origin = true;
                        reference_iter_node(rbtdbiter);
                } else {
                        result = tresult;
@@ -9565,7 +9565,7 @@ dbiterator_prev(dns_dbiterator_t *iterator) {
        dereference_iter_node(rbtdbiter);
 
        if (result == DNS_R_NEWORIGIN || result == ISC_R_SUCCESS) {
-               rbtdbiter->new_origin = ISC_TF(result == DNS_R_NEWORIGIN);
+               rbtdbiter->new_origin = (result == DNS_R_NEWORIGIN);
                result = dns_rbtnodechain_current(rbtdbiter->current, NULL,
                                                  NULL, &rbtdbiter->node);
        }
@@ -9609,7 +9609,7 @@ dbiterator_next(dns_dbiterator_t *iterator) {
        dereference_iter_node(rbtdbiter);
 
        if (result == DNS_R_NEWORIGIN || result == ISC_R_SUCCESS) {
-               rbtdbiter->new_origin = ISC_TF(result == DNS_R_NEWORIGIN);
+               rbtdbiter->new_origin = (result == DNS_R_NEWORIGIN);
                result = dns_rbtnodechain_current(rbtdbiter->current, NULL,
                                                  NULL, &rbtdbiter->node);
        }
@@ -9699,7 +9699,7 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
        if (rbtdbiter->paused)
                return (ISC_R_SUCCESS);
 
-       rbtdbiter->paused = ISC_TRUE;
+       rbtdbiter->paused = true;
 
        if (rbtdbiter->tree_locked != isc_rwlocktype_none) {
                INSIST(rbtdbiter->tree_locked == isc_rwlocktype_read);
@@ -10078,18 +10078,18 @@ rdataset_putadditional(dns_acache_t *acache, dns_rdataset_t *rdataset,
 static void
 setownercase(rdatasetheader_t *header, const dns_name_t *name) {
        unsigned int i;
-       isc_boolean_t fully_lower;
+       bool fully_lower;
 
        /*
         * We do not need to worry about label lengths as they are all
         * less than or equal to 63.
         */
        memset(header->upper, 0, sizeof(header->upper));
-       fully_lower = ISC_TRUE;
+       fully_lower = true;
        for (i = 0; i < name->length; i++)
                if (name->ndata[i] >= 0x41 && name->ndata[i] <= 0x5a) {
                        header->upper[i/8] |= 1 << (i%8);
-                       fully_lower = ISC_FALSE;
+                       fully_lower = false;
                }
        header->attributes |= RDATASET_ATTR_CASESET;
        if (ISC_LIKELY(fully_lower))
@@ -10283,13 +10283,13 @@ rdataset_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name) {
  *
  * Caller must hold the node (read or write) lock.
  */
-static inline isc_boolean_t
+static inline bool
 need_headerupdate(rdatasetheader_t *header, isc_stdtime_t now) {
        if ((header->attributes &
             (RDATASET_ATTR_NONEXISTENT |
              RDATASET_ATTR_STALE |
              RDATASET_ATTR_ZEROTTL)) != 0)
-               return (ISC_FALSE);
+               return (false);
 
 #if DNS_RBTDB_LIMITLRUUPDATE
        if (header->type == dns_rdatatype_ns ||
@@ -10308,7 +10308,7 @@ need_headerupdate(rdatasetheader_t *header, isc_stdtime_t now) {
 #else
        UNUSED(now);
 
-       return (ISC_TRUE);
+       return (true);
 #endif
 }
 
@@ -10346,7 +10346,7 @@ update_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
  */
 static void
 overmem_purge(dns_rbtdb_t *rbtdb, unsigned int locknum_start,
-             isc_stdtime_t now, isc_boolean_t tree_locked)
+             isc_stdtime_t now, bool tree_locked)
 {
        rdatasetheader_t *header, *header_prev;
        unsigned int locknum;
@@ -10390,7 +10390,7 @@ overmem_purge(dns_rbtdb_t *rbtdb, unsigned int locknum_start,
 
 static void
 expire_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
-             isc_boolean_t tree_locked, expire_t reason)
+             bool tree_locked, expire_t reason)
 {
        set_ttl(rbtdb, header, 0);
        mark_stale_header(rbtdb, header);
@@ -10409,7 +10409,7 @@ expire_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
                decrement_reference(rbtdb, header->node, 0,
                                    isc_rwlocktype_write,
                                    tree_locked ? isc_rwlocktype_write :
-                                   isc_rwlocktype_none, ISC_FALSE);
+                                   isc_rwlocktype_none, false);
 
                if (rbtdb->cachestats == NULL)
                        return;
index 08a3c3821a6517c4ea139a1af7bcf675ed9d5b5f..6a5948efa4edeffb578862ca30b9e038bc8a1396 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/parseint.h>
@@ -238,7 +239,7 @@ str_totext(const char *source, isc_buffer_t *target) {
 
 static isc_result_t
 maybe_numeric(unsigned int *valuep, isc_textregion_t *source,
-             unsigned int max, isc_boolean_t hex_allowed)
+             unsigned int max, bool hex_allowed)
 {
        isc_result_t result;
        uint32_t n;
@@ -276,7 +277,7 @@ dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source,
        isc_result_t result;
        int i;
 
-       result = maybe_numeric(valuep, source, max, ISC_FALSE);
+       result = maybe_numeric(valuep, source, max, false);
        if (result != ISC_R_BADNUMBER)
                return (result);
 
@@ -404,7 +405,7 @@ dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source)
        char *text, *end;
        unsigned int value, mask;
 
-       result = maybe_numeric(&value, source, 0xffff, ISC_TRUE);
+       result = maybe_numeric(&value, source, 0xffff, true);
        if (result == ISC_R_SUCCESS) {
                *flagsp = value;
                return (ISC_R_SUCCESS);
index 145b1f346de0163de9ab084905f88ddf09a2634a..93f55594d71bdd60de3e504a097390230a2b0353 100644 (file)
 #define ARGS_DIGEST    dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg
 
 #define ARGS_CHECKOWNER dns_name_t *name, dns_rdataclass_t rdclass, \
-                       dns_rdatatype_t type, isc_boolean_t wildcard
+                       dns_rdatatype_t type, bool wildcard
 
 #define ARGS_CHECKNAMES dns_rdata_t *rdata, dns_name_t *owner, dns_name_t *bad
 
@@ -125,7 +125,7 @@ typedef struct dns_rdata_textctx {
 } dns_rdata_textctx_t;
 
 static isc_result_t
-txt_totext(isc_region_t *source, isc_boolean_t quote, isc_buffer_t *target);
+txt_totext(isc_region_t *source, bool quote, isc_buffer_t *target);
 
 static isc_result_t
 txt_fromtext(isc_textregion_t *source, isc_buffer_t *target);
@@ -139,7 +139,7 @@ multitxt_totext(isc_region_t *source, isc_buffer_t *target);
 static isc_result_t
 multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target);
 
-static isc_boolean_t
+static bool
 name_prefix(dns_name_t *name, dns_name_t *origin, dns_name_t *target);
 
 static unsigned int
@@ -151,7 +151,7 @@ str_totext(const char *source, isc_buffer_t *target);
 static isc_result_t
 inet_totext(int af, isc_region_t *src, isc_buffer_t *target);
 
-static isc_boolean_t
+static bool
 buffer_empty(isc_buffer_t *source);
 
 static void
@@ -422,7 +422,7 @@ mem_maybedup(isc_mem_t *mctx, void *source, size_t length) {
 
 static inline isc_result_t
 typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target,
-                isc_boolean_t allow_empty)
+                bool allow_empty)
 {
        isc_token_t token;
        unsigned char bm[8*1024]; /* 64k bits */
@@ -430,7 +430,7 @@ typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target,
        int octet;
        unsigned int max_octet, newend, end;
        int window;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
 
        max_used = 0;
        bm[0] = 0;
@@ -438,7 +438,7 @@ typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target,
 
        do {
                RETERR(isc_lex_getmastertoken(lexer, &token,
-                                             isc_tokentype_string, ISC_TRUE));
+                                             isc_tokentype_string, true));
                if (token.type != isc_tokentype_string)
                        break;
                RETTOK(dns_rdatatype_fromtext(&covered,
@@ -452,7 +452,7 @@ typemap_fromtext(isc_lex_t *lexer, isc_buffer_t *target,
                        max_used = covered;
                }
                bm[covered/8] |= (0x80>>(covered%8));
-               first = ISC_FALSE;
+               first = false;
        } while (1);
        isc_lex_ungettoken(lexer, &token);
        if (!allow_empty && first)
@@ -490,13 +490,13 @@ typemap_totext(isc_region_t *sr, dns_rdata_textctx_t *tctx,
 {
        unsigned int i, j, k;
        unsigned int window, len;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
 
        for (i = 0; i < sr->length; i += len) {
                if (tctx != NULL &&
                    (tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) {
                        RETERR(str_totext(tctx->linebreak, target));
-                       first = ISC_TRUE;
+                       first = true;
                }
                INSIST(i + 2 <= sr->length);
                window = sr->base[i];
@@ -514,7 +514,7 @@ typemap_totext(isc_region_t *sr, dns_rdata_textctx_t *tctx,
                                t = window * 256 + j * 8 + k;
                                if (!first)
                                        RETERR(str_totext(" ", target));
-                               first = ISC_FALSE;
+                               first = false;
                                if (dns_rdatatype_isknown(t)) {
                                        RETERR(dns_rdatatype_totext(t, target));
                                } else {
@@ -529,10 +529,10 @@ typemap_totext(isc_region_t *sr, dns_rdata_textctx_t *tctx,
 }
 
 static isc_result_t
-typemap_test(isc_region_t *sr, isc_boolean_t allow_empty) {
+typemap_test(isc_region_t *sr, bool allow_empty) {
        unsigned int window, lastwindow = 0;
        unsigned int len;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
        unsigned int i;
 
        for (i = 0; i < sr->length; i += len) {
@@ -565,7 +565,7 @@ typemap_test(isc_region_t *sr, isc_boolean_t allow_empty) {
                if (sr->base[i + len - 1] == 0)
                        RETERR(DNS_R_FORMERR);
                lastwindow = window;
-               first = ISC_FALSE;
+               first = false;
        }
        if (i != sr->length)
                return (DNS_R_EXTRADATA);
@@ -645,7 +645,7 @@ dns_rdata_clone(const dns_rdata_t *src, dns_rdata_t *target) {
 int
 dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
        int result = 0;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
 
        REQUIRE(rdata1 != NULL);
        REQUIRE(rdata2 != NULL);
@@ -676,7 +676,7 @@ dns_rdata_compare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
 int
 dns_rdata_casecompare(const dns_rdata_t *rdata1, const dns_rdata_t *rdata2) {
        int result = 0;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
 
        REQUIRE(rdata1 != NULL);
        REQUIRE(rdata2 != NULL);
@@ -747,7 +747,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
        isc_region_t region;
        isc_buffer_t ss;
        isc_buffer_t st;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
        uint32_t activelength;
        unsigned int length;
 
@@ -813,7 +813,7 @@ dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx,
                 isc_buffer_t *target)
 {
        isc_result_t result = ISC_R_NOTIMPLEMENTED;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
        isc_region_t tr;
        isc_buffer_t st;
 
@@ -880,7 +880,7 @@ unknown_fromtext(dns_rdataclass_t rdclass, dns_rdatatype_t type,
                return (DNS_R_METATYPE);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                       ISC_FALSE));
+                                       false));
        if (token.value.as_ulong > 65535U)
                return (ISC_R_RANGE);
        result = isc_buffer_allocate(mctx, &buf, token.value.as_ulong);
@@ -931,9 +931,9 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
        void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
        isc_result_t tresult;
        unsigned int length;
-       isc_boolean_t unknown;
+       bool unknown;
 
-       REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE);
+       REQUIRE(origin == NULL || dns_name_isabsolute(origin) == true);
        if (rdata != NULL) {
                REQUIRE(DNS_RDATA_INITIALIZED(rdata));
                REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
@@ -951,7 +951,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
                callback = default_fromtext_callback;
 
        result = isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                       ISC_FALSE);
+                                       false);
        if (result != ISC_R_SUCCESS) {
                name = isc_lex_getsourcename(lexer);
                line = isc_lex_getsourceline(lexer);
@@ -959,7 +959,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
                return (result);
        }
 
-       unknown = ISC_FALSE;
+       unknown = false;
        if (token.type == isc_tokentype_string &&
            strcmp(DNS_AS_STR(token), "\\#") == 0) {
                /*
@@ -970,13 +970,13 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
                if (type == dns_rdatatype_txt) {
                        result = isc_lex_getmastertoken(lexer, &token,
                                                        isc_tokentype_number,
-                                                       ISC_FALSE);
+                                                       false);
                        if (result == ISC_R_SUCCESS)
                                isc_lex_ungettoken(lexer, &token);
                }
 
                if (result == ISC_R_SUCCESS) {
-                       unknown = ISC_TRUE;
+                       unknown = true;
                        result = unknown_fromtext(rdclass, type, lexer,
                                                  mctx, target);
                } else
@@ -1085,12 +1085,12 @@ rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
             isc_buffer_t *target)
 {
        isc_result_t result = ISC_R_NOTIMPLEMENTED;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
        unsigned int cur;
 
        REQUIRE(rdata != NULL);
        REQUIRE(tctx->origin == NULL ||
-               dns_name_isabsolute(tctx->origin) == ISC_TRUE);
+               dns_name_isabsolute(tctx->origin) == true);
 
        /*
         * Some DynDNS meta-RRs have empty rdata.
@@ -1173,7 +1173,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
        isc_result_t result = ISC_R_NOTIMPLEMENTED;
        isc_buffer_t st;
        isc_region_t region;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
        unsigned int length;
 
        REQUIRE(source != NULL);
@@ -1206,7 +1206,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
 isc_result_t
 dns_rdata_tostruct(const dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
        isc_result_t result = ISC_R_NOTIMPLEMENTED;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
 
        REQUIRE(rdata != NULL);
        REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
@@ -1232,7 +1232,7 @@ dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
                         void *arg)
 {
        isc_result_t result = ISC_R_NOTIMPLEMENTED;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
 
        /*
         * Call 'add' for each name and type from 'rdata' which is subject to
@@ -1255,7 +1255,7 @@ dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
 isc_result_t
 dns_rdata_digest(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
        isc_result_t result = ISC_R_NOTIMPLEMENTED;
-       isc_boolean_t use_default = ISC_FALSE;
+       bool use_default = false;
        isc_region_t r;
 
        /*
@@ -1276,20 +1276,20 @@ dns_rdata_digest(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_rdata_checkowner(dns_name_t *name, dns_rdataclass_t rdclass,
-                    dns_rdatatype_t type, isc_boolean_t wildcard)
+                    dns_rdatatype_t type, bool wildcard)
 {
-       isc_boolean_t result;
+       bool result;
 
        CHECKOWNERSWITCH
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_rdata_checknames(dns_rdata_t *rdata, dns_name_t *owner, dns_name_t *bad)
 {
-       isc_boolean_t result;
+       bool result;
 
        CHECKNAMESSWITCH
        return (result);
@@ -1399,7 +1399,7 @@ name_length(dns_name_t *name) {
 }
 
 static isc_result_t
-txt_totext(isc_region_t *source, isc_boolean_t quote, isc_buffer_t *target) {
+txt_totext(isc_region_t *source, bool quote, isc_buffer_t *target) {
        unsigned int tl;
        unsigned int n;
        unsigned char *sp;
@@ -1415,7 +1415,7 @@ txt_totext(isc_region_t *source, isc_boolean_t quote, isc_buffer_t *target) {
 
        REQUIRE(n + 1 <= source->length);
        if (n == 0U)
-               REQUIRE(quote == ISC_TRUE);
+               REQUIRE(quote == true);
 
        if (quote) {
                if (tl < 1)
@@ -1470,7 +1470,7 @@ txt_totext(isc_region_t *source, isc_boolean_t quote, isc_buffer_t *target) {
 static isc_result_t
 txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
        isc_region_t tregion;
-       isc_boolean_t escape;
+       bool escape;
        unsigned int n, nrem;
        char *s;
        unsigned char *t;
@@ -1482,7 +1482,7 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
        n = source->length;
        t = tregion.base;
        nrem = tregion.length;
-       escape = ISC_FALSE;
+       escape = false;
        if (nrem < 1)
                return (ISC_R_NOSPACE);
        /*
@@ -1516,10 +1516,10 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
                        if (c > 255)
                                return (DNS_R_SYNTAX);
                } else if (!escape && c == '\\') {
-                       escape = ISC_TRUE;
+                       escape = true;
                        continue;
                }
-               escape = ISC_FALSE;
+               escape = false;
                if (nrem == 0)
                        return ((tregion.length <= 256U) ?
                                ISC_R_NOSPACE : DNS_R_SYNTAX);
@@ -1619,7 +1619,7 @@ multitxt_totext(isc_region_t *source, isc_buffer_t *target) {
 static isc_result_t
 multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
        isc_region_t tregion;
-       isc_boolean_t escape;
+       bool escape;
        unsigned int n, nrem;
        char *s;
        unsigned char *t0, *t;
@@ -1628,7 +1628,7 @@ multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
 
        s = source->base;
        n = source->length;
-       escape = ISC_FALSE;
+       escape = false;
 
        do {
                isc_buffer_availableregion(target, &tregion);
@@ -1659,10 +1659,10 @@ multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
                                if (c > 255)
                                        return (DNS_R_SYNTAX);
                        } else if (!escape && c == '\\') {
-                               escape = ISC_TRUE;
+                               escape = true;
                                continue;
                        }
-                       escape = ISC_FALSE;
+                       escape = false;
                        *t++ = c;
                        nrem--;
                        if (nrem == 0)
@@ -1676,7 +1676,7 @@ multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 name_prefix(dns_name_t *name, dns_name_t *origin, dns_name_t *target) {
        int l1, l2;
 
@@ -1701,11 +1701,11 @@ name_prefix(dns_name_t *name, dns_name_t *origin, dns_name_t *target) {
                goto return_false;
 
        dns_name_getlabelsequence(name, 0, l1 - l2, target);
-       return (ISC_TRUE);
+       return (true);
 
 return_false:
        *target = *name;
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -1737,9 +1737,9 @@ inet_totext(int af, isc_region_t *src, isc_buffer_t *target) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 buffer_empty(isc_buffer_t *source) {
-       return((source->current == source->active) ? ISC_TRUE : ISC_FALSE);
+       return((source->current == source->active) ? true : false);
 }
 
 static void
@@ -2011,7 +2011,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
        Ceor = Csum = Crot = word = bcount = 0;
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        while (token.value.as_textregion.length != 0) {
                if ((c = token.value.as_textregion.base[0]) == 'x') {
                        break;
@@ -2024,7 +2024,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
         * Number of bytes.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if ((token.value.as_ulong % 4) != 0U) {
                unsigned long padding = 4 - (token.value.as_ulong % 4);
                if (isc_buffer_usedlength(target) < padding)
@@ -2036,7 +2036,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
         * Checksum.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        oeor = strtol(DNS_AS_STR(token), &e, 16);
        if (*e != 0)
                return (DNS_R_SYNTAX);
@@ -2045,7 +2045,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
         * Checksum.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        osum = strtol(DNS_AS_STR(token), &e, 16);
        if (*e != 0)
                return (DNS_R_SYNTAX);
@@ -2054,7 +2054,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
         * Checksum.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        orot = strtol(DNS_AS_STR(token), &e, 16);
        if (*e != 0)
                return (DNS_R_SYNTAX);
@@ -2268,77 +2268,77 @@ dns_rdata_covers(dns_rdata_t *rdata) {
        return (covers_sig(rdata));
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_ismeta(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_META) != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_issingleton(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_SINGLETON)
            != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_notquestion(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_NOTQUESTION)
            != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_questiononly(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_QUESTIONONLY)
            != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_atparent(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_ATPARENT) != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdataclass_ismeta(dns_rdataclass_t rdclass) {
 
        if (rdclass == dns_rdataclass_reserved0
            || rdclass == dns_rdataclass_none
            || rdclass == dns_rdataclass_any)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);  /* Assume it is not a meta class. */
+       return (false);  /* Assume it is not a meta class. */
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_isdnssec(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_DNSSEC) != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_iszonecutauth(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type)
             & (DNS_RDATATYPEATTR_DNSSEC | DNS_RDATATYPEATTR_ZONECUTAUTH))
            != 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_rdatatype_isknown(dns_rdatatype_t type) {
        if ((dns_rdatatype_attributes(type) & DNS_RDATATYPEATTR_UNKNOWN)
            == 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 void
index 11b85e2f21b94a27d82868270f1056381e680569..538c9ec1f62a70f6fe9de0e7811a1165fe7095be 100644 (file)
@@ -36,7 +36,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Algorithm Name.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -47,7 +47,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Time Signed: 48 bits.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        sigtime = isc_string_touint64(DNS_AS_STR(token), &e, 10);
        if (*e != 0)
                RETTOK(DNS_R_SYNTAX);
@@ -60,7 +60,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Fudge.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -69,7 +69,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Signature Size.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -83,7 +83,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Original ID.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -92,7 +92,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Error.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (dns_tsigrcode_fromtext(&rcode, &token.value.as_textregion)
                                != ISC_R_SUCCESS)
        {
@@ -109,7 +109,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
         * Other Len.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -128,7 +128,7 @@ totext_any_tsig(ARGS_TOTEXT) {
        char *bufp;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        uint64_t sigtime;
        unsigned short n;
 
@@ -559,7 +559,7 @@ digest_any_tsig(ARGS_DIGEST) {
        return (ISC_R_NOTIMPLEMENTED);
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_any_tsig(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_tsig);
@@ -570,10 +570,10 @@ checkowner_any_tsig(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_any_tsig(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_tsig);
@@ -583,7 +583,7 @@ checknames_any_tsig(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 1575d335e120924aa396b4660dbe178adf8b53e3..a1b571fa14582bd207b7aa598e2ed2f496686cd4 100644 (file)
@@ -33,7 +33,7 @@ fromtext_ch_a(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        /* get domain name */
        dns_name_init(&name, NULL);
@@ -43,8 +43,8 @@ fromtext_ch_a(ARGS_FROMTEXT) {
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
        if ((options & DNS_RDATA_CHECKNAMES) != 0 &&
            (options & DNS_RDATA_CHECKREVERSE) != 0) {
-               isc_boolean_t ok;
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               bool ok;
+               ok = dns_name_ishostname(&name, false);
                if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                        RETTOK(DNS_R_BADNAME);
                if (!ok && callbacks != NULL)
@@ -52,7 +52,7 @@ fromtext_ch_a(ARGS_FROMTEXT) {
        }
 
        /* 16-bit octal address */
-       RETERR(isc_lex_getoctaltoken(lexer, &token, ISC_FALSE));
+       RETERR(isc_lex_getoctaltoken(lexer, &token, false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        return (uint16_tobuffer(token.value.as_ulong, target));
@@ -63,7 +63,7 @@ totext_ch_a(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("0177777")];
        uint16_t addr;
 
@@ -274,7 +274,7 @@ digest_ch_a(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ch_a(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_a);
@@ -285,7 +285,7 @@ checkowner_ch_a(ARGS_CHECKOWNER) {
        return (dns_name_ishostname(name, wildcard));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_ch_a(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -298,13 +298,13 @@ checknames_ch_a(ARGS_CHECKNAMES) {
        dns_rdata_toregion(rdata, &region);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index d7a1bbfc047ee9ad9e8f78f9375dbd6ac8e67834..812dfa6e453e4c3b55a7a0f627df7b1966bfce61 100644 (file)
@@ -21,7 +21,7 @@ fromtext_afsdb(ARGS_FROMTEXT) {
        isc_token_t token;
        isc_buffer_t buffer;
        dns_name_t name;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_afsdb);
 
@@ -33,7 +33,7 @@ fromtext_afsdb(ARGS_FROMTEXT) {
         * Subtype.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -42,15 +42,15 @@ fromtext_afsdb(ARGS_FROMTEXT) {
         * Hostname.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKNAMES) != 0)
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               ok = dns_name_ishostname(&name, false);
        if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                RETTOK(DNS_R_BADNAME);
        if (!ok && callbacks != NULL)
@@ -64,7 +64,7 @@ totext_afsdb(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_region_t region;
        char buf[sizeof("64000 ")];
-       isc_boolean_t sub;
+       bool sub;
        unsigned int num;
 
        REQUIRE(rdata->type == dns_rdatatype_afsdb);
@@ -263,7 +263,7 @@ digest_afsdb(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_afsdb(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_afsdb);
@@ -273,10 +273,10 @@ checkowner_afsdb(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_afsdb(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -289,12 +289,12 @@ checknames_afsdb(ARGS_CHECKNAMES) {
        isc_region_consume(&region, 2);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index b895c860aeb9924032a57f8d453a1b29e01147f3..31bbaffdc0d7cf31cdb8514d29fa4f36e3c3d2e5 100644 (file)
@@ -131,7 +131,7 @@ digest_avc(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_avc(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_avc);
@@ -141,10 +141,10 @@ checkowner_avc(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_avc(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_avc);
@@ -153,7 +153,7 @@ checknames_avc(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 90b033b4d405744dc74ee9fd0fb14f1f72ca03d7..4dc36399069ebaf720cc6a2ce48c49a20e9f7293 100644 (file)
@@ -50,7 +50,7 @@ fromtext_caa(ARGS_FROMTEXT) {
 
        /* Flags. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 255U)
                RETTOK(ISC_R_RANGE);
        flags = (uint8_t)(token.value.as_ulong & 255U);
@@ -60,7 +60,7 @@ fromtext_caa(ARGS_FROMTEXT) {
         * Tag
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        tr = token.value.as_textregion;
        for (i = 0; i < tr.length; i++)
                if (!alphanumeric[(unsigned char) tr.base[i]])
@@ -72,7 +72,7 @@ fromtext_caa(ARGS_FROMTEXT) {
         * Value
         */
        RETERR(isc_lex_getmastertoken(lexer, &token,
-                                     isc_tokentype_qstring, ISC_FALSE));
+                                     isc_tokentype_qstring, false));
        if (token.type != isc_tokentype_qstring &&
            token.type != isc_tokentype_string)
                RETERR(DNS_R_SYNTAX);
@@ -104,7 +104,7 @@ totext_caa(ARGS_TOTEXT) {
        /*
         * Tag
         */
-       RETERR(txt_totext(&region, ISC_FALSE, target));
+       RETERR(txt_totext(&region, false, target));
        RETERR(str_totext(" ", target));
 
        /*
@@ -330,7 +330,7 @@ digest_caa(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_caa(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_caa);
@@ -340,10 +340,10 @@ checkowner_caa(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_caa(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_caa);
@@ -354,7 +354,7 @@ checknames_caa(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 22dda77c121eea63e0a122c8a80a50ab278a1470..afcdbc2265de5c07ad30c34a44e359417738795a 100644 (file)
@@ -132,7 +132,7 @@ digest_cdnskey(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_cdnskey(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_cdnskey);
@@ -142,10 +142,10 @@ checkowner_cdnskey(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_cdnskey(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata != NULL);
@@ -155,7 +155,7 @@ checknames_cdnskey(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 6e3fdeb0402038eecce73a52d08fc70afdbe6460..e1ea7ce64938e89c992abadf3308f4e0532cf254 100644 (file)
@@ -141,7 +141,7 @@ digest_cds(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_cds(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_cds);
@@ -151,10 +151,10 @@ checkowner_cds(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_cds(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_cds);
@@ -163,7 +163,7 @@ checknames_cds(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 64e665ded221aa8e99c3dbf16a71e6579595b641..237a806f0dfedd8feaba610ae12f3e2e30e771ce 100644 (file)
@@ -34,7 +34,7 @@ fromtext_cert(ARGS_FROMTEXT) {
         * Cert type.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_cert_fromtext(&cert, &token.value.as_textregion));
        RETERR(uint16_tobuffer(cert, target));
 
@@ -42,7 +42,7 @@ fromtext_cert(ARGS_FROMTEXT) {
         * Key tag.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -51,7 +51,7 @@ fromtext_cert(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secalg_fromtext(&secalg, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &secalg, 1));
 
@@ -244,7 +244,7 @@ digest_cert(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_cert(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_cert);
@@ -254,10 +254,10 @@ checkowner_cert(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_cert(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_cert);
@@ -266,7 +266,7 @@ checknames_cert(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 
index c15131c76c151752458a26c101ebd263d1c39599..3da82ebee48ce6c04a89ac2c50451fe5804bcff4 100644 (file)
@@ -28,7 +28,7 @@ fromtext_cname(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -43,7 +43,7 @@ totext_cname(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_cname);
        REQUIRE(rdata->length != 0);
@@ -195,7 +195,7 @@ digest_cname(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_cname(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_cname);
@@ -205,10 +205,10 @@ checkowner_cname(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_cname(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_cname);
@@ -217,7 +217,7 @@ checknames_cname(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 35c840ba1c257d24fdac2a28c29d8454c0e245b9..c63912875d1cbff322e162e70189f782aff8e458 100644 (file)
@@ -30,18 +30,18 @@ fromtext_csync(ARGS_FROMTEXT) {
 
        /* Serial. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /* Flags. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        /* Type Map */
-       return (typemap_fromtext(lexer, target, ISC_TRUE));
+       return (typemap_fromtext(lexer, target, true));
 }
 
 static inline isc_result_t
@@ -100,7 +100,7 @@ fromwire_csync(ARGS_FROMWIRE) {
        isc_buffer_forward(source, 6);
        isc_region_consume(&sr, 6);
 
-       RETERR(typemap_test(&sr, ISC_TRUE));
+       RETERR(typemap_test(&sr, true));
 
        RETERR(mem_tobuffer(target, sr.base, sr.length));
        isc_buffer_forward(source, sr.length);
@@ -153,7 +153,7 @@ fromstruct_csync(ARGS_FROMSTRUCT) {
 
        region.base = csync->typebits;
        region.length = csync->len;
-       RETERR(typemap_test(&region, ISC_TRUE));
+       RETERR(typemap_test(&region, true));
        return (mem_tobuffer(target, csync->typebits, csync->len));
 }
 
@@ -226,7 +226,7 @@ digest_csync(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_csync(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_csync);
@@ -236,10 +236,10 @@ checkowner_csync(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_csync(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_csync);
@@ -248,7 +248,7 @@ checknames_csync(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 01b43087796d47f85042a80b76a9169b252232f3..0f05ba84a62e19afd6734241cdc3abba2e059ba2 100644 (file)
@@ -137,7 +137,7 @@ digest_dlv(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_dlv(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_dlv);
@@ -147,10 +147,10 @@ checkowner_dlv(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_dlv(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_dlv);
@@ -159,7 +159,7 @@ checknames_dlv(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index e429ae8c18ecf0d0ebe2ec64b33f39824e965dc9..50c58385647db0c97f6c6b986d6ad98bbe7465c3 100644 (file)
@@ -29,7 +29,7 @@ fromtext_dname(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -44,7 +44,7 @@ totext_dname(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_dname);
        REQUIRE(rdata->length != 0);
@@ -196,7 +196,7 @@ digest_dname(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_dname(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_dname);
@@ -206,10 +206,10 @@ checkowner_dname(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_dname(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_dname);
@@ -218,7 +218,7 @@ checknames_dname(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 055055a02257cd57986a0a67cd139ed86d3b226f..f20a8f6110d2561ff8dd0da0f45e8d61000131da 100644 (file)
@@ -134,7 +134,7 @@ digest_dnskey(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_dnskey(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_dnskey);
@@ -144,10 +144,10 @@ checkowner_dnskey(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_dnskey(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata != NULL);
@@ -157,7 +157,7 @@ checknames_dnskey(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 0a1dff2c56f325685ee474bef0b267b1dc3d1253..16c0703d638578779e6612b7eb6cb0a6e87b7c29 100644 (file)
@@ -29,21 +29,21 @@ fromtext_doa(ARGS_FROMTEXT) {
         * DOA-ENTERPRISE
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /*
         * DOA-TYPE
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /*
         * DOA-LOCATION
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU) {
                RETTOK(ISC_R_RANGE);
        }
@@ -53,14 +53,14 @@ fromtext_doa(ARGS_FROMTEXT) {
         * DOA-MEDIA-TYPE
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(txt_fromtext(&token.value.as_textregion, target));
 
        /*
         * DOA-DATA
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcmp(DNS_AS_STR(token), "-") == 0) {
                return (ISC_R_SUCCESS);
        } else {
@@ -110,7 +110,7 @@ totext_doa(ARGS_TOTEXT) {
        /*
         * DOA-MEDIA-TYPE
         */
-       RETERR(txt_totext(&region, ISC_TRUE, target));
+       RETERR(txt_totext(&region, true, target));
        RETERR(str_totext(" ", target));
 
        /*
@@ -327,7 +327,7 @@ digest_doa(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_doa(ARGS_CHECKOWNER) {
        UNUSED(name);
        UNUSED(type);
@@ -336,10 +336,10 @@ checkowner_doa(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_doa);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_doa(ARGS_CHECKNAMES) {
        UNUSED(rdata);
        UNUSED(owner);
@@ -347,7 +347,7 @@ checknames_doa(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_doa);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 2da4bdabdf5e9a403c21b7327ed710147ce1449b..d25c1a65f1ad482cb2fb20102e009f438469bc25 100644 (file)
@@ -41,7 +41,7 @@ generic_fromtext_ds(ARGS_FROMTEXT) {
         * Key tag.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -50,7 +50,7 @@ generic_fromtext_ds(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secalg_fromtext(&c, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &c, 1));
 
@@ -58,7 +58,7 @@ generic_fromtext_ds(ARGS_FROMTEXT) {
         * Digest type.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_dsdigest_fromtext(&c, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &c, 1));
 
@@ -367,7 +367,7 @@ digest_ds(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ds(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_ds);
@@ -377,10 +377,10 @@ checkowner_ds(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_ds(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_ds);
@@ -389,7 +389,7 @@ checknames_ds(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 6b7bb54a091e842def24d1f154cbaf4e44ba52b5..686f23f8cf83b35c580e00e41ce4c0577f5e5498 100644 (file)
@@ -32,7 +32,7 @@ fromtext_eui48(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        n = sscanf(DNS_AS_STR(token), "%2x-%2x-%2x-%2x-%2x-%2x",
                   &l0, &l1, &l2, &l3, &l4, &l5);
        if (n != 6 || l0 > 255U || l1 > 255U || l2 > 255U || l3 > 255U ||
@@ -176,7 +176,7 @@ digest_eui48(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_eui48(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_eui48);
@@ -186,10 +186,10 @@ checkowner_eui48(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_eui48(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_eui48);
@@ -199,7 +199,7 @@ checknames_eui48(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index cccb49975bb724c18a5e8f0346d4d79c3198eef0..0a37326c634544bbb436425fef9add353a134002 100644 (file)
@@ -32,7 +32,7 @@ fromtext_eui64(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        n = sscanf(DNS_AS_STR(token), "%2x-%2x-%2x-%2x-%2x-%2x-%2x-%2x",
                   &l0, &l1, &l2, &l3, &l4, &l5, &l6, &l7);
        if (n != 8 || l0 > 255U || l1 > 255U || l2 > 255U || l3 > 255U ||
@@ -181,7 +181,7 @@ digest_eui64(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_eui64(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_eui64);
@@ -191,10 +191,10 @@ checkowner_eui64(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_eui64(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_eui64);
@@ -204,7 +204,7 @@ checknames_eui64(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index c0d93eea0fcab1a60f1047afbf818bb6cb252a20..62429327e442f3c0a1760bc79c6056e82aa6c744 100644 (file)
@@ -32,7 +32,7 @@ fromtext_gpos(ARGS_FROMTEXT) {
        for (i = 0; i < 3; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_qstring,
-                                             ISC_FALSE));
+                                             false));
                RETTOK(txt_fromtext(&token.value.as_textregion, target));
        }
        return (ISC_R_SUCCESS);
@@ -51,7 +51,7 @@ totext_gpos(ARGS_TOTEXT) {
        dns_rdata_toregion(rdata, &region);
 
        for (i = 0; i < 3; i++) {
-               RETERR(txt_totext(&region, ISC_TRUE, target));
+               RETERR(txt_totext(&region, true, target));
                if (i != 2)
                        RETERR(str_totext(" ", target));
        }
@@ -214,7 +214,7 @@ digest_gpos(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_gpos(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_gpos);
@@ -224,10 +224,10 @@ checkowner_gpos(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_gpos(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_gpos);
@@ -236,7 +236,7 @@ checknames_gpos(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index b56ff7c56cead7a32061d7dfa04ae4afb74b520e..528be5eb869ac1faae5487b21803cabc396fbd66 100644 (file)
@@ -30,7 +30,7 @@ fromtext_hinfo(ARGS_FROMTEXT) {
        for (i = 0; i < 2; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_qstring,
-                                             ISC_FALSE));
+                                             false));
                RETTOK(txt_fromtext(&token.value.as_textregion, target));
        }
        return (ISC_R_SUCCESS);
@@ -46,9 +46,9 @@ totext_hinfo(ARGS_TOTEXT) {
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &region);
-       RETERR(txt_totext(&region, ISC_TRUE, target));
+       RETERR(txt_totext(&region, true, target));
        RETERR(str_totext(" ", target));
-       return (txt_totext(&region, ISC_TRUE, target));
+       return (txt_totext(&region, true, target));
 }
 
 static inline isc_result_t
@@ -184,7 +184,7 @@ digest_hinfo(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_hinfo(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_hinfo);
@@ -194,10 +194,10 @@ checkowner_hinfo(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_hinfo(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_hinfo);
@@ -206,7 +206,7 @@ checknames_hinfo(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index aa99e0f926c87efa605df88ae925215b8fc8102e..36c9273e458f8cd571c63a8c3ce113c0c6eaacd2 100644 (file)
@@ -42,7 +42,7 @@ fromtext_hip(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -58,7 +58,7 @@ fromtext_hip(ARGS_FROMTEXT) {
         */
        start = isc_buffer_used(target);
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(isc_hex_decodestring(DNS_AS_STR(token), target));
 
        /*
@@ -74,7 +74,7 @@ fromtext_hip(ARGS_FROMTEXT) {
         */
        start = isc_buffer_used(target);
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(isc_base64_decodestring(DNS_AS_STR(token), target));
 
        /*
@@ -95,7 +95,7 @@ fromtext_hip(ARGS_FROMTEXT) {
        do {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_TRUE));
+                                             true));
                if (token.type != isc_tokentype_string)
                        break;
                buffer_fromregion(&buffer, &token.value.as_region);
@@ -169,7 +169,7 @@ totext_hip(ARGS_TOTEXT) {
        while (region.length > 0) {
                dns_name_fromregion(&name, &region);
 
-               RETERR(dns_name_totext(&name, ISC_FALSE, target));
+               RETERR(dns_name_totext(&name, false, target));
                isc_region_consume(&region, name.length);
                if (region.length > 0)
                        RETERR(str_totext(tctx->linebreak, target));
@@ -377,7 +377,7 @@ digest_hip(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_hip(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_hip);
@@ -387,10 +387,10 @@ checkowner_hip(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_hip(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_hip);
@@ -399,7 +399,7 @@ checknames_hip(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 isc_result_t
index 5bdad8a7afd3b243b36ebf5d1aaec06cc17fd389..f68f0b84573eb7680f4db6d2a6f6e5960566a74f 100644 (file)
@@ -39,7 +39,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) {
         * Precedence.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -48,7 +48,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) {
         * Gateway type.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0x3U)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -58,7 +58,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -67,7 +67,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) {
         * Gateway.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        switch (gateway) {
        case 0:
@@ -175,7 +175,7 @@ totext_ipseckey(ARGS_TOTEXT) {
 
        case 3:
                dns_name_fromregion(&name, &region);
-               RETERR(dns_name_totext(&name, ISC_FALSE, target));
+               RETERR(dns_name_totext(&name, false, target));
                isc_region_consume(&region, name_length(&name));
                break;
        }
@@ -429,7 +429,7 @@ digest_ipseckey(ARGS_DIGEST) {
        return ((digest)(arg, &region));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ipseckey(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_ipseckey);
@@ -439,10 +439,10 @@ checkowner_ipseckey(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_ipseckey(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_ipseckey);
@@ -451,7 +451,7 @@ checknames_ipseckey(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 8b15fb81b8e4d72fdffcf23d8b1d08faab891a72..a73cd1f70a73c519aa30abd17e2cf526671e12ab 100644 (file)
@@ -30,12 +30,12 @@ fromtext_isdn(ARGS_FROMTEXT) {
 
        /* ISDN-address */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(txt_fromtext(&token.value.as_textregion, target));
 
        /* sa: optional */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_TRUE));
+                                     true));
        if (token.type != isc_tokentype_string &&
            token.type != isc_tokentype_qstring) {
                isc_lex_ungettoken(lexer, &token);
@@ -55,11 +55,11 @@ totext_isdn(ARGS_TOTEXT) {
        UNUSED(tctx);
 
        dns_rdata_toregion(rdata, &region);
-       RETERR(txt_totext(&region, ISC_TRUE, target));
+       RETERR(txt_totext(&region, true, target));
        if (region.length == 0)
                return (ISC_R_SUCCESS);
        RETERR(str_totext(" ", target));
-       return (txt_totext(&region, ISC_TRUE, target));
+       return (txt_totext(&region, true, target));
 }
 
 static inline isc_result_t
@@ -204,7 +204,7 @@ digest_isdn(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_isdn(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_isdn);
@@ -214,10 +214,10 @@ checkowner_isdn(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_isdn(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_isdn);
@@ -226,7 +226,7 @@ checknames_isdn(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 6d42934687c7c66b1a04320ba077d7a79d6eb4ff..6dd2eab0f2303b60a006a8b5ec75bdc8d492c2d3 100644 (file)
@@ -34,19 +34,19 @@ generic_fromtext_key(ARGS_FROMTEXT) {
 
        /* flags */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_keyflags_fromtext(&flags, &token.value.as_textregion));
        RETERR(uint16_tobuffer(flags, target));
 
        /* protocol */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secproto_fromtext(&proto, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &proto, 1));
 
        /* algorithm */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secalg_fromtext(&alg, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &alg, 1));
 
@@ -402,7 +402,7 @@ digest_key(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_key(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_key);
@@ -412,10 +412,10 @@ checkowner_key(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_key(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata != NULL);
@@ -425,7 +425,7 @@ checknames_key(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index ffa945489f61c0bc60c9b892db11e0742c991a58..06b56c1e1ad130e5b3e4e452584db2ff26da874e 100644 (file)
@@ -38,37 +38,37 @@ fromtext_keydata(ARGS_FROMTEXT) {
 
        /* refresh timer */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &refresh));
        RETERR(uint32_tobuffer(refresh, target));
 
        /* add hold-down */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &addhd));
        RETERR(uint32_tobuffer(addhd, target));
 
        /* remove hold-down */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &removehd));
        RETERR(uint32_tobuffer(removehd, target));
 
        /* flags */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_keyflags_fromtext(&flags, &token.value.as_textregion));
        RETERR(uint16_tobuffer(flags, target));
 
        /* protocol */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secproto_fromtext(&proto, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &proto, 1));
 
        /* algorithm */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secalg_fromtext(&alg, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &alg, 1));
 
@@ -408,7 +408,7 @@ digest_keydata(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_keydata(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_keydata);
@@ -418,10 +418,10 @@ checkowner_keydata(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_keydata(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_keydata);
@@ -430,7 +430,7 @@ checknames_keydata(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index c7501971e4471dfccaa32df2bd3bef7cb17767d8..7d92cc2b911b48ec4cab9fcfd730757bb687de6f 100644 (file)
@@ -33,13 +33,13 @@ fromtext_l32(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        if (getquad(DNS_AS_STR(token), &addr, lexer, callbacks) != 1)
                RETTOK(DNS_R_BADDOTTEDQUAD);
@@ -194,7 +194,7 @@ digest_l32(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_l32(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_l32);
@@ -204,10 +204,10 @@ checkowner_l32(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_l32(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_l32);
@@ -217,7 +217,7 @@ checknames_l32(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index d89923335d2024013c2e9afb09b53010de8e5893..277c6a910ea1e0cc08bea242ffd39b14691f03af 100644 (file)
@@ -32,13 +32,13 @@ fromtext_l64(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        if (locator_pton(DNS_AS_STR(token), locator) != 1)
                RETTOK(DNS_R_SYNTAX);
@@ -189,7 +189,7 @@ digest_l64(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_l64(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_l64);
@@ -199,10 +199,10 @@ checkowner_l64(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_l64(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_l64);
@@ -212,7 +212,7 @@ checknames_l64(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 19bd1cfd4e19c01ed6116887cff192d001b8aea9..50c00ff9f7a9bbfca0a3014320a82b3a5a77a576 100644 (file)
@@ -25,8 +25,8 @@ fromtext_loc(ARGS_FROMTEXT) {
        unsigned char hp;
        unsigned char vp;
        unsigned char version;
-       isc_boolean_t east = ISC_FALSE;
-       isc_boolean_t north = ISC_FALSE;
+       bool east = false;
+       bool north = false;
        long tmp;
        long m;
        long cm;
@@ -61,7 +61,7 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Degrees.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 90U)
                RETTOK(ISC_R_RANGE);
        d1 = (int)token.value.as_ulong;
@@ -69,9 +69,9 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Minutes.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcasecmp(DNS_AS_STR(token), "N") == 0)
-               north = ISC_TRUE;
+               north = true;
        if (north || strcasecmp(DNS_AS_STR(token), "S") == 0)
                goto getlong;
        m1 = strtol(DNS_AS_STR(token), &e, 10);
@@ -86,9 +86,9 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Seconds.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcasecmp(DNS_AS_STR(token), "N") == 0)
-               north = ISC_TRUE;
+               north = true;
        if (north || strcasecmp(DNS_AS_STR(token), "S") == 0)
                goto getlong;
        s1 = strtol(DNS_AS_STR(token), &e, 10);
@@ -134,9 +134,9 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Direction.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcasecmp(DNS_AS_STR(token), "N") == 0)
-               north = ISC_TRUE;
+               north = true;
        if (!north && strcasecmp(DNS_AS_STR(token), "S") != 0)
                RETTOK(DNS_R_SYNTAX);
 
@@ -145,7 +145,7 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Degrees.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 180U)
                RETTOK(ISC_R_RANGE);
        d2 = (int)token.value.as_ulong;
@@ -154,9 +154,9 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Minutes.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcasecmp(DNS_AS_STR(token), "E") == 0)
-               east = ISC_TRUE;
+               east = true;
        if (east || strcasecmp(DNS_AS_STR(token), "W") == 0)
                goto getalt;
        m2 = strtol(DNS_AS_STR(token), &e, 10);
@@ -171,9 +171,9 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Seconds.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcasecmp(DNS_AS_STR(token), "E") == 0)
-               east = ISC_TRUE;
+               east = true;
        if (east || strcasecmp(DNS_AS_STR(token), "W") == 0)
                goto getalt;
        s2 = strtol(DNS_AS_STR(token), &e, 10);
@@ -219,9 +219,9 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Direction.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strcasecmp(DNS_AS_STR(token), "E") == 0)
-               east = ISC_TRUE;
+               east = true;
        if (!east && strcasecmp(DNS_AS_STR(token), "W") != 0)
                RETTOK(DNS_R_SYNTAX);
 
@@ -230,7 +230,7 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Altitude.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        m = strtol(DNS_AS_STR(token), &e, 10);
        if (*e != 0 && *e != '.' && *e != 'm')
                RETTOK(DNS_R_SYNTAX);
@@ -272,7 +272,7 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Size: optional.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_TRUE));
+                                     true));
        if (token.type == isc_tokentype_eol ||
            token.type == isc_tokentype_eof) {
                isc_lex_ungettoken(lexer, &token);
@@ -325,7 +325,7 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Horizontal precision: optional.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_TRUE));
+                                     true));
        if (token.type == isc_tokentype_eol ||
            token.type == isc_tokentype_eof) {
                isc_lex_ungettoken(lexer, &token);
@@ -376,7 +376,7 @@ fromtext_loc(ARGS_FROMTEXT) {
         * Vertical precision: optional.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_TRUE));
+                                     true));
        if (token.type == isc_tokentype_eol ||
            token.type == isc_tokentype_eof) {
                isc_lex_ungettoken(lexer, &token);
@@ -450,9 +450,9 @@ totext_loc(ARGS_TOTEXT) {
        unsigned long latitude;
        unsigned long longitude;
        unsigned long altitude;
-       isc_boolean_t north;
-       isc_boolean_t east;
-       isc_boolean_t below;
+       bool north;
+       bool east;
+       bool below;
        isc_region_t sr;
        char buf[sizeof("89 59 59.999 N 179 59 59.999 E "
                        "-42849672.95m 90000000m 90000000m 90000000m")];
@@ -507,10 +507,10 @@ totext_loc(ARGS_TOTEXT) {
        latitude = uint32_fromregion(&sr);
        isc_region_consume(&sr, 4);
        if (latitude >= 0x80000000) {
-               north = ISC_TRUE;
+               north = true;
                latitude -= 0x80000000;
        } else {
-               north = ISC_FALSE;
+               north = false;
                latitude = 0x80000000 - latitude;
        }
        fs1 = (int)(latitude % 1000);
@@ -525,10 +525,10 @@ totext_loc(ARGS_TOTEXT) {
        longitude = uint32_fromregion(&sr);
        isc_region_consume(&sr, 4);
        if (longitude >= 0x80000000) {
-               east = ISC_TRUE;
+               east = true;
                longitude -= 0x80000000;
        } else {
-               east = ISC_FALSE;
+               east = false;
                longitude = 0x80000000 - longitude;
        }
        fs2 = (int)(longitude % 1000);
@@ -543,10 +543,10 @@ totext_loc(ARGS_TOTEXT) {
        altitude = uint32_fromregion(&sr);
        isc_region_consume(&sr, 4);
        if (altitude < 10000000U) {
-               below = ISC_TRUE;
+               below = true;
                altitude = 10000000 - altitude;
        } else {
-               below =ISC_FALSE;
+               below =false;
                altitude -= 10000000;
        }
 
@@ -778,7 +778,7 @@ digest_loc(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_loc(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_loc);
@@ -788,10 +788,10 @@ checkowner_loc(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_loc(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_loc);
@@ -800,7 +800,7 @@ checknames_loc(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 41295cd084e044bbdf9d3676899a1f020d65f9f6..49bc799bd9b65e96607dfb8a02df1090b5095054 100644 (file)
@@ -31,13 +31,13 @@ fromtext_lp(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -51,7 +51,7 @@ totext_lp(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -211,7 +211,7 @@ digest_lp(ARGS_DIGEST) {
        return ((digest)(arg, &region));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_lp(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_lp);
@@ -221,10 +221,10 @@ checkowner_lp(ARGS_CHECKOWNER) {
        UNUSED(name);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_lp(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_lp);
@@ -232,7 +232,7 @@ checknames_lp(ARGS_CHECKNAMES) {
        UNUSED(bad);
        UNUSED(owner);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 651503a3ff67d86308692eeab9ce146e18ce87b1..299f89d10d79cb96f8fdc9ded1c4ea966046e4c2 100644 (file)
@@ -27,7 +27,7 @@ fromtext_mb(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -42,7 +42,7 @@ totext_mb(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_mb);
        REQUIRE(rdata->length != 0);
@@ -198,7 +198,7 @@ digest_mb(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_mb(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_mb);
@@ -210,7 +210,7 @@ checkowner_mb(ARGS_CHECKOWNER) {
        return (dns_name_ismailbox(name));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_mb(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_mb);
@@ -219,7 +219,7 @@ checknames_mb(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 85d53eca8224f9c0856046dded3561010edbc3a8..9eefe6967e3be8e4cb08d5116bf54ce7efe0625c 100644 (file)
@@ -27,7 +27,7 @@ fromtext_md(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -42,7 +42,7 @@ totext_md(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_md);
        REQUIRE(rdata->length != 0);
@@ -199,7 +199,7 @@ digest_md(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_md(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_md);
@@ -209,10 +209,10 @@ checkowner_md(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_md(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_md);
@@ -221,7 +221,7 @@ checknames_md(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 0658c85fe31c5709cb26f72d48fe959c8872493e..59659816e6199ba67d77009e5251e36ffeed77f5 100644 (file)
@@ -27,7 +27,7 @@ fromtext_mf(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -42,7 +42,7 @@ totext_mf(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_mf);
        REQUIRE(rdata->length != 0);
@@ -198,7 +198,7 @@ digest_mf(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_mf(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_mf);
@@ -208,10 +208,10 @@ checkowner_mf(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_mf(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_mf);
@@ -220,7 +220,7 @@ checknames_mf(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index be694423d746f74ab02edbdc22cdaf5d2c88ef74..45a38ce751388974a04b63c0f918791040f2b465 100644 (file)
@@ -27,7 +27,7 @@ fromtext_mg(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -42,7 +42,7 @@ totext_mg(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_mg);
        REQUIRE(rdata->length != 0);
@@ -194,7 +194,7 @@ digest_mg(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_mg(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_mg);
@@ -206,7 +206,7 @@ checkowner_mg(ARGS_CHECKOWNER) {
        return (dns_name_ismailbox(name));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_mg(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_mg);
@@ -215,7 +215,7 @@ checknames_mg(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 267798227338b7594acc6d15d673d6184b444fd0..23506e2082ad78c85c62e8c97eefa3e01532fcc1 100644 (file)
@@ -20,7 +20,7 @@ fromtext_minfo(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
        int i;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_minfo);
 
@@ -34,12 +34,12 @@ fromtext_minfo(ARGS_FROMTEXT) {
        for (i = 0; i < 2; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_FALSE));
+                                             false));
                dns_name_init(&name, NULL);
                buffer_fromregion(&buffer, &token.value.as_region);
                RETTOK(dns_name_fromtext(&name, &buffer, origin,
                                         options, target));
-               ok = ISC_TRUE;
+               ok = true;
                if ((options & DNS_RDATA_CHECKNAMES) != 0)
                        ok = dns_name_ismailbox(&name);
                if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
@@ -56,7 +56,7 @@ totext_minfo(ARGS_TOTEXT) {
        dns_name_t rmail;
        dns_name_t email;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_minfo);
        REQUIRE(rdata->length != 0);
@@ -273,7 +273,7 @@ digest_minfo(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_minfo(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_minfo);
@@ -283,10 +283,10 @@ checkowner_minfo(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_minfo(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -301,16 +301,16 @@ checknames_minfo(ARGS_CHECKNAMES) {
        if (!dns_name_ismailbox(&name)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
        isc_region_consume(&region, name_length(&name));
        dns_name_fromregion(&name, &region);
        if (!dns_name_ismailbox(&name)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index a8ecf2d56a3af50ccee3ecbc926e1ec64b5ae3a9..edea7b169785c6988b3b947fd442b8b01dc07c58 100644 (file)
@@ -27,7 +27,7 @@ fromtext_mr(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -42,7 +42,7 @@ totext_mr(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_mr);
        REQUIRE(rdata->length != 0);
@@ -194,7 +194,7 @@ digest_mr(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_mr(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_mr);
@@ -204,10 +204,10 @@ checkowner_mr(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_mr(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_mr);
@@ -216,7 +216,7 @@ checknames_mr(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 3406f3b5cba9e1df86b56a17ffd159dfc3ee04cb..c333740db947f652bdb403a748d5016ea865a842 100644 (file)
 
 #define RRTYPE_MX_ATTRIBUTES (0)
 
-static isc_boolean_t
+static bool
 check_mx(isc_token_t *token) {
        char tmp[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123.")];
        struct in_addr addr;
        struct in6_addr addr6;
 
        if (strlcpy(tmp, DNS_AS_STR(*token), sizeof(tmp)) >= sizeof(tmp))
-               return (ISC_TRUE);
+               return (true);
 
        if (tmp[strlen(tmp) - 1] == '.')
                tmp[strlen(tmp) - 1] = '\0';
        if (inet_aton(tmp, &addr) == 1 ||
            inet_pton(AF_INET6, tmp, &addr6) == 1)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline isc_result_t
@@ -43,7 +43,7 @@ fromtext_mx(ARGS_FROMTEXT) {
        isc_token_t token;
        dns_name_t name;
        isc_buffer_t buffer;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_mx);
 
@@ -51,15 +51,15 @@ fromtext_mx(ARGS_FROMTEXT) {
        UNUSED(rdclass);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKMX) != 0)
                ok = check_mx(&token);
        if (!ok && (options & DNS_RDATA_CHECKMXFAIL) != 0)
@@ -72,9 +72,9 @@ fromtext_mx(ARGS_FROMTEXT) {
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKNAMES) != 0)
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               ok = dns_name_ishostname(&name, false);
        if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                RETTOK(DNS_R_BADNAME);
        if (!ok && callbacks != NULL)
@@ -87,7 +87,7 @@ totext_mx(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -296,7 +296,7 @@ digest_mx(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_mx(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_mx);
@@ -307,7 +307,7 @@ checkowner_mx(ARGS_CHECKOWNER) {
        return (dns_name_ishostname(name, wildcard));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_mx(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -320,12 +320,12 @@ checknames_mx(ARGS_CHECKNAMES) {
        isc_region_consume(&region, 2);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index d3c14f2a9e686a7e0acc38dc230357dd9c0bcf05..80c8f16729093b96c7ae01be79324e1b74122ac8 100644 (file)
@@ -27,8 +27,8 @@ txt_valid_regex(const unsigned char *txt) {
        unsigned int nsub = 0;
        char regex[256];
        char *cp;
-       isc_boolean_t flags = ISC_FALSE;
-       isc_boolean_t replace = ISC_FALSE;
+       bool flags = false;
+       bool replace = false;
        unsigned char c;
        unsigned char delim;
        unsigned int len;
@@ -57,10 +57,10 @@ txt_valid_regex(const unsigned char *txt) {
                if (c == 0)
                        return (DNS_R_SYNTAX);
                if (c == delim && !replace) {
-                       replace = ISC_TRUE;
+                       replace = true;
                        continue;
                } else if (c == delim && !flags) {
-                       flags = ISC_TRUE;
+                       flags = true;
                        continue;
                } else if (c == delim)
                        return (DNS_R_SYNTAX);
@@ -127,7 +127,7 @@ fromtext_naptr(ARGS_FROMTEXT) {
         * Order.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -136,7 +136,7 @@ fromtext_naptr(ARGS_FROMTEXT) {
         * Preference.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -145,14 +145,14 @@ fromtext_naptr(ARGS_FROMTEXT) {
         * Flags.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(txt_fromtext(&token.value.as_textregion, target));
 
        /*
         * Service.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(txt_fromtext(&token.value.as_textregion, target));
 
        /*
@@ -160,7 +160,7 @@ fromtext_naptr(ARGS_FROMTEXT) {
         */
        regex = isc_buffer_used(target);
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(txt_fromtext(&token.value.as_textregion, target));
        RETTOK(txt_valid_regex(regex));
 
@@ -168,7 +168,7 @@ fromtext_naptr(ARGS_FROMTEXT) {
         * Replacement.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -182,7 +182,7 @@ totext_naptr(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -215,19 +215,19 @@ totext_naptr(ARGS_TOTEXT) {
        /*
         * Flags.
         */
-       RETERR(txt_totext(&region, ISC_TRUE, target));
+       RETERR(txt_totext(&region, true, target));
        RETERR(str_totext(" ", target));
 
        /*
         * Service.
         */
-       RETERR(txt_totext(&region, ISC_TRUE, target));
+       RETERR(txt_totext(&region, true, target));
        RETERR(str_totext(" ", target));
 
        /*
         * Regexp.
         */
-       RETERR(txt_totext(&region, ISC_TRUE, target));
+       RETERR(txt_totext(&region, true, target));
        RETERR(str_totext(" ", target));
 
        /*
@@ -629,7 +629,7 @@ digest_naptr(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_naptr(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_naptr);
@@ -639,10 +639,10 @@ checkowner_naptr(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_naptr(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_naptr);
@@ -651,7 +651,7 @@ checknames_naptr(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index deafe776d3d2733af9461510497df7a40e21d81a..fee61fd32c9766f08add475df79d0f2a344c21e3 100644 (file)
@@ -32,13 +32,13 @@ fromtext_nid(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        if (locator_pton(DNS_AS_STR(token), locator) != 1)
                RETTOK(DNS_R_SYNTAX);
@@ -189,7 +189,7 @@ digest_nid(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_nid(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_nid);
@@ -199,10 +199,10 @@ checkowner_nid(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_nid(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nid);
@@ -212,7 +212,7 @@ checknames_nid(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index cd088b3057ec7da235799d7e81fee3d0feb476b5..fe8957affa23b16398aedcf7100c861508638d47 100644 (file)
@@ -130,7 +130,7 @@ digest_ninfo(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ninfo(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_ninfo);
@@ -140,10 +140,10 @@ checkowner_ninfo(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_ninfo(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_ninfo);
@@ -152,7 +152,7 @@ checknames_ninfo(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index cf4812812481923fe889fbc2fc2ea531ae9109db..7f3979f6220e1e179f4f313bbdb78fd72f47db11 100644 (file)
@@ -19,7 +19,7 @@ fromtext_ns(ARGS_FROMTEXT) {
        isc_token_t token;
        dns_name_t name;
        isc_buffer_t buffer;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_ns);
 
@@ -28,16 +28,16 @@ fromtext_ns(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token,isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKNAMES) != 0)
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               ok = dns_name_ishostname(&name, false);
        if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                RETTOK(DNS_R_BADNAME);
        if (!ok && callbacks != NULL)
@@ -50,7 +50,7 @@ totext_ns(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_ns);
        REQUIRE(rdata->length != 0);
@@ -206,7 +206,7 @@ digest_ns(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ns(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_ns);
@@ -216,10 +216,10 @@ checkowner_ns(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_ns(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -231,12 +231,12 @@ checknames_ns(ARGS_CHECKNAMES) {
        dns_rdata_toregion(rdata, &region);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 81d43f36a4209d47acac864ede22f4225781d84f..1aedf22438846cb683a0b61956ab8218d03f3c52 100644 (file)
@@ -54,13 +54,13 @@ fromtext_nsec3(ARGS_FROMTEXT) {
 
        /* Hash. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_hashalg_fromtext(&hashalg, &token.value.as_textregion));
        RETERR(uint8_tobuffer(hashalg, target));
 
        /* Flags. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        flags = token.value.as_ulong;
        if (flags > 255U)
                RETTOK(ISC_R_RANGE);
@@ -68,14 +68,14 @@ fromtext_nsec3(ARGS_FROMTEXT) {
 
        /* Iterations. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        /* salt */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_textregion.length > (255*2))
                RETTOK(DNS_R_TEXTTOOLONG);
        if (strcmp(DNS_AS_STR(token), "-") == 0) {
@@ -89,7 +89,7 @@ fromtext_nsec3(ARGS_FROMTEXT) {
         * Next hash a single base32hex word.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        isc_buffer_init(&b, buf, sizeof(buf));
        RETTOK(isc_base32hexnp_decodestring(DNS_AS_STR(token), &b));
        if (isc_buffer_usedlength(&b) > 0xffU)
@@ -97,7 +97,7 @@ fromtext_nsec3(ARGS_FROMTEXT) {
        RETERR(uint8_tobuffer(isc_buffer_usedlength(&b), target));
        RETERR(mem_tobuffer(target, &buf, isc_buffer_usedlength(&b)));
 
-       return (typemap_fromtext(lexer, target, ISC_TRUE));
+       return (typemap_fromtext(lexer, target, true));
 }
 
 static inline isc_result_t
@@ -207,7 +207,7 @@ fromwire_nsec3(ARGS_FROMWIRE) {
                RETERR(DNS_R_FORMERR);
        isc_region_consume(&sr, hashlen);
 
-       RETERR(typemap_test(&sr, ISC_TRUE));
+       RETERR(typemap_test(&sr, true));
 
        RETERR(mem_tobuffer(target, rr.base, rr.length));
        isc_buffer_forward(source, rr.length);
@@ -268,7 +268,7 @@ fromstruct_nsec3(ARGS_FROMSTRUCT) {
 
        region.base = nsec3->typebits;
        region.length = nsec3->len;
-       RETERR(typemap_test(&region, ISC_TRUE));
+       RETERR(typemap_test(&region, true));
        return (mem_tobuffer(target, nsec3->typebits, nsec3->len));
 }
 
@@ -358,7 +358,7 @@ digest_nsec3(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_nsec3(ARGS_CHECKOWNER) {
        unsigned char owner[NSEC3_MAX_HASH_LENGTH];
        isc_buffer_t buffer;
@@ -377,12 +377,12 @@ checkowner_nsec3(ARGS_CHECKOWNER) {
        isc_region_consume(&label, 1);
        isc_buffer_init(&buffer, owner, sizeof(owner));
        if (isc_base32hexnp_decoderegion(&label, &buffer) == ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_nsec3(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nsec3);
@@ -391,7 +391,7 @@ checknames_nsec3(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index af61b36299ace39a8bb62d1f74d6919cc818e4df..8a24deea03e4911b681e268c92f8014a53f13ee6 100644 (file)
@@ -52,13 +52,13 @@ fromtext_nsec3param(ARGS_FROMTEXT) {
 
        /* Hash. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_hashalg_fromtext(&hashalg, &token.value.as_textregion));
        RETERR(uint8_tobuffer(hashalg, target));
 
        /* Flags. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        flags = token.value.as_ulong;
        if (flags > 255U)
                RETTOK(ISC_R_RANGE);
@@ -66,14 +66,14 @@ fromtext_nsec3param(ARGS_FROMTEXT) {
 
        /* Iterations. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        /* Salt. */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_textregion.length > (255*2))
                RETTOK(DNS_R_TEXTTOOLONG);
        if (strcmp(DNS_AS_STR(token), "-") == 0) {
@@ -280,7 +280,7 @@ digest_nsec3param(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_nsec3param(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_nsec3param);
@@ -290,10 +290,10 @@ checkowner_nsec3param(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_nsec3param(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nsec3param);
@@ -302,7 +302,7 @@ checknames_nsec3param(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 67f9967fd397d56718047ecbe85f69ab5546ac07..05e575b62cd6eea842993535c47da3523259709c 100644 (file)
@@ -36,14 +36,14 @@ fromtext_nsec(ARGS_FROMTEXT) {
         * Next domain.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
 
-       return (typemap_fromtext(lexer, target, ISC_FALSE));
+       return (typemap_fromtext(lexer, target, false));
 }
 
 static inline isc_result_t
@@ -60,7 +60,7 @@ totext_nsec(ARGS_TOTEXT) {
        dns_rdata_toregion(rdata, &sr);
        dns_name_fromregion(&name, &sr);
        isc_region_consume(&sr, name_length(&name));
-       RETERR(dns_name_totext(&name, ISC_FALSE, target));
+       RETERR(dns_name_totext(&name, false, target));
        /*
         * Don't leave a trailing space when there's no typemap present.
         */
@@ -86,7 +86,7 @@ fromwire_nsec(ARGS_FROMWIRE) {
        RETERR(dns_name_fromwire(&name, source, dctx, options, target));
 
        isc_buffer_activeregion(source, &sr);
-       RETERR(typemap_test(&sr, ISC_FALSE));
+       RETERR(typemap_test(&sr, false));
        RETERR(mem_tobuffer(target, sr.base, sr.length));
        isc_buffer_forward(source, sr.length);
        return (ISC_R_SUCCESS);
@@ -146,7 +146,7 @@ fromstruct_nsec(ARGS_FROMSTRUCT) {
 
        region.base = nsec->typebits;
        region.length = nsec->len;
-       RETERR(typemap_test(&region, ISC_FALSE));
+       RETERR(typemap_test(&region, false));
        return (mem_tobuffer(target, nsec->typebits, nsec->len));
 }
 
@@ -222,7 +222,7 @@ digest_nsec(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_nsec(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_nsec);
@@ -232,10 +232,10 @@ checkowner_nsec(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_nsec(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nsec);
@@ -244,7 +244,7 @@ checknames_nsec(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index f55eb70f029b742c62cd4140163bab6bf0e0cd1c..624adade556a75652c6bbd6dbd06788c714d5d28 100644 (file)
@@ -150,7 +150,7 @@ digest_null(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_null(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_null);
@@ -160,10 +160,10 @@ checkowner_null(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_null(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_null);
@@ -172,7 +172,7 @@ checknames_null(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 10c2ab798f02e1f80c3c0b7a33bb5331b032367d..91a95b7f4c431dbf8685153f798217ce804a0f79 100644 (file)
@@ -29,7 +29,7 @@ fromtext_nxt(ARGS_FROMTEXT) {
        unsigned char bm[8*1024]; /* 64k bits */
        dns_rdatatype_t covered;
        dns_rdatatype_t maxcovered = 0;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
        long n;
 
        REQUIRE(type == dns_rdatatype_nxt);
@@ -42,7 +42,7 @@ fromtext_nxt(ARGS_FROMTEXT) {
         * Next domain.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -52,7 +52,7 @@ fromtext_nxt(ARGS_FROMTEXT) {
        memset(bm, 0, sizeof(bm));
        do {
                RETERR(isc_lex_getmastertoken(lexer, &token,
-                                             isc_tokentype_string, ISC_TRUE));
+                                             isc_tokentype_string, true));
                if (token.type != isc_tokentype_string)
                        break;
                n = strtol(DNS_AS_STR(token), &e, 10);
@@ -68,7 +68,7 @@ fromtext_nxt(ARGS_FROMTEXT) {
                        return (ISC_R_RANGE);
                if (first || covered > maxcovered)
                        maxcovered = covered;
-               first = ISC_FALSE;
+               first = false;
                bm[covered/8] |= (0x80>>(covered%8));
        } while (1);
        isc_lex_ungettoken(lexer, &token);
@@ -84,7 +84,7 @@ totext_nxt(ARGS_TOTEXT) {
        unsigned int i, j;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_nxt);
        REQUIRE(rdata->length != 0);
@@ -293,7 +293,7 @@ digest_nxt(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_nxt(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_nxt);
@@ -303,10 +303,10 @@ checkowner_nxt(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_nxt(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nxt);
@@ -315,7 +315,7 @@ checknames_nxt(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 70fc0b5ff0fd15a649b7a288219e714fe9a49b42..52c87d4552727ebe54ae272a50841e9062a91d93 100644 (file)
@@ -197,7 +197,7 @@ digest_openpgpkey(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_openpgpkey(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_openpgpkey);
@@ -207,10 +207,10 @@ checkowner_openpgpkey(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_openpgpkey(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
@@ -219,7 +219,7 @@ checknames_openpgpkey(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index b7886ec6da382c5b08038c75091cbdaf824d41ae..b102cf2f42c14b6966aac9df4a8618571eef226e 100644 (file)
@@ -322,7 +322,7 @@ digest_opt(ARGS_DIGEST) {
        return (ISC_R_NOTIMPLEMENTED);
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_opt(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_opt);
@@ -334,7 +334,7 @@ checkowner_opt(ARGS_CHECKOWNER) {
        return (dns_name_equal(name, dns_rootname));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_opt(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_opt);
@@ -343,7 +343,7 @@ checknames_opt(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 83402d6bae47eb58783cf626f12fa9c45af76ba9..c31b29f7318c45ced16fb523265fd96a607525fb 100644 (file)
@@ -23,7 +23,7 @@ fromtext_#(ARGS_FROMTEXT) {
        REQUIRE(rdclass == #);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        return (ISC_R_NOTIMPLEMENTED);
 }
@@ -136,7 +136,7 @@ digest_#(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_#(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_proforma.c#);
@@ -147,10 +147,10 @@ checkowner_#(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_#(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
@@ -160,7 +160,7 @@ checknames_#(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 8258d1d897baa02b9faf58bd4a082361cc074dae..a2f5ef1c610412b1155ce155a6569d20711c35ae 100644 (file)
@@ -27,7 +27,7 @@ fromtext_ptr(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -37,8 +37,8 @@ fromtext_ptr(ARGS_FROMTEXT) {
        if (rdclass == dns_rdataclass_in &&
            (options & DNS_RDATA_CHECKNAMES) != 0 &&
            (options & DNS_RDATA_CHECKREVERSE) != 0) {
-               isc_boolean_t ok;
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               bool ok;
+               ok = dns_name_ishostname(&name, false);
                if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                        RETTOK(DNS_R_BADNAME);
                if (!ok && callbacks != NULL)
@@ -52,7 +52,7 @@ totext_ptr(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_ptr);
        REQUIRE(rdata->length != 0);
@@ -205,7 +205,7 @@ digest_ptr(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ptr(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_ptr);
@@ -215,7 +215,7 @@ checkowner_ptr(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static unsigned char ip6_arpa_data[]  = "\003IP6\004ARPA";
@@ -233,7 +233,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 isc_boolean_t
+static inline bool
 checknames_ptr(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -241,10 +241,10 @@ checknames_ptr(ARGS_CHECKNAMES) {
        REQUIRE(rdata->type == dns_rdatatype_ptr);
 
        if (rdata->rdclass != dns_rdataclass_in)
-           return (ISC_TRUE);
+           return (true);
 
        if (dns_name_isdnssd(owner))
-               return (ISC_TRUE);
+               return (true);
 
        if (dns_name_issubdomain(owner, &in_addr_arpa) ||
            dns_name_issubdomain(owner, &ip6_arpa) ||
@@ -252,13 +252,13 @@ checknames_ptr(ARGS_CHECKNAMES) {
                dns_rdata_toregion(rdata, &region);
                dns_name_init(&name, NULL);
                dns_name_fromregion(&name, &region);
-               if (!dns_name_ishostname(&name, ISC_FALSE)) {
+               if (!dns_name_ishostname(&name, false)) {
                        if (bad != NULL)
                                dns_name_clone(&name, bad);
-                       return (ISC_FALSE);
+                       return (false);
                }
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 934af826640913079e1e7d0e58ca04c11fed92ca..2475a48fac3f30717048c1e1bbbd71a4a7575eac 100644 (file)
@@ -130,7 +130,7 @@ digest_rkey(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_rkey(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_rkey);
@@ -140,10 +140,10 @@ checkowner_rkey(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_rkey(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata != NULL);
@@ -153,7 +153,7 @@ checknames_rkey(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 1630f0ce13ee6a2a312cb04d022716d6eac3b880..2e915658057e8ea8f0587cbfff51d2a599b055b9 100644 (file)
@@ -23,7 +23,7 @@ fromtext_rp(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
        int i;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_rp);
 
@@ -37,12 +37,12 @@ fromtext_rp(ARGS_FROMTEXT) {
        for (i = 0; i < 2; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_FALSE));
+                                             false));
                dns_name_init(&name, NULL);
                buffer_fromregion(&buffer, &token.value.as_region);
                RETTOK(dns_name_fromtext(&name, &buffer, origin,
                                         options, target));
-               ok = ISC_TRUE;
+               ok = true;
                if ((options & DNS_RDATA_CHECKNAMES) != 0 && i == 0)
                        ok = dns_name_ismailbox(&name);
                if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
@@ -59,7 +59,7 @@ totext_rp(ARGS_TOTEXT) {
        dns_name_t rmail;
        dns_name_t email;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_rp);
        REQUIRE(rdata->length != 0);
@@ -272,7 +272,7 @@ digest_rp(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_rp(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_rp);
@@ -282,10 +282,10 @@ checkowner_rp(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_rp(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -300,9 +300,9 @@ checknames_rp(ARGS_CHECKNAMES) {
        if (!dns_name_ismailbox(&name)) {
                if (bad != NULL)
                                dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 4951defc00f2d27fdfb12234ea2f0a94f95c4f4e..fb945ff1eddce3bedf69c9ca3ae1897f73965a37 100644 (file)
@@ -38,7 +38,7 @@ fromtext_rrsig(ARGS_FROMTEXT) {
         * Type covered.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        result = dns_rdatatype_fromtext(&covered, &token.value.as_textregion);
        if (result != ISC_R_SUCCESS && result != ISC_R_NOTIMPLEMENTED) {
                i = strtol(DNS_AS_STR(token), &e, 10);
@@ -54,7 +54,7 @@ fromtext_rrsig(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secalg_fromtext(&c, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &c, 1));
 
@@ -62,7 +62,7 @@ fromtext_rrsig(ARGS_FROMTEXT) {
         * Labels.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        c = (unsigned char)token.value.as_ulong;
@@ -72,14 +72,14 @@ fromtext_rrsig(ARGS_FROMTEXT) {
         * Original ttl.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /*
         * Signature expiration.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strlen(DNS_AS_STR(token)) <= 10U &&
            *DNS_AS_STR(token) != '-' && *DNS_AS_STR(token) != '+') {
                char *end;
@@ -100,7 +100,7 @@ fromtext_rrsig(ARGS_FROMTEXT) {
         * Time signed.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (strlen(DNS_AS_STR(token)) <= 10U &&
            *DNS_AS_STR(token) != '-' && *DNS_AS_STR(token) != '+') {
                char *end;
@@ -121,14 +121,14 @@ fromtext_rrsig(ARGS_FROMTEXT) {
         * Key footprint.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        /*
         * Signer.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -233,7 +233,7 @@ totext_rrsig(ARGS_TOTEXT) {
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &sr);
        isc_region_consume(&sr, name_length(&name));
-       RETERR(dns_name_totext(&name, ISC_FALSE, target));
+       RETERR(dns_name_totext(&name, false, target));
 
        /*
         * Sig.
@@ -542,7 +542,7 @@ covers_rrsig(dns_rdata_t *rdata) {
        return (type);
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_rrsig(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_rrsig);
@@ -552,10 +552,10 @@ checkowner_rrsig(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_rrsig(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_rrsig);
@@ -564,7 +564,7 @@ checknames_rrsig(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 64b4345fbb0fe952101c78eb15c85d87019a5d0c..e6450cb0d0e152a85dc6338cb4634147431a272d 100644 (file)
@@ -21,7 +21,7 @@ fromtext_rt(ARGS_FROMTEXT) {
        isc_token_t token;
        dns_name_t name;
        isc_buffer_t buffer;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_rt);
 
@@ -30,22 +30,22 @@ fromtext_rt(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKNAMES) != 0)
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               ok = dns_name_ishostname(&name, false);
        if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                RETTOK(DNS_R_BADNAME);
        if (!ok && callbacks != NULL)
@@ -58,7 +58,7 @@ totext_rt(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -265,7 +265,7 @@ digest_rt(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_rt(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_rt);
@@ -275,10 +275,10 @@ checkowner_rt(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_rt(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -291,12 +291,12 @@ checknames_rt(ARGS_CHECKNAMES) {
        isc_region_consume(&region, 2);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 8606bfb4819eddbf65edcaadd2a29c2d9fffa6cb..ca0ce4ea2ffcbcdba8d34e8ae8ee2a6489de1b9d 100644 (file)
@@ -38,7 +38,7 @@ fromtext_sig(ARGS_FROMTEXT) {
         * Type covered.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        result = dns_rdatatype_fromtext(&covered, &token.value.as_textregion);
        if (result != ISC_R_SUCCESS && result != ISC_R_NOTIMPLEMENTED) {
                i = strtol(DNS_AS_STR(token), &e, 10);
@@ -54,7 +54,7 @@ fromtext_sig(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_secalg_fromtext(&c, &token.value.as_textregion));
        RETERR(mem_tobuffer(target, &c, 1));
 
@@ -62,7 +62,7 @@ fromtext_sig(ARGS_FROMTEXT) {
         * Labels.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        c = (unsigned char)token.value.as_ulong;
@@ -72,14 +72,14 @@ fromtext_sig(ARGS_FROMTEXT) {
         * Original ttl.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /*
         * Signature expiration.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &time_expire));
        RETERR(uint32_tobuffer(time_expire, target));
 
@@ -87,7 +87,7 @@ fromtext_sig(ARGS_FROMTEXT) {
         * Time signed.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &time_signed));
        RETERR(uint32_tobuffer(time_signed, target));
 
@@ -95,14 +95,14 @@ fromtext_sig(ARGS_FROMTEXT) {
         * Key footprint.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        /*
         * Signer.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -126,7 +126,7 @@ totext_sig(ARGS_TOTEXT) {
        unsigned long foot;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_sig);
        REQUIRE(rdata->length != 0);
@@ -543,7 +543,7 @@ covers_sig(dns_rdata_t *rdata) {
        return (type);
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_sig(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_sig);
@@ -553,10 +553,10 @@ checkowner_sig(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_sig(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_sig);
@@ -565,7 +565,7 @@ checknames_sig(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 283b763e3ffc523e274a62c6607fe485e393616f..128941440d98971bcc86990df95c79d3d8ea877d 100644 (file)
@@ -30,21 +30,21 @@ fromtext_sink(ARGS_FROMTEXT) {
 
        /* meaning */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
 
        /* coding */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
 
        /* subcoding */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -246,7 +246,7 @@ digest_sink(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_sink(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_sink);
@@ -256,10 +256,10 @@ checkowner_sink(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_sink(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_sink);
@@ -268,7 +268,7 @@ checknames_sink(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 9c69d547a78853920e7084d5567d4915593d1414..efd7f0178bdab7564c78354dde148d2431dbb294 100644 (file)
@@ -123,7 +123,7 @@ digest_smimea(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_smimea(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_smimea);
@@ -133,10 +133,10 @@ checkowner_smimea(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_smimea(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_smimea);
@@ -145,7 +145,7 @@ checknames_smimea(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 8e75d149c331e47957bfa43cfb2048fe9ce21694..c21d64b35fcf927b030f7ee6c37216f7ae38f2d4 100644 (file)
@@ -21,7 +21,7 @@ fromtext_soa(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        int i;
        uint32_t n;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_soa);
 
@@ -35,17 +35,17 @@ fromtext_soa(ARGS_FROMTEXT) {
        for (i = 0; i < 2; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_FALSE));
+                                             false));
 
                dns_name_init(&name, NULL);
                buffer_fromregion(&buffer, &token.value.as_region);
                RETTOK(dns_name_fromtext(&name, &buffer, origin,
                                         options, target));
-               ok = ISC_TRUE;
+               ok = true;
                if ((options & DNS_RDATA_CHECKNAMES) != 0)
                        switch (i) {
                        case 0:
-                               ok = dns_name_ishostname(&name, ISC_FALSE);
+                               ok = dns_name_ishostname(&name, false);
                                break;
                        case 1:
                                ok = dns_name_ismailbox(&name);
@@ -59,13 +59,13 @@ fromtext_soa(ARGS_FROMTEXT) {
        }
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        for (i = 0; i < 4; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_FALSE));
+                                             false));
                RETTOK(dns_counter_fromtext(&token.value.as_textregion, &n));
                RETERR(uint32_tobuffer(n, target));
        }
@@ -83,20 +83,18 @@ totext_soa(ARGS_TOTEXT) {
        dns_name_t mname;
        dns_name_t rname;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        int i;
-       isc_boolean_t multiline;
-       isc_boolean_t comm;
+       bool multiline;
+       bool comm;
 
        REQUIRE(rdata->type == dns_rdatatype_soa);
        REQUIRE(rdata->length != 0);
 
-       multiline = ISC_TF((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0);
-       if (multiline)
-               comm = ISC_TF((tctx->flags & DNS_STYLEFLAG_RRCOMMENT) != 0);
-       else
-               comm = ISC_FALSE;
-
+       multiline = (tctx->flags & DNS_STYLEFLAG_MULTILINE);
+       comm = (multiline) ?
+               (tctx->flags & DNS_STYLEFLAG_RRCOMMENT) :
+               false;
 
        dns_name_init(&mname, NULL);
        dns_name_init(&rname, NULL);
@@ -134,7 +132,7 @@ totext_soa(ARGS_TOTEXT) {
                        /* Print times in week/day/hour/minute/second form */
                        if (i >= 1) {
                                RETERR(str_totext(" (", target));
-                               RETERR(dns_ttl_totext(num, ISC_TRUE, target));
+                               RETERR(dns_ttl_totext(num, true, target));
                                RETERR(str_totext(")", target));
                        }
                        RETERR(str_totext(tctx->linebreak, target));
@@ -392,7 +390,7 @@ digest_soa(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_soa(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_soa);
@@ -402,10 +400,10 @@ checkowner_soa(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_soa(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -417,19 +415,19 @@ checknames_soa(ARGS_CHECKNAMES) {
        dns_rdata_toregion(rdata, &region);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
        isc_region_consume(&region, name_length(&name));
        dns_name_fromregion(&name, &region);
        if (!dns_name_ismailbox(&name)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 3595007c3d5e42954bc5f822d36b7878dea44ca4..c41edf67441e85239acef0ef0f286858ae2f7519 100644 (file)
@@ -131,7 +131,7 @@ digest_spf(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_spf(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_spf);
@@ -141,10 +141,10 @@ checkowner_spf(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_spf(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_spf);
@@ -153,7 +153,7 @@ checknames_spf(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 8d131adb20cf48c05cbf03c328aa423515b74e94..1b5d7ca51f356978c100baed9dd8cc85b55aaf16 100644 (file)
@@ -33,7 +33,7 @@ fromtext_sshfp(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -42,7 +42,7 @@ fromtext_sshfp(ARGS_FROMTEXT) {
         * Digest type.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -230,7 +230,7 @@ digest_sshfp(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_sshfp(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_sshfp);
@@ -240,10 +240,10 @@ checkowner_sshfp(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_sshfp(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_sshfp);
@@ -252,7 +252,7 @@ checknames_sshfp(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index ac9ffaf388344b9b636c7c4280d4ae7dbba84647..12ec6e7ee814bfd6bbdc4d8aef377f0b7704dbea 100644 (file)
@@ -132,7 +132,7 @@ digest_ta(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_ta(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_ta);
@@ -142,10 +142,10 @@ checkowner_ta(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_ta(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_ta);
@@ -154,7 +154,7 @@ checknames_ta(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index fca274bfd4fa65ee6c3c24f45b987777e749aedc..7f6bacb74f7fe0318bdee16a4ca3c2df4e52b01a 100644 (file)
@@ -33,7 +33,7 @@ fromtext_talink(ARGS_FROMTEXT) {
        for (i = 0; i < 2; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_FALSE));
+                                             false));
 
                dns_name_init(&name, NULL);
                buffer_fromregion(&buffer, &token.value.as_region);
@@ -50,7 +50,7 @@ totext_talink(ARGS_TOTEXT) {
        dns_name_t prev;
        dns_name_t next;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_talink);
        REQUIRE(rdata->length != 0);
@@ -232,7 +232,7 @@ digest_talink(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_talink(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_talink);
@@ -242,10 +242,10 @@ checkowner_talink(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_talink(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_talink);
@@ -253,7 +253,7 @@ checknames_talink(ARGS_CHECKNAMES) {
        UNUSED(bad);
        UNUSED(owner);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 42a6e722afefac42b1c3509da53725e5ccbfb5e9..7bbd1d347918e8f835cd7c3ab47bb63839aac9fb 100644 (file)
@@ -35,7 +35,7 @@ fromtext_tkey(ARGS_FROMTEXT) {
         * Algorithm.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -47,21 +47,21 @@ fromtext_tkey(ARGS_FROMTEXT) {
         * Inception.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /*
         * Expiration.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        RETERR(uint32_tobuffer(token.value.as_ulong, target));
 
        /*
         * Mode.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -70,7 +70,7 @@ fromtext_tkey(ARGS_FROMTEXT) {
         * Error.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        if (dns_tsigrcode_fromtext(&rcode, &token.value.as_textregion)
                                != ISC_R_SUCCESS)
        {
@@ -87,7 +87,7 @@ fromtext_tkey(ARGS_FROMTEXT) {
         * Key Size.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -101,7 +101,7 @@ fromtext_tkey(ARGS_FROMTEXT) {
         * Other Size.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -119,7 +119,7 @@ totext_tkey(ARGS_TOTEXT) {
        unsigned long n;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_tkey);
        REQUIRE(rdata->length != 0);
@@ -524,7 +524,7 @@ digest_tkey(ARGS_DIGEST) {
        return (ISC_R_NOTIMPLEMENTED);
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_tkey(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_tkey);
@@ -534,10 +534,10 @@ checkowner_tkey(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_tkey(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_tkey);
@@ -546,7 +546,7 @@ checknames_tkey(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index fb0dd18e9df4b6fa982005ecf38eda5f8b69abc6..1224dc19aab366ce72ef395f148a8b118d6d6ad0 100644 (file)
@@ -30,7 +30,7 @@ generic_fromtext_tlsa(ARGS_FROMTEXT) {
         * Certificate Usage.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -39,7 +39,7 @@ generic_fromtext_tlsa(ARGS_FROMTEXT) {
         * Selector.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -48,7 +48,7 @@ generic_fromtext_tlsa(ARGS_FROMTEXT) {
         * Matching type.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint8_tobuffer(token.value.as_ulong, target));
@@ -301,7 +301,7 @@ digest_tlsa(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_tlsa(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_tlsa);
@@ -311,10 +311,10 @@ checkowner_tlsa(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_tlsa(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_tlsa);
@@ -323,7 +323,7 @@ checknames_tlsa(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index d31cf93db5981fa51f4cf8db2bd9e2bf25a2e720..3f3842e6b0a2d8fcea56842badc947245899dacb 100644 (file)
@@ -36,7 +36,7 @@ generic_fromtext_txt(ARGS_FROMTEXT) {
        for (;;) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_qstring,
-                                             ISC_TRUE));
+                                             true));
                if (token.type != isc_tokentype_qstring &&
                    token.type != isc_tokentype_string)
                        break;
@@ -57,7 +57,7 @@ generic_totext_txt(ARGS_TOTEXT) {
        dns_rdata_toregion(rdata, &region);
 
        while (region.length > 0) {
-               RETERR(txt_totext(&region, ISC_TRUE, target));
+               RETERR(txt_totext(&region, true, target));
                if (region.length > 0)
                        RETERR(str_totext(" ", target));
        }
@@ -248,7 +248,7 @@ digest_txt(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_txt(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_txt);
@@ -258,10 +258,10 @@ checkowner_txt(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_txt(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_txt);
@@ -270,7 +270,7 @@ checknames_txt(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 95bb5506b927ecc5b6481d717f114a24e66f8697..1c4654f9ed21b17357a85a2cb030685babfb7960 100644 (file)
@@ -154,7 +154,7 @@ digest_unspec(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_unspec(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_unspec);
@@ -164,10 +164,10 @@ checkowner_unspec(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_unspec(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_unspec);
@@ -176,7 +176,7 @@ checknames_unspec(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 640192012643a28f206468f7b111dfacb0f1a4cb..8fb0307d28b32e385283fc4643eb3dffcc7e2ca5 100644 (file)
@@ -31,7 +31,7 @@ fromtext_uri(ARGS_FROMTEXT) {
         * Priority
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -40,7 +40,7 @@ fromtext_uri(ARGS_FROMTEXT) {
         * Weight
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -49,7 +49,7 @@ fromtext_uri(ARGS_FROMTEXT) {
         * Target URI
         */
        RETERR(isc_lex_getmastertoken(lexer, &token,
-                                     isc_tokentype_qstring, ISC_FALSE));
+                                     isc_tokentype_qstring, false));
        if (token.type != isc_tokentype_qstring)
                RETTOK(DNS_R_SYNTAX);
        RETTOK(multitxt_fromtext(&token.value.as_textregion, target));
@@ -275,7 +275,7 @@ digest_uri(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_uri(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_uri);
@@ -285,10 +285,10 @@ checkowner_uri(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_uri(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_uri);
@@ -297,7 +297,7 @@ checknames_uri(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index a846594db3d3cee6f0e66f717ba4e58823748bf0..d267f651519d444748ae94578a2a10ea7fa2afa4 100644 (file)
@@ -30,7 +30,7 @@ fromtext_x25(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_qstring,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_textregion.length < 4)
                RETTOK(DNS_R_SYNTAX);
        for (i = 0; i < token.value.as_textregion.length; i++)
@@ -50,7 +50,7 @@ totext_x25(ARGS_TOTEXT) {
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &region);
-       return (txt_totext(&region, ISC_TRUE, target));
+       return (txt_totext(&region, true, target));
 }
 
 static inline isc_result_t
@@ -181,7 +181,7 @@ digest_x25(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_x25(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_x25);
@@ -191,10 +191,10 @@ checkowner_x25(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_x25(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_x25);
@@ -203,7 +203,7 @@ checknames_x25(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index bdd3a8355184973f3f948826b54b677782f51bcd..973465e802e02c23956348491b39e12975342fa3 100644 (file)
@@ -31,7 +31,7 @@ fromtext_hs_a(ARGS_FROMTEXT) {
        UNUSED(rdclass);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        if (getquad(DNS_AS_STR(token), &addr, lexer, callbacks) != 1)
                RETTOK(DNS_R_BADDOTTEDQUAD);
@@ -192,7 +192,7 @@ digest_hs_a(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_hs_a(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_a);
@@ -203,10 +203,10 @@ checkowner_hs_a(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_hs_a(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_a);
@@ -216,7 +216,7 @@ checknames_hs_a(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 200f486102df482994fe6efb0feb3cf9ef9b793a..9d7d431ed55834056f63a27caea9f277c11a742c 100644 (file)
@@ -28,7 +28,7 @@ fromtext_in_a6(ARGS_FROMTEXT) {
        unsigned char mask;
        dns_name_t name;
        isc_buffer_t buffer;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_a6);
        REQUIRE(rdclass == dns_rdataclass_in);
@@ -41,7 +41,7 @@ fromtext_in_a6(ARGS_FROMTEXT) {
         * Prefix length.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 128U)
                RETTOK(ISC_R_RANGE);
 
@@ -61,7 +61,7 @@ fromtext_in_a6(ARGS_FROMTEXT) {
                 */
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string,
-                                             ISC_FALSE));
+                                             false));
                if (inet_pton(AF_INET6, DNS_AS_STR(token), addr) != 1)
                        RETTOK(DNS_R_BADAAAA);
                mask = 0xff >> (prefixlen % 8);
@@ -73,15 +73,15 @@ fromtext_in_a6(ARGS_FROMTEXT) {
                return (ISC_R_SUCCESS);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKNAMES) != 0)
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               ok = dns_name_ishostname(&name, false);
        if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                RETTOK(DNS_R_BADNAME);
        if (!ok && callbacks != NULL)
@@ -99,7 +99,7 @@ totext_in_a6(ARGS_TOTEXT) {
        char buf[sizeof("128")];
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_a6);
        REQUIRE(rdata->rdclass == dns_rdataclass_in);
@@ -414,7 +414,7 @@ digest_in_a6(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_a6(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_a6);
@@ -426,7 +426,7 @@ checkowner_in_a6(ARGS_CHECKOWNER) {
        return (dns_name_ishostname(name, wildcard));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_a6(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -440,16 +440,16 @@ checknames_in_a6(ARGS_CHECKNAMES) {
        dns_rdata_toregion(rdata, &region);
        prefixlen = uint8_fromregion(&region);
        if (prefixlen == 0)
-               return (ISC_TRUE);
+               return (true);
        isc_region_consume(&region, 1 + 16 - prefixlen / 8);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index ef4ea1b0c16a3c439f7724addc56ae61475f9425..d2776992b8816998893e8a77b32e1ecbf3f0bd10 100644 (file)
@@ -33,7 +33,7 @@ fromtext_in_a(ARGS_FROMTEXT) {
        UNUSED(rdclass);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        if (getquad(DNS_AS_STR(token), &addr, lexer, callbacks) != 1)
                RETTOK(DNS_R_BADDOTTEDQUAD);
@@ -198,7 +198,7 @@ digest_in_a(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_a(ARGS_CHECKOWNER) {
        dns_name_t prefix, suffix;
 
@@ -217,14 +217,14 @@ checkowner_in_a(ARGS_CHECKOWNER) {
                dns_name_split(name, dns_name_countlabels(name) - 2,
                               &prefix, &suffix);
                if (dns_name_equal(&gc_msdcs, &prefix) &&
-                   dns_name_ishostname(&suffix, ISC_FALSE))
-                       return (ISC_TRUE);
+                   dns_name_ishostname(&suffix, false))
+                       return (true);
        }
 
        return (dns_name_ishostname(name, wildcard));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_a(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_a);
@@ -234,7 +234,7 @@ checknames_in_a(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 0c640d7c03d2f33e2e27604c74a0025d3553206d..655c5edd2ea27de67236cb6b7c9ed5187258b2d3 100644 (file)
@@ -34,7 +34,7 @@ fromtext_in_aaaa(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        if (inet_pton(AF_INET6, DNS_AS_STR(token), addr) != 1)
                RETTOK(DNS_R_BADAAAA);
@@ -195,7 +195,7 @@ digest_in_aaaa(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_aaaa(ARGS_CHECKOWNER) {
        dns_name_t prefix, suffix;
 
@@ -214,14 +214,14 @@ checkowner_in_aaaa(ARGS_CHECKOWNER) {
                dns_name_split(name, dns_name_countlabels(name) - 2,
                               &prefix, &suffix);
                if (dns_name_equal(&gc_msdcs, &prefix) &&
-                   dns_name_ishostname(&suffix, ISC_FALSE))
-                       return (ISC_TRUE);
+                   dns_name_ishostname(&suffix, false))
+                       return (true);
        }
 
        return (dns_name_ishostname(name, wildcard));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_aaaa(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_aaaa);
@@ -231,7 +231,7 @@ checknames_in_aaaa(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 13d160adde5198bdb67df2e5808daac6d20d19a1..ae35db9b931f55420dcd8debc33056cc7bc6a553 100644 (file)
@@ -24,7 +24,7 @@ fromtext_in_apl(ARGS_FROMTEXT) {
        unsigned long afi;
        uint8_t prefix;
        uint8_t len;
-       isc_boolean_t neg;
+       bool neg;
        char *cp, *ap, *slash;
        int n;
 
@@ -39,12 +39,12 @@ fromtext_in_apl(ARGS_FROMTEXT) {
 
        do {
                RETERR(isc_lex_getmastertoken(lexer, &token,
-                                             isc_tokentype_string, ISC_TRUE));
+                                             isc_tokentype_string, true));
                if (token.type != isc_tokentype_string)
                        break;
 
                cp = DNS_AS_STR(token);
-               neg = ISC_TF(*cp == '!');
+               neg = (*cp == '!');
                if (neg)
                        cp++;
                afi = strtoul(cp, &ap, 10);
@@ -107,7 +107,7 @@ totext_in_apl(ARGS_TOTEXT) {
        uint16_t afi;
        uint8_t prefix;
        uint8_t len;
-       isc_boolean_t neg;
+       bool neg;
        unsigned char buf[16];
        char txt[sizeof(" !64000:")];
        const char *sep = "";
@@ -129,7 +129,7 @@ totext_in_apl(ARGS_TOTEXT) {
                prefix = *sr.base;
                isc_region_consume(&sr, 1);
                len = (*sr.base & 0x7f);
-               neg = ISC_TF((*sr.base & 0x80) != 0);
+               neg = (*sr.base & 0x80);
                isc_region_consume(&sr, 1);
                INSIST(len <= sr.length);
                n = snprintf(txt, sizeof(txt), "%s%s%u:", sep,
@@ -256,7 +256,7 @@ fromstruct_in_apl(ARGS_FROMSTRUCT) {
        isc_buffer_init(&b, apl->apl, apl->apl_len);
        isc_buffer_add(&b, apl->apl_len);
        isc_buffer_setactive(&b, apl->apl_len);
-       return(fromwire_in_apl(rdclass, type, &b, NULL, ISC_FALSE, target));
+       return(fromwire_in_apl(rdclass, type, &b, NULL, false, target));
 }
 
 static inline isc_result_t
@@ -384,7 +384,7 @@ dns_rdata_apl_current(dns_rdata_in_apl_t *apl, dns_rdata_apl_ent_t *ent) {
        ent->family = (apl->apl[apl->offset] << 8) + apl->apl[apl->offset + 1];
        ent->prefix = apl->apl[apl->offset + 2];
        ent->length = length;
-       ent->negative = ISC_TF((apl->apl[apl->offset + 3] & 0x80) != 0);
+       ent->negative = (apl->apl[apl->offset + 3] & 0x80);
        if (ent->length != 0)
                ent->data = &apl->apl[apl->offset + 4];
        else
@@ -420,7 +420,7 @@ digest_in_apl(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_apl(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_apl);
@@ -431,11 +431,11 @@ checkowner_in_apl(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_apl(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_apl);
@@ -445,7 +445,7 @@ checknames_in_apl(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index a931daab231656fa704f46fb8d1bff2f7e3ebe2f..8c17a53eb23c7d1f9f66b32b34859fb5a3e22ddf 100644 (file)
@@ -15,7 +15,7 @@
 
 
 typedef struct dns_rdata_apl_ent {
-       isc_boolean_t   negative;
+       bool    negative;
        uint16_t        family;
        uint8_t prefix;
        uint8_t length;
index 0558fca5c43bd83b038af63a5037620898ff6909..90971b7827db19c0e5b46caaa745b0aeb9c30e0d 100644 (file)
@@ -197,7 +197,7 @@ digest_in_dhcid(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_dhcid(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_dhcid);
@@ -208,10 +208,10 @@ checkowner_in_dhcid(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_dhcid(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_dhcid);
@@ -221,7 +221,7 @@ checknames_in_dhcid(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index a2a7d3d24c0d73851e6c75db6b1d133ca3ca3488..2786951de0fe8eb058175c0e10657a9ca2e696fd 100644 (file)
@@ -30,13 +30,13 @@ fromtext_in_kx(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
@@ -50,7 +50,7 @@ totext_in_kx(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -249,7 +249,7 @@ digest_in_kx(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_kx(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_kx);
@@ -260,10 +260,10 @@ checkowner_in_kx(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_kx(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_kx);
@@ -273,7 +273,7 @@ checknames_in_kx(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 735c8bb7bb84ab208085fe130bb04429a2e49251..3217300cc948ae908d91fcdb00aaac8b62d8cef8 100644 (file)
@@ -30,7 +30,7 @@ fromtext_in_nsap_ptr(ARGS_FROMTEXT) {
        UNUSED(callbacks);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
@@ -45,7 +45,7 @@ totext_in_nsap_ptr(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
 
        REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
        REQUIRE(rdata->rdclass == dns_rdataclass_in);
@@ -206,7 +206,7 @@ digest_in_nsap_ptr(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_nsap_ptr(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_nsap_ptr);
@@ -217,10 +217,10 @@ checkowner_in_nsap_ptr(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_nsap_ptr(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
@@ -230,7 +230,7 @@ checknames_in_nsap_ptr(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 17a83a9ac4c6d631210b139af695fd80c75865a0..ba3e69c767f9fbc2b4b08209d70a12bdb7098452 100644 (file)
@@ -21,7 +21,7 @@ fromtext_in_nsap(ARGS_FROMTEXT) {
        isc_token_t token;
        isc_textregion_t *sr;
        int n;
-       isc_boolean_t valid = ISC_FALSE;
+       bool valid = false;
        int digits = 0;
        unsigned char c = 0;
 
@@ -36,7 +36,7 @@ fromtext_in_nsap(ARGS_FROMTEXT) {
 
        /* 0x<hex.string.with.periods> */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        sr = &token.value.as_textregion;
        if (sr->length < 2)
                RETTOK(ISC_R_UNEXPECTEDEND);
@@ -54,7 +54,7 @@ fromtext_in_nsap(ARGS_FROMTEXT) {
                c += n;
                if (++digits == 2) {
                        RETERR(mem_tobuffer(target, &c, 1));
-                       valid = ISC_TRUE;
+                       valid = true;
                        digits = 0;
                        c = 0;
                }
@@ -216,7 +216,7 @@ digest_in_nsap(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_nsap(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_nsap);
@@ -227,10 +227,10 @@ checkowner_in_nsap(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_nsap(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_nsap);
@@ -240,7 +240,7 @@ checknames_in_nsap(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 5b1029dcaa452f611d7404cfaf30751798d02e3a..a94b9df0ca81a5033a273cc46ec485387351d0c8 100644 (file)
@@ -36,7 +36,7 @@ fromtext_in_px(ARGS_FROMTEXT) {
         * Preference.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -45,7 +45,7 @@ fromtext_in_px(ARGS_FROMTEXT) {
         * MAP822.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
@@ -54,7 +54,7 @@ fromtext_in_px(ARGS_FROMTEXT) {
         * MAPX400.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
@@ -66,7 +66,7 @@ totext_in_px(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -335,7 +335,7 @@ digest_in_px(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_px(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_px);
@@ -346,10 +346,10 @@ checkowner_in_px(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_px(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_px);
@@ -359,7 +359,7 @@ checknames_in_px(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index f31bd3b40680b871599fe3c51104c8e6ebe097f9..63a4e80a28ffe3edc019ba536abd3697886b7548 100644 (file)
@@ -21,7 +21,7 @@ fromtext_in_srv(ARGS_FROMTEXT) {
        isc_token_t token;
        dns_name_t name;
        isc_buffer_t buffer;
-       isc_boolean_t ok;
+       bool ok;
 
        REQUIRE(type == dns_rdatatype_srv);
        REQUIRE(rdclass == dns_rdataclass_in);
@@ -34,7 +34,7 @@ fromtext_in_srv(ARGS_FROMTEXT) {
         * Priority.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -43,7 +43,7 @@ fromtext_in_srv(ARGS_FROMTEXT) {
         * Weight.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -52,7 +52,7 @@ fromtext_in_srv(ARGS_FROMTEXT) {
         * Port.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
-                                     ISC_FALSE));
+                                     false));
        if (token.value.as_ulong > 0xffffU)
                RETTOK(ISC_R_RANGE);
        RETERR(uint16_tobuffer(token.value.as_ulong, target));
@@ -61,15 +61,15 @@ fromtext_in_srv(ARGS_FROMTEXT) {
         * Target.
         */
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
        dns_name_init(&name, NULL);
        buffer_fromregion(&buffer, &token.value.as_region);
        if (origin == NULL)
                origin = dns_rootname;
        RETTOK(dns_name_fromtext(&name, &buffer, origin, options, target));
-       ok = ISC_TRUE;
+       ok = true;
        if ((options & DNS_RDATA_CHECKNAMES) != 0)
-               ok = dns_name_ishostname(&name, ISC_FALSE);
+               ok = dns_name_ishostname(&name, false);
        if (!ok && (options & DNS_RDATA_CHECKNAMESFAIL) != 0)
                RETTOK(DNS_R_BADNAME);
        if (!ok && callbacks != NULL)
@@ -82,7 +82,7 @@ totext_in_srv(ARGS_TOTEXT) {
        isc_region_t region;
        dns_name_t name;
        dns_name_t prefix;
-       isc_boolean_t sub;
+       bool sub;
        char buf[sizeof("64000")];
        unsigned short num;
 
@@ -350,7 +350,7 @@ digest_in_srv(ARGS_DIGEST) {
        return (dns_name_digest(&name, digest, arg));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_srv(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_srv);
@@ -361,10 +361,10 @@ checkowner_in_srv(ARGS_CHECKOWNER) {
        UNUSED(rdclass);
        UNUSED(wildcard);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_srv(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
@@ -378,12 +378,12 @@ checknames_in_srv(ARGS_CHECKNAMES) {
        isc_region_consume(&region, 6);
        dns_name_init(&name, NULL);
        dns_name_fromregion(&name, &region);
-       if (!dns_name_ishostname(&name, ISC_FALSE)) {
+       if (!dns_name_ishostname(&name, false)) {
                if (bad != NULL)
                        dns_name_clone(&name, bad);
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 7e2967390ce63ce5001f7b49e7b572d94b84d1af..0dc5804ab8ba958cadce8c2a8c91fef5687806de 100644 (file)
@@ -37,7 +37,7 @@ static void init_lock(void) {
        RUNTIME_CHECK(isc_mutex_init(&wks_lock) == ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 mygetprotobyname(const char *name, long *proto) {
        struct protoent *pe;
 
@@ -46,10 +46,10 @@ mygetprotobyname(const char *name, long *proto) {
        if (pe != NULL)
                *proto = pe->p_proto;
        UNLOCK(&wks_lock);
-       return (ISC_TF(pe != NULL));
+       return (pe != NULL);
 }
 
-static isc_boolean_t
+static bool
 mygetservbyname(const char *name, const char *proto, long *port) {
        struct servent *se;
 
@@ -58,7 +58,7 @@ mygetservbyname(const char *name, const char *proto, long *port) {
        if (se != NULL)
                *port = ntohs(se->s_port);
        UNLOCK(&wks_lock);
-       return (ISC_TF(se != NULL));
+       return (se != NULL);
 }
 
 #ifdef _WIN32
@@ -112,7 +112,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
         * IPv4 dotted quad.
         */
        CHECK(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        isc_buffer_availableregion(target, &region);
        if (getquad(DNS_AS_STR(token), &addr, lexer, callbacks) != 1)
@@ -126,7 +126,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
         * Protocol.
         */
        CHECK(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
-                                     ISC_FALSE));
+                                     false));
 
        proto = strtol(DNS_AS_STR(token), &e, 10);
        if (*e == 0)
@@ -147,7 +147,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
        memset(bm, 0, sizeof(bm));
        do {
                CHECK(isc_lex_getmastertoken(lexer, &token,
-                                             isc_tokentype_string, ISC_TRUE));
+                                             isc_tokentype_string, true));
                if (token.type != isc_tokentype_string)
                        break;
 
@@ -379,7 +379,7 @@ digest_in_wks(ARGS_DIGEST) {
        return ((digest)(arg, &r));
 }
 
-static inline isc_boolean_t
+static inline bool
 checkowner_in_wks(ARGS_CHECKOWNER) {
 
        REQUIRE(type == dns_rdatatype_wks);
@@ -391,7 +391,7 @@ checkowner_in_wks(ARGS_CHECKOWNER) {
        return (dns_name_ishostname(name, wildcard));
 }
 
-static inline isc_boolean_t
+static inline bool
 checknames_in_wks(ARGS_CHECKNAMES) {
 
        REQUIRE(rdata->type == dns_rdatatype_wks);
@@ -401,7 +401,7 @@ checknames_in_wks(ARGS_CHECKNAMES) {
        UNUSED(owner);
        UNUSED(bad);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline int
index 18e76ed00af644147699f60ae2a108e6f09cfdb7..a2ac36f83956736e14322f3921bce5b5ad16de66 100644 (file)
@@ -132,7 +132,7 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset) {
        rdataset->private6 = NULL;
 }
 
-isc_boolean_t
+bool
 dns_rdataset_isassociated(dns_rdataset_t *rdataset) {
        /*
         * Is 'rdataset' associated?
@@ -141,9 +141,9 @@ dns_rdataset_isassociated(dns_rdataset_t *rdataset) {
        REQUIRE(DNS_RDATASET_VALID(rdataset));
 
        if (rdataset->methods != NULL)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -312,7 +312,7 @@ static isc_result_t
 towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
             dns_compress_t *cctx, isc_buffer_t *target,
             dns_rdatasetorderfunc_t order, const void *order_arg,
-            isc_boolean_t partial, unsigned int options,
+            bool partial, unsigned int options,
             unsigned int *countp, void **state)
 {
        dns_rdata_t rdata = DNS_RDATA_INIT;
@@ -321,8 +321,8 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        unsigned int i, count = 0, added, choice;
        isc_buffer_t savedbuffer, rdlen, rrbuffer;
        unsigned int headlen;
-       isc_boolean_t question = ISC_FALSE;
-       isc_boolean_t shuffle = ISC_FALSE;
+       bool question = false;
+       bool shuffle = false;
        dns_rdata_t *in = NULL, in_fixed[MAX_SHUFFLE];
        struct towire_sort *out = NULL, out_fixed[MAX_SHUFFLE];
        dns_fixedname_t fixed;
@@ -342,7 +342,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        REQUIRE(cctx != NULL && cctx->mctx != NULL);
 
        if ((rdataset->attributes & DNS_RDATASETATTR_QUESTION) != 0) {
-               question = ISC_TRUE;
+               question = true;
                count = 1;
                result = dns_rdataset_first(rdataset);
                INSIST(result == ISC_R_NOMORE);
@@ -370,13 +370,13 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        if (!question && count > 1 &&
            (!WANT_FIXED(rdataset) || order != NULL) &&
            rdataset->type != dns_rdatatype_rrsig)
-               shuffle = ISC_TRUE;
+               shuffle = true;
 
        if (shuffle && count > MAX_SHUFFLE) {
                in = isc_mem_get(cctx->mctx, count * sizeof(*in));
                out = isc_mem_get(cctx->mctx, count * sizeof(*out));
                if (in == NULL || out == NULL)
-                       shuffle = ISC_FALSE;
+                       shuffle = false;
        } else {
                in = in_fixed;
                out = out_fixed;
@@ -572,7 +572,7 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
                          unsigned int *countp)
 {
        return (towiresorted(rdataset, owner_name, cctx, target,
-                            order, order_arg, ISC_FALSE, options,
+                            order, order_arg, false, options,
                             countp, NULL));
 }
 
@@ -589,7 +589,7 @@ dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
 {
        REQUIRE(state == NULL); /* XXX remove when implemented */
        return (towiresorted(rdataset, owner_name, cctx, target,
-                            order, order_arg, ISC_TRUE, options,
+                            order, order_arg, true, options,
                             countp, state));
 }
 
@@ -602,7 +602,7 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
                    unsigned int *countp)
 {
        return (towiresorted(rdataset, owner_name, cctx, target,
-                            NULL, NULL, ISC_FALSE, options, countp, NULL));
+                            NULL, NULL, false, options, countp, NULL));
 }
 
 isc_result_t
@@ -809,7 +809,7 @@ dns_rdataset_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name) {
 void
 dns_rdataset_trimttl(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
                     dns_rdata_rrsig_t *rrsig, isc_stdtime_t now,
-                    isc_boolean_t acceptexpired)
+                    bool acceptexpired)
 {
        uint32_t ttl = 0;
 
index 6615abc9ab8b401a6f5d20bcb889df2c2f5a24d9..930a8220e990eea4e17336a308e0a4b31f6f9ab9 100644 (file)
@@ -547,14 +547,14 @@ rdata_from_slab(unsigned char **current,
        unsigned char *tcurrent = *current;
        isc_region_t region;
        unsigned int length;
-       isc_boolean_t offline = ISC_FALSE;
+       bool offline = false;
 
        length = *tcurrent++ * 256;
        length += *tcurrent++;
 
        if (type == dns_rdatatype_rrsig) {
                if ((*tcurrent & DNS_RDATASLAB_OFFLINE) != 0)
-                       offline = ISC_TRUE;
+                       offline = true;
                length--;
                tcurrent++;
        }
@@ -575,7 +575,7 @@ rdata_from_slab(unsigned char **current,
  * contains an rdata identical to 'rdata'.  This does case insensitive
  * comparisons per DNSSEC.
  */
-static inline isc_boolean_t
+static inline bool
 rdata_in_slab(unsigned char *slab, unsigned int reservelen,
              dns_rdataclass_t rdclass, dns_rdatatype_t type,
              dns_rdata_t *rdata)
@@ -598,12 +598,12 @@ rdata_in_slab(unsigned char *slab, unsigned int reservelen,
 
                n = dns_rdata_compare(&trdata, rdata);
                if (n == 0)
-                       return (ISC_TRUE);
+                       return (true);
                if (n > 0)      /* In DNSSEC order. */
                        break;
                dns_rdata_reset(&trdata);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
@@ -616,7 +616,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
        unsigned int ocount, ncount, count, olength, tlength, tcount, length;
        dns_rdata_t ordata = DNS_RDATA_INIT;
        dns_rdata_t nrdata = DNS_RDATA_INIT;
-       isc_boolean_t added_something = ISC_FALSE;
+       bool added_something = false;
        unsigned int oadded = 0;
        unsigned int nadded = 0;
        unsigned int nncount = 0;
@@ -702,7 +702,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
                                tlength++;
                        tcount++;
                        nncount++;
-                       added_something = ISC_TRUE;
+                       added_something = true;
                }
                ncount--;
        } while (ncount > 0);
@@ -792,14 +792,13 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
        }
 
        while (oadded < ocount || nadded < ncount) {
-               isc_boolean_t fromold;
+               bool fromold;
                if (oadded == ocount)
-                       fromold = ISC_FALSE;
+                       fromold = false;
                else if (nadded == ncount)
-                       fromold = ISC_TRUE;
+                       fromold = true;
                else
-                       fromold = ISC_TF(dns_rdata_compare(&ordata,
-                                                          &nrdata) < 0);
+                       fromold = dns_rdata_compare(&ordata, &nrdata) < 0;
                if (fromold) {
 #if DNS_RDATASET_FIXED
                        offsettable[oorder] = tcurrent - offsetbase;
@@ -1049,7 +1048,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 dns_rdataslab_equal(unsigned char *slab1, unsigned char *slab2,
                    unsigned int reservelen)
 {
@@ -1066,7 +1065,7 @@ dns_rdataslab_equal(unsigned char *slab1, unsigned char *slab2,
        count2 += *current2++;
 
        if (count1 != count2)
-               return (ISC_FALSE);
+               return (false);
 
 #if DNS_RDATASET_FIXED
        current1 += (4 * count1);
@@ -1087,17 +1086,17 @@ dns_rdataslab_equal(unsigned char *slab1, unsigned char *slab2,
 
                if (length1 != length2 ||
                    memcmp(current1, current2, length1) != 0)
-                       return (ISC_FALSE);
+                       return (false);
 
                current1 += length1;
                current2 += length1;
 
                count1--;
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 dns_rdataslab_equalx(unsigned char *slab1, unsigned char *slab2,
                     unsigned int reservelen, dns_rdataclass_t rdclass,
                     dns_rdatatype_t type)
@@ -1116,7 +1115,7 @@ dns_rdataslab_equalx(unsigned char *slab1, unsigned char *slab2,
        count2 += *current2++;
 
        if (count1 != count2)
-               return (ISC_FALSE);
+               return (false);
 
 #if DNS_RDATASET_FIXED
        current1 += (4 * count1);
@@ -1127,9 +1126,9 @@ dns_rdataslab_equalx(unsigned char *slab1, unsigned char *slab2,
                rdata_from_slab(&current1, rdclass, type, &rdata1);
                rdata_from_slab(&current2, rdclass, type, &rdata2);
                if (dns_rdata_compare(&rdata1, &rdata2) != 0)
-                       return (ISC_FALSE);
+                       return (false);
                dns_rdata_reset(&rdata1);
                dns_rdata_reset(&rdata2);
        }
-       return (ISC_TRUE);
+       return (true);
 }
index f6ec8c09f324cf5cc60ebc9e3123bcb9c5eaf91e..a2353874787490c1cccc3ed655bbd5cb0495692d 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/magic.h>
 #include <isc/mem.h>
@@ -58,7 +59,7 @@ struct dns_requestmgr {
        dns_dispatchmgr_t              *dispatchmgr;
        dns_dispatch_t                 *dispatchv4;
        dns_dispatch_t                 *dispatchv6;
-       isc_boolean_t                   exiting;
+       bool                    exiting;
        isc_eventlist_t                 whenshutdown;
        unsigned int                    hash;
        isc_mutex_t                     locks[DNS_REQUEST_NLOCKS];
@@ -81,7 +82,7 @@ struct dns_request {
        isc_buffer_t                   *tsig;
        dns_tsigkey_t                  *tsigkey;
        isc_event_t                     ctlevent;
-       isc_boolean_t                   canceling; /* ctlevent outstanding */
+       bool                    canceling; /* ctlevent outstanding */
        isc_sockaddr_t                  destaddr;
        unsigned int                    udpcount;
        isc_dscp_t                      dscp;
@@ -197,7 +198,7 @@ dns_requestmgr_create(isc_mem_t *mctx,
        requestmgr->iref = 0;
        ISC_LIST_INIT(requestmgr->whenshutdown);
        ISC_LIST_INIT(requestmgr->requests);
-       requestmgr->exiting = ISC_FALSE;
+       requestmgr->exiting = false;
        requestmgr->hash = 0;
        requestmgr->magic = REQUESTMGR_MAGIC;
 
@@ -259,7 +260,7 @@ mgr_shutdown(dns_requestmgr_t *requestmgr) {
         * Caller holds lock.
         */
        if (!requestmgr->exiting) {
-               requestmgr->exiting = ISC_TRUE;
+               requestmgr->exiting = true;
                for (request = ISC_LIST_HEAD(requestmgr->requests);
                     request != NULL;
                     request = ISC_LIST_NEXT(request, link)) {
@@ -294,7 +295,7 @@ requestmgr_attach(dns_requestmgr_t *source, dns_requestmgr_t **targetp) {
 static void
 requestmgr_detach(dns_requestmgr_t **requestmgrp) {
        dns_requestmgr_t *requestmgr;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(requestmgrp != NULL);
        requestmgr = *requestmgrp;
@@ -312,7 +313,7 @@ requestmgr_detach(dns_requestmgr_t **requestmgrp) {
                INSIST(ISC_LIST_HEAD(requestmgr->requests) == NULL);
                send_shutdown_events(requestmgr);
                if (requestmgr->eref == 0)
-                       need_destroy = ISC_TRUE;
+                       need_destroy = true;
        }
        UNLOCK(&requestmgr->lock);
 
@@ -339,7 +340,7 @@ dns_requestmgr_attach(dns_requestmgr_t *source, dns_requestmgr_t **targetp) {
 void
 dns_requestmgr_detach(dns_requestmgr_t **requestmgrp) {
        dns_requestmgr_t *requestmgr;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(requestmgrp != NULL);
        requestmgr = *requestmgrp;
@@ -355,7 +356,7 @@ dns_requestmgr_detach(dns_requestmgr_t **requestmgrp) {
        if (requestmgr->eref == 0 && requestmgr->iref == 0) {
                INSIST(requestmgr->exiting &&
                       ISC_LIST_HEAD(requestmgr->requests) == NULL);
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        }
        UNLOCK(&requestmgr->lock);
 
@@ -486,7 +487,7 @@ new_request(isc_mem_t *mctx, dns_request_t **requestp)
        ISC_EVENT_INIT(&request->ctlevent, sizeof(request->ctlevent), 0, NULL,
                       DNS_EVENT_REQUESTCONTROL, do_cancel, request, NULL,
                       NULL, NULL);
-       request->canceling = ISC_FALSE;
+       request->canceling = false;
        request->udpcount = 0;
 
        isc_mem_attach(mctx, &request->mctx);
@@ -497,12 +498,12 @@ new_request(isc_mem_t *mctx, dns_request_t **requestp)
 }
 
 
-static isc_boolean_t
+static bool
 isblackholed(dns_dispatchmgr_t *dispatchmgr, isc_sockaddr_t *destaddr) {
        dns_acl_t *blackhole;
        isc_netaddr_t netaddr;
        int match;
-       isc_boolean_t drop = ISC_FALSE;
+       bool drop = false;
        char netaddrstr[ISC_NETADDR_FORMATSIZE];
 
        blackhole = dns_dispatchmgr_getblackhole(dispatchmgr);
@@ -511,7 +512,7 @@ isblackholed(dns_dispatchmgr_t *dispatchmgr, isc_sockaddr_t *destaddr) {
                if (dns_acl_match(&netaddr, NULL, blackhole,
                                  NULL, &match, NULL) == ISC_R_SUCCESS &&
                    match > 0)
-                       drop = ISC_TRUE;
+                       drop = true;
        }
        if (drop) {
                isc_netaddr_format(&netaddr, netaddrstr, sizeof(netaddrstr));
@@ -521,11 +522,11 @@ isblackholed(dns_dispatchmgr_t *dispatchmgr, isc_sockaddr_t *destaddr) {
 }
 
 static isc_result_t
-create_tcp_dispatch(isc_boolean_t newtcp, isc_boolean_t share,
+create_tcp_dispatch(bool newtcp, bool share,
                    dns_requestmgr_t *requestmgr,
                    isc_sockaddr_t *srcaddr,
                    isc_sockaddr_t *destaddr, isc_dscp_t dscp,
-                   isc_boolean_t *connected, dns_dispatch_t **dispatchp)
+                   bool *connected, dns_dispatch_t **dispatchp)
 {
        isc_result_t result;
        isc_socket_t *sock = NULL;
@@ -552,7 +553,7 @@ create_tcp_dispatch(isc_boolean_t newtcp, isc_boolean_t share,
                if (result == ISC_R_SUCCESS) {
                        char peer[ISC_SOCKADDR_FORMATSIZE];
 
-                       *connected = ISC_TRUE;
+                       *connected = true;
                        isc_sockaddr_format(destaddr, peer, sizeof(peer));
                        req_log(ISC_LOG_DEBUG(1), "attached to existing TCP "
                                "connection to %s", peer);
@@ -652,10 +653,10 @@ find_udp_dispatch(dns_requestmgr_t *requestmgr, isc_sockaddr_t *srcaddr,
 }
 
 static isc_result_t
-get_dispatch(isc_boolean_t tcp, isc_boolean_t newtcp, isc_boolean_t share,
+get_dispatch(bool tcp, bool newtcp, bool share,
             dns_requestmgr_t *requestmgr,
             isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
-            isc_dscp_t dscp, isc_boolean_t *connected,
+            isc_dscp_t dscp, bool *connected,
             dns_dispatch_t **dispatchp)
 {
        isc_result_t result;
@@ -684,7 +685,7 @@ set_timer(isc_timer_t *timer, unsigned int timeout, unsigned int udpresend) {
        timertype = udpresend != 0 ? isc_timertype_limited : isc_timertype_once;
        if (result == ISC_R_SUCCESS)
                result = isc_timer_reset(timer, timertype, &expires,
-                                        &interval, ISC_FALSE);
+                                        &interval, false);
        return (result);
 }
 
@@ -748,11 +749,11 @@ dns_request_createraw4(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
        isc_result_t result;
        isc_mem_t *mctx;
        dns_messageid_t id;
-       isc_boolean_t tcp = ISC_FALSE;
-       isc_boolean_t newtcp = ISC_FALSE;
-       isc_boolean_t share = ISC_FALSE;
+       bool tcp = false;
+       bool newtcp = false;
+       bool share = false;
        isc_region_t r;
-       isc_boolean_t connected = ISC_FALSE;
+       bool connected = false;
        unsigned int dispopt = 0;
 
        REQUIRE(VALID_REQUESTMGR(requestmgr));
@@ -813,8 +814,8 @@ dns_request_createraw4(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
        }
 
        if ((options & DNS_REQUESTOPT_TCP) != 0 || r.length > 512)
-               tcp = ISC_TRUE;
-       share = ISC_TF((options & DNS_REQUESTOPT_SHARE) != 0);
+               tcp = true;
+       share = (options & DNS_REQUESTOPT_SHARE);
 
  again:
        result = get_dispatch(tcp, newtcp, share, requestmgr,
@@ -834,8 +835,8 @@ dns_request_createraw4(dns_requestmgr_t *requestmgr, isc_buffer_t *msgbuf,
                                           requestmgr->socketmgr);
        if (result != ISC_R_SUCCESS) {
                if ((options & DNS_REQUESTOPT_FIXEDID) != 0 && !newtcp) {
-                       newtcp = ISC_TRUE;
-                       connected = ISC_FALSE;
+                       newtcp = true;
+                       connected = false;
                        dns_dispatch_detach(&request->dispatch);
                        goto again;
                }
@@ -983,10 +984,10 @@ dns_request_createvia4(dns_requestmgr_t *requestmgr, dns_message_t *message,
        isc_result_t result;
        isc_mem_t *mctx;
        dns_messageid_t id;
-       isc_boolean_t tcp;
-       isc_boolean_t share;
-       isc_boolean_t settsigkey = ISC_TRUE;
-       isc_boolean_t connected = ISC_FALSE;
+       bool tcp;
+       bool share;
+       bool settsigkey = true;
+       bool connected = false;
 
        REQUIRE(VALID_REQUESTMGR(requestmgr));
        REQUIRE(message != NULL);
@@ -1044,9 +1045,9 @@ dns_request_createvia4(dns_requestmgr_t *requestmgr, dns_message_t *message,
                dns_tsigkey_attach(key, &request->tsigkey);
 
  use_tcp:
-       tcp = ISC_TF((options & DNS_REQUESTOPT_TCP) != 0);
-       share = ISC_TF((options & DNS_REQUESTOPT_SHARE) != 0);
-       result = get_dispatch(tcp, ISC_FALSE, share,
+       tcp = (options & DNS_REQUESTOPT_TCP);
+       share = (options & DNS_REQUESTOPT_SHARE);
+       result = get_dispatch(tcp, false, share,
                              requestmgr, srcaddr, destaddr,
                              dscp, &connected, &request->dispatch);
        if (result != ISC_R_SUCCESS)
@@ -1078,7 +1079,7 @@ dns_request_createvia4(dns_requestmgr_t *requestmgr, dns_message_t *message,
                dns_dispatch_detach(&request->dispatch);
                sock = NULL;
                options |= DNS_REQUESTOPT_TCP;
-               settsigkey = ISC_FALSE;
+               settsigkey = false;
                goto use_tcp;
        }
        if (result != ISC_R_SUCCESS)
@@ -1143,9 +1144,9 @@ req_render(dns_message_t *message, isc_buffer_t **bufferp,
        isc_buffer_t *buf2 = NULL;
        isc_result_t result;
        isc_region_t r;
-       isc_boolean_t tcp = ISC_FALSE;
+       bool tcp = false;
        dns_compress_t cctx;
-       isc_boolean_t cleanup_cctx = ISC_FALSE;
+       bool cleanup_cctx = false;
 
        REQUIRE(bufferp != NULL && *bufferp == NULL);
 
@@ -1161,10 +1162,10 @@ req_render(dns_message_t *message, isc_buffer_t **bufferp,
        result = dns_compress_init(&cctx, -1, mctx);
        if (result != ISC_R_SUCCESS)
                return (result);
-       cleanup_cctx = ISC_TRUE;
+       cleanup_cctx = true;
 
        if ((options & DNS_REQUESTOPT_CASE) != 0)
-               dns_compress_setsensitive(&cctx, ISC_TRUE);
+               dns_compress_setsensitive(&cctx, true);
 
        /*
         * Render message.
@@ -1189,14 +1190,14 @@ req_render(dns_message_t *message, isc_buffer_t **bufferp,
                goto cleanup;
 
        dns_compress_invalidate(&cctx);
-       cleanup_cctx = ISC_FALSE;
+       cleanup_cctx = false;
 
        /*
         * Copy rendered message to exact sized buffer.
         */
        isc_buffer_usedregion(buf1, &r);
        if ((options & DNS_REQUESTOPT_TCP) != 0) {
-               tcp = ISC_TRUE;
+               tcp = true;
        } else if (r.length > 512) {
                result = DNS_R_USETCP;
                goto cleanup;
@@ -1252,7 +1253,7 @@ do_cancel(isc_task_t *task, isc_event_t *event) {
        UNUSED(task);
        INSIST(event->ev_type == DNS_EVENT_REQUESTCONTROL);
        LOCK(&request->requestmgr->locks[request->hash]);
-       request->canceling = ISC_FALSE;
+       request->canceling = false;
        if (!DNS_REQUEST_CANCELED(request))
                req_cancel(request);
        send_if_done(request, ISC_R_CANCELED);
@@ -1271,7 +1272,7 @@ dns_request_cancel(dns_request_t *request) {
        if (!request->canceling && !DNS_REQUEST_CANCELED(request)) {
                isc_event_t *ev =  &request->ctlevent;
                isc_task_send(request->event->ev_sender, &ev);
-               request->canceling = ISC_TRUE;
+               request->canceling = true;
        }
        UNLOCK(&request->requestmgr->locks[request->hash]);
 }
@@ -1302,11 +1303,11 @@ dns_request_getresponse(dns_request_t *request, dns_message_t *message,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_request_usedtcp(dns_request_t *request) {
        REQUIRE(VALID_REQUEST(request));
 
-       return (ISC_TF((request->flags & DNS_REQUEST_F_TCP) != 0));
+       return (request->flags & DNS_REQUEST_F_TCP);
 }
 
 void
index 82f0617ca6890065d3aa7e0d7fe48c6ea5b31d0c..8008c0961d6a4992f2c39d7928afdb04a5db9627 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/counter.h>
 #include <isc/log.h>
@@ -206,7 +207,7 @@ typedef struct query {
        isc_mem_t *                     mctx;
        dns_dispatchmgr_t *             dispatchmgr;
        dns_dispatch_t *                dispatch;
-       isc_boolean_t                   exclusivesocket;
+       bool                    exclusivesocket;
        dns_adbaddrinfo_t *             addrinfo;
        isc_socket_t *                  tcpsocket;
        isc_time_t                      start;
@@ -269,9 +270,9 @@ struct fetchctx {
 
        /*% Locked by appropriate bucket lock. */
        fetchstate                      state;
-       isc_boolean_t                   want_shutdown;
-       isc_boolean_t                   cloned;
-       isc_boolean_t                   spilled;
+       bool                    want_shutdown;
+       bool                    cloned;
+       bool                    spilled;
        unsigned int                    references;
        isc_event_t                     control_event;
        ISC_LINK(struct fetchctx)       link;
@@ -302,7 +303,7 @@ struct fetchctx {
        ISC_LIST(dns_validator_t)       validators;
        dns_db_t *                      cache;
        dns_adb_t *                     adb;
-       isc_boolean_t                   ns_ttl_ok;
+       bool                    ns_ttl_ok;
        uint32_t                        ns_ttl;
        isc_counter_t *                 qc;
 
@@ -360,7 +361,7 @@ struct fetchctx {
        int                             exitline;
        isc_time_t                      start;
        uint64_t                        duration;
-       isc_boolean_t                   logged;
+       bool                    logged;
        unsigned int                    querysent;
        unsigned int                    referrals;
        unsigned int                    lamecount;
@@ -370,7 +371,7 @@ struct fetchctx {
        unsigned int                    adberr;
        unsigned int                    findfail;
        unsigned int                    valfail;
-       isc_boolean_t                   timeout;
+       bool                    timeout;
        dns_adbaddrinfo_t               *addrinfo;
        isc_sockaddr_t                  *client;
        unsigned int                    depth;
@@ -421,7 +422,7 @@ typedef struct fctxbucket {
        isc_task_t *                    task;
        isc_mutex_t                     lock;
        ISC_LIST(fetchctx_t)            fctxs;
-       isc_boolean_t                   exiting;
+       bool                    exiting;
        isc_mem_t *                     mctx;
 } fctxbucket_t;
 
@@ -443,7 +444,7 @@ typedef struct zonebucket {
 } zonebucket_t;
 
 typedef struct alternate {
-       isc_boolean_t                   isaddress;
+       bool                    isaddress;
        union   {
                isc_sockaddr_t          addr;
                struct {
@@ -466,15 +467,15 @@ struct dns_resolver {
        isc_timermgr_t *                timermgr;
        isc_taskmgr_t *                 taskmgr;
        dns_view_t *                    view;
-       isc_boolean_t                   frozen;
+       bool                    frozen;
        unsigned int                    options;
        dns_dispatchmgr_t *             dispatchmgr;
        dns_dispatchset_t *             dispatches4;
-       isc_boolean_t                   exclusivev4;
+       bool                    exclusivev4;
        dns_dispatchset_t *             dispatches6;
        isc_dscp_t                      querydscp4;
        isc_dscp_t                      querydscp6;
-       isc_boolean_t                   exclusivev6;
+       bool                    exclusivev6;
        unsigned int                    nbuckets;
        fctxbucket_t *                  buckets;
        zonebucket_t *                  dbuckets;
@@ -493,7 +494,7 @@ struct dns_resolver {
        unsigned int                    spillatmax;
        unsigned int                    spillatmin;
        isc_timer_t *                   spillattimer;
-       isc_boolean_t                   zero_no_soa_ttl;
+       bool                    zero_no_soa_ttl;
        unsigned int                    query_timeout;
        unsigned int                    maxdepth;
        unsigned int                    maxqueries;
@@ -501,10 +502,10 @@ struct dns_resolver {
 
        /* Locked by lock. */
        unsigned int                    references;
-       isc_boolean_t                   exiting;
+       bool                    exiting;
        isc_eventlist_t                 whenshutdown;
        unsigned int                    activebuckets;
-       isc_boolean_t                   priming;
+       bool                    priming;
        unsigned int                    spillat;        /* clients-per-query */
        unsigned int                    zspill;         /* fetches-per-zone */
 
@@ -545,9 +546,9 @@ struct dns_resolver {
 #define NEGATIVE(r) (((r)->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
 
 #ifdef ENABLE_AFL
-isc_boolean_t dns_fuzzing_resolver = ISC_FALSE;
+bool dns_fuzzing_resolver = false;
 void dns_resolver_setfuzzing() {
-       dns_fuzzing_resolver = ISC_TRUE;
+       dns_fuzzing_resolver = true;
 }
 #endif
 
@@ -556,27 +557,27 @@ static void empty_bucket(dns_resolver_t *res);
 static isc_result_t resquery_send(resquery_t *query);
 static void resquery_response(isc_task_t *task, isc_event_t *event);
 static void resquery_connected(isc_task_t *task, isc_event_t *event);
-static void fctx_try(fetchctx_t *fctx, isc_boolean_t retrying,
-                    isc_boolean_t badcache);
+static void fctx_try(fetchctx_t *fctx, bool retrying,
+                    bool badcache);
 static void fctx_destroy(fetchctx_t *fctx);
-static isc_boolean_t fctx_unlink(fetchctx_t *fctx);
+static bool fctx_unlink(fetchctx_t *fctx);
 static isc_result_t ncache_adderesult(dns_message_t *message,
                                      dns_db_t *cache, dns_dbnode_t *node,
                                      dns_rdatatype_t covers,
                                      isc_stdtime_t now, dns_ttl_t maxttl,
-                                     isc_boolean_t optout,
-                                     isc_boolean_t secure,
+                                     bool optout,
+                                     bool secure,
                                      dns_rdataset_t *ardataset,
                                      isc_result_t *eresultp);
 static void validated(isc_task_t *task, isc_event_t *event);
-static isc_boolean_t maybe_destroy(fetchctx_t *fctx, isc_boolean_t locked);
+static bool maybe_destroy(fetchctx_t *fctx, bool locked);
 static void add_bad(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
                    isc_result_t reason, badnstype_t badtype);
 static inline isc_result_t findnoqname(fetchctx_t *fctx, dns_name_t *name,
                                       dns_rdatatype_t type,
                                       dns_name_t **noqname);
 static void fctx_increference(fetchctx_t *fctx);
-static isc_boolean_t fctx_decreference(fetchctx_t *fctx);
+static bool fctx_decreference(fetchctx_t *fctx);
 
 /*%
  * Increment resolver-related statistics counters.
@@ -631,7 +632,7 @@ valcreate(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, dns_name_t *name,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 rrsig_fromchildzone(fetchctx_t *fctx, dns_rdataset_t *rdataset) {
        dns_namereln_t namereln;
        dns_rdata_rrsig_t rrsig;
@@ -649,23 +650,23 @@ rrsig_fromchildzone(fetchctx_t *fctx, dns_rdataset_t *rdataset) {
                namereln = dns_name_fullcompare(&rrsig.signer, &fctx->domain,
                                                &order, &labels);
                if (namereln == dns_namereln_subdomain)
-                       return (ISC_TRUE);
+                       return (true);
                dns_rdata_reset(&rdata);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
        dns_name_t *name;
        dns_name_t *domain = &fctx->domain;
        dns_rdataset_t *rdataset;
        dns_rdatatype_t type;
        isc_result_t result;
-       isc_boolean_t keep_auth = ISC_FALSE;
+       bool keep_auth = false;
 
        if (message->rcode == dns_rcode_nxdomain)
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * A DS RRset can appear anywhere in a zone, even for a delegation-only
@@ -721,7 +722,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
                                 */
                                if (type == dns_rdatatype_rrsig &&
                                    rrsig_fromchildzone(fctx, rdataset))
-                                       return (ISC_FALSE);
+                                       return (false);
                                /*
                                 * Direct query for apex records or DS.
                                 */
@@ -730,7 +731,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
                                     type == dns_rdatatype_ns ||
                                     type == dns_rdatatype_soa ||
                                     type == dns_rdatatype_dnskey))
-                                       return (ISC_FALSE);
+                                       return (false);
                                /*
                                 * Indirect query for apex records or DS.
                                 */
@@ -739,7 +740,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
                                     type == dns_rdatatype_ds ||
                                     type == dns_rdatatype_soa ||
                                     type == dns_rdatatype_dnskey))
-                                       return (ISC_FALSE);
+                                       return (false);
                        }
                        result = dns_message_nextname(message,
                                                      DNS_SECTION_ANSWER);
@@ -751,7 +752,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
         */
        if (fctx->type == dns_rdatatype_ds &&
            message->counts[DNS_SECTION_ANSWER] == 0)
-               return (ISC_FALSE);
+               return (false);
 
        /* Look for referral or indication of answer from child zone? */
        if (message->counts[DNS_SECTION_AUTHORITY] == 0)
@@ -767,7 +768,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
                        type = rdataset->type;
                        if (type == dns_rdatatype_soa &&
                            dns_name_equal(name, domain))
-                               keep_auth = ISC_TRUE;
+                               keep_auth = true;
 
                        if (type != dns_rdatatype_ns &&
                            type != dns_rdatatype_soa &&
@@ -776,7 +777,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
 
                        if (type == dns_rdatatype_rrsig) {
                                if (rrsig_fromchildzone(fctx, rdataset))
-                                       return (ISC_FALSE);
+                                       return (false);
                                else
                                        continue;
                        }
@@ -794,10 +795,10 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
                                 */
                                if (message->counts[DNS_SECTION_ANSWER] == 0 &&
                                    fctx->type == dns_rdatatype_any)
-                                       return (ISC_FALSE);
+                                       return (false);
                        } else if (dns_name_issubdomain(name, domain)) {
                                /* Referral or answer from child zone. */
-                               return (ISC_FALSE);
+                               return (false);
                        }
                }
                result = dns_message_nextname(message, DNS_SECTION_AUTHORITY);
@@ -809,7 +810,7 @@ fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
        if (!keep_auth)
                message->counts[DNS_SECTION_AUTHORITY] = 0;
        message->counts[DNS_SECTION_ADDITIONAL] = 0;
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline isc_result_t
@@ -822,7 +823,7 @@ fctx_starttimer(fetchctx_t *fctx) {
         * no further idle events are delivered.
         */
        return (isc_timer_reset(fctx->timer, isc_timertype_once,
-                               &fctx->expires, NULL, ISC_TRUE));
+                               &fctx->expires, NULL, true));
 }
 
 static inline void
@@ -836,7 +837,7 @@ fctx_stoptimer(fetchctx_t *fctx) {
         * cannot fail in that case.
         */
        result = isc_timer_reset(fctx->timer, isc_timertype_inactive,
-                                NULL, NULL, ISC_TRUE);
+                                NULL, NULL, true);
        if (result != ISC_R_SUCCESS) {
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "isc_timer_reset(): %s",
@@ -851,7 +852,7 @@ fctx_startidletimer(fetchctx_t *fctx, isc_interval_t *interval) {
         * to be in effect.
         */
        return (isc_timer_reset(fctx->timer, isc_timertype_once,
-                               &fctx->expires, interval, ISC_FALSE));
+                               &fctx->expires, interval, false));
 }
 
 /*
@@ -863,7 +864,7 @@ fctx_startidletimer(fetchctx_t *fctx, isc_interval_t *interval) {
 static inline void
 resquery_destroy(resquery_t **queryp) {
        dns_resolver_t *res;
-       isc_boolean_t empty;
+       bool empty;
        resquery_t *query;
        fetchctx_t *fctx;
        unsigned int bucket;
@@ -894,8 +895,8 @@ resquery_destroy(resquery_t **queryp) {
 
 static void
 fctx_cancelquery(resquery_t **queryp, dns_dispatchevent_t **deventp,
-                isc_time_t *finish, isc_boolean_t no_response,
-                isc_boolean_t age_untried)
+                isc_time_t *finish, bool no_response,
+                bool age_untried)
 {
        fetchctx_t *fctx;
        resquery_t *query;
@@ -1096,8 +1097,8 @@ fctx_cancelquery(resquery_t **queryp, dns_dispatchevent_t **deventp,
 }
 
 static void
-fctx_cancelqueries(fetchctx_t *fctx, isc_boolean_t no_response,
-                  isc_boolean_t age_untried)
+fctx_cancelqueries(fetchctx_t *fctx, bool no_response,
+                  bool age_untried)
 {
        resquery_t *query, *next_query;
 
@@ -1179,8 +1180,8 @@ fctx_cleanupaltaddrs(fetchctx_t *fctx) {
 }
 
 static inline void
-fctx_stopqueries(fetchctx_t *fctx, isc_boolean_t no_response,
-                isc_boolean_t age_untried)
+fctx_stopqueries(fetchctx_t *fctx, bool no_response,
+                bool age_untried)
 {
        FCTXTRACE("stopqueries");
        fctx_cancelqueries(fctx, no_response, age_untried);
@@ -1219,7 +1220,7 @@ fcount_logspill(fetchctx_t *fctx, fctxcount_t *counter) {
 }
 
 static isc_result_t
-fcount_incr(fetchctx_t *fctx, isc_boolean_t force) {
+fcount_incr(fetchctx_t *fctx, bool force) {
        isc_result_t result = ISC_R_SUCCESS;
        zonebucket_t *dbucket;
        fctxcount_t *counter;
@@ -1229,7 +1230,7 @@ fcount_incr(fetchctx_t *fctx, isc_boolean_t force) {
        REQUIRE(fctx->res != NULL);
 
        INSIST(fctx->dbucketnum == RES_NOBUCKET);
-       bucketnum = dns_name_fullhash(&fctx->domain, ISC_FALSE)
+       bucketnum = dns_name_fullhash(&fctx->domain, false)
                        % RES_DOMAIN_BUCKETS;
 
        LOCK(&fctx->res->lock);
@@ -1321,7 +1322,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result, int line) {
        isc_task_t *task;
        unsigned int count = 0;
        isc_interval_t i;
-       isc_boolean_t logit = ISC_FALSE;
+       bool logit = false;
        isc_time_t now;
        unsigned int old_spillat;
        unsigned int new_spillat = 0;   /* initialized to silence
@@ -1384,12 +1385,12 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result, int line) {
                                fctx->res->spillat = fctx->res->spillatmax;
                        new_spillat = fctx->res->spillat;
                        if (new_spillat != old_spillat) {
-                               logit = ISC_TRUE;
+                               logit = true;
                        }
                        isc_interval_set(&i, 20 * 60, 0);
                        result = isc_timer_reset(fctx->res->spillattimer,
                                                 isc_timertype_ticker, NULL,
-                                                &i, ISC_TRUE);
+                                                &i, true);
                        RUNTIME_CHECK(result == ISC_R_SUCCESS);
                }
                UNLOCK(&fctx->res->lock);
@@ -1424,8 +1425,8 @@ log_edns(fetchctx_t *fctx) {
 static void
 fctx_done(fetchctx_t *fctx, isc_result_t result, int line) {
        dns_resolver_t *res;
-       isc_boolean_t no_response = ISC_FALSE;
-       isc_boolean_t age_untried = ISC_FALSE;
+       bool no_response = false;
+       bool age_untried = false;
 
        REQUIRE(line >= 0);
 
@@ -1438,9 +1439,9 @@ fctx_done(fetchctx_t *fctx, isc_result_t result, int line) {
                 * Log any deferred EDNS timeout messages.
                 */
                log_edns(fctx);
-               no_response = ISC_TRUE;
+               no_response = true;
        } else if (result == ISC_R_TIMEDOUT)
-               age_untried = ISC_TRUE;
+               age_untried = true;
 
        fctx->reason = NULL;
 
@@ -1458,8 +1459,8 @@ fctx_done(fetchctx_t *fctx, isc_result_t result, int line) {
 static void
 process_sendevent(resquery_t *query, isc_event_t *event) {
        isc_socketevent_t *sevent = (isc_socketevent_t *)event;
-       isc_boolean_t destroy_query = ISC_FALSE;
-       isc_boolean_t retry = ISC_FALSE;
+       bool destroy_query = false;
+       bool retry = false;
        isc_result_t result;
        fetchctx_t *fctx;
 
@@ -1473,7 +1474,7 @@ process_sendevent(resquery_t *query, isc_event_t *event) {
                         */
                        if (query->tcpsocket != NULL)
                                isc_socket_detach(&query->tcpsocket);
-                       destroy_query = ISC_TRUE;
+                       destroy_query = true;
                }
        } else {
                switch (sevent->result) {
@@ -1494,9 +1495,9 @@ process_sendevent(resquery_t *query, isc_event_t *event) {
                         */
                        add_bad(fctx, query->addrinfo, sevent->result,
                                badns_unreachable);
-                       fctx_cancelquery(&query, NULL, NULL, ISC_TRUE,
-                                        ISC_FALSE);
-                       retry = ISC_TRUE;
+                       fctx_cancelquery(&query, NULL, NULL, true,
+                                        false);
+                       retry = true;
                        break;
 
                default:
@@ -1504,8 +1505,8 @@ process_sendevent(resquery_t *query, isc_event_t *event) {
                                   "unexpected event result; responding",
                                   sevent->result);
 
-                       fctx_cancelquery(&query, NULL, NULL, ISC_FALSE,
-                                        ISC_FALSE);
+                       fctx_cancelquery(&query, NULL, NULL, false,
+                                        false);
                        break;
                }
        }
@@ -1523,7 +1524,7 @@ process_sendevent(resquery_t *query, isc_event_t *event) {
                if (result != ISC_R_SUCCESS)
                        fctx_done(fctx, result, __LINE__);
                else
-                       fctx_try(fctx, ISC_TRUE, ISC_FALSE);
+                       fctx_try(fctx, true, false);
        }
 
        if (destroy_query)
@@ -1637,7 +1638,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        isc_result_t result;
        resquery_t *query;
        isc_sockaddr_t addr;
-       isc_boolean_t have_addr = ISC_FALSE;
+       bool have_addr = false;
        unsigned int srtt;
        isc_dscp_t dscp = -1;
 
@@ -1690,19 +1691,19 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
         */
        query->dispatchmgr = res->dispatchmgr;
        query->dispatch = NULL;
-       query->exclusivesocket = ISC_FALSE;
+       query->exclusivesocket = false;
        query->tcpsocket = NULL;
        if (res->view->peers != NULL) {
                dns_peer_t *peer = NULL;
                isc_netaddr_t dstip;
-               isc_boolean_t usetcp = ISC_FALSE;
+               bool usetcp = false;
                isc_netaddr_fromsockaddr(&dstip, &addrinfo->sockaddr);
                result = dns_peerlist_peerbyaddr(res->view->peers,
                                                 &dstip, &peer);
                if (result == ISC_R_SUCCESS) {
                        result = dns_peer_getquerysource(peer, &addr);
                        if (result == ISC_R_SUCCESS)
-                               have_addr = ISC_TRUE;
+                               have_addr = true;
                        result = dns_peer_getquerydscp(peer, &dscp);
                        if (result == ISC_R_SUCCESS)
                                query->dscp = dscp;
@@ -1886,7 +1887,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 bad_edns(fetchctx_t *fctx, isc_sockaddr_t *address) {
        isc_sockaddr_t *sa;
 
@@ -1894,10 +1895,10 @@ bad_edns(fetchctx_t *fctx, isc_sockaddr_t *address) {
             sa != NULL;
             sa = ISC_LIST_NEXT(sa, link)) {
                if (isc_sockaddr_equal(sa, address))
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -2062,8 +2063,8 @@ compute_cc(resquery_t *query, unsigned char *cookie, size_t len) {
 
 static isc_result_t
 issecuredomain(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
-              isc_stdtime_t now, isc_boolean_t checknta,
-              isc_boolean_t *issecure)
+              isc_stdtime_t now, bool checknta,
+              bool *issecure)
 {
        dns_name_t suffix;
        unsigned int labels;
@@ -2084,23 +2085,23 @@ issecuredomain(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
        return (dns_view_issecuredomain(view, name, now, checknta, issecure));
 }
 
-static isc_boolean_t
+static bool
 wouldvalidate(fetchctx_t *fctx) {
-       isc_boolean_t secure_domain;
+       bool secure_domain;
        isc_result_t result;
        isc_stdtime_t now;
 
        if (!fctx->res->view->enablevalidation)
-               return (ISC_FALSE);
+               return (false);
 
        if (fctx->res->view->dlv != NULL)
-               return (ISC_TRUE);
+               return (true);
 
        isc_stdtime_get(&now);
        result = dns_view_issecuredomain(fctx->res->view, &fctx->name,
-                                        now, ISC_TRUE, &secure_domain);
+                                        now, true, &secure_domain);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
        return (secure_domain);
 }
 
@@ -2120,12 +2121,12 @@ resquery_send(resquery_t *query) {
        isc_netaddr_t ipaddr;
        dns_tsigkey_t *tsigkey = NULL;
        dns_peer_t *peer = NULL;
-       isc_boolean_t useedns;
+       bool useedns;
        dns_compress_t cctx;
-       isc_boolean_t cleanup_cctx = ISC_FALSE;
-       isc_boolean_t secure_domain;
-       isc_boolean_t connecting = ISC_FALSE;
-       isc_boolean_t tcp = ISC_TF((query->options & DNS_FETCHOPT_TCP) != 0);
+       bool cleanup_cctx = false;
+       bool secure_domain;
+       bool connecting = false;
+       bool tcp = (query->options & DNS_FETCHOPT_TCP);
        dns_ednsopt_t ednsopts[DNS_EDNSOPTIONS];
        unsigned ednsopt = 0;
        uint16_t hint = 0, udpsize = 0; /* No EDNS */
@@ -2213,15 +2214,14 @@ resquery_send(resquery_t *query) {
        else if (res->view->enablevalidation &&
                 ((fctx->qmessage->flags & DNS_MESSAGEFLAG_RD) != 0))
        {
-               isc_boolean_t checknta =
-                       ISC_TF((query->options & DNS_FETCHOPT_NONTA) == 0);
+               bool checknta = !(query->options & DNS_FETCHOPT_NONTA);
                result = issecuredomain(res->view, &fctx->name, fctx->type,
                                        isc_time_seconds(&query->start),
                                        checknta, &secure_domain);
                if (result != ISC_R_SUCCESS)
-                       secure_domain = ISC_FALSE;
+                       secure_domain = false;
                if (res->view->dlv != NULL)
-                       secure_domain = ISC_TRUE;
+                       secure_domain = true;
                if (secure_domain)
                        fctx->qmessage->flags |= DNS_MESSAGEFLAG_CD;
        }
@@ -2237,7 +2237,7 @@ resquery_send(resquery_t *query) {
        result = dns_compress_init(&cctx, -1, fctx->res->mctx);
        if (result != ISC_R_SUCCESS)
                goto cleanup_message;
-       cleanup_cctx = ISC_TRUE;
+       cleanup_cctx = true;
 
        result = dns_message_renderbegin(fctx->qmessage, &cctx,
                                         &query->buffer);
@@ -2301,7 +2301,7 @@ resquery_send(resquery_t *query) {
                        }
                }
        }
-       fctx->timeout = ISC_FALSE;
+       fctx->timeout = false;
 
        /*
         * Use EDNS0, unless the caller doesn't want it, or we know that
@@ -2311,8 +2311,8 @@ resquery_send(resquery_t *query) {
                if ((query->addrinfo->flags & DNS_FETCHOPT_NOEDNS0) == 0) {
                        unsigned int version = DNS_EDNS_VERSION;
                        unsigned int flags = query->addrinfo->flags;
-                       isc_boolean_t reqnsid = res->view->requestnsid;
-                       isc_boolean_t sendcookie = res->view->sendcookie;
+                       bool reqnsid = res->view->requestnsid;
+                       bool sendcookie = res->view->sendcookie;
                        unsigned char cookie[64];
 
                        if ((flags & FCTX_ADDRINFO_EDNSOK) != 0 &&
@@ -2367,7 +2367,7 @@ resquery_send(resquery_t *query) {
                                        version = ednsversion;
                        }
                        if (NOCOOKIE(query->addrinfo))
-                               sendcookie = ISC_FALSE;
+                               sendcookie = false;
                        if (reqnsid) {
                                INSIST(ednsopt < DNS_EDNSOPTIONS);
                                ednsopts[ednsopt].code = DNS_OPT_NSID;
@@ -2382,7 +2382,7 @@ resquery_send(resquery_t *query) {
                         * Only send COOKIE to EDNS(1) servers.
                         */
                        if (version < 1)
-                               sendcookie = ISC_FALSE;
+                               sendcookie = false;
 #endif
                        if (sendcookie) {
                                INSIST(ednsopt < DNS_EDNSOPTIONS);
@@ -2490,7 +2490,7 @@ resquery_send(resquery_t *query) {
 #endif /* HAVE_DNSTAP */
 
        dns_compress_invalidate(&cctx);
-       cleanup_cctx = ISC_FALSE;
+       cleanup_cctx = false;
 
        if (dns_message_gettsigkey(fctx->qmessage) != NULL) {
                dns_tsigkey_attach(dns_message_gettsigkey(fctx->qmessage),
@@ -2543,7 +2543,7 @@ resquery_send(resquery_t *query) {
                                                    query);
                        if (result != ISC_R_SUCCESS)
                                goto cleanup_message;
-                       connecting = ISC_TRUE;
+                       connecting = true;
                        query->connects++;
                }
        }
@@ -2631,7 +2631,7 @@ static void
 resquery_connected(isc_task_t *task, isc_event_t *event) {
        isc_socketevent_t *sevent = (isc_socketevent_t *)event;
        resquery_t *query = event->ev_arg;
-       isc_boolean_t retry = ISC_FALSE;
+       bool retry = false;
        isc_interval_t interval;
        isc_result_t result;
        unsigned int attrs;
@@ -2678,8 +2678,8 @@ resquery_connected(isc_task_t *task, isc_event_t *event) {
                                FCTXTRACE("query canceled: idle timer failed; "
                                          "responding");
 
-                               fctx_cancelquery(&query, NULL, NULL, ISC_FALSE,
-                                                ISC_FALSE);
+                               fctx_cancelquery(&query, NULL, NULL, false,
+                                                false);
                                fctx_done(fctx, result, __LINE__);
                                break;
                        }
@@ -2718,7 +2718,7 @@ resquery_connected(isc_task_t *task, isc_event_t *event) {
                                FCTXTRACE("query canceled: "
                                          "resquery_send() failed; responding");
 
-                               fctx_cancelquery(&query, NULL, NULL, ISC_FALSE, ISC_FALSE);
+                               fctx_cancelquery(&query, NULL, NULL, false, false);
                                fctx_done(fctx, result, __LINE__);
                        }
                        break;
@@ -2737,8 +2737,8 @@ resquery_connected(isc_task_t *task, isc_event_t *event) {
                         * No route to remote.
                         */
                        isc_socket_detach(&query->tcpsocket);
-                       fctx_cancelquery(&query, NULL, NULL, ISC_TRUE, ISC_FALSE);
-                       retry = ISC_TRUE;
+                       fctx_cancelquery(&query, NULL, NULL, true, false);
+                       retry = true;
                        break;
 
                default:
@@ -2747,7 +2747,7 @@ resquery_connected(isc_task_t *task, isc_event_t *event) {
                                   sevent->result);
 
                        isc_socket_detach(&query->tcpsocket);
-                       fctx_cancelquery(&query, NULL, NULL, ISC_FALSE, ISC_FALSE);
+                       fctx_cancelquery(&query, NULL, NULL, false, false);
                        break;
                }
        }
@@ -2764,7 +2764,7 @@ resquery_connected(isc_task_t *task, isc_event_t *event) {
                if (result != ISC_R_SUCCESS)
                        fctx_done(fctx, result, __LINE__);
                else
-                       fctx_try(fctx, ISC_TRUE, ISC_FALSE);
+                       fctx_try(fctx, true, false);
        }
 }
 
@@ -2773,11 +2773,11 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
        fetchctx_t *fctx;
        dns_adbfind_t *find;
        dns_resolver_t *res;
-       isc_boolean_t want_try = ISC_FALSE;
-       isc_boolean_t want_done = ISC_FALSE;
-       isc_boolean_t bucket_empty = ISC_FALSE;
+       bool want_try = false;
+       bool want_done = false;
+       bool bucket_empty = false;
        unsigned int bucketnum;
-       isc_boolean_t dodestroy = ISC_FALSE;
+       bool dodestroy = false;
 
        find = event->ev_sender;
        fctx = event->ev_arg;
@@ -2801,7 +2801,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
                INSIST(!SHUTTINGDOWN(fctx));
                if (event->ev_type == DNS_EVENT_ADBMOREADDRESSES) {
                        fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
-                       want_try = ISC_TRUE;
+                       want_try = true;
                } else {
                        fctx->findfail++;
                        if (fctx->pending == 0) {
@@ -2811,7 +2811,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
                                 * fail the fctx.
                                 */
                                fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
-                               want_done = ISC_TRUE;
+                               want_done = true;
                        }
                }
        } else if (SHUTTINGDOWN(fctx) && fctx->pending == 0 &&
@@ -2819,7 +2819,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
 
                if (fctx->references == 0) {
                        bucket_empty = fctx_unlink(fctx);
-                       dodestroy = ISC_TRUE;
+                       dodestroy = true;
                }
        }
        UNLOCK(&res->buckets[bucketnum].lock);
@@ -2828,7 +2828,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
        dns_adb_destroyfind(&find);
 
        if (want_try) {
-               fctx_try(fctx, ISC_TRUE, ISC_FALSE);
+               fctx_try(fctx, true, false);
        } else if (want_done) {
                FCTXTRACE("fetch failed in finddone(); return ISC_R_FAILURE");
                fctx_done(fctx, ISC_R_FAILURE, __LINE__);
@@ -2840,7 +2840,7 @@ fctx_finddone(isc_task_t *task, isc_event_t *event) {
 }
 
 
-static inline isc_boolean_t
+static inline bool
 bad_server(fetchctx_t *fctx, isc_sockaddr_t *address) {
        isc_sockaddr_t *sa;
 
@@ -2848,21 +2848,21 @@ bad_server(fetchctx_t *fctx, isc_sockaddr_t *address) {
             sa != NULL;
             sa = ISC_LIST_NEXT(sa, link)) {
                if (isc_sockaddr_equal(sa, address))
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-static inline isc_boolean_t
+static inline bool
 mark_bad(fetchctx_t *fctx) {
        dns_adbfind_t *curr;
        dns_adbaddrinfo_t *addrinfo;
-       isc_boolean_t all_bad = ISC_TRUE;
+       bool all_bad = true;
 
 #ifdef ENABLE_AFL
        if (dns_fuzzing_resolver)
-               return ISC_FALSE;
+               return false;
 #endif
 
        /*
@@ -2882,7 +2882,7 @@ mark_bad(fetchctx_t *fctx) {
                        if (bad_server(fctx, &addrinfo->sockaddr))
                                addrinfo->flags |= FCTX_ADDRINFO_MARK;
                        else
-                               all_bad = ISC_FALSE;
+                               all_bad = false;
                }
        }
 
@@ -2895,7 +2895,7 @@ mark_bad(fetchctx_t *fctx) {
                if (bad_server(fctx, &addrinfo->sockaddr))
                        addrinfo->flags |= FCTX_ADDRINFO_MARK;
                else
-                       all_bad = ISC_FALSE;
+                       all_bad = false;
        }
 
        /*
@@ -2910,7 +2910,7 @@ mark_bad(fetchctx_t *fctx) {
                        if (bad_server(fctx, &addrinfo->sockaddr))
                                addrinfo->flags |= FCTX_ADDRINFO_MARK;
                        else
-                               all_bad = ISC_FALSE;
+                               all_bad = false;
                }
        }
 
@@ -2920,7 +2920,7 @@ mark_bad(fetchctx_t *fctx) {
                if (bad_server(fctx, &addrinfo->sockaddr))
                        addrinfo->flags |= FCTX_ADDRINFO_MARK;
                else
-                       all_bad = ISC_FALSE;
+                       all_bad = false;
        }
 
        return (all_bad);
@@ -3087,16 +3087,16 @@ sort_finds(dns_adbfindlist_t *findlist, unsigned int bias) {
 static void
 findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
         unsigned int options, unsigned int flags, isc_stdtime_t now,
-        isc_boolean_t *overquota, isc_boolean_t *need_alternate)
+        bool *overquota, bool *need_alternate)
 {
        dns_adbaddrinfo_t *ai;
        dns_adbfind_t *find;
        dns_resolver_t *res;
-       isc_boolean_t unshared;
+       bool unshared;
        isc_result_t result;
 
        res = fctx->res;
-       unshared = ISC_TF((fctx->options & DNS_FETCHOPT_UNSHARED) != 0);
+       unshared = (fctx->options & DNS_FETCHOPT_UNSHARED);
        /*
         * If this name is a subdomain of the query domain, tell
         * the ADB to start looking using zone/hint data. This keeps us
@@ -3176,11 +3176,11 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
                              find->result_v6 != DNS_R_NXDOMAIN) ||
                             (res->dispatches6 == NULL &&
                              find->result_v4 != DNS_R_NXDOMAIN)))
-                               *need_alternate = ISC_TRUE;
+                               *need_alternate = true;
                } else {
                        if ((find->options & DNS_ADBFIND_OVERQUOTA) != 0) {
                                if (overquota != NULL)
-                                       *overquota = ISC_TRUE;
+                                       *overquota = true;
                                fctx->quotacount++; /* quota exceeded */
                        }
                        else if ((find->options & DNS_ADBFIND_LAMEPRUNED) != 0)
@@ -3198,24 +3198,24 @@ findname(fetchctx_t *fctx, dns_name_t *name, in_port_t port,
                              find->result_v6 == DNS_R_NXRRSET) ||
                             (res->dispatches6 == NULL &&
                              find->result_v4 == DNS_R_NXRRSET)))
-                               *need_alternate = ISC_TRUE;
+                               *need_alternate = true;
                        dns_adb_destroyfind(&find);
                }
        }
 }
 
-static isc_boolean_t
+static bool
 isstrictsubdomain(dns_name_t *name1, dns_name_t *name2) {
        int order;
        unsigned int nlabels;
        dns_namereln_t namereln;
 
        namereln = dns_name_fullcompare(name1, name2, &order, &nlabels);
-       return (ISC_TF(namereln == dns_namereln_subdomain));
+       return (namereln == dns_namereln_subdomain);
 }
 
 static isc_result_t
-fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
+fctx_getaddresses(fetchctx_t *fctx, bool badcache) {
        dns_rdata_t rdata = DNS_RDATA_INIT;
        isc_result_t result;
        dns_resolver_t *res;
@@ -3223,10 +3223,10 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
        unsigned int stdoptions = 0;
        dns_forwarder_t *fwd;
        dns_adbaddrinfo_t *ai;
-       isc_boolean_t all_bad;
+       bool all_bad;
        dns_rdata_ns_t ns;
-       isc_boolean_t need_alternate = ISC_FALSE;
-       isc_boolean_t all_spilled = ISC_TRUE;
+       bool need_alternate = false;
+       bool all_spilled = true;
 
        FCTXTRACE5("getaddresses", "fctx->depth=", fctx->depth);
 
@@ -3298,7 +3298,7 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
                                                      &fctx->domain);
                                if (result != ISC_R_SUCCESS)
                                        return (result);
-                               result = fcount_incr(fctx, ISC_TRUE);
+                               result = fcount_incr(fctx, true);
                                if (result != ISC_R_SUCCESS)
                                        return (result);
                        }
@@ -3375,7 +3375,7 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
             result == ISC_R_SUCCESS;
             result = dns_rdataset_next(&fctx->nameservers))
        {
-               isc_boolean_t overquota = ISC_FALSE;
+               bool overquota = false;
 
                dns_rdataset_current(&fctx->nameservers, &rdata);
                /*
@@ -3389,7 +3389,7 @@ fctx_getaddresses(fetchctx_t *fctx, isc_boolean_t badcache) {
                         &overquota, &need_alternate);
 
                if (!overquota)
-                       all_spilled = ISC_FALSE;
+                       all_spilled = false;
 
                dns_rdata_reset(&rdata);
                dns_rdata_freestruct(&ns);
@@ -3502,8 +3502,8 @@ possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr) {
        isc_netaddr_t na;
        char buf[ISC_NETADDR_FORMATSIZE];
        isc_sockaddr_t *sa;
-       isc_boolean_t aborted = ISC_FALSE;
-       isc_boolean_t bogus;
+       bool aborted = false;
+       bool bogus;
        dns_acl_t *blackhole;
        isc_netaddr_t ipaddr;
        dns_peer_t *peer = NULL;
@@ -3524,13 +3524,13 @@ possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr) {
                                  &res->view->aclenv,
                                  &match, NULL) == ISC_R_SUCCESS &&
                    match > 0)
-                       aborted = ISC_TRUE;
+                       aborted = true;
        }
 
        if (peer != NULL &&
            dns_peer_getbogus(peer, &bogus) == ISC_R_SUCCESS &&
            bogus)
-               aborted = ISC_TRUE;
+               aborted = true;
 
        if (aborted) {
                addr->flags |= FCTX_ADDRINFO_MARK;
@@ -3705,12 +3705,12 @@ fctx_nextaddress(fetchctx_t *fctx) {
 }
 
 static void
-fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
+fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) {
        isc_result_t result;
        dns_adbaddrinfo_t *addrinfo = NULL;
        dns_resolver_t *res;
        unsigned int bucketnum;
-       isc_boolean_t bucket_empty;
+       bool bucket_empty;
 
        FCTXTRACE5("try", "fctx->qc=", isc_counter_used(fctx->qc));
 
@@ -3738,7 +3738,7 @@ fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
 
        if (addrinfo == NULL) {
                /* We have no more addresses.  Start over. */
-               fctx_cancelqueries(fctx, ISC_TRUE, ISC_FALSE);
+               fctx_cancelqueries(fctx, true, false);
                fctx_cleanupall(fctx);
                result = fctx_getaddresses(fctx, badcache);
                if (result == DNS_R_WAIT) {
@@ -3798,7 +3798,7 @@ fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache) {
                inc_stats(res, dns_resstatscounter_retry);
 }
 
-static isc_boolean_t
+static bool
 fctx_unlink(fetchctx_t *fctx) {
        dns_resolver_t *res;
        unsigned int bucketnum;
@@ -3832,9 +3832,9 @@ fctx_unlink(fetchctx_t *fctx) {
 
        if (res->buckets[bucketnum].exiting &&
            ISC_LIST_EMPTY(res->buckets[bucketnum].fctxs))
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -3930,7 +3930,7 @@ fctx_timeout(isc_task_t *task, isc_event_t *event) {
                isc_result_t result;
 
                fctx->timeouts++;
-               fctx->timeout = ISC_TRUE;
+               fctx->timeout = true;
 
                /*
                 * We could cancel the running queries here, or we could let
@@ -3946,7 +3946,7 @@ fctx_timeout(isc_task_t *task, isc_event_t *event) {
                    isc_time_compare(&tevent->due, &query->start) >= 0)
                {
                        FCTXTRACE("query timed out; no response");
-                       fctx_cancelquery(&query, NULL, NULL, ISC_TRUE, ISC_FALSE);
+                       fctx_cancelquery(&query, NULL, NULL, true, false);
                }
                fctx->attributes &= ~FCTX_ATTR_ADDRWAIT;
 
@@ -3961,7 +3961,7 @@ fctx_timeout(isc_task_t *task, isc_event_t *event) {
                        /*
                         * Keep trying.
                         */
-                       fctx_try(fctx, ISC_TRUE, ISC_FALSE);
+                       fctx_try(fctx, true, false);
        }
 
        isc_event_free(&event);
@@ -3984,7 +3984,7 @@ fctx_shutdown(fetchctx_t *fctx) {
        if (fctx->want_shutdown)
                return;
 
-       fctx->want_shutdown = ISC_TRUE;
+       fctx->want_shutdown = true;
 
        /*
         * Unless we're still initializing (in which case the
@@ -4002,11 +4002,11 @@ fctx_shutdown(fetchctx_t *fctx) {
 static void
 fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
        fetchctx_t *fctx = event->ev_arg;
-       isc_boolean_t bucket_empty = ISC_FALSE;
+       bool bucket_empty = false;
        dns_resolver_t *res;
        unsigned int bucketnum;
        dns_validator_t *validator;
-       isc_boolean_t dodestroy = ISC_FALSE;
+       bool dodestroy = false;
 
        REQUIRE(VALID_FCTX(fctx));
 
@@ -4040,7 +4040,7 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
         * fetch, and clean up finds and addresses.  To avoid deadlock
         * with the ADB, we must do this before we lock the bucket lock.
         */
-       fctx_stopqueries(fctx, ISC_FALSE, ISC_FALSE);
+       fctx_stopqueries(fctx, false, false);
        fctx_cleanupall(fctx);
 
        LOCK(&res->buckets[bucketnum].lock);
@@ -4059,7 +4059,7 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
        if (fctx->references == 0 && fctx->pending == 0 &&
            fctx->nqueries == 0 && ISC_LIST_EMPTY(fctx->validators)) {
                bucket_empty = fctx_unlink(fctx);
-               dodestroy = ISC_TRUE;
+               dodestroy = true;
        }
 
        UNLOCK(&res->buckets[bucketnum].lock);
@@ -4074,10 +4074,10 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
 static void
 fctx_start(isc_task_t *task, isc_event_t *event) {
        fetchctx_t *fctx = event->ev_arg;
-       isc_boolean_t done = ISC_FALSE, bucket_empty = ISC_FALSE;
+       bool done = false, bucket_empty = false;
        dns_resolver_t *res;
        unsigned int bucketnum;
-       isc_boolean_t dodestroy = ISC_FALSE;
+       bool dodestroy = false;
 
        REQUIRE(VALID_FCTX(fctx));
 
@@ -4111,9 +4111,9 @@ fctx_start(isc_task_t *task, isc_event_t *event) {
                         * It's now safe to destroy this fctx.
                         */
                        bucket_empty = fctx_unlink(fctx);
-                       dodestroy = ISC_TRUE;
+                       dodestroy = true;
                }
-               done = ISC_TRUE;
+               done = true;
        } else {
                /*
                 * Normal fctx startup.
@@ -4142,7 +4142,7 @@ fctx_start(isc_task_t *task, isc_event_t *event) {
                if (result != ISC_R_SUCCESS)
                        fctx_done(fctx, result, __LINE__);
                else
-                       fctx_try(fctx, ISC_FALSE, ISC_FALSE);
+                       fctx_try(fctx, false, false);
        } else if (dodestroy) {
                        fctx_destroy(fctx);
                if (bucket_empty)
@@ -4291,8 +4291,8 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
        fctx->bucketnum = bucketnum;
        fctx->dbucketnum = RES_NOBUCKET;
        fctx->state = fetchstate_init;
-       fctx->want_shutdown = ISC_FALSE;
-       fctx->cloned = ISC_FALSE;
+       fctx->want_shutdown = false;
+       fctx->cloned = false;
        fctx->depth = depth;
        ISC_LIST_INIT(fctx->queries);
        ISC_LIST_INIT(fctx->finds);
@@ -4325,18 +4325,18 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
        fctx->result = ISC_R_FAILURE;
        fctx->vresult = ISC_R_SUCCESS;
        fctx->exitline = -1;    /* sentinel */
-       fctx->logged = ISC_FALSE;
+       fctx->logged = false;
        fctx->attributes = 0;
-       fctx->spilled = ISC_FALSE;
+       fctx->spilled = false;
        fctx->nqueries = 0;
        fctx->reason = NULL;
        fctx->rand_buf = 0;
        fctx->rand_bits = 0;
-       fctx->timeout = ISC_FALSE;
+       fctx->timeout = false;
        fctx->addrinfo = NULL;
        fctx->client = NULL;
        fctx->ns_ttl = 0;
-       fctx->ns_ttl_ok = ISC_FALSE;
+       fctx->ns_ttl_ok = false;
 
        dns_name_init(&fctx->nsname, NULL);
        fctx->nsfetch = NULL;
@@ -4378,7 +4378,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
                                findoptions |= DNS_DBFIND_NOEXACT;
                        result = dns_view_findzonecut(res->view, name,
                                                      domain, 0, findoptions,
-                                                     ISC_TRUE,
+                                                     true,
                                                      &fctx->nameservers,
                                                      NULL);
                        if (result != ISC_R_SUCCESS)
@@ -4389,7 +4389,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
                                goto cleanup_nameservers;
 
                        fctx->ns_ttl = fctx->nameservers.ttl;
-                       fctx->ns_ttl_ok = ISC_TRUE;
+                       fctx->ns_ttl_ok = true;
                } else {
                        /*
                         * We're in forward-only mode.  Set the query domain.
@@ -4404,13 +4404,13 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
                        goto cleanup_name;
                dns_rdataset_clone(nameservers, &fctx->nameservers);
                fctx->ns_ttl = fctx->nameservers.ttl;
-               fctx->ns_ttl_ok = ISC_TRUE;
+               fctx->ns_ttl_ok = true;
        }
 
        /*
         * Are there too many simultaneous queries for this domain?
         */
-       result = fcount_incr(fctx, ISC_FALSE);
+       result = fcount_incr(fctx, false);
        if (result != ISC_R_SUCCESS) {
                result = fctx->res->quotaresp[dns_quotatype_zone];
                inc_stats(res, dns_resstatscounter_zonequota);
@@ -4532,7 +4532,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
 /*
  * Handle Responses
  */
-static inline isc_boolean_t
+static inline bool
 is_lame(fetchctx_t *fctx) {
        dns_message_t *message = fctx->rmessage;
        dns_name_t *name;
@@ -4542,13 +4542,13 @@ is_lame(fetchctx_t *fctx) {
        if (message->rcode != dns_rcode_noerror &&
            message->rcode != dns_rcode_yxdomain &&
            message->rcode != dns_rcode_nxdomain)
-               return (ISC_FALSE);
+               return (false);
 
        if (message->counts[DNS_SECTION_ANSWER] != 0)
-               return (ISC_FALSE);
+               return (false);
 
        if (message->counts[DNS_SECTION_AUTHORITY] == 0)
-               return (ISC_FALSE);
+               return (false);
 
        result = dns_message_firstname(message, DNS_SECTION_AUTHORITY);
        while (result == ISC_R_SUCCESS) {
@@ -4566,15 +4566,15 @@ is_lame(fetchctx_t *fctx) {
                                                        &order, &labels);
                        if (namereln == dns_namereln_equal &&
                            (message->flags & DNS_MESSAGEFLAG_AA) != 0)
-                               return (ISC_FALSE);
+                               return (false);
                        if (namereln == dns_namereln_subdomain)
-                               return (ISC_FALSE);
-                       return (ISC_TRUE);
+                               return (false);
+                       return (true);
                }
                result = dns_message_nextname(message, DNS_SECTION_AUTHORITY);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static inline void
@@ -4706,7 +4706,7 @@ clone_results(fetchctx_t *fctx) {
         * Caller must be holding the appropriate lock.
         */
 
-       fctx->cloned = ISC_TRUE;
+       fctx->cloned = true;
        hevent = ISC_LIST_HEAD(fctx->events);
        if (hevent == NULL)
                return;
@@ -4754,13 +4754,13 @@ clone_results(fetchctx_t *fctx) {
  * Returns:
  *     true if the resolver is exiting and this is the last fctx in the bucket.
  */
-static isc_boolean_t
-maybe_destroy(fetchctx_t *fctx, isc_boolean_t locked) {
+static bool
+maybe_destroy(fetchctx_t *fctx, bool locked) {
        unsigned int bucketnum;
-       isc_boolean_t bucket_empty = ISC_FALSE;
+       bool bucket_empty = false;
        dns_resolver_t *res = fctx->res;
        dns_validator_t *validator, *next_validator;
-       isc_boolean_t dodestroy = ISC_FALSE;
+       bool dodestroy = false;
 
        REQUIRE(SHUTTINGDOWN(fctx));
 
@@ -4778,7 +4778,7 @@ maybe_destroy(fetchctx_t *fctx, isc_boolean_t locked) {
 
        if (fctx->references == 0 && ISC_LIST_EMPTY(fctx->validators)) {
                bucket_empty = fctx_unlink(fctx);
-               dodestroy = ISC_TRUE;
+               dodestroy = true;
        }
  unlock:
        if (!locked)
@@ -4806,9 +4806,9 @@ validated(isc_task_t *task, isc_event_t *event) {
        dns_valarg_t *valarg;
        dns_validatorevent_t *vevent;
        fetchctx_t *fctx;
-       isc_boolean_t chaining;
-       isc_boolean_t negative;
-       isc_boolean_t sentresponse;
+       bool chaining;
+       bool negative;
+       bool sentresponse;
        isc_result_t eresult = ISC_R_SUCCESS;
        isc_result_t result = ISC_R_SUCCESS;
        isc_stdtime_t now;
@@ -4844,9 +4844,9 @@ validated(isc_task_t *task, isc_event_t *event) {
        dns_validator_destroy(&vevent->validator);
        isc_mem_put(fctx->mctx, valarg, sizeof(*valarg));
 
-       negative = ISC_TF(vevent->rdataset == NULL);
+       negative = (vevent->rdataset == NULL);
 
-       sentresponse = ISC_TF((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0);
+       sentresponse = (fctx->options & DNS_FETCHOPT_NOVALIDATE);
 
        /*
         * If shutting down, ignore the results.  Check to see if we're
@@ -4854,8 +4854,8 @@ validated(isc_task_t *task, isc_event_t *event) {
         * so, destroy the fctx.
         */
        if (SHUTTINGDOWN(fctx) && !sentresponse) {
-               isc_boolean_t bucket_empty;
-               bucket_empty = maybe_destroy(fctx, ISC_TRUE);
+               bool bucket_empty;
+               bucket_empty = maybe_destroy(fctx, true);
                UNLOCK(&res->buckets[bucketnum].lock);
                if (bucket_empty)
                        empty_bucket(res);
@@ -4879,9 +4879,9 @@ validated(isc_task_t *task, isc_event_t *event) {
                        INSIST(vevent->rdataset->type == dns_rdatatype_dname);
                        eresult = DNS_R_DNAME;
                }
-               chaining = ISC_TRUE;
+               chaining = true;
        } else
-               chaining = ISC_FALSE;
+               chaining = false;
 
        /*
         * Either we're not shutting down, or we are shutting down but want
@@ -4915,7 +4915,7 @@ validated(isc_task_t *task, isc_event_t *event) {
                        if (vevent->rdataset != NULL)
                                result = dns_db_findnode(fctx->cache,
                                                         vevent->name,
-                                                        ISC_TRUE, &node);
+                                                        true, &node);
                        if (result == ISC_R_SUCCESS)
                                (void)dns_db_deleterdataset(fctx->cache, node,
                                                             NULL,
@@ -4937,7 +4937,7 @@ validated(isc_task_t *task, isc_event_t *event) {
                        if (vevent->rdataset != NULL)
                                result = dns_db_findnode(fctx->cache,
                                                         vevent->name,
-                                                        ISC_TRUE, &node);
+                                                        true, &node);
                        if (result == ISC_R_SUCCESS) {
                                (void)dns_db_addrdataset(fctx->cache, node,
                                                         NULL, now,
@@ -4979,7 +4979,7 @@ validated(isc_task_t *task, isc_event_t *event) {
                                                         fctx->type, &expire);
                        fctx_done(fctx, result, __LINE__); /* Locks bucket. */
                } else
-                       fctx_try(fctx, ISC_TRUE, ISC_TRUE); /* Locks bucket. */
+                       fctx_try(fctx, true, true); /* Locks bucket. */
                return;
        }
 
@@ -4999,7 +4999,7 @@ validated(isc_task_t *task, isc_event_t *event) {
                else
                        covers = fctx->type;
 
-               result = dns_db_findnode(fctx->cache, vevent->name, ISC_TRUE,
+               result = dns_db_findnode(fctx->cache, vevent->name, true,
                                         &node);
                if (result != ISC_R_SUCCESS)
                        goto noanswer_response;
@@ -5056,7 +5056,7 @@ validated(isc_task_t *task, isc_event_t *event) {
         * rdatasets to the first event on the fetch
         * event list.
         */
-       result = dns_db_findnode(fctx->cache, vevent->name, ISC_TRUE, &node);
+       result = dns_db_findnode(fctx->cache, vevent->name, true, &node);
        if (result != ISC_R_SUCCESS)
                goto noanswer_response;
 
@@ -5083,14 +5083,14 @@ validated(isc_task_t *task, isc_event_t *event) {
        }
 
        if (sentresponse) {
-               isc_boolean_t bucket_empty = ISC_FALSE;
+               bool bucket_empty = false;
                /*
                 * If we only deferred the destroy because we wanted to cache
                 * the data, destroy now.
                 */
                dns_db_detachnode(fctx->cache, &node);
                if (SHUTTINGDOWN(fctx))
-                       bucket_empty = maybe_destroy(fctx, ISC_TRUE);
+                       bucket_empty = maybe_destroy(fctx, true);
                UNLOCK(&res->buckets[bucketnum].lock);
                if (bucket_empty)
                        empty_bucket(res);
@@ -5140,7 +5140,7 @@ validated(isc_task_t *task, isc_event_t *event) {
                        if (sigrdataset == NULL ||
                            sigrdataset->trust != dns_trust_secure)
                                continue;
-                       result = dns_db_findnode(fctx->cache, name, ISC_TRUE,
+                       result = dns_db_findnode(fctx->cache, name, true,
                                                 &nsnode);
                        if (result != ISC_R_SUCCESS)
                                continue;
@@ -5284,10 +5284,10 @@ findnoqname(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type,
                dns_message_currentname(fctx->rmessage, section, &nsec);
                for (nrdataset = ISC_LIST_HEAD(nsec->list);
                      nrdataset != NULL; nrdataset = next) {
-                       isc_boolean_t data = ISC_FALSE, exists = ISC_FALSE;
-                       isc_boolean_t optout = ISC_FALSE, unknown = ISC_FALSE;
-                       isc_boolean_t setclosest = ISC_FALSE;
-                       isc_boolean_t setnearest = ISC_FALSE;
+                       bool data = false, exists = false;
+                       bool optout = false, unknown = false;
+                       bool setclosest = false;
+                       bool setnearest = false;
 
                        next = ISC_LIST_NEXT(nrdataset, link);
                        if (nrdataset->type != dns_rdatatype_nsec &&
@@ -5351,16 +5351,16 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
        dns_db_t **adbp = NULL;
        dns_name_t *aname = NULL;
        dns_resolver_t *res = fctx->res;
-       isc_boolean_t need_validation = ISC_FALSE;
-       isc_boolean_t secure_domain = ISC_FALSE;
-       isc_boolean_t have_answer = ISC_FALSE;
+       bool need_validation = false;
+       bool secure_domain = false;
+       bool have_answer = false;
        isc_result_t result, eresult = ISC_R_SUCCESS;
        dns_fetchevent_t *event = NULL;
        unsigned int options;
        isc_task_t *task;
-       isc_boolean_t fail;
+       bool fail;
        unsigned int valoptions = 0;
-       isc_boolean_t checknta = ISC_TRUE;
+       bool checknta = true;
 
        /*
         * The appropriate bucket lock must be held.
@@ -5372,7 +5372,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
         */
        if ((fctx->options & DNS_FETCHOPT_NONTA) != 0) {
                valoptions |= DNS_VALIDATOR_NONTA;
-               checknta = ISC_FALSE;
+               checknta = false;
        }
 
        if (res->view->enablevalidation) {
@@ -5384,7 +5384,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
 
                if (!secure_domain && res->view->dlv != NULL) {
                        valoptions |= DNS_VALIDATOR_DLV;
-                       secure_domain = ISC_TRUE;
+                       secure_domain = true;
                }
        }
 
@@ -5393,7 +5393,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
        }
 
        if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0) {
-               need_validation = ISC_FALSE;
+               need_validation = false;
        } else {
                need_validation = secure_domain;
        }
@@ -5401,7 +5401,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
        if (((name->attributes & DNS_NAMEATTR_ANSWER) != 0) &&
            (!need_validation))
        {
-               have_answer = ISC_TRUE;
+               have_answer = true;
                event = ISC_LIST_HEAD(fctx->events);
                if (event != NULL) {
                        adbp = &event->db;
@@ -5433,7 +5433,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
         * Find or create the cache node.
         */
        node = NULL;
-       result = dns_db_findnode(fctx->cache, name, ISC_TRUE, &node);
+       result = dns_db_findnode(fctx->cache, name, true, &node);
        if (result != ISC_R_SUCCESS) {
                return (result);
        }
@@ -5441,7 +5441,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
        /*
         * Cache or validate each cacheable rdataset.
         */
-       fail = ISC_TF((fctx->res->options & DNS_RESOLVER_CHECKNAMESFAIL) != 0);
+       fail = (fctx->res->options & DNS_RESOLVER_CHECKNAMESFAIL);
        for (rdataset = ISC_LIST_HEAD(name->list);
             rdataset != NULL;
             rdataset = ISC_LIST_NEXT(rdataset, link))
@@ -5869,7 +5869,7 @@ cache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, isc_stdtime_t now)
 static isc_result_t
 ncache_adderesult(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
                  dns_rdatatype_t covers, isc_stdtime_t now, dns_ttl_t maxttl,
-                 isc_boolean_t optout, isc_boolean_t secure,
+                 bool optout, bool secure,
                  dns_rdataset_t *ardataset, isc_result_t *eresultp)
 {
        isc_result_t result;
@@ -5929,21 +5929,21 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        dns_db_t **adbp;
        dns_dbnode_t *node, **anodep;
        dns_rdataset_t *ardataset;
-       isc_boolean_t need_validation, secure_domain;
+       bool need_validation, secure_domain;
        dns_name_t *aname;
        dns_fetchevent_t *event;
        uint32_t ttl;
        unsigned int valoptions = 0;
-       isc_boolean_t checknta = ISC_TRUE;
+       bool checknta = true;
 
        FCTXTRACE("ncache_message");
 
        fctx->attributes &= ~FCTX_ATTR_WANTNCACHE;
 
        res = fctx->res;
-       need_validation = ISC_FALSE;
+       need_validation = false;
        POST(need_validation);
-       secure_domain = ISC_FALSE;
+       secure_domain = false;
        eresult = ISC_R_SUCCESS;
        name = &fctx->name;
        node = NULL;
@@ -5959,7 +5959,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
         */
        if ((fctx->options & DNS_FETCHOPT_NONTA) != 0) {
                valoptions |= DNS_VALIDATOR_NONTA;
-               checknta = ISC_FALSE;
+               checknta = false;
        }
 
        if (fctx->res->view->enablevalidation) {
@@ -5970,7 +5970,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
 
                if (!secure_domain && res->view->dlv != NULL) {
                        valoptions |= DNS_VALIDATOR_DLV;
-                       secure_domain = ISC_TRUE;
+                       secure_domain = true;
                }
        }
 
@@ -5978,7 +5978,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
                valoptions |= DNS_VALIDATOR_NOCDFLAG;
 
        if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
-               need_validation = ISC_FALSE;
+               need_validation = false;
        else
                need_validation = secure_domain;
 
@@ -6043,7 +6043,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        } else
                event = NULL;
 
-       result = dns_db_findnode(fctx->cache, name, ISC_TRUE, &node);
+       result = dns_db_findnode(fctx->cache, name, true, &node);
        if (result != ISC_R_SUCCESS)
                goto unlock;
 
@@ -6059,8 +6059,8 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
                ttl = 0;
 
        result = ncache_adderesult(fctx->rmessage, fctx->cache, node,
-                                  covers, now, ttl, ISC_FALSE,
-                                  ISC_FALSE, ardataset, &eresult);
+                                  covers, now, ttl, false,
+                                  false, ardataset, &eresult);
        if (result != ISC_R_SUCCESS)
                goto unlock;
 
@@ -6090,7 +6090,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
 
 static inline void
 mark_related(dns_name_t *name, dns_rdataset_t *rdataset,
-            isc_boolean_t external, isc_boolean_t gluing)
+            bool external, bool gluing)
 {
        name->attributes |= DNS_NAMEATTR_CACHE;
        if (gluing) {
@@ -6123,9 +6123,9 @@ check_section(void *arg, dns_name_t *addname, dns_rdatatype_t type,
        isc_result_t result;
        dns_name_t *name = NULL;
        dns_rdataset_t *rdataset = NULL;
-       isc_boolean_t external;
+       bool external;
        dns_rdatatype_t rtype;
-       isc_boolean_t gluing;
+       bool gluing;
 
        REQUIRE(VALID_FCTX(fctx));
 
@@ -6134,14 +6134,14 @@ check_section(void *arg, dns_name_t *addname, dns_rdatatype_t type,
                return (ISC_R_SUCCESS);
 #endif
 
-       gluing = ISC_TF(GLUING(fctx) ||
-                       (fctx->type == dns_rdatatype_ns &&
-                        dns_name_equal(&fctx->name, dns_rootname)));
+       gluing = (GLUING(fctx) ||
+                 (fctx->type == dns_rdatatype_ns &&
+                  dns_name_equal(&fctx->name, dns_rootname)));
 
        result = dns_message_findname(fctx->rmessage, section, addname,
                                      dns_rdatatype_any, 0, &name, NULL);
        if (result == ISC_R_SUCCESS) {
-               external = ISC_TF(!dns_name_issubdomain(name, &fctx->domain));
+               external = !dns_name_issubdomain(name, &fctx->domain);
                if (type == dns_rdatatype_a) {
                        for (rdataset = ISC_LIST_HEAD(name->list);
                             rdataset != NULL;
@@ -6194,12 +6194,12 @@ check_answer(void *arg, dns_name_t *addname, dns_rdatatype_t type) {
 
 static void
 chase_additional(fetchctx_t *fctx) {
-       isc_boolean_t rescan;
+       bool rescan;
        dns_section_t section = DNS_SECTION_ADDITIONAL;
        isc_result_t result;
 
  again:
-       rescan = ISC_FALSE;
+       rescan = false;
 
        for (result = dns_message_firstname(fctx->rmessage, section);
             result == ISC_R_SUCCESS;
@@ -6219,7 +6219,7 @@ chase_additional(fetchctx_t *fctx) {
                                (void)dns_rdataset_additionaldata(rdataset,
                                                                  check_related,
                                                                  fctx);
-                               rescan = ISC_TRUE;
+                               rescan = true;
                        }
                }
        }
@@ -6227,7 +6227,7 @@ chase_additional(fetchctx_t *fctx) {
                goto again;
 }
 
-static isc_boolean_t
+static bool
 is_answeraddress_allowed(dns_view_t *view, dns_name_t *name,
                         dns_rdataset_t *rdataset)
 {
@@ -6244,7 +6244,7 @@ is_answeraddress_allowed(dns_view_t *view, dns_name_t *name,
 
        /* By default, we allow any addresses. */
        if (view->denyansweracl == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * If the owner name matches one in the exclusion list, either exactly
@@ -6257,7 +6257,7 @@ is_answeraddress_allowed(dns_view_t *view, dns_name_t *name,
                                          &node, NULL, 0, NULL, NULL);
 
                if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
        /*
@@ -6294,16 +6294,16 @@ is_answeraddress_allowed(dns_view_t *view, dns_name_t *name,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
                                      "answer address %s denied for %s/%s/%s",
                                      addrbuf, namebuf, typebuf, classbuf);
-                       return (ISC_FALSE);
+                       return (false);
                }
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
-                       dns_rdataset_t *rdataset, isc_boolean_t *chainingp)
+                       dns_rdataset_t *rdataset, bool *chainingp)
 {
        isc_result_t result;
        dns_rbtnode_t *node = NULL;
@@ -6330,7 +6330,7 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
         * If newqname != NULL we also need to extract the newqname.
         */
        if (chainingp == NULL && view->denyanswernames == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        result = dns_rdataset_first(rdataset);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
@@ -6345,7 +6345,7 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
                if (dns_name_fullcompare(qname, rname, &order, &nlabels) !=
                    dns_namereln_subdomain)
                {
-                       return (ISC_TRUE);
+                       return (true);
                }
                result = dns_rdata_tostruct(&rdata, &dname, NULL);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
@@ -6357,9 +6357,9 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
                                              NULL);
                if (result == DNS_R_NAMETOOLONG) {
                        if (chainingp != NULL) {
-                               *chainingp = ISC_TRUE;
+                               *chainingp = true;
                        }
-                       return (ISC_TRUE);
+                       return (true);
                }
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                break;
@@ -6368,10 +6368,10 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
        }
 
        if (chainingp != NULL)
-               *chainingp = ISC_TRUE;
+               *chainingp = true;
 
        if (view->denyanswernames == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * If the owner name matches one in the exclusion list, either exactly
@@ -6381,14 +6381,14 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
                result = dns_rbt_findnode(view->answernames_exclude, qname,
                                          NULL, &node, NULL, 0, NULL, NULL);
                if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
        /*
         * If the target name is a subdomain of the search domain, allow it.
         */
        if (dns_name_issubdomain(tname, &fctx->domain))
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Otherwise, apply filters.
@@ -6405,10 +6405,10 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
                              DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
                              "%s target %s denied for %s/%s",
                              typebuf, tnamebuf, qnamebuf, classbuf);
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -6449,7 +6449,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
        dns_message_t *message;
        dns_name_t *name, *qname, *ns_name, *soa_name, *ds_name, *save_name;
        dns_rdataset_t *rdataset, *ns_rdataset;
-       isc_boolean_t aa, negative_response;
+       bool aa, negative_response;
        dns_rdatatype_t type, save_type;
        dns_section_t section;
 
@@ -6472,9 +6472,9 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
                 * referral.
                 */
                if ((message->flags & DNS_MESSAGEFLAG_AA) != 0)
-                       aa = ISC_TRUE;
+                       aa = true;
                else
-                       aa = ISC_FALSE;
+                       aa = false;
                qname = &fctx->name;
        } else {
                /*
@@ -6482,7 +6482,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
                 * followed a CNAME/DNAME chain.
                 */
                qname = oqname;
-               aa = ISC_FALSE;
+               aa = false;
                /*
                 * If the current qname is not a subdomain of the query
                 * domain, there's no point in looking at the authority
@@ -6504,11 +6504,11 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
         * Sometimes we can tell if its a negative response by looking at
         * the message header.
         */
-       negative_response = ISC_FALSE;
+       negative_response = false;
        if (message->rcode == dns_rcode_nxdomain ||
            (message->counts[DNS_SECTION_ANSWER] == 0 &&
             message->counts[DNS_SECTION_AUTHORITY] == 0))
-               negative_response = ISC_TRUE;
+               negative_response = true;
 
        /*
         * Process the authority section.
@@ -6634,7 +6634,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
         * the NS RRset is allowed (Type 4).
         */
        if (soa_name != NULL)
-               negative_response = ISC_TRUE;
+               negative_response = true;
 
        result = dns_message_firstname(message, section);
        while (result == ISC_R_SUCCESS) {
@@ -6864,11 +6864,11 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
                result = dns_name_dup(ns_name, fctx->mctx, &fctx->domain);
                if (result != ISC_R_SUCCESS)
                        return (result);
-               result = fcount_incr(fctx, ISC_TRUE);
+               result = fcount_incr(fctx, true);
                if (result != ISC_R_SUCCESS)
                        return (result);
                fctx->attributes |= FCTX_ATTR_WANTCACHE;
-               fctx->ns_ttl_ok = ISC_FALSE;
+               fctx->ns_ttl_ok = false;
                log_ns_ttl(fctx, "DELEGATION");
                return (DNS_R_DELEGATION);
        }
@@ -6886,7 +6886,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname,
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 validinanswer(dns_rdataset_t *rdataset, fetchctx_t *fctx) {
        if (rdataset->type == dns_rdatatype_nsec3) {
                /*
@@ -6894,7 +6894,7 @@ validinanswer(dns_rdataset_t *rdataset, fetchctx_t *fctx) {
                 * appear in the answer section.
                 */
                log_formerr(fctx, "NSEC3 in answer");
-               return (ISC_FALSE);
+               return (false);
        }
        if (rdataset->type == dns_rdatatype_tkey) {
                /*
@@ -6902,13 +6902,13 @@ validinanswer(dns_rdataset_t *rdataset, fetchctx_t *fctx) {
                 * response to any query we can make.
                 */
                log_formerr(fctx, "TKEY in answer");
-               return (ISC_FALSE);
+               return (false);
        }
        if (rdataset->rdclass != fctx->res->rdclass) {
                log_formerr(fctx, "Mismatched class in answer");
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
@@ -6920,9 +6920,9 @@ answer_response(fetchctx_t *fctx) {
        dns_rdataset_t *rdataset = NULL, *sigrdataset = NULL;
        dns_rdataset_t *ardataset = NULL, *crdataset = NULL;
        dns_rdataset_t *drdataset = NULL, *ns_rdataset = NULL;
-       isc_boolean_t done = ISC_FALSE, aa;
+       bool done = false, aa;
        unsigned int dname_labels, domain_labels;
-       isc_boolean_t chaining = ISC_FALSE;
+       bool chaining = false;
        dns_rdatatype_t type;
        dns_view_t *view = NULL;
        dns_trust_t trust;
@@ -7032,7 +7032,7 @@ answer_response(fetchctx_t *fctx) {
                crdataset = NULL;
        }
 
-       aa = ISC_TF((message->flags & DNS_MESSAGEFLAG_AA) != 0);
+       aa = (message->flags & DNS_MESSAGEFLAG_AA);
        trust = aa ? dns_trust_authanswer : dns_trust_answer;
 
        if (aname != NULL && type == dns_rdatatype_any) {
@@ -7149,7 +7149,7 @@ answer_response(fetchctx_t *fctx) {
                        sigrdataset->trust = trust;
                        break;
                }
-               chaining = ISC_TRUE;
+               chaining = true;
        } else if (dname != NULL) {
                if (!validinanswer(drdataset, fctx)) {
                        return (DNS_R_FORMERR);
@@ -7217,10 +7217,10 @@ answer_response(fetchctx_t *fctx) {
         */
        result = dns_message_firstname(message, DNS_SECTION_AUTHORITY);
        while (!done && result == ISC_R_SUCCESS) {
-               isc_boolean_t external;
+               bool external;
                name = NULL;
                dns_message_currentname(message, DNS_SECTION_AUTHORITY, &name);
-               external = ISC_TF(!dns_name_issubdomain(name, &fctx->domain));
+               external = !dns_name_issubdomain(name, &fctx->domain);
                if (!external) {
                        /*
                         * We expect to find NS or SIG NS rdatasets, and
@@ -7257,7 +7257,7 @@ answer_response(fetchctx_t *fctx) {
                                                        rdataset,
                                                        check_related,
                                                        fctx);
-                                       done = ISC_TRUE;
+                                       done = true;
                                }
                        }
                }
@@ -7284,9 +7284,9 @@ fctx_increference(fetchctx_t *fctx) {
        UNLOCK(&fctx->res->buckets[fctx->bucketnum].lock);
 }
 
-static isc_boolean_t
+static bool
 fctx_decreference(fetchctx_t *fctx) {
-       isc_boolean_t bucket_empty = ISC_FALSE;
+       bool bucket_empty = false;
 
        REQUIRE(VALID_FCTX(fctx));
 
@@ -7320,8 +7320,8 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
        dns_resolver_t *res;
        fetchctx_t *fctx;
        isc_result_t result;
-       isc_boolean_t bucket_empty;
-       isc_boolean_t locked = ISC_FALSE;
+       bool bucket_empty;
+       bool locked = false;
        unsigned int bucketnum;
        dns_rdataset_t nameservers;
        dns_fixedname_t fixed;
@@ -7370,7 +7370,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
                }
                dns_rdataset_clone(fevent->rdataset, &fctx->nameservers);
                fctx->ns_ttl = fctx->nameservers.ttl;
-               fctx->ns_ttl_ok = ISC_TRUE;
+               fctx->ns_ttl_ok = true;
                log_ns_ttl(fctx, "resume_dslookup");
 
                if (dns_rdataset_isassociated(fevent->rdataset)) {
@@ -7387,7 +7387,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
                        fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
                        goto cleanup;
                }
-               result = fcount_incr(fctx, ISC_TRUE);
+               result = fcount_incr(fctx, true);
                if (result != ISC_R_SUCCESS) {
                        fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
                        goto cleanup;
@@ -7395,7 +7395,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
                /*
                 * Try again.
                 */
-               fctx_try(fctx, ISC_TRUE, ISC_FALSE);
+               fctx_try(fctx, true, false);
        } else {
                unsigned int n;
                dns_rdataset_t *nsrdataset = NULL;
@@ -7453,7 +7453,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
                        fctx_done(fctx, result, __LINE__);
                } else {
                        LOCK(&res->buckets[bucketnum].lock);
-                       locked = ISC_TRUE;
+                       locked = true;
                        fctx->references++;
                }
        }
@@ -7493,7 +7493,7 @@ checknamessection(dns_message_t *message, dns_section_t section) {
                                dns_rdataset_current(rdataset, &rdata);
                                if (!dns_rdata_checkowner(name, rdata.rdclass,
                                                          rdata.type,
-                                                         ISC_FALSE) ||
+                                                         false) ||
                                    !dns_rdata_checknames(&rdata, name, NULL))
                                {
                                        rdataset->attributes |=
@@ -7566,17 +7566,17 @@ log_nsid(isc_buffer_t *opt, size_t nsid_len, resquery_t *query,
                isc_mem_put(mctx, buf, buflen);
 }
 
-static isc_boolean_t
+static bool
 iscname(fetchctx_t *fctx) {
        isc_result_t result;
 
        result = dns_message_findname(fctx->rmessage, DNS_SECTION_ANSWER,
                                      &fctx->name, dns_rdatatype_cname, 0,
                                      NULL, NULL);
-       return (result == ISC_R_SUCCESS ? ISC_TRUE : ISC_FALSE);
+       return (result == ISC_R_SUCCESS ? true : false);
 }
 
-static isc_boolean_t
+static bool
 betterreferral(fetchctx_t *fctx) {
        isc_result_t result;
        dns_name_t *name;
@@ -7594,9 +7594,9 @@ betterreferral(fetchctx_t *fctx) {
                     rdataset != NULL;
                     rdataset = ISC_LIST_NEXT(rdataset, link))
                        if (rdataset->type == dns_rdatatype_ns)
-                               return (ISC_TRUE);
+                               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -7609,8 +7609,8 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
        unsigned char *optvalue;
        dns_adbaddrinfo_t *addrinfo;
        unsigned char cookie[8];
-       isc_boolean_t seen_cookie = ISC_FALSE;
-       isc_boolean_t seen_nsid = ISC_FALSE;
+       bool seen_cookie = false;
+       bool seen_nsid = false;
 
        result = dns_rdataset_first(opt);
        if (result == ISC_R_SUCCESS) {
@@ -7630,7 +7630,7 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
                                                 ISC_LOG_DEBUG(3),
                                                 query->fctx->res->mctx);
                                isc_buffer_forward(&optbuf, optlen);
-                               seen_nsid = ISC_TRUE;
+                               seen_nsid = true;
                                break;
                        case DNS_OPT_COOKIE:
                                /*
@@ -7658,7 +7658,7 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
                                isc_buffer_forward(&optbuf, optlen);
                                inc_stats(query->fctx->res,
                                          dns_resstatscounter_cookiein);
-                               seen_cookie = ISC_TRUE;
+                               seen_cookie = true;
                                break;
                        default:
                                isc_buffer_forward(&optbuf, optlen);
@@ -7674,8 +7674,8 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        isc_result_t result = ISC_R_SUCCESS;
        resquery_t *query = event->ev_arg;
        dns_dispatchevent_t *devent = (dns_dispatchevent_t *)event;
-       isc_boolean_t keep_trying, get_nameservers, resend, nextitem;
-       isc_boolean_t truncated;
+       bool keep_trying, get_nameservers, resend, nextitem;
+       bool truncated;
        dns_message_t *message;
        dns_rdataset_t *opt;
        fetchctx_t *fctx;
@@ -7688,10 +7688,10 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        unsigned int findoptions;
        isc_result_t broken_server;
        badnstype_t broken_type = badns_response;
-       isc_boolean_t no_response;
+       bool no_response;
        unsigned int bucketnum;
        dns_resolver_t *res;
-       isc_boolean_t bucket_empty;
+       bool bucket_empty;
 #ifdef HAVE_DNSTAP
        isc_socket_t *sock = NULL;
        isc_sockaddr_t localaddr, *la = NULL;
@@ -7718,14 +7718,14 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
 
        (void)isc_timer_touch(fctx->timer);
 
-       keep_trying = ISC_FALSE;
+       keep_trying = false;
        broken_server = ISC_R_SUCCESS;
-       get_nameservers = ISC_FALSE;
-       resend = ISC_FALSE;
-       nextitem = ISC_FALSE;
-       truncated = ISC_FALSE;
+       get_nameservers = false;
+       resend = false;
+       nextitem = false;
+       truncated = false;
        finish = NULL;
-       no_response = ISC_FALSE;
+       no_response = false;
 
        if (res->exiting) {
                result = ISC_R_SHUTTINGDOWN;
@@ -7734,7 +7734,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        }
 
        fctx->timeouts = 0;
-       fctx->timeout = ISC_FALSE;
+       fctx->timeout = false;
        fctx->addrinfo = query->addrinfo;
 
        /*
@@ -7758,13 +7758,13 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                         * off and try again.
                         */
                        options |= DNS_FETCHOPT_NOEDNS0;
-                       resend = ISC_TRUE;
+                       resend = true;
                        add_bad_edns(fctx, &query->addrinfo->sockaddr);
                } else {
                        /*
                         * There's no hope for this query.
                         */
-                       keep_trying = ISC_TRUE;
+                       keep_trying = true;
 
                        /*
                         * If this is a network error on an exclusive query
@@ -7781,7 +7781,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                    broken_server = devent->result;
                                    broken_type = badns_unreachable;
                                    finish = NULL;
-                                   no_response = ISC_TRUE;
+                                   no_response = true;
                        }
                }
                FCTXTRACE3("dispatcher failure", devent->result);
@@ -7840,14 +7840,14 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                         * off and try again.
                                         */
                                        options |= DNS_FETCHOPT_NOEDNS0;
-                                       resend = ISC_TRUE;
+                                       resend = true;
                                        add_bad_edns(fctx,
                                                    &query->addrinfo->sockaddr);
                                        inc_stats(res,
                                                 dns_resstatscounter_edns0fail);
                                } else {
                                        broken_server = result;
-                                       keep_trying = ISC_TRUE;
+                                       keep_trying = true;
                                }
                                goto done;
                        }
@@ -7855,7 +7855,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                         * We defer retrying via TCP for a bit so we can
                         * check out this message further.
                         */
-                       truncated = ISC_TRUE;
+                       truncated = true;
                        break;
                case DNS_R_FORMERR:
                        if ((query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
@@ -7865,12 +7865,12 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                 * off and try again.
                                 */
                                options |= DNS_FETCHOPT_NOEDNS0;
-                               resend = ISC_TRUE;
+                               resend = true;
                                add_bad_edns(fctx, &query->addrinfo->sockaddr);
                                inc_stats(res, dns_resstatscounter_edns0fail);
                        } else {
                                broken_server = DNS_R_UNEXPECTEDRCODE;
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                        }
                        goto done;
                default:
@@ -7926,12 +7926,12 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        }
 
        dns_dt_send(res->view, dtmsgtype, la, &query->addrinfo->sockaddr,
-                   ISC_TF((query->options & DNS_FETCHOPT_TCP) != 0),
+                   (query->options & DNS_FETCHOPT_TCP)),
                    &zr, &query->start, NULL, &devent->buffer);
 #endif /* HAVE_DNSTAP */
 
        if (message->rdclass != res->rdclass) {
-               resend = ISC_TRUE;
+               resend = true;
                FCTXTRACE("bad class");
                goto done;
        }
@@ -7948,7 +7948,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                 * If the COOKIE is bad, assume it is an attack and
                 * keep listening for a good answer.
                 */
-               nextitem = ISC_TRUE;
+               nextitem = true;
                if (isc_log_wouldlog(dns_lctx, ISC_LOG_INFO)) {
                        char addrbuf[ISC_SOCKADDR_FORMATSIZE];
                        isc_sockaddr_format(&query->addrinfo->sockaddr,
@@ -7983,7 +7983,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                result = same_question(fctx);
                if (result != ISC_R_SUCCESS) {
                        FCTXTRACE3("response did not match question", result);
-                       nextitem = ISC_TRUE;
+                       nextitem = true;
                        goto done;
                }
                break;
@@ -8078,16 +8078,16 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
         * Deal with truncated responses by retrying using TCP.
         */
        if ((message->flags & DNS_MESSAGEFLAG_TC) != 0)
-               truncated = ISC_TRUE;
+               truncated = true;
 
        if (truncated) {
                inc_stats(res, dns_resstatscounter_truncated);
                if ((options & DNS_FETCHOPT_TCP) != 0) {
                        broken_server = DNS_R_TRUNCATEDTCP;
-                       keep_trying = ISC_TRUE;
+                       keep_trying = true;
                } else {
                        options |= DNS_FETCHOPT_TCP;
-                       resend = ISC_TRUE;
+                       resend = true;
                }
                FCTXTRACE3("message truncated", result);
                goto done;
@@ -8099,7 +8099,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        if (message->opcode != dns_opcode_query) {
                /* XXXRTH Log */
                broken_server = DNS_R_UNEXPECTEDOPCODE;
-               keep_trying = ISC_TRUE;
+               keep_trying = true;
                FCTXTRACE("invalid message opcode");
                goto done;
        }
@@ -8155,7 +8155,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        dns_adb_changeflags(fctx->adb, query->addrinfo,
                                            FCTX_ADDRINFO_NOCOOKIE,
                                            FCTX_ADDRINFO_NOCOOKIE);
-                       resend = ISC_TRUE;
+                       resend = true;
                } else if ((message->rcode == dns_rcode_formerr ||
                            message->rcode == dns_rcode_notimp ||
                            (message->rcode == dns_rcode_servfail &&
@@ -8173,7 +8173,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                         *              if so, we should bail out.
                         */
                        options |= DNS_FETCHOPT_NOEDNS0;
-                       resend = ISC_TRUE;
+                       resend = true;
                        /*
                         * Remember that they may not like EDNS0.
                         */
@@ -8186,7 +8186,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                 * but other forwarders might.  Keep trying.
                                 */
                                broken_server = DNS_R_REMOTEFORMERR;
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                        } else {
                                /*
                                 * The server doesn't understand us.  Since
@@ -8201,7 +8201,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        }
                } else if (message->rcode == dns_rcode_badvers) {
                        unsigned int version;
-                       isc_boolean_t setnocookie = ISC_FALSE;
+                       bool setnocookie = false;
 #if DNS_EDNS_VERSION > 0
                        unsigned int flags, mask;
 #endif
@@ -8216,7 +8216,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        if (dns_adb_getcookie(fctx->adb, query->addrinfo,
                                              cookie, sizeof(cookie)) == 0U) {
                                if (!NOCOOKIE(query->addrinfo))
-                                       setnocookie = ISC_TRUE;
+                                       setnocookie = true;
                                dns_adb_changeflags(fctx->adb, query->addrinfo,
                                                    FCTX_ADDRINFO_NOCOOKIE,
                                                    FCTX_ADDRINFO_NOCOOKIE);
@@ -8253,17 +8253,17 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        if ((int)version < query->ednsversion) {
                                dns_adb_changeflags(fctx->adb, query->addrinfo,
                                                    flags, mask);
-                               resend = ISC_TRUE;
+                               resend = true;
                        } else {
                                broken_server = DNS_R_BADVERS;
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                        }
 #else
                        if (version == 0U && setnocookie) {
-                               resend = ISC_TRUE;
+                               resend = true;
                        } else {
                                broken_server = DNS_R_BADVERS;
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                        }
 #endif
                } else if (message->rcode == dns_rcode_badcookie &&
@@ -8274,14 +8274,14 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        if (BADCOOKIE(query->addrinfo))
                                query->options |= DNS_FETCHOPT_TCP;
                        query->addrinfo->flags |= FCTX_ADDRINFO_BADCOOKIE;
-                       resend = ISC_TRUE;
+                       resend = true;
                } else {
                        /*
                         * XXXRTH log.
                         */
                        broken_server = DNS_R_UNEXPECTEDRCODE;
                        INSIST(broken_server != ISC_R_SUCCESS);
-                       keep_trying = ISC_TRUE;
+                       keep_trying = true;
                }
 
                isc_buffer_init(&b, code, sizeof(code) - 1);
@@ -8307,7 +8307,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                      "could not mark server as lame: %s",
                                      isc_result_totext(result));
                broken_server = DNS_R_LAME;
-               keep_trying = ISC_TRUE;
+               keep_trying = true;
                FCTXTRACE("lame server");
                goto done;
        }
@@ -8429,14 +8429,14 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                 * some more elaborate course of action.
                                 */
                                broken_server = DNS_R_LAME;
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                                goto done;
                        }
                        goto force_referral;
                }
                if (result != ISC_R_SUCCESS) {
                        if (result == DNS_R_FORMERR)
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                        goto done;
                }
        } else if (message->counts[DNS_SECTION_AUTHORITY] > 0 ||
@@ -8456,8 +8456,8 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                         * We don't have the answer, but we know a better
                         * place to look.
                         */
-                       get_nameservers = ISC_TRUE;
-                       keep_trying = ISC_TRUE;
+                       get_nameservers = true;
+                       keep_trying = true;
                        /*
                         * We have a new set of name servers, and it
                         * has not experienced any restarts yet.
@@ -8483,7 +8483,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                         * Something has gone wrong.
                         */
                        if (result == DNS_R_FORMERR)
-                               keep_trying = ISC_TRUE;
+                               keep_trying = true;
                        FCTXTRACE3("noanswer_response", result);
                        goto done;
                }
@@ -8493,7 +8493,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                 */
                /* XXXRTH Log */
                broken_server = DNS_R_UNEXPECTEDRCODE;
-               keep_trying = ISC_TRUE;
+               keep_trying = true;
                FCTXTRACE("broken server: unexpected rcode");
                goto done;
        }
@@ -8557,7 +8557,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
         */
        if (!nextitem)
                fctx_cancelquery(&query, &devent, finish,
-                                no_response, ISC_FALSE);
+                                no_response, false);
 
 #ifdef ENABLE_AFL
        if (dns_fuzzing_resolver && (keep_trying || resend)) {
@@ -8593,7 +8593,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                        result = dns_view_findzonecut(res->view,
                                                      name, fname,
                                                      now, findoptions,
-                                                     ISC_TRUE,
+                                                     true,
                                                      &fctx->nameservers,
                                                      NULL);
                        if (result != ISC_R_SUCCESS) {
@@ -8619,14 +8619,14 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                                fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
                                return;
                        }
-                       result = fcount_incr(fctx, ISC_TRUE);
+                       result = fcount_incr(fctx, true);
                        if (result != ISC_R_SUCCESS) {
                                fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
                                return;
                        }
                        fctx->ns_ttl = fctx->nameservers.ttl;
-                       fctx->ns_ttl_ok = ISC_TRUE;
-                       fctx_cancelqueries(fctx, ISC_TRUE, ISC_FALSE);
+                       fctx->ns_ttl_ok = true;
+                       fctx_cancelqueries(fctx, true, false);
                        fctx_cleanupfinds(fctx);
                        fctx_cleanupaltfinds(fctx);
                        fctx_cleanupforwaddrs(fctx);
@@ -8635,7 +8635,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                /*
                 * Try again.
                 */
-               fctx_try(fctx, !get_nameservers, ISC_FALSE);
+               fctx_try(fctx, !get_nameservers, false);
        } else if (resend) {
                /*
                 * Resend (probably with changed options).
@@ -8670,7 +8670,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                 * DNSSEC validator to validate the answer.
                 */
                FCTXTRACE("wait for validator");
-               fctx_cancelqueries(fctx, ISC_TRUE, ISC_FALSE);
+               fctx_cancelqueries(fctx, true, false);
                /*
                 * We must not retransmit while the validator is working;
                 * it has references to the current rmessage.
@@ -8681,7 +8681,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
        } else if (result == DNS_R_CHASEDSSERVERS) {
                unsigned int n;
                add_bad(fctx, addrinfo, result, broken_type);
-               fctx_cancelqueries(fctx, ISC_TRUE, ISC_FALSE);
+               fctx_cancelqueries(fctx, true, false);
                fctx_cleanupfinds(fctx);
                fctx_cleanupforwaddrs(fctx);
 
@@ -8812,7 +8812,7 @@ spillattimer_countdown(isc_task_t *task, isc_event_t *event) {
        dns_resolver_t *res = event->ev_arg;
        isc_result_t result;
        unsigned int count;
-       isc_boolean_t logit = ISC_FALSE;
+       bool logit = false;
 
        REQUIRE(VALID_RESOLVER(res));
 
@@ -8822,12 +8822,12 @@ spillattimer_countdown(isc_task_t *task, isc_event_t *event) {
        INSIST(!res->exiting);
        if (res->spillat > res->spillatmin) {
                res->spillat--;
-               logit = ISC_TRUE;
+               logit = true;
        }
        if (res->spillat <= res->spillatmin) {
                result = isc_timer_reset(res->spillattimer,
                                         isc_timertype_inactive, NULL,
-                                        NULL, ISC_TRUE);
+                                        NULL, true);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
        }
        count = res->spillat;
@@ -8895,7 +8895,7 @@ dns_resolver_create(dns_view_t *view,
        res->spillatmax = 100;
        res->spillattimer = NULL;
        res->zspill = 0;
-       res->zero_no_soa_ttl = ISC_FALSE;
+       res->zero_no_soa_ttl = false;
        res->query_timeout = DEFAULT_QUERY_TIMEOUT;
        res->maxdepth = DEFAULT_RECURSION_DEPTH;
        res->maxqueries = DEFAULT_MAX_QUERIES;
@@ -8942,7 +8942,7 @@ dns_resolver_create(dns_view_t *view,
 #endif
                isc_task_setname(res->buckets[i].task, name, res);
                ISC_LIST_INIT(res->buckets[i].fctxs);
-               res->buckets[i].exiting = ISC_FALSE;
+               res->buckets[i].exiting = false;
                buckets_created++;
        }
 
@@ -8969,8 +8969,7 @@ dns_resolver_create(dns_view_t *view,
                dns_dispatchset_create(view->mctx, socketmgr, taskmgr,
                                       dispatchv4, &res->dispatches4, ndisp);
                dispattr = dns_dispatch_getattributes(dispatchv4);
-               res->exclusivev4 =
-                       ISC_TF((dispattr & DNS_DISPATCHATTR_EXCLUSIVE) != 0);
+               res->exclusivev4 = (dispattr & DNS_DISPATCHATTR_EXCLUSIVE);
        }
 
        res->dispatches6 = NULL;
@@ -8978,17 +8977,16 @@ dns_resolver_create(dns_view_t *view,
                dns_dispatchset_create(view->mctx, socketmgr, taskmgr,
                                       dispatchv6, &res->dispatches6, ndisp);
                dispattr = dns_dispatch_getattributes(dispatchv6);
-               res->exclusivev6 =
-                       ISC_TF((dispattr & DNS_DISPATCHATTR_EXCLUSIVE) != 0);
+               res->exclusivev6 = (dispattr & DNS_DISPATCHATTR_EXCLUSIVE);
        }
 
        res->querydscp4 = -1;
        res->querydscp6 = -1;
        res->references = 1;
-       res->exiting = ISC_FALSE;
-       res->frozen = ISC_FALSE;
+       res->exiting = false;
+       res->frozen = false;
        ISC_LIST_INIT(res->whenshutdown);
-       res->priming = ISC_FALSE;
+       res->priming = false;
        res->primefetch = NULL;
        res->nfctx = 0;
 
@@ -9108,7 +9106,7 @@ prime_done(isc_task_t *task, isc_event_t *event) {
        LOCK(&res->lock);
 
        INSIST(res->priming);
-       res->priming = ISC_FALSE;
+       res->priming = false;
        LOCK(&res->primelock);
        fetch = res->primefetch;
        res->primefetch = NULL;
@@ -9139,7 +9137,7 @@ prime_done(isc_task_t *task, isc_event_t *event) {
 
 void
 dns_resolver_prime(dns_resolver_t *res) {
-       isc_boolean_t want_priming = ISC_FALSE;
+       bool want_priming = false;
        dns_rdataset_t *rdataset;
        isc_result_t result;
 
@@ -9152,8 +9150,8 @@ dns_resolver_prime(dns_resolver_t *res) {
 
        if (!res->exiting && !res->priming) {
                INSIST(res->primefetch == NULL);
-               res->priming = ISC_TRUE;
-               want_priming = ISC_TRUE;
+               res->priming = true;
+               want_priming = true;
        }
 
        UNLOCK(&res->lock);
@@ -9174,7 +9172,7 @@ dns_resolver_prime(dns_resolver_t *res) {
                        LOCK(&res->lock);
                        INSIST(res->priming);
                        INSIST(res->primefetch == NULL);
-                       res->priming = ISC_FALSE;
+                       res->priming = false;
                        UNLOCK(&res->lock);
                        return;
                }
@@ -9192,7 +9190,7 @@ dns_resolver_prime(dns_resolver_t *res) {
                        isc_mem_put(res->mctx, rdataset, sizeof(*rdataset));
                        LOCK(&res->lock);
                        INSIST(res->priming);
-                       res->priming = ISC_FALSE;
+                       res->priming = false;
                        UNLOCK(&res->lock);
                }
        }
@@ -9206,7 +9204,7 @@ dns_resolver_freeze(dns_resolver_t *res) {
 
        REQUIRE(VALID_RESOLVER(res));
 
-       res->frozen = ISC_TRUE;
+       res->frozen = true;
 }
 
 void
@@ -9271,7 +9269,7 @@ dns_resolver_shutdown(dns_resolver_t *res) {
 
        if (!res->exiting) {
                RTRACE("exiting");
-               res->exiting = ISC_TRUE;
+               res->exiting = true;
 
                for (i = 0; i < res->nbuckets; i++) {
                        LOCK(&res->buckets[i].lock);
@@ -9287,7 +9285,7 @@ dns_resolver_shutdown(dns_resolver_t *res) {
                                dns_dispatchset_cancelall(res->dispatches6,
                                                          res->buckets[i].task);
                        }
-                       res->buckets[i].exiting = ISC_TRUE;
+                       res->buckets[i].exiting = true;
                        if (ISC_LIST_EMPTY(res->buckets[i].fctxs)) {
                                INSIST(res->activebuckets > 0);
                                res->activebuckets--;
@@ -9298,7 +9296,7 @@ dns_resolver_shutdown(dns_resolver_t *res) {
                        send_shutdown_events(res);
                result = isc_timer_reset(res->spillattimer,
                                         isc_timertype_inactive, NULL,
-                                        NULL, ISC_TRUE);
+                                        NULL, true);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
        }
 
@@ -9308,7 +9306,7 @@ dns_resolver_shutdown(dns_resolver_t *res) {
 void
 dns_resolver_detach(dns_resolver_t **resp) {
        dns_resolver_t *res;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(resp != NULL);
        res = *resp;
@@ -9322,7 +9320,7 @@ dns_resolver_detach(dns_resolver_t **resp) {
        res->references--;
        if (res->references == 0) {
                INSIST(res->exiting && res->activebuckets == 0);
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        }
 
        UNLOCK(&res->lock);
@@ -9333,7 +9331,7 @@ dns_resolver_detach(dns_resolver_t **resp) {
        *resp = NULL;
 }
 
-static inline isc_boolean_t
+static inline bool
 fctx_match(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type,
           unsigned int options)
 {
@@ -9342,10 +9340,10 @@ fctx_match(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type,
         */
        if (fctx->cloned || fctx->state == fetchstate_done ||
            ISC_LIST_EMPTY(fctx->events))
-               return (ISC_FALSE);
+               return (false);
 
        if (fctx->type != type || fctx->options != options)
-               return (ISC_FALSE);
+               return (false);
        return (dns_name_equal(&fctx->name, name));
 }
 
@@ -9422,12 +9420,12 @@ dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
        fetchctx_t *fctx = NULL;
        isc_result_t result = ISC_R_SUCCESS;
        unsigned int bucketnum;
-       isc_boolean_t new_fctx = ISC_FALSE;
+       bool new_fctx = false;
        isc_event_t *event;
        unsigned int count = 0;
        unsigned int spillat;
        unsigned int spillatmin;
-       isc_boolean_t dodestroy = ISC_FALSE;
+       bool dodestroy = false;
 
        UNUSED(forwarders);
 
@@ -9456,7 +9454,7 @@ dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
        fetch->mctx = NULL;
        isc_mem_attach(res->mctx, &fetch->mctx);
 
-       bucketnum = dns_name_fullhash(name, ISC_FALSE) % res->nbuckets;
+       bucketnum = dns_name_fullhash(name, false) % res->nbuckets;
 
        LOCK(&res->lock);
        spillat = res->spillat;
@@ -9497,7 +9495,7 @@ dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
        if (count >= spillatmin && spillatmin != 0) {
                INSIST(fctx != NULL);
                if (count >= spillat)
-                       fctx->spilled = ISC_TRUE;
+                       fctx->spilled = true;
                if (fctx->spilled) {
                        result = DNS_R_DROP;
                        goto unlock;
@@ -9509,7 +9507,7 @@ dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
                                     options, bucketnum, depth, qc, &fctx);
                if (result != ISC_R_SUCCESS)
                        goto unlock;
-               new_fctx = ISC_TRUE;
+               new_fctx = true;
        } else if (fctx->depth > depth)
                fctx->depth = depth;
 
@@ -9532,7 +9530,7 @@ dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
                         * since we know we're not exiting.
                         */
                        (void)fctx_unlink(fctx);
-                       dodestroy = ISC_TRUE;
+                       dodestroy = true;
                }
        }
 
@@ -9605,7 +9603,7 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) {
        dns_fetchevent_t *event, *next_event;
        fetchctx_t *fctx;
        unsigned int bucketnum;
-       isc_boolean_t bucket_empty;
+       bool bucket_empty;
 
        REQUIRE(fetchp != NULL);
        fetch = *fetchp;
@@ -9647,7 +9645,7 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) {
 void
 dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
                      isc_logcategory_t *category, isc_logmodule_t *module,
-                     int level, isc_boolean_t duplicateok)
+                     int level, bool duplicateok)
 {
        fetchctx_t *fctx;
        dns_resolver_t *res;
@@ -9680,7 +9678,7 @@ dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
                              fctx->lamecount, fctx->quotacount,
                              fctx->neterr, fctx->badresp, fctx->adberr,
                              fctx->findfail, fctx->valfail);
-               fctx->logged = ISC_TRUE;
+               fctx->logged = true;
        }
 
        UNLOCK(&res->buckets[fctx->bucketnum].lock);
@@ -9751,10 +9749,10 @@ dns_resolver_addalternate(dns_resolver_t *resolver, isc_sockaddr_t *alt,
        if (a == NULL)
                return (ISC_R_NOMEMORY);
        if (alt != NULL) {
-               a->isaddress = ISC_TRUE;
+               a->isaddress = true;
                a->_u.addr = *alt;
        } else {
-               a->isaddress = ISC_FALSE;
+               a->isaddress = false;
                a->_u._n.port = port;
                dns_name_init(&a->_u._n.name, NULL);
                result = dns_name_dup(name, resolver->mctx, &a->_u._n.name);
@@ -9803,11 +9801,11 @@ dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name,
 #endif
        {
                (void) dns_badcache_add(resolver->badcache, name, type,
-                                       ISC_FALSE, 0, expire);
+                                       false, 0, expire);
        }
 }
 
-isc_boolean_t
+bool
 dns_resolver_getbadcache(dns_resolver_t *resolver, dns_name_t *name,
                         dns_rdatatype_t type, isc_time_t *now)
 {
@@ -9917,7 +9915,7 @@ dns_resolver_disable_algorithm(dns_resolver_t *resolver, dns_name_t *name,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
                                 unsigned int alg)
 {
@@ -9925,7 +9923,7 @@ dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
        unsigned char *algorithms;
        void *data = NULL;
        isc_result_t result;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
 
        REQUIRE(VALID_RESOLVER(resolver));
 
@@ -9933,7 +9931,7 @@ dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
         * DH is unsupported for DNSKEYs, see RFC 4034 sec. A.1.
         */
        if ((alg == DST_ALG_DH) || (alg == DST_ALG_INDIRECT))
-               return (ISC_FALSE);
+               return (false);
 
 #if USE_ALGLOCK
        RWLOCK(&resolver->alglock, isc_rwlocktype_read);
@@ -9946,14 +9944,14 @@ dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
                mask = 1 << (alg%8);
                algorithms = data;
                if (len <= *algorithms && (algorithms[len-1] & mask) != 0)
-                       found = ISC_TRUE;
+                       found = true;
        }
  unlock:
 #if USE_ALGLOCK
        RWUNLOCK(&resolver->alglock, isc_rwlocktype_read);
 #endif
        if (found)
-               return (ISC_FALSE);
+               return (false);
 
        return (dst_algorithm_supported(alg));
 }
@@ -10052,7 +10050,7 @@ dns_resolver_disable_ds_digest(dns_resolver_t *resolver, dns_name_t *name,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_resolver_ds_digest_supported(dns_resolver_t *resolver, dns_name_t *name,
                                 unsigned int digest_type)
 {
@@ -10060,7 +10058,7 @@ dns_resolver_ds_digest_supported(dns_resolver_t *resolver, dns_name_t *name,
        unsigned char *digests;
        void *data = NULL;
        isc_result_t result;
-       isc_boolean_t found = ISC_FALSE;
+       bool found = false;
 
        REQUIRE(VALID_RESOLVER(resolver));
 
@@ -10075,14 +10073,14 @@ dns_resolver_ds_digest_supported(dns_resolver_t *resolver, dns_name_t *name,
                mask = 1 << (digest_type%8);
                digests = data;
                if (len <= *digests && (digests[len-1] & mask) != 0)
-                       found = ISC_TRUE;
+                       found = true;
        }
  unlock:
 #if USE_ALGLOCK
        RWUNLOCK(&resolver->alglock, isc_rwlocktype_read);
 #endif
        if (found)
-               return (ISC_FALSE);
+               return (false);
        return (dst_ds_digest_supported(digest_type));
 }
 
@@ -10101,11 +10099,11 @@ dns_resolver_resetmustbesecure(dns_resolver_t *resolver) {
 #endif
 }
 
-static isc_boolean_t yes = ISC_TRUE, no = ISC_FALSE;
+static bool yes = true, no = false;
 
 isc_result_t
 dns_resolver_setmustbesecure(dns_resolver_t *resolver, dns_name_t *name,
-                            isc_boolean_t value)
+                            bool value)
 {
        isc_result_t result;
 
@@ -10129,10 +10127,10 @@ dns_resolver_setmustbesecure(dns_resolver_t *resolver, dns_name_t *name,
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_resolver_getmustbesecure(dns_resolver_t *resolver, dns_name_t *name) {
        void *data = NULL;
-       isc_boolean_t value = ISC_FALSE;
+       bool value = false;
        isc_result_t result;
 
        REQUIRE(VALID_RESOLVER(resolver));
@@ -10144,7 +10142,7 @@ dns_resolver_getmustbesecure(dns_resolver_t *resolver, dns_name_t *name) {
                goto unlock;
        result = dns_rbt_findname(resolver->mustbesecure, name, 0, NULL, &data);
        if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
-               value = *(isc_boolean_t*)data;
+               value = *(bool*)data;
  unlock:
 #if USE_MBSLOCK
        RWUNLOCK(&resolver->mbslock, isc_rwlocktype_read);
@@ -10191,7 +10189,7 @@ dns_resolver_setfetchesperzone(dns_resolver_t *resolver, uint32_t clients)
 }
 
 
-isc_boolean_t
+bool
 dns_resolver_getzeronosoattl(dns_resolver_t *resolver) {
        REQUIRE(VALID_RESOLVER(resolver));
 
@@ -10199,7 +10197,7 @@ dns_resolver_getzeronosoattl(dns_resolver_t *resolver) {
 }
 
 void
-dns_resolver_setzeronosoattl(dns_resolver_t *resolver, isc_boolean_t state) {
+dns_resolver_setzeronosoattl(dns_resolver_t *resolver, bool state) {
        REQUIRE(VALID_RESOLVER(resolver));
 
        resolver->zero_no_soa_ttl = state;
index 20b5d5267b6d4ac4c9eb6d3bb4fcbb3182fd752a..70b2b7df3a6b2f731446b11440153a80fa3a783b 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/buffer.h>
 #include <isc/string.h>                /* Required for HP/UX (and others?) */
 #include <isc/util.h>
@@ -260,7 +262,7 @@ dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
 }
 
 static void
-report(dns_view_t *view, dns_name_t *name, isc_boolean_t missing,
+report(dns_view_t *view, dns_name_t *name, bool missing,
        dns_rdata_t *rdata)
 {
        const char *viewname = "", *sep = "";
@@ -296,7 +298,7 @@ report(dns_view_t *view, dns_name_t *name, isc_boolean_t missing,
                              databuf);
 }
 
-static isc_boolean_t
+static bool
 inrrset(dns_rdataset_t *rrset, dns_rdata_t *rdata) {
        isc_result_t result;
        dns_rdata_t current = DNS_RDATA_INIT;
@@ -305,11 +307,11 @@ inrrset(dns_rdataset_t *rrset, dns_rdata_t *rdata) {
        while (result == ISC_R_SUCCESS) {
                dns_rdataset_current(rrset, &current);
                if (dns_rdata_compare(rdata, &current) == 0)
-                       return (ISC_TRUE);
+                       return (true);
                dns_rdata_reset(&current);
                result = dns_rdataset_next(rrset);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -344,7 +346,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db,
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(&rootrrset, &rdata);
                        if (!inrrset(&hintrrset, &rdata))
-                               report(view, name, ISC_TRUE, &rdata);
+                               report(view, name, true, &rdata);
                        result = dns_rdataset_next(&rootrrset);
                }
                result = dns_rdataset_first(&hintrrset);
@@ -352,7 +354,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db,
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(&hintrrset, &rdata);
                        if (!inrrset(&rootrrset, &rdata))
-                               report(view, name, ISC_FALSE, &rdata);
+                               report(view, name, false, &rdata);
                        result = dns_rdataset_next(&hintrrset);
                }
        }
@@ -362,7 +364,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db,
                while (result == ISC_R_SUCCESS) {
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(&rootrrset, &rdata);
-                       report(view, name, ISC_TRUE, &rdata);
+                       report(view, name, true, &rdata);
                        result = dns_rdataset_next(&rootrrset);
                }
        }
@@ -386,7 +388,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db,
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(&rootrrset, &rdata);
                        if (!inrrset(&hintrrset, &rdata))
-                               report(view, name, ISC_TRUE, &rdata);
+                               report(view, name, true, &rdata);
                        dns_rdata_reset(&rdata);
                        result = dns_rdataset_next(&rootrrset);
                }
@@ -395,7 +397,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db,
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(&hintrrset, &rdata);
                        if (!inrrset(&rootrrset, &rdata))
-                               report(view, name, ISC_FALSE, &rdata);
+                               report(view, name, false, &rdata);
                        dns_rdata_reset(&rdata);
                        result = dns_rdataset_next(&hintrrset);
                }
@@ -406,7 +408,7 @@ check_address_records(dns_view_t *view, dns_db_t *hints, dns_db_t *db,
                while (result == ISC_R_SUCCESS) {
                        dns_rdata_reset(&rdata);
                        dns_rdataset_current(&rootrrset, &rdata);
-                       report(view, name, ISC_TRUE, &rdata);
+                       report(view, name, true, &rdata);
                        dns_rdata_reset(&rdata);
                        result = dns_rdataset_next(&rootrrset);
                }
index cb2738b3dc496940c40aa6b9b4174fe8d31b0a77..f0993be086961e14e162b47d7f655131bbada1ab 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/mem.h>
@@ -547,7 +548,7 @@ static void
 adj_trigger_cnt(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
                dns_rpz_type_t rpz_type,
                const dns_rpz_cidr_key_t *tgt_ip, dns_rpz_prefix_t tgt_prefix,
-               isc_boolean_t inc)
+               bool inc)
 {
        dns_rpz_trigger_counter_t *cnt;
        dns_rpz_zbits_t *have;
@@ -1086,12 +1087,12 @@ trim_zbits(dns_rpz_zbits_t zbits, dns_rpz_zbits_t found) {
  *
  * Return ISC_R_SUCCESS, DNS_R_PARTIALMATCH, ISC_R_NOTFOUND,
  *         and *found=longest match node
- *     or with create==ISC_TRUE, ISC_R_EXISTS or ISC_R_NOMEMORY
+ *     or with create==true, ISC_R_EXISTS or ISC_R_NOMEMORY
  */
 static isc_result_t
 search(dns_rpz_zones_t *rpzs,
        const dns_rpz_cidr_key_t *tgt_ip, dns_rpz_prefix_t tgt_prefix,
-       const dns_rpz_addr_zbits_t *tgt_set, isc_boolean_t create,
+       const dns_rpz_addr_zbits_t *tgt_set, bool create,
        dns_rpz_cidr_node_t **found)
 {
        dns_rpz_cidr_node_t *cur, *parent, *child, *new_parent, *sibling;
@@ -1289,7 +1290,7 @@ add_cidr(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        if (result != ISC_R_SUCCESS)
                return (ISC_R_SUCCESS);
 
-       result = search(rpzs, &tgt_ip, tgt_prefix, &set, ISC_TRUE, &found);
+       result = search(rpzs, &tgt_ip, tgt_prefix, &set, true, &found);
        if (result != ISC_R_SUCCESS) {
                char namebuf[DNS_NAME_FORMATSIZE];
 
@@ -1311,7 +1312,7 @@ add_cidr(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
                return (result);
        }
 
-       adj_trigger_cnt(rpzs, rpz_num, rpz_type, &tgt_ip, tgt_prefix, ISC_TRUE);
+       adj_trigger_cnt(rpzs, rpz_num, rpz_type, &tgt_ip, tgt_prefix, true);
        return (result);
 }
 
@@ -1384,7 +1385,7 @@ add_name(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        if (result == ISC_R_EXISTS)
                return (ISC_R_SUCCESS);
        if (result == ISC_R_SUCCESS)
-               adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, ISC_TRUE);
+               adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
        return (result);
 }
 
@@ -1799,7 +1800,7 @@ dns_rpz_ready(dns_rpz_zones_t *rpzs,
                            new_ip.nsip != 0) {
                                result = search(load_rpzs,
                                                &cnode->ip, cnode->prefix,
-                                               &new_ip, ISC_TRUE, &found);
+                                               &new_ip, true, &found);
                                if (result == ISC_R_NOMEMORY)
                                        goto unlock_and_detach;
                                INSIST(result == ISC_R_SUCCESS);
@@ -1963,7 +1964,7 @@ del_cidr(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        if (result != ISC_R_SUCCESS)
                return;
 
-       result = search(rpzs, &tgt_ip, tgt_prefix, &tgt_set, ISC_FALSE, &tgt);
+       result = search(rpzs, &tgt_ip, tgt_prefix, &tgt_set, false, &tgt);
        if (result != ISC_R_SUCCESS) {
                INSIST(result == ISC_R_NOTFOUND ||
                       result == DNS_R_PARTIALMATCH);
@@ -1988,7 +1989,7 @@ del_cidr(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        tgt->set.nsip &= ~tgt_set.nsip;
        set_sum_pair(tgt);
 
-       adj_trigger_cnt(rpzs, rpz_num, rpz_type, &tgt_ip, tgt_prefix, ISC_FALSE);
+       adj_trigger_cnt(rpzs, rpz_num, rpz_type, &tgt_ip, tgt_prefix, false);
 
        /*
         * We might need to delete 2 nodes.
@@ -2040,7 +2041,7 @@ del_name(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        dns_rbtnode_t *nmnode;
        dns_rpz_nm_data_t *nm_data, del_data;
        isc_result_t result;
-       isc_boolean_t exists;
+       bool exists;
 
        /*
         * We need a summary database of names even with 1 policy zone,
@@ -2083,8 +2084,10 @@ del_name(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        del_data.wild.qname &= nm_data->wild.qname;
        del_data.wild.ns &= nm_data->wild.ns;
 
-       exists = ISC_TF(del_data.set.qname != 0 || del_data.set.ns != 0 ||
-                       del_data.wild.qname != 0 || del_data.wild.ns != 0);
+       exists = (del_data.set.qname != 0 ||
+                 del_data.set.ns != 0 ||
+                 del_data.wild.qname != 0 ||
+                 del_data.wild.ns != 0);
 
        nm_data->set.qname &= ~del_data.set.qname;
        nm_data->set.ns &= ~del_data.set.ns;
@@ -2093,7 +2096,7 @@ del_name(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
 
        if (nm_data->set.qname == 0 && nm_data->set.ns == 0 &&
            nm_data->wild.qname == 0 && nm_data->wild.ns == 0) {
-               result = dns_rbt_deletenode(rpzs->rbt, nmnode, ISC_FALSE);
+               result = dns_rbt_deletenode(rpzs->rbt, nmnode, false);
                if (result != ISC_R_SUCCESS) {
                        /*
                         * bin/tests/system/rpz/tests.sh looks for "rpz.*failed".
@@ -2107,7 +2110,7 @@ del_name(dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num,
        }
 
        if (exists)
-               adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, ISC_FALSE);
+               adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, false);
 }
 
 /*
@@ -2228,7 +2231,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
        make_addr_set(&tgt_set, zbits, rpz_type);
 
        RWLOCK(&rpzs->search_lock, isc_rwlocktype_read);
-       result = search(rpzs, &tgt_ip, 128, &tgt_set, ISC_FALSE, &found);
+       result = search(rpzs, &tgt_ip, 128, &tgt_set, false, &found);
        if (result == ISC_R_NOTFOUND) {
                /*
                 * There are no eligible zones for this IP address.
index c8fb749bfc82b245e146de063131872207627ee8..cb7e7b6a7bfa51fa2c450c238f23d3e9a1aaecb8 100644 (file)
@@ -20,6 +20,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/net.h>
@@ -36,7 +37,7 @@
 #include <dns/view.h>
 
 static void
-log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_boolean_t early,
+log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, bool early,
        char *log_buf, unsigned int log_buf_len);
 
 /*
@@ -170,7 +171,7 @@ set_age(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_stdtime_t now) {
                                       !ISC_LINK_LINKED(e_old, hlink));
                     e_old = ISC_LIST_PREV(e_old, lru), ++i)
                {
-                       e_old->ts_valid = ISC_FALSE;
+                       e_old->ts_valid = false;
                }
                if (i != 0)
                        isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
@@ -191,7 +192,7 @@ set_age(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_stdtime_t now) {
 
        e->ts_gen = ts_gen;
        e->ts = ts;
-       e->ts_valid = ISC_TRUE;
+       e->ts_valid = true;
 }
 
 static isc_result_t
@@ -362,11 +363,11 @@ ref_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, int probes, isc_stdtime_t now) {
        }
 }
 
-static inline isc_boolean_t
+static inline 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 (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 static inline uint32_t
@@ -425,10 +426,10 @@ make_key(const dns_rrl_t *rrl, dns_rrl_key_t *key,
                        dns_name_init(&base, base_offsets);
                        dns_name_getlabelsequence(qname, 1, labels-1, &base);
                        key->s.qname_hash =
-                               dns_name_fullhash(&base, ISC_FALSE);
+                               dns_name_fullhash(&base, false);
                } else {
                        key->s.qname_hash =
-                               dns_name_fullhash(qname, ISC_FALSE);
+                               dns_name_fullhash(qname, false);
                }
        }
 
@@ -438,7 +439,7 @@ make_key(const dns_rrl_t *rrl, dns_rrl_key_t *key,
                              rrl->ipv4_mask);
                break;
        case AF_INET6:
-               key->s.ipv6 = ISC_TRUE;
+               key->s.ipv6 = true;
                memmove(key->s.ip, &client_addr->type.sin6.sin6_addr,
                        sizeof(key->s.ip));
                for (i = 0; i < DNS_RRL_MAX_PREFIX/32; ++i)
@@ -492,7 +493,7 @@ response_balance(dns_rrl_t *rrl, const dns_rrl_entry_t *e, int age) {
 static dns_rrl_entry_t *
 get_entry(dns_rrl_t *rrl, const isc_sockaddr_t *client_addr,
          dns_rdataclass_t qclass, dns_rdatatype_t qtype, dns_name_t *qname,
-         dns_rrl_rtype_t rtype, isc_stdtime_t now, isc_boolean_t create,
+         dns_rrl_rtype_t rtype, isc_stdtime_t now, bool create,
          char *log_buf, unsigned int log_buf_len)
 {
        dns_rrl_key_t key;
@@ -573,7 +574,7 @@ get_entry(dns_rrl_t *rrl, const isc_sockaddr_t *client_addr,
                e = ISC_LIST_TAIL(rrl->lru);
        }
        if (e->logged)
-               log_end(rrl, e, ISC_TRUE, log_buf, log_buf_len);
+               log_end(rrl, e, true, log_buf, log_buf_len);
        if (ISC_LINK_LINKED(e, hlink)) {
                if (e->hash_gen == rrl->hash_gen)
                        hash = rrl->hash;
@@ -585,7 +586,7 @@ get_entry(dns_rrl_t *rrl, const isc_sockaddr_t *client_addr,
        ISC_LIST_PREPEND(*new_bin, e, hlink);
        e->hash_gen = rrl->hash_gen;
        e->key = key;
-       e->ts_valid = ISC_FALSE;
+       e->ts_valid = false;
        ref_entry(rrl, e, probes, now);
        return (e);
 }
@@ -631,7 +632,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale,
                 */
                credit_e = get_entry(rrl, client_addr,
                                     0, dns_rdatatype_none, NULL,
-                                    DNS_RRL_RTYPE_TCP, now, ISC_FALSE,
+                                    DNS_RRL_RTYPE_TCP, now, false,
                                     log_buf, log_buf_len);
                if (credit_e != NULL) {
                        age = get_age(rrl, e, now);
@@ -787,8 +788,8 @@ add_log_str(isc_buffer_t *lb, const char *str, unsigned int str_len) {
  */
 static void
 make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
-            const char *str1, const char *str2, isc_boolean_t plural,
-            dns_name_t *qname, isc_boolean_t save_qname,
+            const char *str1, const char *str2, bool plural,
+            dns_name_t *qname, bool save_qname,
             dns_rrl_result_t rrl_result, isc_result_t resp_result,
             char *log_buf, unsigned int log_buf_len)
 {
@@ -917,7 +918,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
                        qname = dns_fixedname_name(&qbuf->qname);
                if (qname != NULL) {
                        ADD_LOG_CSTR(&lb, " for ");
-                       (void)dns_name_totext(qname, ISC_TRUE, &lb);
+                       (void)dns_name_totext(qname, true, &lb);
                } else {
                        ADD_LOG_CSTR(&lb, " for (?)");
                }
@@ -941,7 +942,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
 }
 
 static void
-log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_boolean_t early,
+log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, bool early,
        char *log_buf, unsigned int log_buf_len)
 {
        if (e->logged) {
@@ -949,14 +950,14 @@ log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_boolean_t early,
                             early ? "*" : NULL,
                             rrl->log_only ? "would stop limiting "
                                           : "stop limiting ",
-                            ISC_TRUE, NULL, ISC_FALSE,
+                            true, NULL, false,
                             DNS_RRL_RESULT_OK, ISC_R_SUCCESS,
                             log_buf, log_buf_len);
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
                              DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DROP,
                              "%s", log_buf);
                free_qname(rrl, e);
-               e->logged = ISC_FALSE;
+               e->logged = false;
                --rrl->num_logged;
        }
 }
@@ -1005,10 +1006,10 @@ log_stops(dns_rrl_t *rrl, isc_stdtime_t now, int limit,
  */
 dns_rrl_result_t
 dns_rrl(dns_view_t *view,
-       const isc_sockaddr_t *client_addr, isc_boolean_t is_tcp,
+       const isc_sockaddr_t *client_addr, bool is_tcp,
        dns_rdataclass_t qclass, dns_rdatatype_t qtype,
        dns_name_t *qname, isc_result_t resp_result, isc_stdtime_t now,
-       isc_boolean_t wouldlog, char *log_buf, unsigned int log_buf_len)
+       bool wouldlog, char *log_buf, unsigned int log_buf_len)
 {
        dns_rrl_t *rrl;
        dns_rrl_rtype_t rtype;
@@ -1081,7 +1082,7 @@ dns_rrl(dns_view_t *view,
                if (scale < 1.0) {
                        e = get_entry(rrl, client_addr,
                                      0, dns_rdatatype_none, NULL,
-                                     DNS_RRL_RTYPE_TCP, now, ISC_TRUE,
+                                     DNS_RRL_RTYPE_TCP, now, true,
                                      log_buf, log_buf_len);
                        if (e != NULL) {
                                e->responses = -(rrl->window+1);
@@ -1114,7 +1115,7 @@ dns_rrl(dns_view_t *view,
                break;
        }
        e = get_entry(rrl, client_addr, qclass, qtype, qname, rtype,
-                     now, ISC_TRUE, log_buf, log_buf_len);
+                     now, true, log_buf, log_buf_len);
        if (e == NULL) {
                UNLOCK(&rrl->lock);
                return (DNS_RRL_RESULT_OK);
@@ -1125,8 +1126,8 @@ dns_rrl(dns_view_t *view,
                 * Do not worry about speed or releasing the lock.
                 * This message appears before messages from debit_rrl_entry().
                 */
-               make_log_buf(rrl, e, "consider limiting ", NULL, ISC_FALSE,
-                            qname, ISC_FALSE, DNS_RRL_RESULT_OK, resp_result,
+               make_log_buf(rrl, e, "consider limiting ", NULL, false,
+                            qname, false, DNS_RRL_RESULT_OK, resp_result,
                             log_buf, log_buf_len);
                isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
                              DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DEBUG1,
@@ -1150,7 +1151,7 @@ dns_rrl(dns_view_t *view,
 
                e_all = get_entry(rrl, client_addr,
                                  0, dns_rdatatype_none, NULL,
-                                 DNS_RRL_RTYPE_ALL, now, ISC_TRUE,
+                                 DNS_RRL_RTYPE_ALL, now, true,
                                  log_buf, log_buf_len);
                if (e_all == NULL) {
                        UNLOCK(&rrl->lock);
@@ -1165,7 +1166,7 @@ dns_rrl(dns_view_t *view,
                        if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG1)) {
                                make_log_buf(rrl, e,
                                             "prefer all-per-second limiting ",
-                                            NULL, ISC_TRUE, qname, ISC_FALSE,
+                                            NULL, true, qname, false,
                                             DNS_RRL_RESULT_OK, resp_result,
                                             log_buf, log_buf_len);
                                isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
@@ -1188,11 +1189,11 @@ dns_rrl(dns_view_t *view,
            isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DROP)) {
                make_log_buf(rrl, e, rrl->log_only ? "would " : NULL,
                             e->logged ? "continue limiting " : "limit ",
-                            ISC_TRUE, qname, ISC_TRUE,
+                            true, qname, true,
                             DNS_RRL_RESULT_OK, resp_result,
                             log_buf, log_buf_len);
                if (!e->logged) {
-                       e->logged = ISC_TRUE;
+                       e->logged = true;
                        if (++rrl->num_logged <= 1)
                                rrl->last_logged = e;
                }
@@ -1216,7 +1217,7 @@ dns_rrl(dns_view_t *view,
        if (wouldlog)
                make_log_buf(rrl, e,
                             rrl->log_only ? "would rate limit " : "rate limit ",
-                            NULL, ISC_FALSE, qname, ISC_FALSE,
+                            NULL, false, qname, false,
                             rrl_result, resp_result, log_buf, log_buf_len);
 
        if (e != NULL) {
index 20431c31e64729207d309779b7e87ffa20d8ac2d..cabda7fe784e5edfa84e394d81ec858d37c230a5 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/buffer.h>
@@ -569,14 +570,14 @@ destroy(dns_sdb_t *sdb) {
 static void
 detach(dns_db_t **dbp) {
        dns_sdb_t *sdb = (dns_sdb_t *)(*dbp);
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(VALID_SDB(sdb));
        LOCK(&sdb->lock);
        REQUIRE(sdb->references > 0);
        sdb->references--;
        if (sdb->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&sdb->lock);
 
        if (need_destroy)
@@ -640,9 +641,9 @@ attachversion(dns_db_t *db, dns_dbversion_t *source,
 }
 
 static void
-closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
+closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
        REQUIRE(versionp != NULL && *versionp == (void *) &dummy);
-       REQUIRE(commit == ISC_FALSE);
+       REQUIRE(commit == false);
 
        UNUSED(db);
        UNUSED(commit);
@@ -717,7 +718,7 @@ destroynode(dns_sdbnode_t *node) {
 }
 
 static isc_result_t
-findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnodeext(dns_db_t *db, dns_name_t *name, bool create,
            dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo,
            dns_dbnode_t **nodep)
 {
@@ -726,13 +727,13 @@ findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
        isc_result_t result;
        isc_buffer_t b;
        char namestr[DNS_NAME_MAXTEXT + 1];
-       isc_boolean_t isorigin;
+       bool isorigin;
        dns_sdbimplementation_t *imp;
        dns_name_t relname;
        unsigned int labels;
 
        REQUIRE(VALID_SDB(sdb));
-       REQUIRE(create == ISC_FALSE);
+       REQUIRE(create == false);
        REQUIRE(nodep != NULL && *nodep == NULL);
 
        UNUSED(name);
@@ -758,11 +759,11 @@ findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
                                 dns_name_countlabels(&db->origin);
                        dns_name_init(&relname, NULL);
                        dns_name_getlabelsequence(name, 0, labels, &relname);
-                       result = dns_name_totext(&relname, ISC_TRUE, &b);
+                       result = dns_name_totext(&relname, true, &b);
                        if (result != ISC_R_SUCCESS)
                                return (result);
                } else {
-                       result = dns_name_totext(name, ISC_TRUE, &b);
+                       result = dns_name_totext(name, true, &b);
                        if (result != ISC_R_SUCCESS)
                                return (result);
                }
@@ -848,7 +849,7 @@ findext(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                 * Look up the next label.
                 */
                dns_name_getlabelsequence(name, nlabels - i, i, xname);
-               result = findnodeext(db, xname, ISC_FALSE, methods,
+               result = findnodeext(db, xname, false, methods,
                                     clientinfo, &node);
                if (result == ISC_R_NOTFOUND) {
                        /*
@@ -1020,7 +1021,7 @@ static void
 detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
        dns_sdb_t *sdb = (dns_sdb_t *)db;
        dns_sdbnode_t *node;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(VALID_SDB(sdb));
        REQUIRE(targetp != NULL && *targetp != NULL);
@@ -1033,7 +1034,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
        INSIST(node->references > 0);
        node->references--;
        if (node->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&node->lock);
 
        if (need_destroy)
@@ -1083,7 +1084,7 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
        sdbiter->common.methods = &dbiterator_methods;
        sdbiter->common.db = NULL;
        dns_db_attach(db, &sdbiter->common.db);
-       sdbiter->common.relative_names = ISC_TF(options & DNS_DB_RELATIVENAMES);
+       sdbiter->common.relative_names = (options & DNS_DB_RELATIVENAMES);
        sdbiter->common.magic = DNS_DBITERATOR_MAGIC;
        ISC_LIST_INIT(sdbiter->nodelist);
        sdbiter->current = NULL;
@@ -1213,11 +1214,11 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
        return (ISC_R_NOTIMPLEMENTED);
 }
 
-static isc_boolean_t
+static bool
 issecure(dns_db_t *db) {
        UNUSED(db);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static unsigned int
@@ -1227,14 +1228,14 @@ nodecount(dns_db_t *db) {
        return (0);
 }
 
-static isc_boolean_t
+static bool
 ispersistent(dns_db_t *db) {
        UNUSED(db);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
-overmem(dns_db_t *db, isc_boolean_t over) {
+overmem(dns_db_t *db, bool over) {
        UNUSED(db);
        UNUSED(over);
 }
@@ -1335,7 +1336,7 @@ dns_sdb_create(isc_mem_t *mctx, dns_name_t *origin, dns_dbtype_t type,
                goto cleanup_lock;
 
        isc_buffer_init(&b, zonestr, sizeof(zonestr));
-       result = dns_name_totext(origin, ISC_TRUE, &b);
+       result = dns_name_totext(origin, true, &b);
        if (result != ISC_R_SUCCESS)
                goto cleanup_origin;
        isc_buffer_putuint8(&b, 0);
index 71fcf81d44a90845dad52e6752635f300a80a4df..11c4c737167a5b6e9f7792a116bf211c83bf35a9 100644 (file)
@@ -49,6 +49,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/buffer.h>
@@ -183,7 +184,7 @@ typedef struct sdlz_rdatasetiter {
  * Forward references.
  */
 static isc_result_t getnodedata(dns_db_t *db, dns_name_t *name,
-                               isc_boolean_t create, unsigned int options,
+                               bool create, unsigned int options,
                                dns_clientinfomethods_t *methods,
                                dns_clientinfo_t *clientinfo,
                                dns_dbnode_t **nodep);
@@ -346,14 +347,14 @@ destroy(dns_sdlz_db_t *sdlz) {
 static void
 detach(dns_db_t **dbp) {
        dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)(*dbp);
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(VALID_SDLZDB(sdlz));
        LOCK(&sdlz->refcnt_lock);
        REQUIRE(sdlz->references > 0);
        sdlz->references--;
        if (sdlz->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&sdlz->refcnt_lock);
 
        if (need_destroy)
@@ -436,7 +437,7 @@ attachversion(dns_db_t *db, dns_dbversion_t *source, dns_dbversion_t **targetp)
 }
 
 static void
-closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
+closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
        dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db;
        char origin[DNS_NAME_MAXTEXT + 1];
 
@@ -535,7 +536,7 @@ destroynode(dns_sdlznode_t *node) {
 }
 
 static isc_result_t
-getnodedata(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+getnodedata(dns_db_t *db, dns_name_t *name, bool create,
            unsigned int options, dns_clientinfomethods_t *methods,
            dns_clientinfo_t *clientinfo, dns_dbnode_t **nodep)
 {
@@ -546,14 +547,14 @@ getnodedata(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
        char namestr[DNS_NAME_MAXTEXT + 1];
        isc_buffer_t b2;
        char zonestr[DNS_NAME_MAXTEXT + 1];
-       isc_boolean_t isorigin;
+       bool isorigin;
        dns_sdlzauthorityfunc_t authority;
 
        REQUIRE(VALID_SDLZDB(sdlz));
        REQUIRE(nodep != NULL && *nodep == NULL);
 
        if (sdlz->dlzimp->methods->newversion == NULL) {
-               REQUIRE(create == ISC_FALSE);
+               REQUIRE(create == false);
        }
 
        isc_buffer_init(&b, namestr, sizeof(namestr));
@@ -565,18 +566,18 @@ getnodedata(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
                         dns_name_countlabels(&sdlz->common.origin);
                dns_name_init(&relname, NULL);
                dns_name_getlabelsequence(name, 0, labels, &relname);
-               result = dns_name_totext(&relname, ISC_TRUE, &b);
+               result = dns_name_totext(&relname, true, &b);
                if (result != ISC_R_SUCCESS)
                        return (result);
        } else {
-               result = dns_name_totext(name, ISC_TRUE, &b);
+               result = dns_name_totext(name, true, &b);
                if (result != ISC_R_SUCCESS)
                        return (result);
        }
        isc_buffer_putuint8(&b, 0);
 
        isc_buffer_init(&b2, zonestr, sizeof(zonestr));
-       result = dns_name_totext(&sdlz->common.origin, ISC_TRUE, &b2);
+       result = dns_name_totext(&sdlz->common.origin, true, &b2);
        if (result != ISC_R_SUCCESS)
                return (result);
        isc_buffer_putuint8(&b2, 0);
@@ -634,7 +635,7 @@ getnodedata(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
                        }
 
                        isc_buffer_init(&b, wildstr, sizeof(wildstr));
-                       result = dns_name_totext(wild, ISC_TRUE, &b);
+                       result = dns_name_totext(wild, true, &b);
                        if (result != ISC_R_SUCCESS)
                                return (result);
                        isc_buffer_putuint8(&b, 0);
@@ -694,7 +695,7 @@ getnodedata(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
 }
 
 static isc_result_t
-findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnodeext(dns_db_t *db, dns_name_t *name, bool create,
            dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo,
            dns_dbnode_t **nodep)
 {
@@ -702,7 +703,7 @@ findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
 }
 
 static isc_result_t
-findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
+findnode(dns_db_t *db, dns_name_t *name, bool create,
         dns_dbnode_t **nodep)
 {
        return (getnodedata(db, name, create, 0, NULL, NULL, nodep));
@@ -747,7 +748,7 @@ static void
 detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
        dns_sdlz_db_t *sdlz = (dns_sdlz_db_t *)db;
        dns_sdlznode_t *node;
-       isc_boolean_t need_destroy = ISC_FALSE;
+       bool need_destroy = false;
 
        REQUIRE(VALID_SDLZDB(sdlz));
        REQUIRE(targetp != NULL && *targetp != NULL);
@@ -760,7 +761,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp) {
        INSIST(node->references > 0);
        node->references--;
        if (node->references == 0)
-               need_destroy = ISC_TRUE;
+               need_destroy = true;
        UNLOCK(&node->lock);
 
        if (need_destroy)
@@ -805,7 +806,7 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
                 return (ISC_R_NOTIMPLEMENTED);
 
        isc_buffer_init(&b, zonestr, sizeof(zonestr));
-       result = dns_name_totext(&sdlz->common.origin, ISC_TRUE, &b);
+       result = dns_name_totext(&sdlz->common.origin, true, &b);
        if (result != ISC_R_SUCCESS)
                return (result);
        isc_buffer_putuint8(&b, 0);
@@ -817,7 +818,7 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
        sdlziter->common.methods = &dbiterator_methods;
        sdlziter->common.db = NULL;
        dns_db_attach(db, &sdlziter->common.db);
-       sdlziter->common.relative_names = ISC_TF(options & DNS_DB_RELATIVENAMES);
+       sdlziter->common.relative_names = (options & DNS_DB_RELATIVENAMES);
        sdlziter->common.magic = DNS_DBITERATOR_MAGIC;
        ISC_LIST_INIT(sdlziter->nodelist);
        sdlziter->current = NULL;
@@ -935,7 +936,7 @@ findext(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
                 * Look up the next label.
                 */
                dns_name_getlabelsequence(name, nlabels - i, i, xname);
-               result = getnodedata(db, xname, ISC_FALSE, options,
+               result = getnodedata(db, xname, false, options,
                                     methods, clientinfo, &node);
                if (result == ISC_R_NOTFOUND) {
                        result = DNS_R_NXDOMAIN;
@@ -1229,11 +1230,11 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 issecure(dns_db_t *db) {
        UNUSED(db);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static unsigned int
@@ -1243,14 +1244,14 @@ nodecount(dns_db_t *db) {
        return (0);
 }
 
-static isc_boolean_t
+static bool
 ispersistent(dns_db_t *db) {
        UNUSED(db);
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
-overmem(dns_db_t *db, isc_boolean_t over) {
+overmem(dns_db_t *db, bool over) {
        UNUSED(db);
        UNUSED(over);
 }
@@ -1274,7 +1275,7 @@ getoriginnode(dns_db_t *db, dns_dbnode_t **nodep) {
        if (sdlz->dlzimp->methods->newversion == NULL)
                return (ISC_R_NOTIMPLEMENTED);
 
-       result = getnodedata(db, &sdlz->common.origin, ISC_FALSE,
+       result = getnodedata(db, &sdlz->common.origin, false,
                             0, NULL, NULL, nodep);
        if (result != ISC_R_SUCCESS)
                sdlz_log(ISC_LOG_ERROR, "sdlz getoriginnode failed: %s",
@@ -1600,7 +1601,7 @@ dns_sdlzallowzonexfr(void *driverarg, void *dbdata, isc_mem_t *mctx,
 
        /* Convert DNS name to ascii text */
        isc_buffer_init(&b, namestr, sizeof(namestr));
-       result = dns_name_totext(name, ISC_TRUE, &b);
+       result = dns_name_totext(name, true, &b);
        if (result != ISC_R_SUCCESS)
                return (result);
        isc_buffer_putuint8(&b, 0);
@@ -1714,7 +1715,7 @@ dns_sdlzfindzone(void *driverarg, void *dbdata, isc_mem_t *mctx,
 
        /* Convert DNS name to ascii text */
        isc_buffer_init(&b, namestr, sizeof(namestr));
-       result = dns_name_totext(name, ISC_TRUE, &b);
+       result = dns_name_totext(name, true, &b);
        if (result != ISC_R_SUCCESS)
                return (result);
        isc_buffer_putuint8(&b, 0);
@@ -1764,7 +1765,7 @@ dns_sdlzconfigure(void *driverarg, void *dbdata,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 dns_sdlzssumatch(dns_name_t *signer, dns_name_t *name, isc_netaddr_t *tcpaddr,
                 dns_rdatatype_t type, const dst_key_t *key, void *driverarg,
                 void *dbdata)
@@ -1778,13 +1779,13 @@ dns_sdlzssumatch(dns_name_t *signer, dns_name_t *name, isc_netaddr_t *tcpaddr,
        isc_buffer_t *tkey_token = NULL;
        isc_region_t token_region = { NULL, 0 };
        uint32_t token_len = 0;
-       isc_boolean_t ret;
+       bool ret;
 
        REQUIRE(driverarg != NULL);
 
        imp = (dns_sdlzimplementation_t *) driverarg;
        if (imp->methods->ssumatch == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * Format the request elements. sdlz operates on strings, not
@@ -1924,7 +1925,7 @@ dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl,
 
                result = dns_rdata_fromtext(rdata, rdatalist->rdclass,
                                            rdatalist->type, lex,
-                                           origin, ISC_FALSE,
+                                           origin, false,
                                            mctx, rdatabuf,
                                            &lookup->callbacks);
                if (result != ISC_R_SUCCESS)
index adc1505707bca4ca5af963bd961d6b3cab357e74..8aec053db6bfc0cd3d9f771d9fdd4858d05f221a 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/magic.h>
 #include <isc/mem.h>
 #include <isc/netaddr.h>
@@ -36,7 +38,7 @@
 
 struct dns_ssurule {
        unsigned int magic;
-       isc_boolean_t grant;    /*%< is this a grant or a deny? */
+       bool grant;     /*%< is this a grant or a deny? */
        unsigned int matchtype; /*%< which type of pattern match? */
        dns_name_t *identity;   /*%< the identity to match */
        dns_name_t *name;       /*%< the name being updated */
@@ -128,7 +130,7 @@ dns_ssutable_attach(dns_ssutable_t *source, dns_ssutable_t **targetp) {
 void
 dns_ssutable_detach(dns_ssutable_t **tablep) {
        dns_ssutable_t *table;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 
        REQUIRE(tablep != NULL);
        table = *tablep;
@@ -138,7 +140,7 @@ dns_ssutable_detach(dns_ssutable_t **tablep) {
 
        INSIST(table->references > 0);
        if (--table->references == 0)
-               done = ISC_TRUE;
+               done = true;
        UNLOCK(&table->lock);
 
        *tablep = NULL;
@@ -148,7 +150,7 @@ dns_ssutable_detach(dns_ssutable_t **tablep) {
 }
 
 isc_result_t
-dns_ssutable_addrule(dns_ssutable_t *table, isc_boolean_t grant,
+dns_ssutable_addrule(dns_ssutable_t *table, bool grant,
                     dns_name_t *identity, unsigned int matchtype,
                     dns_name_t *name, unsigned int ntypes,
                     dns_rdatatype_t *types)
@@ -235,11 +237,11 @@ dns_ssutable_addrule(dns_ssutable_t *table, isc_boolean_t grant,
        return (result);
 }
 
-static inline isc_boolean_t
+static inline bool
 isusertype(dns_rdatatype_t type) {
-       return (ISC_TF(type != dns_rdatatype_ns &&
-                      type != dns_rdatatype_soa &&
-                      type != dns_rdatatype_rrsig));
+       return (type != dns_rdatatype_ns &&
+               type != dns_rdatatype_soa &&
+               type != dns_rdatatype_rrsig);
 }
 
 static void
@@ -336,21 +338,21 @@ stf_from_address(dns_name_t *stfself, isc_netaddr_t *tcpaddr) {
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 dns_ssutable_checkrules(dns_ssutable_t *table, dns_name_t *signer,
                        dns_name_t *name, isc_netaddr_t *addr,
                        dns_rdatatype_t type, const dst_key_t *key)
 {
        return (dns_ssutable_checkrules2
                (table, signer, name, addr,
-                addr == NULL ? ISC_FALSE : ISC_TRUE,
+                addr == NULL ? false : true,
                 NULL, type, key));
 }
 
-isc_boolean_t
+bool
 dns_ssutable_checkrules2(dns_ssutable_t *table, dns_name_t *signer,
                         dns_name_t *name, isc_netaddr_t *addr,
-                        isc_boolean_t tcp, const dns_aclenv_t *env,
+                        bool tcp, const dns_aclenv_t *env,
                         dns_rdatatype_t type, const dst_key_t *key)
 {
        dns_ssurule_t *rule;
@@ -368,7 +370,7 @@ dns_ssutable_checkrules2(dns_ssutable_t *table, dns_name_t *signer,
        REQUIRE(addr == NULL || env != NULL);
 
        if (signer == NULL && addr == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        for (rule = ISC_LIST_HEAD(table->rules);
             rule != NULL;
@@ -546,10 +548,10 @@ dns_ssutable_checkrules2(dns_ssutable_t *table, dns_name_t *signer,
                return (rule->grant);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 dns_ssurule_isgrant(const dns_ssurule_t *rule) {
        REQUIRE(VALID_SSURULE(rule));
        return (rule->grant);
@@ -625,7 +627,7 @@ dns_ssutable_createdlz(isc_mem_t *mctx, dns_ssutable_t **tablep,
        rule->identity = NULL;
        rule->name = NULL;
        rule->types = NULL;
-       rule->grant = ISC_TRUE;
+       rule->grant = true;
        rule->matchtype = DNS_SSUMATCHTYPE_DLZ;
        rule->ntypes = 0;
        rule->types = NULL;
index e319890d2a39f9a0a9948196ff5fbed5c62b89f6..a1b638eeb0b09ea97d9a2bc236252cc794750e07 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <errno.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <unistd.h>
 
 #ifdef ISC_PLATFORM_HAVESYSUNH
@@ -113,7 +114,7 @@ ux_socket_connect(const char *path) {
  * time we avoid the need for locking and allow for parallel access to
  * the authorization server.
  */
-isc_boolean_t
+bool
 dns_ssu_external_match(dns_name_t *identity,
                       dns_name_t *signer, dns_name_t *name,
                       isc_netaddr_t *tcpaddr, dns_rdatatype_t type,
@@ -143,13 +144,13 @@ dns_ssu_external_match(dns_name_t *identity,
        if (strncmp(b_identity, "local:", 6) != 0) {
                ssu_e_log(3, "ssu_external: invalid socket path '%s'",
                          b_identity);
-               return (ISC_FALSE);
+               return (false);
        }
        sock_path = &b_identity[6];
 
        fd = ux_socket_connect(sock_path);
        if (fd == -1)
-               return (ISC_FALSE);
+               return (false);
 
        if (key != NULL) {
                dst_key_format(key, b_key, sizeof(b_key));
@@ -193,7 +194,7 @@ dns_ssu_external_match(dns_name_t *identity,
        data = isc_mem_allocate(mctx, req_len);
        if (data == NULL) {
                close(fd);
-               return (ISC_FALSE);
+               return (false);
        }
 
        isc_buffer_init(&buf, data, req_len);
@@ -227,7 +228,7 @@ dns_ssu_external_match(dns_name_t *identity,
                ssu_e_log(3, "ssu_external: unable to send request - %s",
                          strbuf);
                close(fd);
-               return (ISC_FALSE);
+               return (false);
        }
 
        /* Receive the reply */
@@ -238,7 +239,7 @@ dns_ssu_external_match(dns_name_t *identity,
                ssu_e_log(3, "ssu_external: unable to receive reply - %s",
                          strbuf);
                close(fd);
-               return (ISC_FALSE);
+               return (false);
        }
 
        close(fd);
@@ -248,14 +249,14 @@ dns_ssu_external_match(dns_name_t *identity,
        if (reply == 0) {
                ssu_e_log(3, "ssu_external: denied external auth for '%s'",
                          b_name);
-               return (ISC_FALSE);
+               return (false);
        } else if (reply == 1) {
                ssu_e_log(3, "ssu_external: allowed external auth for '%s'",
                          b_name);
-               return (ISC_TRUE);
+               return (true);
        }
 
        ssu_e_log(3, "ssu_external: invalid reply 0x%08x", reply);
 
-       return (ISC_FALSE);
+       return (false);
 }
index 1fff388472f82086197969e7cc0ffd653a09c5fc..617ed3bf8f72ae89c3fd4eb7cea36d5db72fee69 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/magic.h>
 #include <isc/mem.h>
@@ -228,7 +229,7 @@ dns_rdatatypestats_increment(dns_stats_t *stats, dns_rdatatype_t type) {
 
 static inline void
 update_rdatasetstats(dns_stats_t *stats, dns_rdatastatstype_t rrsettype,
-                    isc_boolean_t increment)
+                    bool increment)
 {
        int counter;
        dns_rdatatype_t rdtype;
@@ -271,7 +272,7 @@ dns_rdatasetstats_increment(dns_stats_t *stats, dns_rdatastatstype_t rrsettype)
        REQUIRE(DNS_STATS_VALID(stats) &&
                stats->type == dns_statstype_rdataset);
 
-       update_rdatasetstats(stats, rrsettype, ISC_TRUE);
+       update_rdatasetstats(stats, rrsettype, true);
 }
 
 void
@@ -280,7 +281,7 @@ dns_rdatasetstats_decrement(dns_stats_t *stats, dns_rdatastatstype_t rrsettype)
        REQUIRE(DNS_STATS_VALID(stats) &&
                stats->type == dns_statstype_rdataset);
 
-       update_rdatasetstats(stats, rrsettype, ISC_FALSE);
+       update_rdatasetstats(stats, rrsettype, false);
 }
 
 void
index 3c4a3b1da2ece25b9091041542bcbc9d5a596f10..6e3ce238775a7036493d71117ebaf66566dea513 100644 (file)
@@ -17,6 +17,7 @@
 #include <atf-c.h>
 
 #include <stdio.h>
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/print.h>
@@ -41,13 +42,13 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
        isc_result_t result;
        unsigned int pass;
        struct {
-               isc_boolean_t first;
-               isc_boolean_t second;
+               bool first;
+               bool second;
        } ecs[] = {
-               { ISC_FALSE, ISC_FALSE },
-               { ISC_TRUE, ISC_TRUE },
-               { ISC_TRUE, ISC_FALSE },
-               { ISC_FALSE, ISC_TRUE }
+               { false, false },
+               { true, true },
+               { true, false },
+               { false, true }
        };
 
        dns_acl_t *any = NULL;
@@ -85,7 +86,7 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_acl_any(mctx, &any);
@@ -100,10 +101,10 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
        result = dns_acl_create(mctx, 1, &notany);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_acl_merge(notnone, none, ISC_FALSE);
+       result = dns_acl_merge(notnone, none, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_acl_merge(notany, any, ISC_FALSE);
+       result = dns_acl_merge(notany, any, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
 #ifdef HAVE_GEOIP
@@ -116,7 +117,7 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
                sizeof(de->geoip_elem.as_string));
        de->geoip_elem.subtype = dns_geoip_country_code;
        de->type = dns_aclelementtype_geoip;
-       de->negative = ISC_FALSE;
+       de->negative = false;
        ATF_REQUIRE(geoip->length < geoip->alloc);
        geoip->node_count++;
        de->node_num = geoip->node_count;
@@ -125,7 +126,7 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
        result = dns_acl_create(mctx, 1, &notgeoip);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_acl_merge(notgeoip, geoip, ISC_FALSE);
+       result = dns_acl_merge(notgeoip, geoip, false);
 #endif
 
        ATF_CHECK(dns_acl_isinsecure(any));             /* any; */
@@ -175,57 +176,57 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
                inaddr.s_addr = htonl(0x0a000000);      /* 10.0.0.0 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(pos4pos6->iptable, &addr, 8,
-                                               ISC_TRUE, ecs[pass].first);
+                                               true, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                addr.family = AF_INET6;                 /* 0a00:: */
                result = dns_iptable_addprefix2(pos4pos6->iptable, &addr, 8,
-                                               ISC_TRUE, ecs[pass].second);
+                                               true, ecs[pass].second);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notpos4pos6, pos4pos6, ISC_FALSE);
+               result = dns_acl_merge(notpos4pos6, pos4pos6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                inaddr.s_addr = htonl(0x0a000000);      /* !10.0.0.0/8 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(neg4pos6->iptable, &addr, 8,
-                                               ISC_FALSE, ecs[pass].first);
+                                               false, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                addr.family = AF_INET6;                 /* 0a00::/8 */
                result = dns_iptable_addprefix2(neg4pos6->iptable, &addr, 8,
-                                               ISC_TRUE, ecs[pass].second);
+                                               true, ecs[pass].second);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notneg4pos6, neg4pos6, ISC_FALSE);
+               result = dns_acl_merge(notneg4pos6, neg4pos6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                inaddr.s_addr = htonl(0x0a000000);      /* 10.0.0.0/8 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(pos4neg6->iptable, &addr, 8,
-                                               ISC_TRUE, ecs[pass].first);
+                                               true, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                addr.family = AF_INET6;                 /* !0a00::/8 */
                result = dns_iptable_addprefix2(pos4neg6->iptable, &addr, 8,
-                                               ISC_FALSE, ecs[pass].second);
+                                               false, ecs[pass].second);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notpos4neg6, pos4neg6, ISC_FALSE);
+               result = dns_acl_merge(notpos4neg6, pos4neg6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                inaddr.s_addr = htonl(0x0a000000);      /* !10.0.0.0/8 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(neg4neg6->iptable, &addr, 8,
-                                               ISC_FALSE, ecs[pass].first);
+                                               false, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                addr.family = AF_INET6;                 /* !0a00::/8 */
                result = dns_iptable_addprefix2(neg4neg6->iptable, &addr, 8,
-                                               ISC_FALSE, ecs[pass].second);
+                                               false, ecs[pass].second);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notneg4neg6, neg4neg6, ISC_FALSE);
+               result = dns_acl_merge(notneg4neg6, neg4neg6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                ATF_CHECK(dns_acl_isinsecure(pos4pos6));
@@ -261,18 +262,18 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
                inaddr.s_addr = htonl(0x7f000001);      /* 127.0.0.1 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(loop4->iptable, &addr, 32,
-                                               ISC_TRUE, ecs[pass].first);
+                                               true, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notloop4, loop4, ISC_FALSE);
+               result = dns_acl_merge(notloop4, loop4, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                isc_netaddr_fromin6(&addr, &in6addr_loopback);  /* ::1 */
                result = dns_iptable_addprefix2(loop6->iptable, &addr, 128,
-                                               ISC_TRUE, ecs[pass].first);
+                                               true, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notloop6, loop6, ISC_FALSE);
+               result = dns_acl_merge(notloop6, loop6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                if (!ecs[pass].first) {
@@ -307,29 +308,29 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
                inaddr.s_addr = htonl(0x7f000001);      /* 127.0.0.1 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(loop4pos6->iptable, &addr, 32,
-                                               ISC_TRUE, ecs[pass].first);
+                                               true, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                addr.family = AF_INET6;                 /* f700:0001::/32 */
                result = dns_iptable_addprefix2(loop4pos6->iptable, &addr, 32,
-                                               ISC_TRUE, ecs[pass].second);
+                                               true, ecs[pass].second);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notloop4pos6, loop4pos6, ISC_FALSE);
+               result = dns_acl_merge(notloop4pos6, loop4pos6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                inaddr.s_addr = htonl(0x7f000001);      /* 127.0.0.1 */
                isc_netaddr_fromin(&addr, &inaddr);
                result = dns_iptable_addprefix2(loop4neg6->iptable, &addr, 32,
-                                               ISC_TRUE, ecs[pass].first);
+                                               true, ecs[pass].first);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                addr.family = AF_INET6;                 /* !f700:0001::/32 */
                result = dns_iptable_addprefix2(loop4neg6->iptable, &addr, 32,
-                                               ISC_FALSE, ecs[pass].second);
+                                               false, ecs[pass].second);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-               result = dns_acl_merge(notloop4neg6, loop4neg6, ISC_FALSE);
+               result = dns_acl_merge(notloop4neg6, loop4neg6, false);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                if (!ecs[pass].first && !ecs[pass].second) {
index d929a093e9585644d100f09f03e01c981a80d765..d12a49773db10d8f2789435579818332d7847ef7 100644 (file)
@@ -78,7 +78,7 @@ ATF_TC_BODY(class, tc) {
        isc_result_t result;
        dns_db_t *db = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
@@ -101,7 +101,7 @@ ATF_TC_BODY(dbtype, tc) {
        isc_result_t result;
        dns_db_t *db = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* DB has zone semantics */
@@ -140,7 +140,7 @@ ATF_TC_BODY(version, tc) {
        dns_dbnode_t *node = NULL;
        dns_rdataset_t rdataset;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_zone, "test.test",
@@ -158,7 +158,7 @@ ATF_TC_BODY(version, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        dns_rdataset_disassociate(&rdataset);
        dns_db_detachnode(db, &node);
-       dns_db_closeversion(db, &ver, ISC_FALSE);
+       dns_db_closeversion(db, &ver, false);
 
        /* Open new version for writing */
        dns_db_currentversion(db, &ver);
@@ -185,7 +185,7 @@ ATF_TC_BODY(version, tc) {
                             foundname, &rdataset, NULL);
        ATF_REQUIRE_EQ(result, DNS_R_NXDOMAIN);
 
-       dns_db_closeversion(db, &new, ISC_TRUE);
+       dns_db_closeversion(db, &new, true);
 
        /* But this should still succeed */
        result = dns_db_find(db, name, ver, dns_rdatatype_a, 0, 0, &node,
@@ -193,7 +193,7 @@ ATF_TC_BODY(version, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        dns_rdataset_disassociate(&rdataset);
        dns_db_detachnode(db, &node);
-       dns_db_closeversion(db, &ver, ISC_FALSE);
+       dns_db_closeversion(db, &ver, false);
 
        dns_db_detach(&db);
        dns_test_end();
index 530952c1d4cd251c45e4a690704c8953a95c7cfd..2ddd24340eb44253f436d91723bb83b8b28fb9fd 100644 (file)
@@ -61,7 +61,7 @@ ATF_TC_BODY(diffx_same, tc) {
        isc_result_t result;
        dns_diff_t diff;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        test_create(tc, &olddb, &newdb);
@@ -71,7 +71,7 @@ ATF_TC_BODY(diffx_same, tc) {
        result = dns_db_diffx(&diff, newdb, NULL, olddb, NULL, NULL);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       ATF_REQUIRE_EQ(ISC_LIST_EMPTY(diff.tuples), ISC_TRUE);
+       ATF_REQUIRE_EQ(ISC_LIST_EMPTY(diff.tuples), true);
 
        dns_diff_clear(&diff);
        dns_db_detach(&newdb);
@@ -93,7 +93,7 @@ ATF_TC_BODY(diffx_add, tc) {
        dns_diff_t diff;
        int count = 0;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        test_create(tc, &olddb, &newdb);
@@ -103,7 +103,7 @@ ATF_TC_BODY(diffx_add, tc) {
        result = dns_db_diffx(&diff, newdb, NULL, olddb, NULL, NULL);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       ATF_REQUIRE_EQ(ISC_LIST_EMPTY(diff.tuples), ISC_FALSE);
+       ATF_REQUIRE_EQ(ISC_LIST_EMPTY(diff.tuples), false);
        for (tuple = ISC_LIST_HEAD(diff.tuples); tuple != NULL;
             tuple = ISC_LIST_NEXT(tuple, link)) {
                ATF_REQUIRE_EQ(tuple->op, DNS_DIFFOP_ADD);
@@ -131,7 +131,7 @@ ATF_TC_BODY(diffx_remove, tc) {
        dns_diff_t diff;
        int count = 0;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        test_create(tc, &olddb, &newdb);
@@ -141,7 +141,7 @@ ATF_TC_BODY(diffx_remove, tc) {
        result = dns_db_diffx(&diff, newdb, NULL, olddb, NULL, NULL);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       ATF_REQUIRE_EQ(ISC_LIST_EMPTY(diff.tuples), ISC_FALSE);
+       ATF_REQUIRE_EQ(ISC_LIST_EMPTY(diff.tuples), false);
        for (tuple = ISC_LIST_HEAD(diff.tuples); tuple != NULL;
             tuple = ISC_LIST_NEXT(tuple, link)) {
                ATF_REQUIRE_EQ(tuple->op, DNS_DIFFOP_DEL);
index dd5c9d15adbb509acb433b39758ba54219f0d91a..643627b28dae4b42037c9d8a778945165c7bb71e 100644 (file)
@@ -52,7 +52,7 @@ test_create(const atf_tc_t *tc) {
        dns_db_t *db = NULL;
        dns_dbiterator_t *iter = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_cache, TEST_ORIGIN,
@@ -100,7 +100,7 @@ test_walk(const atf_tc_t *tc) {
 
        name = dns_fixedname_initname(&f);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_cache, TEST_ORIGIN,
@@ -162,7 +162,7 @@ static void test_reverse(const atf_tc_t *tc) {
 
        name = dns_fixedname_initname(&f);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_cache, TEST_ORIGIN,
@@ -223,7 +223,7 @@ static void test_seek(const atf_tc_t *tc) {
        name = dns_fixedname_initname(&f1);
        seekname = dns_fixedname_initname(&f2);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_cache, TEST_ORIGIN,
@@ -293,7 +293,7 @@ static void test_seek_empty(const atf_tc_t *tc) {
 
        seekname = dns_fixedname_initname(&f1);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_cache, TEST_ORIGIN,
@@ -349,7 +349,7 @@ static void test_seek_nx(const atf_tc_t *tc) {
 
        seekname = dns_fixedname_initname(&f1);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_cache, TEST_ORIGIN,
index cfce9dd8d1afb0c6bf2e87c2e63124c379e58961..275fc9bf85fce77bd7b4fa30ad78afa1a40fc6dd 100644 (file)
@@ -68,7 +68,7 @@ setup_db(void) {
 static void
 close_db(void) {
        if (v1 != NULL) {
-               dns_db_closeversion(db1, &v1, ISC_FALSE);
+               dns_db_closeversion(db1, &v1, false);
                ATF_REQUIRE_EQ(v1, NULL);
        }
        if (db1 != NULL) {
@@ -77,7 +77,7 @@ close_db(void) {
        }
 
        if (v2 != NULL) {
-               dns_db_closeversion(db2, &v2, ISC_FALSE);
+               dns_db_closeversion(db2, &v2, false);
                ATF_REQUIRE_EQ(v2, NULL);
        }
        if (db2 != NULL) {
@@ -96,7 +96,7 @@ attachversion(isc_assertioncallback_t callback) {
        isc_result_t result;
        dns_dbversion_t *v = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -107,7 +107,7 @@ attachversion(isc_assertioncallback_t callback) {
                atf_tc_fail("dns_db_attachversion did not assert");
 
        ATF_REQUIRE_EQ(v, v1);
-       dns_db_closeversion(db1, &v, ISC_FALSE);
+       dns_db_closeversion(db1, &v, false);
        ATF_REQUIRE_EQ(v, NULL);
 
        close_db();
@@ -140,13 +140,13 @@ static void
 closeversion(isc_assertioncallback_t callback) {
        isc_result_t result;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
 
        isc_assertion_setcallback(callback);
-       dns_db_closeversion(db1, VERSIONP(callback), ISC_FALSE);
+       dns_db_closeversion(db1, VERSIONP(callback), false);
        if (callback != NULL)
                atf_tc_fail("dns_db_closeversion did not assert");
        ATF_REQUIRE_EQ(v1, NULL);
@@ -183,7 +183,7 @@ find(isc_assertioncallback_t callback) {
        dns_rdataset_t rdataset;
        dns_fixedname_t fixed;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -231,12 +231,12 @@ allrdatasets(isc_assertioncallback_t callback) {
        dns_dbnode_t *node = NULL;
        dns_rdatasetiter_t *iterator = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
 
-       result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
+       result = dns_db_findnode(db1, dns_rootname, false, &node);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_assertion_setcallback(callback);
@@ -286,7 +286,7 @@ findrdataset(isc_assertioncallback_t callback) {
        dns_fixedname_t fixed;
        dns_dbnode_t *node = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -294,7 +294,7 @@ findrdataset(isc_assertioncallback_t callback) {
        dns_rdataset_init(&rdataset);
        dns_fixedname_init(&fixed);
 
-       result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
+       result = dns_db_findnode(db1, dns_rootname, false, &node);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_assertion_setcallback(callback);
@@ -341,7 +341,7 @@ deleterdataset(isc_assertioncallback_t callback) {
        dns_fixedname_t fixed;
        dns_dbnode_t *node = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -349,7 +349,7 @@ deleterdataset(isc_assertioncallback_t callback) {
        dns_rdataset_init(&rdataset);
        dns_fixedname_init(&fixed);
 
-       result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
+       result = dns_db_findnode(db1, dns_rootname, false, &node);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_assertion_setcallback(callback);
@@ -397,7 +397,7 @@ subtract(isc_assertioncallback_t callback) {
        dns_dbnode_t *node = NULL;
        dns_rdatalist_t rdatalist;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -411,7 +411,7 @@ subtract(isc_assertioncallback_t callback) {
        result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
+       result = dns_db_findnode(db1, dns_rootname, false, &node);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_assertion_setcallback(callback);
@@ -456,7 +456,7 @@ dump(isc_assertioncallback_t callback) {
        isc_result_t result;
        FILE *f = NULL;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -507,7 +507,7 @@ addrdataset(isc_assertioncallback_t callback) {
        dns_dbnode_t *node = NULL;
        dns_rdatalist_t rdatalist;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -521,7 +521,7 @@ addrdataset(isc_assertioncallback_t callback) {
        result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
+       result = dns_db_findnode(db1, dns_rootname, false, &node);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_assertion_setcallback(callback);
@@ -570,7 +570,7 @@ getnsec3parameters(isc_assertioncallback_t callback) {
        unsigned char salt[DNS_NSEC3_SALTSIZE];
        size_t salt_length = sizeof(salt);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -621,7 +621,7 @@ resigned(isc_assertioncallback_t callback) {
        isc_buffer_t b;
        unsigned char buf[1024];
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        setup_db();
@@ -661,7 +661,7 @@ resigned(isc_assertioncallback_t callback) {
        rdataset.attributes |= DNS_RDATASETATTR_RESIGN;
        rdataset.resign = 7200;
 
-       result = dns_db_findnode(db1, dns_rootname, ISC_FALSE, &node);
+       result = dns_db_findnode(db1, dns_rootname, false, &node);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_db_addrdataset(db1, node, v1, 0, &rdataset, 0, &added);
index 9fa20ce7b767b2bd72b793133101897236726986..6216b4e1bef2c0a4c44763dd6a5f1d2bd8362e98 100644 (file)
@@ -46,7 +46,7 @@ ATF_TC_BODY(isc_dh_computesecret, tc) {
 
        UNUSED(tc);
 
-       ret = dns_test_begin(NULL, ISC_FALSE);
+       ret = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(ret, ISC_R_SUCCESS);
 
        name = dns_fixedname_initname(&fname);
index 986f16ead1e0d38545fe0d53c4311b89bf5b8a5e..156fe9ff99db2144e467b256e8bc1bc8c737102d 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <atf-c.h>
@@ -79,7 +80,7 @@ ATF_TC_BODY(dispatchset_create, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = make_dispatchset(1);
@@ -103,7 +104,7 @@ ATF_TC_BODY(dispatchset_get, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = make_dispatchset(1);
@@ -197,7 +198,7 @@ nameserver(isc_task_t *task, isc_event_t *event) {
 
 static dns_dispatch_t *dispatch = NULL;
 static dns_dispentry_t *dispentry = NULL;
-static isc_boolean_t first = ISC_TRUE;
+static bool first = true;
 static isc_mutex_t lock;
 static isc_sockaddr_t local;
 static unsigned int responses = 0;
@@ -206,13 +207,13 @@ static void
 response(isc_task_t *task, isc_event_t *event) {
        dns_dispatchevent_t *devent = (dns_dispatchevent_t *)event;
        isc_result_t result;
-       isc_boolean_t wasfirst;
+       bool wasfirst;
 
        UNUSED(task);
 
        LOCK(&lock);
        wasfirst = first;
-       first = ISC_FALSE;
+       first = false;
        responses++;
        UNLOCK(&lock);
 
@@ -257,7 +258,7 @@ ATF_TC_BODY(dispatch_getnext, tc) {
        result = isc_mutex_init(&lock);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_task_create(taskmgr, 0, &task);
@@ -289,7 +290,7 @@ ATF_TC_BODY(dispatch_getnext, tc) {
        result = isc_socket_getsockname(sock, &local);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       first = ISC_TRUE;
+       first = true;
        region.base = rbuf;
        region.length = sizeof(rbuf);
        result = isc_socket_recv(sock, &region, 1, task, nameserver, sock);
index a1e7333aabf15fcc3f10f5cfac37f4ca35acf0eb..56e3da443eedc6ff590b1333dae502df7a3e2d40 100644 (file)
@@ -66,7 +66,7 @@ ATF_TC_BODY(create, tc) {
 
        cleanup();
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        fopt = fstrm_iothr_options_init();
@@ -146,7 +146,7 @@ ATF_TC_BODY(send, tc) {
 
        cleanup();
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        result = dns_test_makeview("test", &view);
@@ -230,14 +230,14 @@ ATF_TC_BODY(send, tc) {
                        break;
                }
 
-               dns_dt_send(view, dt, q, r, ISC_FALSE, &zr, &p, &f, m);
-               dns_dt_send(view, dt, q, r, ISC_FALSE, &zr, NULL, &f, m);
-               dns_dt_send(view, dt, q, r, ISC_FALSE, &zr, &p, NULL, m);
-               dns_dt_send(view, dt, q, r, ISC_FALSE, &zr, NULL, NULL, m);
-               dns_dt_send(view, dt, q, r, ISC_TRUE, &zr, &p, &f, m);
-               dns_dt_send(view, dt, q, r, ISC_TRUE, &zr, NULL, &f, m);
-               dns_dt_send(view, dt, q, r, ISC_TRUE, &zr, &p, NULL, m);
-               dns_dt_send(view, dt, q, r, ISC_TRUE, &zr, NULL, NULL, m);
+               dns_dt_send(view, dt, q, r, false, &zr, &p, &f, m);
+               dns_dt_send(view, dt, q, r, false, &zr, NULL, &f, m);
+               dns_dt_send(view, dt, q, r, false, &zr, &p, NULL, m);
+               dns_dt_send(view, dt, q, r, false, &zr, NULL, NULL, m);
+               dns_dt_send(view, dt, q, r, true, &zr, &p, &f, m);
+               dns_dt_send(view, dt, q, r, true, &zr, NULL, &f, m);
+               dns_dt_send(view, dt, q, r, true, &zr, &p, NULL, m);
+               dns_dt_send(view, dt, q, r, true, &zr, NULL, NULL, m);
        }
 
        dns_dt_detach(&view->dtenv);
@@ -297,7 +297,7 @@ ATF_TC_BODY(totext, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        result = dns_dt_open(TAPSAVED, dns_dtmode_file, mctx, &handle);
index f9da5137dd6d895ee453b48d4decf5a0f4b83f91..51bb90bf64eb47e391815ba2f0de3fc2c198074c 100644 (file)
@@ -16,6 +16,7 @@
 #include <atf-c.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
@@ -55,11 +56,11 @@ isc_task_t *maintask = NULL;
 isc_timermgr_t *timermgr = NULL;
 isc_socketmgr_t *socketmgr = NULL;
 dns_zonemgr_t *zonemgr = NULL;
-isc_boolean_t app_running = ISC_FALSE;
+bool app_running = false;
 int ncpus;
-isc_boolean_t debug_mem_record = ISC_TRUE;
+bool debug_mem_record = true;
 
-static isc_boolean_t hash_active = ISC_FALSE, dst_active = ISC_FALSE;
+static bool hash_active = false, dst_active = false;
 
 /*
  * Logging categories: this needs to match the list in bin/named/log.c.
@@ -111,7 +112,7 @@ create_managers(void) {
 }
 
 isc_result_t
-dns_test_begin(FILE *logfile, isc_boolean_t start_managers) {
+dns_test_begin(FILE *logfile, bool start_managers) {
        isc_result_t result;
 
        if (start_managers)
@@ -122,10 +123,10 @@ dns_test_begin(FILE *logfile, isc_boolean_t start_managers) {
        CHECK(isc_entropy_create(mctx, &ectx));
 
        CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE));
-       hash_active = ISC_TRUE;
+       hash_active = true;
 
        CHECK(dst_lib_init(mctx, ectx, ISC_ENTROPY_BLOCKING));
-       dst_active = ISC_TRUE;
+       dst_active = true;
 
        if (logfile != NULL) {
                isc_logdestination_t destination;
@@ -172,11 +173,11 @@ void
 dns_test_end(void) {
        if (dst_active) {
                dst_lib_destroy();
-               dst_active = ISC_FALSE;
+               dst_active = false;
        }
        if (hash_active) {
                isc_hash_destroy();
-               hash_active = ISC_FALSE;
+               hash_active = false;
        }
        if (ectx != NULL)
                isc_entropy_detach(&ectx);
@@ -211,7 +212,7 @@ dns_test_makeview(const char *name, dns_view_t **viewp) {
 
 isc_result_t
 dns_test_makezone(const char *name, dns_zone_t **zonep, dns_view_t *view,
-                 isc_boolean_t createview)
+                 bool createview)
 {
        dns_fixedname_t fixed_origin;
        dns_zone_t *zone = NULL;
index e3612529b0bcfb42c818b85a85969b5f83fe519f..ebbca6c0952492e0b67e1b654cc170474954ceff 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/entropy.h>
@@ -54,12 +55,12 @@ extern isc_task_t *maintask;
 extern isc_timermgr_t *timermgr;
 extern isc_socketmgr_t *socketmgr;
 extern dns_zonemgr_t *zonemgr;
-extern isc_boolean_t app_running;
+extern bool app_running;
 extern int ncpus;
-extern isc_boolean_t debug_mem_record;
+extern bool debug_mem_record;
 
 isc_result_t
-dns_test_begin(FILE *logfile, isc_boolean_t create_managers);
+dns_test_begin(FILE *logfile, bool create_managers);
 
 void
 dns_test_end(void);
@@ -85,7 +86,7 @@ dns_test_makeview(const char *name, dns_view_t **viewp);
  */
 isc_result_t
 dns_test_makezone(const char *name, dns_zone_t **zonep, dns_view_t *view,
-                 isc_boolean_t createview);
+                 bool createview);
 
 isc_result_t
 dns_test_setupzonemgr(void);
index cc9fcd0207df56e04da1c6d58f21393f948802e7..421ab2f5abdaad4f33a1d906b4e04df4008f60fd 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/file.h>
@@ -107,7 +108,7 @@ sig_fromfile(const char *path, isc_buffer_t *buf) {
 
 static void
 check_sig(const char *datapath, const char *sigpath, const char *keyname,
-         dns_keytag_t id, dns_secalg_t alg, int type, isc_boolean_t expect)
+         dns_keytag_t id, dns_secalg_t alg, int type, bool expect)
 {
        isc_result_t result;
        size_t rval, len;
@@ -177,7 +178,7 @@ check_sig(const char *datapath, const char *sigpath, const char *keyname,
        isc_buffer_remainingregion(&sigbuf, &sigreg);
 
        result = dst_context_create3(key, mctx, DNS_LOGCATEGORY_GENERAL,
-                                    ISC_FALSE, &ctx);
+                                    false, &ctx);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dst_context_adddata(ctx, &datareg);
@@ -200,7 +201,7 @@ ATF_TC_BODY(sig, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        struct {
                const char *datapath;
@@ -208,29 +209,29 @@ ATF_TC_BODY(sig, tc) {
                const char *keyname;
                dns_keytag_t keyid;
                dns_secalg_t alg;
-               isc_boolean_t expect;
+               bool expect;
        } testcases[] = {
                {
                        "testdata/dst/test1.data",
                        "testdata/dst/test1.dsasig",
-                       "test.", 23616, DST_ALG_DSA, ISC_TRUE
+                       "test.", 23616, DST_ALG_DSA, true
                },
                {
                        "testdata/dst/test1.data",
                        "testdata/dst/test1.rsasig",
-                       "test.", 54622, DST_ALG_RSAMD5, ISC_TRUE
+                       "test.", 54622, DST_ALG_RSAMD5, true
                },
                {
                        /* wrong sig */
                        "testdata/dst/test1.data",
                        "testdata/dst/test1.dsasig",
-                       "test.", 54622, DST_ALG_RSAMD5, ISC_FALSE
+                       "test.", 54622, DST_ALG_RSAMD5, false
                },
                {
                        /* wrong data */
                        "testdata/dst/test2.data",
                        "testdata/dst/test1.dsasig",
-                       "test.", 23616, DST_ALG_DSA, ISC_FALSE
+                       "test.", 23616, DST_ALG_DSA, false
                },
        };
        unsigned int i;
index 4091457ca4ab494d416e9049656dd9b709d20f8e..4e8a5f0f931137d5d34879f0d4305eda7a15fe5b 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/print.h>
@@ -131,7 +132,7 @@ load_geoip(const char *dir) {
                      method, "NetSpeed");
 }
 
-static isc_boolean_t
+static bool
 do_lookup_string(const char *addr, uint8_t *scope,
                 dns_geoip_subtype_t subtype, const char *string)
 {
@@ -148,7 +149,7 @@ do_lookup_string(const char *addr, uint8_t *scope,
        return (dns_geoip_match(&na, scope, &geoip, &elt));
 }
 
-static isc_boolean_t
+static bool
 do_lookup_string_v6(const char *addr, uint8_t *scope,
                    dns_geoip_subtype_t subtype, const char *string)
 {
@@ -165,7 +166,7 @@ do_lookup_string_v6(const char *addr, uint8_t *scope,
        return (dns_geoip_match(&na, scope, &geoip, &elt));
 }
 
-static isc_boolean_t
+static bool
 do_lookup_int(const char *addr, uint8_t *scope,
              dns_geoip_subtype_t subtype, int id)
 {
@@ -193,12 +194,12 @@ ATF_TC_HEAD(country, tc) {
 }
 ATF_TC_BODY(country, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
        uint8_t scope;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -244,12 +245,12 @@ ATF_TC_HEAD(country_v6, tc) {
 }
 ATF_TC_BODY(country_v6, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
        uint8_t scope;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -285,11 +286,11 @@ ATF_TC_HEAD(city, tc) {
 }
 ATF_TC_BODY(city, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -348,11 +349,11 @@ ATF_TC_HEAD(city_v6, tc) {
 }
 ATF_TC_BODY(city_v6, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -407,11 +408,11 @@ ATF_TC_HEAD(region, tc) {
 }
 ATF_TC_BODY(region, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -449,11 +450,11 @@ ATF_TC_HEAD(best, tc) {
 }
 ATF_TC_BODY(best, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -529,11 +530,11 @@ ATF_TC_HEAD(asnum, tc) {
 }
 ATF_TC_BODY(asnum, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -559,11 +560,11 @@ ATF_TC_HEAD(isp, tc) {
 }
 ATF_TC_BODY(isp, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -588,11 +589,11 @@ ATF_TC_HEAD(org, tc) {
 }
 ATF_TC_BODY(org, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -617,11 +618,11 @@ ATF_TC_HEAD(domain, tc) {
 }
 ATF_TC_BODY(domain, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -646,11 +647,11 @@ ATF_TC_HEAD(netspeed, tc) {
 }
 ATF_TC_BODY(netspeed, tc) {
        isc_result_t result;
-       isc_boolean_t match;
+       bool match;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* Use databases from the geoip system test */
@@ -708,4 +709,3 @@ ATF_TP_ADD_TCS(tp) {
 
        return (atf_no_error());
 }
-
index cfb1f137a447391e3fe44611587eb8062ba99118..204c6cccb69c02404658294219415d59a8a02b94 100644 (file)
@@ -190,7 +190,7 @@ ATF_TC_BODY(isc_gost_md, tc) {
                { NULL, 0, NULL, 1 }
        };
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        hash_testcase_t *testcase = testcases;
@@ -260,7 +260,7 @@ ATF_TC_BODY(isc_gost_private, tc) {
        int len;
        unsigned char *q;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* raw parse */
@@ -324,17 +324,17 @@ ATF_TC_BODY(isc_gost_private, tc) {
        CK_ULONG siglen;
        pk11_context_t pk11_ctx;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE(result == ISC_R_SUCCESS);
 
        /* create the private key */
        memset(&pk11_ctx, 0, sizeof(pk11_ctx));
-       ATF_REQUIRE(pk11_get_session(&pk11_ctx, OP_GOST, ISC_TRUE,
-                                    ISC_FALSE, ISC_FALSE, NULL,
+       ATF_REQUIRE(pk11_get_session(&pk11_ctx, OP_GOST, true,
+                                    false, false, NULL,
                                     pk11_get_best_token(OP_GOST)) ==
                    ISC_R_SUCCESS);
        pk11_ctx.object = CK_INVALID_HANDLE;
-       pk11_ctx.ontoken = ISC_FALSE;
+       pk11_ctx.ontoken = false;
        ATF_REQUIRE(pkcs_C_CreateObject(pk11_ctx.session, keyTemplate,
                                        (CK_ULONG) 9, &pk11_ctx.object) ==
                    CKR_OK);
index e753308a6e565269767c35d2152981e7125640e4..ed69fccd7976b236135404be288e0e997da041c4 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <atf-c.h>
 
-#include <unistd.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <unistd.h>
@@ -130,7 +130,7 @@ create_tables() {
 
        /* Add a normal key */
        create_key(257, 3, 5, "example.com", keystr1, &key);
-       ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
+       ATF_REQUIRE_EQ(dns_keytable_add(keytable, false, &key),
                       ISC_R_SUCCESS);
 
        /* Add a null key */
@@ -142,7 +142,7 @@ create_tables() {
        isc_stdtime_get(&now);
        ATF_REQUIRE_EQ(dns_ntatable_add(ntatable,
                                        str2name("insecure.example"),
-                                       ISC_FALSE, now, 3600),
+                                       false, now, 3600),
                       ISC_R_SUCCESS);
 }
 
@@ -172,7 +172,7 @@ ATF_TC_BODY(add, tc) {
 
        UNUSED(tc);
 
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_TRUE), ISC_R_SUCCESS);
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, true), ISC_R_SUCCESS);
        create_tables();
 
        /*
@@ -189,7 +189,7 @@ ATF_TC_BODY(add, tc) {
         * nextkeynode() should still return NOTFOUND.
         */
        create_key(257, 3, 5, "example.com", keystr1, &key);
-       ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
+       ATF_REQUIRE_EQ(dns_keytable_add(keytable, false, &key),
                       ISC_R_SUCCESS);
        ATF_REQUIRE_EQ(dns_keytable_nextkeynode(keytable, keynode,
                                                &next_keynode), ISC_R_NOTFOUND);
@@ -197,7 +197,7 @@ ATF_TC_BODY(add, tc) {
        /* Add another key (different keydata) */
        dns_keytable_detachkeynode(keytable, &keynode);
        create_key(257, 3, 5, "example.com", keystr2, &key);
-       ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
+       ATF_REQUIRE_EQ(dns_keytable_add(keytable, false, &key),
                       ISC_R_SUCCESS);
        ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("example.com"),
                                         &keynode), ISC_R_SUCCESS);
@@ -213,7 +213,7 @@ ATF_TC_BODY(add, tc) {
        ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("null.example"),
                                         &null_keynode), ISC_R_SUCCESS);
        create_key(257, 3, 5, "null.example", keystr2, &key);
-       ATF_REQUIRE_EQ(dns_keytable_add(keytable, ISC_FALSE, &key),
+       ATF_REQUIRE_EQ(dns_keytable_add(keytable, false, &key),
                       ISC_R_SUCCESS);
        ATF_REQUIRE_EQ(dns_keytable_find(keytable, str2name("null.example"),
                                         &keynode), ISC_R_SUCCESS);
@@ -251,7 +251,7 @@ ATF_TC_HEAD(delete, tc) {
 ATF_TC_BODY(delete, tc) {
        UNUSED(tc);
 
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_TRUE), ISC_R_SUCCESS);
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, true), ISC_R_SUCCESS);
        create_tables();
 
        /* dns_keytable_delete requires exact match */
@@ -284,7 +284,7 @@ ATF_TC_BODY(deletekeynode, tc) {
 
        UNUSED(tc);
 
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_TRUE), ISC_R_SUCCESS);
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, true), ISC_R_SUCCESS);
        create_tables();
 
        /* key name doesn't match */
@@ -345,7 +345,7 @@ ATF_TC_BODY(find, tc) {
 
        UNUSED(tc);
 
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_TRUE), ISC_R_SUCCESS);
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, true), ISC_R_SUCCESS);
        create_tables();
 
        /*
@@ -372,11 +372,11 @@ ATF_TC_BODY(find, tc) {
        ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
                                                     str2name("example.com"),
                                                     name), ISC_R_SUCCESS);
-       ATF_REQUIRE_EQ(dns_name_equal(name, str2name("example.com")), ISC_TRUE);
+       ATF_REQUIRE_EQ(dns_name_equal(name, str2name("example.com")), true);
        ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
                                                     str2name("s.example.com"),
                                                     name), ISC_R_SUCCESS);
-       ATF_REQUIRE_EQ(dns_name_equal(name, str2name("example.com")), ISC_TRUE);
+       ATF_REQUIRE_EQ(dns_name_equal(name, str2name("example.com")), true);
        ATF_REQUIRE_EQ(dns_keytable_finddeepestmatch(keytable,
                                                     str2name("example.org"),
                                                     name), ISC_R_NOTFOUND);
@@ -384,7 +384,7 @@ ATF_TC_BODY(find, tc) {
                                                     str2name("null.example"),
                                                     name), ISC_R_SUCCESS);
        ATF_REQUIRE_EQ(dns_name_equal(name, str2name("null.example")),
-                      ISC_TRUE);
+                      true);
 
        /*
         * dns_keytable_findkeynode() requires exact name, algorithm, keytag
@@ -426,13 +426,13 @@ ATF_TC_HEAD(issecuredomain, tc) {
        atf_tc_set_md_var(tc, "descr", "check issecuredomain()");
 }
 ATF_TC_BODY(issecuredomain, tc) {
-       isc_boolean_t issecure;
+       bool issecure;
        const char **n;
        const char *names[] = {"example.com", "sub.example.com",
                               "null.example", "sub.null.example", NULL};
 
        UNUSED(tc);
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_TRUE), ISC_R_SUCCESS);
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, true), ISC_R_SUCCESS);
        create_tables();
 
        /*
@@ -447,7 +447,7 @@ ATF_TC_BODY(issecuredomain, tc) {
                                                           NULL,
                                                           &issecure),
                               ISC_R_SUCCESS);
-               ATF_REQUIRE_EQ(issecure, ISC_TRUE);
+               ATF_REQUIRE_EQ(issecure, true);
        }
 
        /*
@@ -459,7 +459,7 @@ ATF_TC_BODY(issecuredomain, tc) {
                                                   NULL,
                                                   &issecure),
                       ISC_R_SUCCESS);
-       ATF_REQUIRE_EQ(issecure, ISC_FALSE);
+       ATF_REQUIRE_EQ(issecure, false);
 
        destroy_tables();
        dns_test_end();
@@ -472,7 +472,7 @@ ATF_TC_HEAD(dump, tc) {
 ATF_TC_BODY(dump, tc) {
        UNUSED(tc);
 
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_TRUE), ISC_R_SUCCESS);
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, true), ISC_R_SUCCESS);
        create_tables();
 
        /*
@@ -492,13 +492,13 @@ ATF_TC_HEAD(nta, tc) {
 ATF_TC_BODY(nta, tc) {
        isc_result_t result;
        dst_key_t *key = NULL;
-       isc_boolean_t issecure, covered;
+       bool issecure, covered;
        dns_view_t *myview = NULL;
        isc_stdtime_t now;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_makeview("view", &myview);
@@ -518,26 +518,26 @@ ATF_TC_BODY(nta, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        create_key(257, 3, 5, "example", keystr1, &key);
-       result = dns_keytable_add(keytable, ISC_FALSE, &key);
+       result = dns_keytable_add(keytable, false, &key);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_stdtime_get(&now);
        result = dns_ntatable_add(ntatable,
                                  str2name("insecure.example"),
-                                 ISC_FALSE, now, 1);
+                                 false, now, 1);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* Should be secure */
        result = dns_view_issecuredomain(myview,
                                         str2name("test.secure.example"),
-                                        now, ISC_TRUE, &issecure);
+                                        now, true, &issecure);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK(issecure);
 
        /* Should not be secure */
        result = dns_view_issecuredomain(myview,
                                         str2name("test.insecure.example"),
-                                        now, ISC_TRUE, &issecure);
+                                        now, true, &issecure);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK(!issecure);
 
@@ -554,22 +554,22 @@ ATF_TC_BODY(nta, tc) {
        /* As of now + 2, the NTA should be clear */
        result = dns_view_issecuredomain(myview,
                                         str2name("test.insecure.example"),
-                                        now + 2, ISC_TRUE, &issecure);
+                                        now + 2, true, &issecure);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK(issecure);
 
        /* Now check deletion */
        result = dns_view_issecuredomain(myview, str2name("test.new.example"),
-                                        now, ISC_TRUE, &issecure);
+                                        now, true, &issecure);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK(issecure);
 
        result = dns_ntatable_add(ntatable, str2name("new.example"),
-                                 ISC_FALSE, now, 3600);
+                                 false, now, 3600);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_view_issecuredomain(myview, str2name("test.new.example"),
-                                        now, ISC_TRUE, &issecure);
+                                        now, true, &issecure);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK(!issecure);
 
@@ -577,7 +577,7 @@ ATF_TC_BODY(nta, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_view_issecuredomain(myview, str2name("test.new.example"),
-                                        now, ISC_TRUE, &issecure);
+                                        now, true, &issecure);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK(issecure);
 
index 3ad87c2b1c7aeef7a4a0438228cf4d84898a7aef..5cce2f38d1aa394f4184d22ef22bd35d50080e90 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 
@@ -44,7 +45,7 @@
 #define TEST_ORIGIN    "test"
 
 static dns_masterrawheader_t header;
-static isc_boolean_t headerset;
+static bool headerset;
 
 dns_name_t dns_origin;
 char origin[sizeof(TEST_ORIGIN)];
@@ -67,7 +68,7 @@ add_callback(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
        UNUSED(arg);
 
        isc_buffer_init(&target, buf, BIGBUFLEN);
-       result = dns_rdataset_totext(dataset, owner, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(dataset, owner, false, false,
                                     &target);
        return(result);
 }
@@ -76,7 +77,7 @@ static void
 rawdata_callback(dns_zone_t *zone, dns_masterrawheader_t *h) {
        UNUSED(zone);
        header = *h;
-       headerset = ISC_TRUE;
+       headerset = true;
 }
 
 static isc_result_t
@@ -110,7 +111,7 @@ setup_master(void (*warn)(struct dns_rdatacallbacks *, const char *, ...),
                callbacks.warn = warn;
        if (error != NULL)
                callbacks.error = error;
-       headerset = ISC_FALSE;
+       headerset = false;
        return (result);
 }
 
@@ -126,7 +127,7 @@ test_master(const char *testfile, dns_masterformat_t format,
                return(result);
 
        result = dns_master_loadfile2(testfile, &dns_origin, &dns_origin,
-                                     dns_rdataclass_in, ISC_TRUE,
+                                     dns_rdataclass_in, true,
                                      &callbacks, mctx, format);
        return (result);
 }
@@ -152,7 +153,7 @@ ATF_TC_BODY(load, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master1.data",
@@ -175,7 +176,7 @@ ATF_TC_BODY(unexpected, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master2.data",
@@ -198,7 +199,7 @@ ATF_TC_BODY(noowner, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master3.data",
@@ -222,7 +223,7 @@ ATF_TC_BODY(nottl, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master4.data",
@@ -245,7 +246,7 @@ ATF_TC_BODY(badclass, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master5.data",
@@ -266,7 +267,7 @@ ATF_TC_BODY(toobig, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master15.data",
@@ -288,7 +289,7 @@ ATF_TC_BODY(maxrdata, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master16.data",
@@ -309,7 +310,7 @@ ATF_TC_BODY(dnskey, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master6.data",
@@ -331,7 +332,7 @@ ATF_TC_BODY(dnsnokey, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master7.data",
@@ -352,7 +353,7 @@ ATF_TC_BODY(include, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master8.data",
@@ -374,7 +375,7 @@ ATF_TC_BODY(master_includelist, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = setup_master(NULL, NULL);
@@ -382,7 +383,7 @@ ATF_TC_BODY(master_includelist, tc) {
 
        result = dns_master_loadfile4("testdata/master/master8.data",
                                      &dns_origin, &dns_origin,
-                                     dns_rdataclass_in, 0, ISC_TRUE,
+                                     dns_rdataclass_in, 0, true,
                                      &callbacks, include_callback,
                                      &filename, mctx, dns_masterformat_text);
        ATF_CHECK_EQ(result, DNS_R_SEENINCLUDE);
@@ -406,7 +407,7 @@ ATF_TC_BODY(includefail, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master9.data",
@@ -428,7 +429,7 @@ ATF_TC_BODY(blanklines, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master10.data",
@@ -449,7 +450,7 @@ ATF_TC_BODY(leadingzero, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = test_master("testdata/master/master11.data",
@@ -472,7 +473,7 @@ ATF_TC_BODY(totext, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* First, test with an empty rdataset */
@@ -512,7 +513,7 @@ ATF_TC_BODY(loadraw, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* Raw format version 0 */
@@ -569,7 +570,7 @@ ATF_TC_BODY(dumpraw, tc) {
                                   0, &target);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_db_create(mctx, "rbt", &dnsorigin, dns_dbtype_zone,
@@ -608,13 +609,13 @@ ATF_TC_BODY(dumpraw, tc) {
        ATF_CHECK_EQ(header.sourceserial, 12345);
 
        unlink("test.dump");
-       dns_db_closeversion(db, &version, ISC_FALSE);
+       dns_db_closeversion(db, &version, false);
        dns_db_detach(&db);
        dns_test_end();
 }
 
 static const char *warn_expect_value;
-static isc_boolean_t warn_expect_result;
+static bool warn_expect_result;
 
 static void
 warn_expect(struct dns_rdatacallbacks *mycallbacks, const char *fmt, ...) {
@@ -627,7 +628,7 @@ warn_expect(struct dns_rdatacallbacks *mycallbacks, const char *fmt, ...) {
        vsnprintf(buf, sizeof(buf), fmt, ap);
        va_end(ap);
        if (warn_expect_value != NULL && strstr(buf, warn_expect_value) != NULL)
-               warn_expect_result = ISC_TRUE;
+               warn_expect_result = true;
 }
 
 /* Origin change test */
@@ -642,11 +643,11 @@ ATF_TC_BODY(neworigin, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        warn_expect_value = "record with inherited owner";
-       warn_expect_result = ISC_FALSE;
+       warn_expect_result = false;
        result = test_master("testdata/master/master17.data",
                             dns_masterformat_text, warn_expect, NULL);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
@@ -681,4 +682,3 @@ ATF_TP_ADD_TCS(tp) {
 
        return (atf_no_error());
 }
-
index c4eb74d8b7efc64fab90cca04c14271865d7999a..1953b41040fbe59cce08962529777f4f1a0300e7 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -144,13 +145,13 @@ compress_test(dns_name_t *name1, dns_name_t *name2, dns_name_t *name3,
        isc_buffer_setactive(&source, source.used);
 
        dns_name_init(&name, NULL);
-       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, ISC_FALSE,
+       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, false,
                                        &target) == ISC_R_SUCCESS);
-       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, ISC_FALSE,
+       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, false,
                                        &target) == ISC_R_SUCCESS);
-       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, ISC_FALSE,
+       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, false,
                                        &target) == ISC_R_SUCCESS);
-       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, ISC_FALSE,
+       RUNTIME_CHECK(dns_name_fromwire(&name, &source, dctx, false,
                                        &target) == ISC_R_SUCCESS);
        dns_decompress_invalidate(dctx);
 
@@ -176,7 +177,7 @@ ATF_TC_BODY(compression, tc) {
        unsigned char plain[] = "\003yyy\003foo\0\003bar\003yyy\003foo\0\003"
                                "bar\003yyy\003foo\0\003xxx\003bar\003foo";
 
-       ATF_REQUIRE_EQ(dns_test_begin(NULL, ISC_FALSE), ISC_R_SUCCESS);;
+       ATF_REQUIRE_EQ(dns_test_begin(NULL, false), ISC_R_SUCCESS);;
 
        dns_name_init(&name1, NULL);
        r.base = plain1;
@@ -288,30 +289,30 @@ ATF_TC_BODY(istat, tc) {
        size_t i;
        struct {
                const char *name;
-               isc_boolean_t istat;
+               bool istat;
        } data[] = {
-               { ".", ISC_FALSE },
-               { "_ta-", ISC_FALSE },
-               { "_ta-1234", ISC_TRUE },
-               { "_TA-1234", ISC_TRUE },
-               { "+TA-1234", ISC_FALSE },
-               { "_fa-1234", ISC_FALSE },
-               { "_td-1234", ISC_FALSE },
-               { "_ta_1234", ISC_FALSE },
-               { "_ta-g234", ISC_FALSE },
-               { "_ta-1h34", ISC_FALSE },
-               { "_ta-12i4", ISC_FALSE },
-               { "_ta-123j", ISC_FALSE },
-               { "_ta-1234-abcf", ISC_TRUE },
-               { "_ta-1234-abcf-ED89", ISC_TRUE },
-               { "_ta-12345-abcf-ED89", ISC_FALSE },
-               { "_ta-.example", ISC_FALSE },
-               { "_ta-1234.example", ISC_TRUE },
-               { "_ta-1234-abcf.example", ISC_TRUE },
-               { "_ta-1234-abcf-ED89.example", ISC_TRUE },
-               { "_ta-12345-abcf-ED89.example", ISC_FALSE },
-               { "_ta-1234-abcfe-ED89.example", ISC_FALSE },
-               { "_ta-1234-abcf-EcD89.example", ISC_FALSE }
+               { ".", false },
+               { "_ta-", false },
+               { "_ta-1234", true },
+               { "_TA-1234", true },
+               { "+TA-1234", false },
+               { "_fa-1234", false },
+               { "_td-1234", false },
+               { "_ta_1234", false },
+               { "_ta-g234", false },
+               { "_ta-1h34", false },
+               { "_ta-12i4", false },
+               { "_ta-123j", false },
+               { "_ta-1234-abcf", true },
+               { "_ta-1234-abcf-ED89", true },
+               { "_ta-12345-abcf-ED89", false },
+               { "_ta-.example", false },
+               { "_ta-1234.example", true },
+               { "_ta-1234-abcf.example", true },
+               { "_ta-1234-abcf-ED89.example", true },
+               { "_ta-12345-abcf-ED89.example", false },
+               { "_ta-1234-abcfe-ED89.example", false },
+               { "_ta-1234-abcf-EcD89.example", false }
        };
 
        name = dns_fixedname_initname(&fixed);
@@ -384,11 +385,11 @@ ATF_TC_HEAD(isabsolute, tc) {
 ATF_TC_BODY(isabsolute, tc) {
        struct {
                const char *namestr;
-               isc_boolean_t expect;
+               bool expect;
        } testcases[] = {
-               { "x", ISC_FALSE },
-               { "a.b.c.d.", ISC_TRUE },
-               { "x.z", ISC_FALSE}
+               { "x", false },
+               { "a.b.c.d.", true },
+               { "x.z", false}
        };
        unsigned int i;
 
@@ -421,15 +422,15 @@ ATF_TC_BODY(hash, tc) {
        struct {
                const char *name1;
                const char *name2;
-               isc_boolean_t expect;
-               isc_boolean_t expecti;
+               bool expect;
+               bool expecti;
        } testcases[] = {
-               { "a.b.c.d", "A.B.C.D", ISC_TRUE, ISC_FALSE },
-               { "a.b.c.d.", "A.B.C.D.", ISC_TRUE, ISC_FALSE },
-               { "a.b.c.d", "a.b.c.d", ISC_TRUE, ISC_TRUE },
-               { "A.B.C.D.", "A.B.C.D.", ISC_TRUE, ISC_FALSE },
-               { "x.y.z.w", "a.b.c.d", ISC_FALSE, ISC_FALSE },
-               { "x.y.z.w.", "a.b.c.d.", ISC_FALSE, ISC_FALSE },
+               { "a.b.c.d", "A.B.C.D", true, false },
+               { "a.b.c.d.", "A.B.C.D.", true, false },
+               { "a.b.c.d", "a.b.c.d", true, true },
+               { "A.B.C.D.", "A.B.C.D.", true, false },
+               { "x.y.z.w", "a.b.c.d", false, false },
+               { "x.y.z.w.", "a.b.c.d.", false, false },
        };
        unsigned int i;
 
@@ -450,22 +451,22 @@ ATF_TC_BODY(hash, tc) {
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                /* Check case-insensitive hashing first */
-               h1 = dns_name_hash(n1, ISC_FALSE);
-               h2 = dns_name_hash(n2, ISC_FALSE);
+               h1 = dns_name_hash(n1, false);
+               h2 = dns_name_hash(n2, false);
 
                printf("%s hashes to %u, %s to %u, case insensitive\n",
                       testcases[i].name1, h1, testcases[i].name2, h2);
 
-               ATF_REQUIRE_EQ(ISC_TF(h1 == h2), testcases[i].expect);
+               ATF_REQUIRE_EQ((h1 == h2), testcases[i].expect);
 
                /* Now case-sensitive */
-               h1 = dns_name_hash(n1, ISC_FALSE);
-               h2 = dns_name_hash(n2, ISC_FALSE);
+               h1 = dns_name_hash(n1, false);
+               h2 = dns_name_hash(n2, false);
 
                printf("%s hashes to %u, %s to %u, case sensitive\n",
                       testcases[i].name1, h1, testcases[i].name2, h2);
 
-               ATF_REQUIRE_EQ(ISC_TF(h1 == h2), testcases[i].expect);
+               ATF_REQUIRE_EQ((h1 == h2), testcases[i].expect);
        }
 }
 
@@ -477,15 +478,15 @@ ATF_TC_BODY(issubdomain, tc) {
        struct {
                const char *name1;
                const char *name2;
-               isc_boolean_t expect;
+               bool expect;
        } testcases[] = {
-               { "c.d", "a.b.c.d", ISC_FALSE },
-               { "c.d.", "a.b.c.d.", ISC_FALSE },
-               { "b.c.d", "c.d", ISC_TRUE },
-               { "a.b.c.d.", "c.d.", ISC_TRUE },
-               { "a.b.c", "a.b.c", ISC_TRUE },
-               { "a.b.c.", "a.b.c.", ISC_TRUE },
-               { "x.y.z", "a.b.c", ISC_FALSE}
+               { "c.d", "a.b.c.d", false },
+               { "c.d.", "a.b.c.d.", false },
+               { "b.c.d", "c.d", true },
+               { "a.b.c.d.", "c.d.", true },
+               { "a.b.c", "a.b.c", true },
+               { "a.b.c.", "a.b.c.", true },
+               { "x.y.z", "a.b.c", false}
        };
        unsigned int i;
 
@@ -710,9 +711,9 @@ ATF_TC_BODY(benchmark, tc) {
 
        UNUSED(tc);
 
-       debug_mem_record = ISC_FALSE;
+       debug_mem_record = false;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_time_now(&ts1);
index 0c4d0841cc29b378a6637b53ce4e9a4f3ae62db8..8a533440b1d496056eefdeab1a80e5e6ac5e9155 100644 (file)
@@ -135,7 +135,7 @@ ATF_TC_BODY(max_iterations, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        iteration_test("testdata/nsec3/1024.db", 150);
@@ -171,7 +171,7 @@ ATF_TC_BODY(nsec3param_salttotext, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
index 48240c071e9a4a9851105fad7279fa0dc5a53142..1cff105d379fe4f09b48d9419fc977b496a62b95 100644 (file)
@@ -36,7 +36,7 @@ ATF_TC_BODY(dscp, tc) {
        dns_peer_t *peer = NULL;
        isc_dscp_t dscp;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /*
index 2fb2d068737fde861a5806ebb07b70581c1e787c..dcb859e966ce4063e6fef94a035ea0aa3bae3d74 100644 (file)
@@ -17,6 +17,7 @@
 #include <atf-c.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/buffer.h>
@@ -35,8 +36,8 @@ static dns_rdatatype_t privatetype = 65534;
 typedef struct {
        unsigned char alg;
        dns_keytag_t keyid;
-       isc_boolean_t remove;
-       isc_boolean_t complete;
+       bool remove;
+       bool complete;
 } signing_testcase_t;
 
 typedef struct {
@@ -44,9 +45,9 @@ typedef struct {
        unsigned char flags;
        unsigned int iterations;
        unsigned long salt;
-       isc_boolean_t remove;
-       isc_boolean_t pending;
-       isc_boolean_t nonsec;
+       bool remove;
+       bool pending;
+       bool nonsec;
 } nsec3_testcase_t;
 
 /*
@@ -146,7 +147,7 @@ ATF_TC_BODY(private_signing_totext, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        for (i = 0; i < ncases; i++) {
@@ -191,7 +192,7 @@ ATF_TC_BODY(private_nsec3_totext, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        for (i = 0; i < ncases; i++) {
@@ -217,4 +218,3 @@ ATF_TP_ADD_TCS(tp) {
        ATF_TP_ADD_TC(tp, private_nsec3_totext);
        return (atf_no_error());
 }
-
index ec7a2b24fb10daae12cfc16820df0034b42e44f0..07d4e56f52ddb7ef38946dbde514e778abce7fa9 100644 (file)
@@ -287,7 +287,7 @@ ATF_TC_BODY(serialize, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_STREQ(dns_result_totext(result), "success");
        result = dns_rbt_create(mctx, delete_data, NULL, &rbt);
        ATF_CHECK_STREQ(dns_result_totext(result), "success");
@@ -361,7 +361,7 @@ ATF_TC_BODY(deserialize_corrupt, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* Set up map file */
index 51507d903ec880a0b510367b6cc304960c66a95a..fdfb3328a1024d4ead04d71865b7ad61dabc1a27 100644 (file)
@@ -20,6 +20,7 @@
 #include <unistd.h>
 
 #include <inttypes.h> /* uintptr_t */
+#include <stdbool.h>
 
 #include <dns/rbt.h>
 #include <dns/fixedname.h>
@@ -218,13 +219,13 @@ ATF_TC_HEAD(rbt_create, tc) {
 ATF_TC_BODY(rbt_create, tc) {
        isc_result_t result;
        test_context_t *ctx;
-       isc_boolean_t tree_ok;
+       bool tree_ok;
 
        UNUSED(tc);
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -232,7 +233,7 @@ ATF_TC_BODY(rbt_create, tc) {
        check_test_data(ctx->rbt);
 
        tree_ok = dns__rbt_checkproperties(ctx->rbt);
-       ATF_CHECK_EQ(tree_ok, ISC_TRUE);
+       ATF_CHECK_EQ(tree_ok, true);
 
        test_context_teardown(ctx);
 
@@ -251,7 +252,7 @@ ATF_TC_BODY(rbt_nodecount, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -281,7 +282,7 @@ ATF_TC_BODY(rbtnode_get_distance, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -331,13 +332,13 @@ ATF_TC_BODY(rbt_check_distance_random, tc) {
 
        int i;
        isc_result_t result;
-       isc_boolean_t tree_ok;
+       bool tree_ok;
 
        UNUSED(tc);
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        result = dns_rbt_create(mctx, delete_data, NULL, &mytree);
@@ -393,7 +394,7 @@ ATF_TC_BODY(rbt_check_distance_random, tc) {
 
        /* Also check RB tree properties */
        tree_ok = dns__rbt_checkproperties(mytree);
-       ATF_CHECK_EQ(tree_ok, ISC_TRUE);
+       ATF_CHECK_EQ(tree_ok, true);
 
        dns_rbt_destroy(&mytree);
 
@@ -416,13 +417,13 @@ ATF_TC_BODY(rbt_check_distance_ordered, tc) {
 
        int i;
        isc_result_t result;
-       isc_boolean_t tree_ok;
+       bool tree_ok;
 
        UNUSED(tc);
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        result = dns_rbt_create(mctx, delete_data, NULL, &mytree);
@@ -466,7 +467,7 @@ ATF_TC_BODY(rbt_check_distance_ordered, tc) {
 
        /* Also check RB tree properties */
        tree_ok = dns__rbt_checkproperties(mytree);
-       ATF_CHECK_EQ(tree_ok, ISC_TRUE);
+       ATF_CHECK_EQ(tree_ok, true);
 
        dns_rbt_destroy(&mytree);
 
@@ -484,12 +485,12 @@ insert_helper(dns_rbt_t *rbt, const char *namestr, dns_rbtnode_t **node) {
        return (dns_rbt_addnode(rbt, name, node));
 }
 
-static isc_boolean_t
+static bool
 compare_labelsequences(dns_rbtnode_t *node, const char *labelstr) {
        dns_name_t name;
        isc_result_t result;
        char *nodestr = NULL;
-       isc_boolean_t is_equal;
+       bool is_equal;
 
        dns_name_init(&name, NULL);
        dns_rbt_namefromnode(node, &name);
@@ -497,7 +498,7 @@ compare_labelsequences(dns_rbtnode_t *node, const char *labelstr) {
        result = dns_name_tostring(&name, &nodestr, mctx);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       is_equal = strcmp(labelstr, nodestr) == 0 ? ISC_TRUE : ISC_FALSE;
+       is_equal = strcmp(labelstr, nodestr) == 0 ? true : false;
 
        isc_mem_free(mctx, nodestr);
 
@@ -517,7 +518,7 @@ ATF_TC_BODY(rbt_insert, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -537,7 +538,7 @@ ATF_TC_BODY(rbt_insert, tc) {
        node = NULL;
        result = insert_helper(ctx->rbt, "0", &node);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
-       ATF_CHECK_EQ(compare_labelsequences(node, "0"), ISC_TRUE);
+       ATF_CHECK_EQ(compare_labelsequences(node, "0"), true);
 
        /* Node count must have increased. */
        ATF_CHECK_EQ(16, dns_rbt_nodecount(ctx->rbt));
@@ -564,7 +565,7 @@ ATF_TC_BODY(rbt_insert, tc) {
        node = NULL;
        result = insert_helper(ctx->rbt, "k.e.f", &node);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
-       ATF_CHECK_EQ(compare_labelsequences(node, "k"), ISC_TRUE);
+       ATF_CHECK_EQ(compare_labelsequences(node, "k"), true);
 
        /* Node count must have incremented twice ("d.e.f" fissioned to
         * "d" and "e.f", and the newly added "k").
@@ -575,7 +576,7 @@ ATF_TC_BODY(rbt_insert, tc) {
        node = NULL;
        result = insert_helper(ctx->rbt, "h", &node);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
-       ATF_CHECK_EQ(compare_labelsequences(node, "h"), ISC_TRUE);
+       ATF_CHECK_EQ(compare_labelsequences(node, "h"), true);
 
        /* Node count must have incremented ("g.h" fissioned to "g" and
         * "h").
@@ -587,19 +588,19 @@ ATF_TC_BODY(rbt_insert, tc) {
        node = NULL;
        result = insert_helper(ctx->rbt, "m.p.w.y.d.e.f", &node);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
-       ATF_CHECK_EQ(compare_labelsequences(node, "m"), ISC_TRUE);
+       ATF_CHECK_EQ(compare_labelsequences(node, "m"), true);
        ATF_CHECK_EQ(21, dns_rbt_nodecount(ctx->rbt));
 
        node = NULL;
        result = insert_helper(ctx->rbt, "n.p.w.y.d.e.f", &node);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
-       ATF_CHECK_EQ(compare_labelsequences(node, "n"), ISC_TRUE);
+       ATF_CHECK_EQ(compare_labelsequences(node, "n"), true);
        ATF_CHECK_EQ(22, dns_rbt_nodecount(ctx->rbt));
 
        node = NULL;
        result = insert_helper(ctx->rbt, "l.a", &node);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
-       ATF_CHECK_EQ(compare_labelsequences(node, "l"), ISC_TRUE);
+       ATF_CHECK_EQ(compare_labelsequences(node, "l"), true);
        ATF_CHECK_EQ(23, dns_rbt_nodecount(ctx->rbt));
 
        node = NULL;
@@ -686,7 +687,7 @@ ATF_TC_BODY(rbt_remove, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /*
@@ -697,7 +698,7 @@ ATF_TC_BODY(rbt_remove, tc) {
                dns_rbtnode_t *node;
                size_t i;
                size_t *n;
-               isc_boolean_t tree_ok;
+               bool tree_ok;
                dns_rbtnodechain_t chain;
                size_t start_node;
 
@@ -747,13 +748,13 @@ ATF_TC_BODY(rbt_remove, tc) {
 
                        name = dns_fixedname_name(&fname);
 
-                       result = dns_rbt_deletename(mytree, name, ISC_FALSE);
+                       result = dns_rbt_deletename(mytree, name, false);
                        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
                }
 
                /* Check RB tree properties. */
                tree_ok = dns__rbt_checkproperties(mytree);
-               ATF_CHECK_EQ(tree_ok, ISC_TRUE);
+               ATF_CHECK_EQ(tree_ok, true);
 
                dns_rbtnodechain_init(&chain, mctx);
 
@@ -938,7 +939,7 @@ remove_nodes(dns_rbt_t *mytree, char **names,
                dns_test_namefromstring(names[node], &fname);
                name = dns_fixedname_name(&fname);
 
-               result = dns_rbt_deletename(mytree, name, ISC_FALSE);
+               result = dns_rbt_deletename(mytree, name, false);
                ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
                isc_mem_free(mctx, names[node]);
@@ -954,7 +955,7 @@ static void
 check_tree(dns_rbt_t *mytree, char **names, size_t names_count,
           unsigned int line)
 {
-       isc_boolean_t tree_ok;
+       bool tree_ok;
 
        UNUSED(names);
 
@@ -971,7 +972,7 @@ check_tree(dns_rbt_t *mytree, char **names, size_t names_count,
 
        /* Also check RB tree properties */
        tree_ok = dns__rbt_checkproperties(mytree);
-       ATF_CHECK_EQ(tree_ok, ISC_TRUE);
+       ATF_CHECK_EQ(tree_ok, true);
 }
 
 ATF_TC(rbt_insert_and_remove);
@@ -1009,7 +1010,7 @@ ATF_TC_BODY(rbt_insert_and_remove, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        result = dns_rbt_create(mctx, delete_data, NULL, &mytree);
@@ -1075,7 +1076,7 @@ ATF_TC_BODY(rbt_findname, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -1134,7 +1135,7 @@ ATF_TC_BODY(rbt_addname, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -1177,7 +1178,7 @@ ATF_TC_BODY(rbt_deletename, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -1185,13 +1186,13 @@ ATF_TC_BODY(rbt_deletename, tc) {
        /* Delete a name that doesn't exist */
        dns_test_namefromstring("z.x.y.w", &fname);
        name = dns_fixedname_name(&fname);
-       result = dns_rbt_deletename(ctx->rbt, name, ISC_FALSE);
+       result = dns_rbt_deletename(ctx->rbt, name, false);
        ATF_REQUIRE_EQ(result, ISC_R_NOTFOUND);
 
        /* Now one that does */
        dns_test_namefromstring("d.e.f", &fname);
        name = dns_fixedname_name(&fname);
-       result = dns_rbt_deletename(ctx->rbt, name, ISC_FALSE);
+       result = dns_rbt_deletename(ctx->rbt, name, false);
        ATF_REQUIRE_EQ(result, ISC_R_NOTFOUND);
 
        test_context_teardown(ctx);
@@ -1215,7 +1216,7 @@ ATF_TC_BODY(rbt_nodechain, tc) {
 
        isc_mem_debugging = ISC_MEM_DEBUGRECORD;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
 
        ctx = test_context_setup();
@@ -1330,9 +1331,9 @@ ATF_TC_BODY(benchmark, tc) {
 
        srandom(time(NULL));
 
-       debug_mem_record = ISC_FALSE;
+       debug_mem_record = false;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        fnames = (dns_fixedname_t *) malloc(4000000 * sizeof(dns_fixedname_t));
index 229e196997acf5ebf9988cfb951568f1dcdb9606..683751680c7f0bd3075b2019f2c4b92d116f0063 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/hex.h>
@@ -47,7 +48,7 @@ typedef struct text_ok text_ok_t;
 struct wire_ok {
        unsigned char data[512];        /* RDATA in wire format */
        size_t len;                     /* octets of data to parse */
-       isc_boolean_t ok;               /* is this RDATA valid? */
+       bool ok;                /* is this RDATA valid? */
        int lineno;                     /* source line defining this RDATA */
 };
 typedef struct wire_ok wire_ok_t;
@@ -67,9 +68,9 @@ typedef struct wire_ok wire_ok_t;
                                        { __VA_ARGS__ }, VARGC(__VA_ARGS__),  \
                                        ok, __LINE__                          \
                                }
-#define WIRE_VALID(...)                WIRE_TEST(ISC_TRUE, __VA_ARGS__)
-#define WIRE_INVALID(...)      WIRE_TEST(ISC_FALSE, __VA_ARGS__)
-#define WIRE_SENTINEL()                WIRE_TEST(ISC_FALSE)
+#define WIRE_VALID(...)                WIRE_TEST(true, __VA_ARGS__)
+#define WIRE_INVALID(...)      WIRE_TEST(false, __VA_ARGS__)
+#define WIRE_SENTINEL()                WIRE_TEST(false)
 
 /*****
  ***** Checking functions used by test cases
@@ -289,7 +290,7 @@ check_text_ok(const text_ok_t *text_ok, dns_rdataclass_t rdclass,
  * for given RR class and type behaves as expected.
  */
 static void
-check_wire_ok(const wire_ok_t *wire_ok, isc_boolean_t empty_ok,
+check_wire_ok(const wire_ok_t *wire_ok, bool empty_ok,
              dns_rdataclass_t rdclass, dns_rdatatype_t type,
              size_t structsize)
 {
@@ -323,12 +324,12 @@ check_wire_ok(const wire_ok_t *wire_ok, isc_boolean_t empty_ok,
  */
 static void
 check_rdata(const text_ok_t *text_ok, const wire_ok_t *wire_ok,
-           isc_boolean_t empty_ok, dns_rdataclass_t rdclass,
+           bool empty_ok, dns_rdataclass_t rdclass,
            dns_rdatatype_t type, size_t structsize)
 {
        isc_result_t result;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        if (text_ok != NULL) {
@@ -472,7 +473,7 @@ ATF_TC_BODY(csync, tc) {
 
        UNUSED(tc);
 
-       check_rdata(text_ok, wire_ok, ISC_FALSE, dns_rdataclass_in,
+       check_rdata(text_ok, wire_ok, false, dns_rdataclass_in,
                    dns_rdatatype_csync, sizeof(dns_rdata_csync_t));
 }
 
@@ -690,7 +691,7 @@ ATF_TC_BODY(doa, tc) {
 
        UNUSED(tc);
 
-       check_rdata(text_ok, wire_ok, ISC_FALSE, dns_rdataclass_in,
+       check_rdata(text_ok, wire_ok, false, dns_rdataclass_in,
                    dns_rdatatype_doa, sizeof(dns_rdata_doa_t));
 }
 
@@ -856,7 +857,7 @@ ATF_TC_BODY(edns_client_subnet, tc) {
 
        UNUSED(tc);
 
-       check_rdata(NULL, wire_ok, ISC_TRUE, dns_rdataclass_in,
+       check_rdata(NULL, wire_ok, true, dns_rdataclass_in,
                    dns_rdatatype_opt, sizeof(dns_rdata_opt_t));
 }
 
@@ -881,7 +882,7 @@ ATF_TC_BODY(hip, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /*
@@ -998,7 +999,7 @@ ATF_TC_BODY(isdn, tc) {
 
        UNUSED(tc);
 
-       check_rdata(NULL, wire_ok, ISC_FALSE, dns_rdataclass_in,
+       check_rdata(NULL, wire_ok, false, dns_rdataclass_in,
                    dns_rdatatype_isdn, sizeof(dns_rdata_isdn_t));
 }
 
@@ -1089,7 +1090,7 @@ ATF_TC_BODY(nsec, tc) {
 
        UNUSED(tc);
 
-       check_rdata(text_ok, wire_ok, ISC_FALSE, dns_rdataclass_in,
+       check_rdata(text_ok, wire_ok, false, dns_rdataclass_in,
                    dns_rdatatype_nsec, sizeof(dns_rdata_nsec_t));
 }
 
@@ -1118,7 +1119,7 @@ ATF_TC_BODY(nsec3, tc) {
 
        UNUSED(tc);
 
-       check_rdata(text_ok, NULL, ISC_FALSE, dns_rdataclass_in,
+       check_rdata(text_ok, NULL, false, dns_rdataclass_in,
                    dns_rdatatype_nsec3, sizeof(dns_rdata_nsec3_t));
 }
 
@@ -1191,7 +1192,7 @@ ATF_TC_BODY(wks, tc) {
 
        UNUSED(tc);
 
-       check_rdata(NULL, wire_ok, ISC_FALSE, dns_rdataclass_in,
+       check_rdata(NULL, wire_ok, false, dns_rdataclass_in,
                    dns_rdatatype_wks, sizeof(dns_rdata_in_wks_t));
 }
 
index 55531e86ffd53f65ecb5abc2de671c89ea0f7fbe..b0558463bc00d35d6b8f96b04b1eaf26daeca403 100644 (file)
@@ -48,7 +48,7 @@ ATF_TC_BODY(trimttl, tc) {
        dns_rdataset_init(&rdataset);
        dns_rdataset_init(&sigrdataset);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        rdataset.ttl = 900;
@@ -57,7 +57,7 @@ ATF_TC_BODY(trimttl, tc) {
        rrsig.originalttl = 1000;
 
        dns_rdataset_trimttl(&rdataset, &sigrdataset, &rrsig, ttltimenow,
-                            ISC_TRUE);
+                            true);
        ATF_REQUIRE_EQ(rdataset.ttl, 800);
        ATF_REQUIRE_EQ(sigrdataset.ttl, 800);
 
@@ -67,7 +67,7 @@ ATF_TC_BODY(trimttl, tc) {
        rrsig.originalttl = 1000;
 
        dns_rdataset_trimttl(&rdataset, &sigrdataset, &rrsig, ttltimenow,
-                            ISC_TRUE);
+                            true);
        ATF_REQUIRE_EQ(rdataset.ttl, 120);
        ATF_REQUIRE_EQ(sigrdataset.ttl, 120);
 
@@ -77,7 +77,7 @@ ATF_TC_BODY(trimttl, tc) {
        rrsig.originalttl = 1000;
 
        dns_rdataset_trimttl(&rdataset, &sigrdataset, &rrsig, ttltimenow,
-                            ISC_FALSE);
+                            false);
        ATF_REQUIRE_EQ(rdataset.ttl, 0);
        ATF_REQUIRE_EQ(sigrdataset.ttl, 0);
 
@@ -87,7 +87,7 @@ ATF_TC_BODY(trimttl, tc) {
        rrsig.originalttl = 1000;
 
        dns_rdataset_trimttl(&rdataset, &sigrdataset, &rrsig, ttltimenow,
-                            ISC_TRUE);
+                            true);
        ATF_REQUIRE_EQ(rdataset.ttl, 800);
        ATF_REQUIRE_EQ(sigrdataset.ttl, 800);
 
@@ -97,7 +97,7 @@ ATF_TC_BODY(trimttl, tc) {
        rrsig.originalttl = 1000;
 
        dns_rdataset_trimttl(&rdataset, &sigrdataset, &rrsig, ttltimenow,
-                            ISC_TRUE);
+                            true);
        ATF_REQUIRE_EQ(rdataset.ttl, 120);
        ATF_REQUIRE_EQ(sigrdataset.ttl, 120);
 
@@ -107,7 +107,7 @@ ATF_TC_BODY(trimttl, tc) {
        rrsig.originalttl = 1000;
 
        dns_rdataset_trimttl(&rdataset, &sigrdataset, &rrsig, ttltimenow,
-                            ISC_FALSE);
+                            false);
        ATF_REQUIRE_EQ(rdataset.ttl, 0);
        ATF_REQUIRE_EQ(sigrdataset.ttl, 0);
 
index bad3c8d9ce01a20f7176dc28dcf6b4faac0c6023..0c2d5c5625a8252898d9da532a2508cc67884edf 100644 (file)
@@ -17,6 +17,7 @@
 #include <atf-c.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/print.h>
@@ -30,7 +31,7 @@
  */
 static void
 set_typestats(dns_stats_t *stats, dns_rdatatype_t type,
-             isc_boolean_t stale)
+             bool stale)
 {
        dns_rdatastatstype_t which;
        unsigned int attributes;
@@ -47,7 +48,7 @@ set_typestats(dns_stats_t *stats, dns_rdatatype_t type,
 }
 
 static void
-set_nxdomainstats(dns_stats_t *stats, isc_boolean_t stale) {
+set_nxdomainstats(dns_stats_t *stats, bool stale) {
        dns_rdatastatstype_t which;
        unsigned int attributes;
 
@@ -126,7 +127,7 @@ ATF_TC_BODY(rdatasetstats, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_rdatasetstats_create(mctx, &stats);
@@ -134,11 +135,11 @@ ATF_TC_BODY(rdatasetstats, tc) {
 
        /* First 256 types. */
        for (i = 0; i <= 255; i++)
-               set_typestats(stats, (dns_rdatatype_t)i, ISC_FALSE);
+               set_typestats(stats, (dns_rdatatype_t)i, false);
        /* Specials */
-       set_typestats(stats, dns_rdatatype_dlv, ISC_FALSE);
-       set_typestats(stats, (dns_rdatatype_t)1000, ISC_FALSE);
-       set_nxdomainstats(stats, ISC_FALSE);
+       set_typestats(stats, dns_rdatatype_dlv, false);
+       set_typestats(stats, (dns_rdatatype_t)1000, false);
+       set_nxdomainstats(stats, false);
 
        /*
         * Check that all counters are set to appropriately.
@@ -147,11 +148,11 @@ ATF_TC_BODY(rdatasetstats, tc) {
 
        /* First 256 types. */
        for (i = 0; i <= 255; i++)
-               set_typestats(stats, (dns_rdatatype_t)i, ISC_TRUE);
+               set_typestats(stats, (dns_rdatatype_t)i, true);
        /* Specials */
-       set_typestats(stats, dns_rdatatype_dlv, ISC_TRUE);
-       set_typestats(stats, (dns_rdatatype_t)1000, ISC_TRUE);
-       set_nxdomainstats(stats, ISC_TRUE);
+       set_typestats(stats, dns_rdatatype_dlv, true);
+       set_typestats(stats, (dns_rdatatype_t)1000, true);
+       set_nxdomainstats(stats, true);
 
        /*
         * Check that all counters are set to appropriately.
@@ -169,4 +170,3 @@ ATF_TP_ADD_TCS(tp) {
        ATF_TP_ADD_TC(tp, rdatasetstats);
        return (atf_no_error());
 }
-
index 8b54bd6a9d89bb34c8ddb65a7e2da477f0bee678..518622de096bdf05d1345b6d9101eb2bba12b6b8 100644 (file)
@@ -40,7 +40,7 @@ setup(void) {
        isc_result_t result;
        isc_sockaddr_t local;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_dispatchmgr_create(mctx, NULL, &dispatchmgr);
index 224cf5b4759905b6e57b8c8d67312a70fcc2b8cb..fb207ef037adf98ba258286f3c82993b8a1ec6cf 100644 (file)
@@ -191,7 +191,7 @@ ATF_TC_BODY(isc_rsa_verify, tc) {
 
        UNUSED(tc);
 
-       ret = dns_test_begin(NULL, ISC_FALSE);
+       ret = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(ret, ISC_R_SUCCESS);
 
        name = dns_fixedname_initname(&fname);
@@ -207,7 +207,7 @@ ATF_TC_BODY(isc_rsa_verify, tc) {
        /* RSASHA1 */
 
        ret = dst_context_create3(key, mctx, DNS_LOGCATEGORY_DNSSEC,
-                                 ISC_FALSE, &ctx);
+                                 false, &ctx);
        ATF_REQUIRE_EQ(ret, ISC_R_SUCCESS);
 
        r.base = d;
@@ -228,7 +228,7 @@ ATF_TC_BODY(isc_rsa_verify, tc) {
        key->key_alg = DST_ALG_RSAMD5;
 
        ret = dst_context_create3(key, mctx, DNS_LOGCATEGORY_DNSSEC,
-                                 ISC_FALSE, &ctx);
+                                 false, &ctx);
        ATF_REQUIRE_EQ(ret, ISC_R_SUCCESS);
 
        r.base = d;
@@ -249,7 +249,7 @@ ATF_TC_BODY(isc_rsa_verify, tc) {
        key->key_alg = DST_ALG_RSASHA256;
 
        ret = dst_context_create3(key, mctx, DNS_LOGCATEGORY_DNSSEC,
-                                 ISC_FALSE, &ctx);
+                                 false, &ctx);
        ATF_REQUIRE_EQ(ret, ISC_R_SUCCESS);
 
        r.base = d;
@@ -269,7 +269,7 @@ ATF_TC_BODY(isc_rsa_verify, tc) {
        key->key_alg = DST_ALG_RSASHA512;
 
        ret = dst_context_create3(key, mctx, DNS_LOGCATEGORY_DNSSEC,
-                                 ISC_FALSE, &ctx);
+                                 false, &ctx);
        ATF_REQUIRE_EQ(ret, ISC_R_SUCCESS);
 
        r.base = d;
index 6fb4055eed672997a4c333a7baa18d80caa36aaf..20fd4b6ff9e2b29c0511279a37c690e7c42a76d7 100644 (file)
@@ -200,7 +200,7 @@ updatesigs_test(const updatesigs_test_params_t *test, dns_zone_t *zone,
 
        dns__zonediff_t zonediff = {
                .diff = &zone_diff,
-               .offline = ISC_FALSE,
+               .offline = false,
        };
 
        REQUIRE(test != NULL);
@@ -239,7 +239,7 @@ updatesigs_test(const updatesigs_test_params_t *test, dns_zone_t *zone,
         */
        result = dns__zone_updatesigs(&raw_diff, db, version, zone_keys, nkeys,
                                      zone, now - 3600, now + 3600, now,
-                                     ISC_TRUE, ISC_FALSE, &zonediff);
+                                     true, false, &zonediff);
        ATF_CHECK_EQ_MSG(result, ISC_R_SUCCESS,
                         "test \"%s\": expected success, got %s",
                         test->description, isc_result_totext(result));
@@ -293,7 +293,7 @@ updatesigs_test(const updatesigs_test_params_t *test, dns_zone_t *zone,
        /*
         * Apply changes to zone database contents and clean up.
         */
-       dns_db_closeversion(db, &version, ISC_TRUE);
+       dns_db_closeversion(db, &version, true);
        dns_diff_clear(&zone_diff);
        dns_diff_clear(&raw_diff);
 }
@@ -311,14 +311,14 @@ ATF_TC_BODY(updatesigs, tc) {
        isc_stdtime_t now;
        size_t i;
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /*
         * Prepare a zone along with its signing keys.
         */
 
-       result = dns_test_makezone("example", &zone, NULL, ISC_FALSE);
+       result = dns_test_makezone("example", &zone, NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_loaddb(&db, dns_dbtype_zone, "example",
index 83e3d9911ff450a64207395846968a659d06d637..28b72b6f3743abfff0eee6b6f78f94c7b3874aad 100644 (file)
@@ -44,7 +44,7 @@ ATF_TC_BODY(epoch_minus_one, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        memset(buf, 0, sizeof(buf));
        isc_buffer_init(&target, buf, sizeof(buf));
@@ -72,7 +72,7 @@ ATF_TC_BODY(epoch, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        memset(buf, 0, sizeof(buf));
        isc_buffer_init(&target, buf, sizeof(buf));
@@ -100,7 +100,7 @@ ATF_TC_BODY(half_maxint, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        memset(buf, 0, sizeof(buf));
        isc_buffer_init(&target, buf, sizeof(buf));
@@ -128,7 +128,7 @@ ATF_TC_BODY(half_plus_one, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        memset(buf, 0, sizeof(buf));
        isc_buffer_init(&target, buf, sizeof(buf));
@@ -156,7 +156,7 @@ ATF_TC_BODY(fifty_before, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        memset(buf, 0, sizeof(buf));
        isc_buffer_init(&target, buf, sizeof(buf));
@@ -184,7 +184,7 @@ ATF_TC_BODY(some_ago, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        memset(buf, 0, sizeof(buf));
        isc_buffer_init(&target, buf, sizeof(buf));
index e4b55fbda19d58b7da457f50660f496d2dc948d8..443fb360a35d1a3b86e5e27f01f0d8840faf6d2b 100644 (file)
@@ -65,12 +65,12 @@ add_tsig(dst_context_t *tsigctx, dns_tsigkey_t *key, isc_buffer_t *target) {
        unsigned char tsigbuf[1024];
        unsigned int count;
        unsigned int sigsize = 0;
-       isc_boolean_t invalidate_ctx = ISC_FALSE;
+       bool invalidate_ctx = false;
 
        memset(&tsig, 0, sizeof(tsig));
 
        CHECK(dns_compress_init(&cctx, -1, mctx));
-       invalidate_ctx = ISC_TRUE;
+       invalidate_ctx = true;
 
        tsig.common.rdclass = dns_rdataclass_any;
        tsig.common.rdtype = dns_rdatatype_tsig;
@@ -264,7 +264,7 @@ ATF_TC_BODY(tsig_tcp, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(stderr, ISC_TRUE);
+       result = dns_test_begin(stderr, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* isc_log_setdebuglevel(lctx, 99); */
@@ -277,7 +277,7 @@ ATF_TC_BODY(tsig_tcp, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_tsigkey_create(keyname, dns_tsig_hmacsha256_name,
-                                   secret, sizeof(secret), ISC_FALSE,
+                                   secret, sizeof(secret), false,
                                    NULL, 0, 0, mctx, ring, &key);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        ATF_REQUIRE(key != NULL);
@@ -343,7 +343,7 @@ ATF_TC_BODY(tsig_tcp, tc) {
        dns_message_destroy(&msg);
 
        result = dst_context_create3(key->key, mctx, DNS_LOGCATEGORY_DNSSEC,
-                                    ISC_FALSE, &outctx);
+                                    false, &outctx);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        ATF_REQUIRE(outctx != NULL);
 
index bf16dd2a33a0c35bdb6d91b9584c47d11594cc20..1585ed7a740fd9f9b7f2f4ac8382feb4a80a18d2 100644 (file)
@@ -58,10 +58,10 @@ ATF_TC_BODY(increment, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_increment);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK_MSG(serial != 0, "serial (%d) should not equal 0", serial);
        ATF_REQUIRE_EQ(serial, 51);
        dns_test_end();
@@ -79,10 +79,10 @@ ATF_TC_BODY(increment_past_zero, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_increment);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, 1u);
        dns_test_end();
@@ -102,10 +102,10 @@ ATF_TC_BODY(past_to_unix, tc) {
        set_mystdtime(2011, 6, 22);
        old = mystdtime - 1;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, mystdtime);
        dns_test_end();
@@ -125,10 +125,10 @@ ATF_TC_BODY(now_to_unix, tc) {
        set_mystdtime(2011, 6, 22);
        old = mystdtime;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, old + 1);
        dns_test_end();
@@ -148,10 +148,10 @@ ATF_TC_BODY(future_to_unix, tc) {
        set_mystdtime(2011, 6, 22);
        old = mystdtime + 1;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, old + 1);
        dns_test_end();
@@ -172,10 +172,10 @@ ATF_TC_BODY(undefined_plus1_to_unix, tc) {
        old = mystdtime ^ 0x80000000u;
        old += 1;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, mystdtime);
        dns_test_end();
@@ -196,10 +196,10 @@ ATF_TC_BODY(undefined_minus1_to_unix, tc) {
        old = mystdtime ^ 0x80000000u;
        old -= 1;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, old + 1);
        dns_test_end();
@@ -219,10 +219,10 @@ ATF_TC_BODY(undefined_to_unix, tc) {
        set_mystdtime(2011, 6, 22);
        old = mystdtime ^ 0x80000000u;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, old + 1);
        dns_test_end();
@@ -242,10 +242,10 @@ ATF_TC_BODY(unixtime_zero, tc) {
        mystdtime = 0;
        old = 0xfffffff0;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, old + 1);
        dns_test_end();
@@ -265,10 +265,10 @@ ATF_TC_BODY(past_to_date, tc) {
        old = dns_update_soaserial(0, dns_updatemethod_date);
        set_mystdtime(2014, 4, 1);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_date);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, 2014040100);
        dns_test_end();
@@ -288,10 +288,10 @@ ATF_TC_BODY(now_to_date, tc) {
        set_mystdtime(2014, 4, 1);
        old = dns_update_soaserial(0, dns_updatemethod_date);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_date);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, 2014040101);
        dns_test_end();
@@ -312,10 +312,10 @@ ATF_TC_BODY(future_to_date, tc) {
        old = dns_update_soaserial(0, dns_updatemethod_date);
        set_mystdtime(2014, 3, 31);
 
-       result = dns_test_begin(NULL, ISC_FALSE);
+       result = dns_test_begin(NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        serial = dns_update_soaserial(old, dns_updatemethod_date);
-       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
+       ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
        ATF_CHECK(serial != 0);
        ATF_REQUIRE_EQ(serial, 2014040101);
        dns_test_end();
index 6189d679d76c3617e2563e4efa11bedc13f7212c..03079c6212a9b22ee05ae3c6f3cc947ca2ae9c3f 100644 (file)
@@ -41,7 +41,7 @@ ATF_TC_BODY(zonemgr_create, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_zonemgr_create(mctx, taskmgr, timermgr, socketmgr,
@@ -67,14 +67,14 @@ ATF_TC_BODY(zonemgr_managezone, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_zonemgr_create(mctx, taskmgr, timermgr, socketmgr,
                                    &myzonemgr);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_makezone("foo", &zone, NULL, ISC_FALSE);
+       result = dns_test_makezone("foo", &zone, NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* This should not succeed until the dns_zonemgr_setsize() is run */
@@ -115,7 +115,7 @@ ATF_TC_BODY(zonemgr_createzone, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_zonemgr_create(mctx, taskmgr, timermgr, socketmgr,
@@ -160,7 +160,7 @@ ATF_TC_BODY(zonemgr_unreachable, tc) {
 
        TIME_NOW(&now);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
 
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
@@ -168,7 +168,7 @@ ATF_TC_BODY(zonemgr_unreachable, tc) {
                                    &myzonemgr);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_makezone("foo", &zone, NULL, ISC_FALSE);
+       result = dns_test_makezone("foo", &zone, NULL, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_zonemgr_setsize(myzonemgr, 1);
index 84bec4a2be44033ef8ca5c270427db259d9fabee..0548ce76269961a48a9a743388631f0b710bcfee 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/app.h>
@@ -51,21 +52,21 @@ count_zone(dns_zone_t *zone, void *uap) {
 static isc_result_t
 load_done(dns_zt_t *zt, dns_zone_t *zone, isc_task_t *task) {
        /* We treat zt as a pointer to a boolean for testing purposes */
-       isc_boolean_t *done = (isc_boolean_t *) zt;
+       bool *done = (bool *) zt;
 
        UNUSED(zone);
        UNUSED(task);
 
-       *done = ISC_TRUE;
+       *done = true;
        isc_app_shutdown();
        return (ISC_R_SUCCESS);
 }
 
 static isc_result_t
 all_done(void *arg) {
-       isc_boolean_t *done = (isc_boolean_t *) arg;
+       bool *done = (bool *) arg;
 
-       *done = ISC_TRUE;
+       *done = true;
        isc_app_shutdown();
        return (ISC_R_SUCCESS);
 }
@@ -106,17 +107,17 @@ ATF_TC_BODY(apply, tc) {
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_makezone("foo", &zone, NULL, ISC_TRUE);
+       result = dns_test_makezone("foo", &zone, NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        view = dns_zone_getview(zone);
        ATF_REQUIRE(view->zonetable != NULL);
 
        ATF_CHECK_EQ(0, nzones);
-       result = dns_zt_apply(view->zonetable, ISC_FALSE, count_zone, &nzones);
+       result = dns_zt_apply(view->zonetable, false, count_zone, &nzones);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        ATF_CHECK_EQ(1, nzones);
 
@@ -144,16 +145,16 @@ ATF_TC_BODY(asyncload_zone, tc) {
        dns_zone_t *zone = NULL;
        dns_view_t *view = NULL;
        dns_db_t *db = NULL;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
        int i = 0;
        struct args args;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_makezone("foo", &zone, NULL, ISC_TRUE);
+       result = dns_test_makezone("foo", &zone, NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_test_setupzonemgr();
@@ -203,26 +204,26 @@ ATF_TC_BODY(asyncload_zt, tc) {
        dns_view_t *view;
        dns_zt_t *zt;
        dns_db_t *db = NULL;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
        int i = 0;
        struct args args;
 
        UNUSED(tc);
 
-       result = dns_test_begin(NULL, ISC_TRUE);
+       result = dns_test_begin(NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = dns_test_makezone("foo", &zone1, NULL, ISC_TRUE);
+       result = dns_test_makezone("foo", &zone1, NULL, true);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        dns_zone_setfile(zone1, "testdata/zt/zone1.db");
        view = dns_zone_getview(zone1);
 
-       result = dns_test_makezone("bar", &zone2, view, ISC_FALSE);
+       result = dns_test_makezone("bar", &zone2, view, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        dns_zone_setfile(zone2, "testdata/zt/zone1.db");
 
        /* This one will fail to load */
-       result = dns_test_makezone("fake", &zone3, view, ISC_FALSE);
+       result = dns_test_makezone("fake", &zone3, view, false);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        dns_zone_setfile(zone3, "testdata/zt/nonexistent.db");
 
index 9287465308729a8d58633b0544819af82ca498fd..8c5a328eef2a6865a555c139382ecddca9f8c200 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/result.h>
 #include <isc/time.h>
 #include <isc/timer.h>
@@ -28,7 +30,7 @@
 
 isc_result_t
 dns_timer_setidle(isc_timer_t *timer, unsigned int maxtime,
-                 unsigned int idletime, isc_boolean_t purge)
+                 unsigned int idletime, bool purge)
 {
        isc_result_t result;
        isc_interval_t maxinterval, idleinterval;
index 64eb7b76a3f60a613feb9603bec09558de96ca79..5b4ffd96c479e213d983a7921248c022b2fec884 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/entropy.h>
@@ -303,7 +304,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
        dns_name_t *keyname, ourname;
        dns_rdataset_t *keyset = NULL;
        dns_rdata_t keyrdata = DNS_RDATA_INIT, ourkeyrdata = DNS_RDATA_INIT;
-       isc_boolean_t found_key = ISC_FALSE, found_incompatible = ISC_FALSE;
+       bool found_key = false, found_incompatible = false;
        dst_key_t *pubkey = NULL;
        isc_buffer_t ourkeybuf, *shared = NULL;
        isc_region_t r, r2, ourkeyr;
@@ -361,11 +362,11 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
                        if (dst_key_alg(pubkey) == DNS_KEYALG_DH) {
                                if (dst_key_paramcompare(pubkey, tctx->dhkey))
                                {
-                                       found_key = ISC_TRUE;
+                                       found_key = true;
                                        ttl = keyset->ttl;
                                        break;
                                } else
-                                       found_incompatible = ISC_TRUE;
+                                       found_incompatible = true;
                        }
 #endif
                        dst_key_free(&pubkey);
@@ -418,7 +419,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
                goto failure;
 
        result = dst__entropy_getdata(randomdata, TKEY_RANDOM_AMOUNT,
-                                     ISC_FALSE);
+                                     false);
        if (result != ISC_R_SUCCESS) {
                tkey_log("process_dhtkey: failed to obtain entropy: %s",
                         isc_result_totext(result));
@@ -435,7 +436,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
        RETERR(dns_tsigkey_create(name, &tkeyin->algorithm,
                                  isc_buffer_base(&secret),
                                  isc_buffer_usedlength(&secret),
-                                 ISC_TRUE, signer, tkeyin->inception,
+                                 true, signer, tkeyin->inception,
                                  tkeyin->expire, ring->mctx, ring, NULL));
 
        /* This key is good for a long time */
@@ -550,7 +551,7 @@ process_gsstkey(dns_name_t *name, dns_rdata_tkey_t *tkeyin,
                        expire = now + lifetime;
 #endif
                RETERR(dns_tsigkey_createfromkey(name, &tkeyin->algorithm,
-                                                dstkey, ISC_TRUE, principal,
+                                                dstkey, true, principal,
                                                 now, expire, ring->mctx, ring,
                                                 NULL));
                dst_key_free(&dstkey);
@@ -649,7 +650,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
 {
        isc_result_t result = ISC_R_SUCCESS;
        dns_rdata_tkey_t tkeyin, tkeyout;
-       isc_boolean_t freetkeyin = ISC_FALSE;
+       bool freetkeyin = false;
        dns_name_t *qname, *name, *keyname, *signer, tsigner;
        dns_fixedname_t fkeyname;
        dns_rdataset_t *tkeyset;
@@ -705,7 +706,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
        dns_rdataset_current(tkeyset, &rdata);
 
        RETERR(dns_rdata_tostruct(&rdata, &tkeyin, NULL));
-       freetkeyin = ISC_TRUE;
+       freetkeyin = true;
 
        if (tkeyin.error != dns_rcode_noerror) {
                result = DNS_R_FORMERR;
@@ -855,7 +856,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
 
        if (freetkeyin) {
                dns_rdata_freestruct(&tkeyin);
-               freetkeyin = ISC_FALSE;
+               freetkeyin = false;
        }
 
        if (tkeyout.key != NULL)
@@ -867,7 +868,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
 
        RETERR(add_rdata_to_list(msg, keyname, &rdata, 0, &namelist));
 
-       RETERR(dns_message_reply(msg, ISC_TRUE));
+       RETERR(dns_message_reply(msg, true));
 
        name = ISC_LIST_HEAD(namelist);
        while (name != NULL) {
@@ -889,7 +890,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
 
 static isc_result_t
 buildquery(dns_message_t *msg, dns_name_t *name,
-          dns_rdata_tkey_t *tkey, isc_boolean_t win2k)
+          dns_rdata_tkey_t *tkey, bool win2k)
 {
        dns_name_t *qname = NULL, *aname = NULL;
        dns_rdataset_t *question = NULL, *tkeyset = NULL;
@@ -1013,7 +1014,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
        tkey.other = NULL;
        tkey.otherlen = 0;
 
-       RETERR(buildquery(msg, name, &tkey, ISC_FALSE));
+       RETERR(buildquery(msg, name, &tkey, false));
 
        RETERR(dns_message_gettemprdata(msg, &rdata));
        RETERR(isc_buffer_allocate(msg->mctx, &dynbuf, 1024));
@@ -1048,7 +1049,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
 isc_result_t
 dns_tkey_buildgssquery(dns_message_t *msg, dns_name_t *name, dns_name_t *gname,
                       isc_buffer_t *intoken, uint32_t lifetime,
-                      gss_ctx_id_t *context, isc_boolean_t win2k,
+                      gss_ctx_id_t *context, bool win2k,
                       isc_mem_t *mctx, char **err_message)
 {
        dns_rdata_tkey_t tkey;
@@ -1114,7 +1115,7 @@ dns_tkey_builddeletequery(dns_message_t *msg, dns_tsigkey_t *key) {
        tkey.keylen = tkey.otherlen = 0;
        tkey.key = tkey.other = NULL;
 
-       return (buildquery(msg, &key->name, &tkey, ISC_FALSE));
+       return (buildquery(msg, &key->name, &tkey, false));
 }
 
 static isc_result_t
@@ -1161,7 +1162,7 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
        isc_buffer_t *shared = NULL, secret;
        isc_region_t r, r2;
        isc_result_t result;
-       isc_boolean_t freertkey = ISC_FALSE;
+       bool freertkey = false;
 
        REQUIRE(qmsg != NULL);
        REQUIRE(rmsg != NULL);
@@ -1175,7 +1176,7 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
                return (ISC_RESULTCLASS_DNSRCODE + rmsg->rcode);
        RETERR(find_tkey(rmsg, &tkeyname, &rtkeyrdata, DNS_SECTION_ANSWER));
        RETERR(dns_rdata_tostruct(&rtkeyrdata, &rtkey, NULL));
-       freertkey = ISC_TRUE;
+       freertkey = true;
 
        RETERR(find_tkey(qmsg, &tempname, &qtkeyrdata,
                         DNS_SECTION_ADDITIONAL));
@@ -1252,7 +1253,7 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
 
        isc_buffer_usedregion(&secret, &r);
        result = dns_tsigkey_create(tkeyname, &rtkey.algorithm,
-                                   r.base, r.length, ISC_TRUE,
+                                   r.base, r.length, true,
                                    NULL, rtkey.inception, rtkey.expire,
                                    rmsg->mctx, ring, outkey);
        isc_buffer_free(&shared);
@@ -1335,7 +1336,7 @@ dns_tkey_processgssresponse(dns_message_t *qmsg, dns_message_t *rmsg,
                                  &dstkey, NULL));
 
        RETERR(dns_tsigkey_createfromkey(tkeyname, DNS_TSIG_GSSAPI_NAME,
-                                        dstkey, ISC_FALSE, NULL,
+                                        dstkey, false, NULL,
                                         rtkey.inception, rtkey.expire,
                                         ring->mctx, ring, outkey));
        dst_key_free(&dstkey);
@@ -1410,7 +1411,7 @@ isc_result_t
 dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
                      dns_name_t *server, gss_ctx_id_t *context,
                      dns_tsigkey_t **outkey, dns_tsig_keyring_t *ring,
-                     isc_boolean_t win2k, char **err_message)
+                     bool win2k, char **err_message)
 {
        dns_rdata_t rtkeyrdata = DNS_RDATA_INIT, qtkeyrdata = DNS_RDATA_INIT;
        dns_name_t *tkeyname;
@@ -1419,7 +1420,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
        dst_key_t *dstkey = NULL;
        isc_result_t result;
        unsigned char array[TEMP_BUFFER_SZ];
-       isc_boolean_t freertkey = ISC_FALSE;
+       bool freertkey = false;
 
        REQUIRE(qmsg != NULL);
        REQUIRE(rmsg != NULL);
@@ -1432,9 +1433,9 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
 
        RETERR(find_tkey(rmsg, &tkeyname, &rtkeyrdata, DNS_SECTION_ANSWER));
        RETERR(dns_rdata_tostruct(&rtkeyrdata, &rtkey, NULL));
-       freertkey = ISC_TRUE;
+       freertkey = true;
 
-       if (win2k == ISC_TRUE)
+       if (win2k == true)
                RETERR(find_tkey(qmsg, &tkeyname, &qtkeyrdata,
                                 DNS_SECTION_ANSWER));
        else
@@ -1506,7 +1507,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
                                         (win2k
                                          ? DNS_TSIG_GSSAPIMS_NAME
                                          : DNS_TSIG_GSSAPI_NAME),
-                                        dstkey, ISC_TRUE, NULL,
+                                        dstkey, true, NULL,
                                         rtkey.inception, rtkey.expire,
                                         ring->mctx, ring, outkey));
        dst_key_free(&dstkey);
index a367291f2311600d3d1c0fa8ba5a43d1e28bebaf..c5eca0e09506e2adcb5893b6dcd9ea4e5ab33553 100644 (file)
@@ -86,7 +86,7 @@ dns_tsec_create(isc_mem_t *mctx, dns_tsectype_t type, dst_key_t *key,
                        return (DNS_R_BADALG);
                }
                result = dns_tsigkey_createfromkey(dst_key_name(key),
-                                                  algname, key, ISC_FALSE,
+                                                  algname, key, false,
                                                   NULL, 0, 0, mctx, NULL,
                                                   &tsigkey);
                if (result != ISC_R_SUCCESS) {
index 7d20f8d532bc9aca4879d6802ec6cffbe86bc7a7..a94ec697c17787449a7ec841533dcdb18cd307ec 100644 (file)
@@ -16,6 +16,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -148,7 +149,7 @@ tsig_log(dns_tsigkey_t *key, int level, const char *fmt, ...) {
        char namestr[DNS_NAME_FORMATSIZE];
        char creatorstr[DNS_NAME_FORMATSIZE];
 
-       if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE)
+       if (isc_log_wouldlog(dns_lctx, level) == false)
                return;
        if (key != NULL) {
                dns_name_format(&key->name, namestr, sizeof(namestr));
@@ -183,7 +184,7 @@ remove_fromring(dns_tsigkey_t *tkey) {
                ISC_LIST_UNLINK(tkey->ring->lru, tkey, link);
                tkey->ring->generated--;
        }
-       (void)dns_rbt_deletename(tkey->ring->keys, &tkey->name, ISC_FALSE);
+       (void)dns_rbt_deletename(tkey->ring->keys, &tkey->name, false);
 }
 
 static void
@@ -246,7 +247,7 @@ keyring_add(dns_tsig_keyring_t *ring, dns_name_t *name,
 
 isc_result_t
 dns_tsigkey_createfromkey(dns_name_t *name, dns_name_t *algorithm,
-                         dst_key_t *dstkey, isc_boolean_t generated,
+                         dst_key_t *dstkey, bool generated,
                          dns_name_t *creator, isc_stdtime_t inception,
                          isc_stdtime_t expire, isc_mem_t *mctx,
                          dns_tsig_keyring_t *ring, dns_tsigkey_t **key)
@@ -577,7 +578,7 @@ restore_key(dns_tsig_keyring_t *ring, isc_stdtime_t now, FILE *fp) {
                return (result);
 
        result = dns_tsigkey_createfromkey(name, algorithm, dstkey,
-                                          ISC_TRUE, creator, inception,
+                                          true, creator, inception,
                                           expire, ring->mctx, ring, NULL);
        if (dstkey != NULL)
                dst_key_free(&dstkey);
@@ -669,7 +670,7 @@ dns_tsigkeyring_dumpanddetach(dns_tsig_keyring_t **ringp, FILE *fp) {
 
 isc_result_t
 dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm,
-                  unsigned char *secret, int length, isc_boolean_t generated,
+                  unsigned char *secret, int length, bool generated,
                   dns_name_t *creator, isc_stdtime_t inception,
                   isc_stdtime_t expire, isc_mem_t *mctx,
                   dns_tsig_keyring_t *ring, dns_tsigkey_t **key)
@@ -853,7 +854,7 @@ dns_tsig_sign(dns_message_t *msg) {
        isc_result_t ret;
        unsigned char badtimedata[BADTIMELEN];
        unsigned int sigsize = 0;
-       isc_boolean_t response;
+       bool response;
 
        REQUIRE(msg != NULL);
        key = dns_message_gettsigkey(msg);
@@ -917,7 +918,7 @@ dns_tsig_sign(dns_message_t *msg) {
                 */
                ret = dst_context_create3(key->key, mctx,
                                          DNS_LOGCATEGORY_DNSSEC,
-                                         ISC_TRUE, &ctx);
+                                         true, &ctx);
                if (ret != ISC_R_SUCCESS)
                        return (ret);
 
@@ -1164,7 +1165,7 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
        uint16_t addcount, id;
        unsigned int siglen;
        unsigned int alg;
-       isc_boolean_t response;
+       bool response;
 
        REQUIRE(source != NULL);
        REQUIRE(DNS_MESSAGE_VALID(msg));
@@ -1260,7 +1261,7 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
                if (ret != ISC_R_SUCCESS) {
                        msg->tsigstatus = dns_tsigerror_badkey;
                        ret = dns_tsigkey_create(keyname, &tsig.algorithm,
-                                                NULL, 0, ISC_FALSE, NULL,
+                                                NULL, 0, false, NULL,
                                                 now, now,
                                                 mctx, NULL, &msg->tsigkey);
                        if (ret != ISC_R_SUCCESS)
@@ -1309,7 +1310,7 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
 
                ret = dst_context_create3(key, mctx,
                                          DNS_LOGCATEGORY_DNSSEC,
-                                         ISC_FALSE, &ctx);
+                                         false, &ctx);
                if (ret != ISC_R_SUCCESS)
                        return (ret);
 
@@ -1521,7 +1522,7 @@ tsig_verify_tcp(isc_buffer_t *source, dns_message_t *msg) {
        dst_key_t *key = NULL;
        unsigned char header[DNS_MESSAGE_HEADERLEN];
        uint16_t addcount, id;
-       isc_boolean_t has_tsig = ISC_FALSE;
+       bool has_tsig = false;
        isc_mem_t *mctx;
        unsigned int siglen;
        unsigned int alg;
@@ -1559,7 +1560,7 @@ tsig_verify_tcp(isc_buffer_t *source, dns_message_t *msg) {
         * If there is a TSIG in this message, do some checks.
         */
        if (msg->tsig != NULL) {
-               has_tsig = ISC_TRUE;
+               has_tsig = true;
 
                keyname = msg->tsigname;
                ret = dns_rdataset_first(msg->tsig);
@@ -1621,7 +1622,7 @@ tsig_verify_tcp(isc_buffer_t *source, dns_message_t *msg) {
        if (msg->tsigctx == NULL) {
                ret = dst_context_create3(key, mctx,
                                          DNS_LOGCATEGORY_DNSSEC,
-                                         ISC_FALSE, &msg->tsigctx);
+                                         false, &msg->tsigctx);
                if (ret != ISC_R_SUCCESS)
                        goto cleanup_querystruct;
 
index 7aa556a400ce1a1a7388ba42203c770f190877b6..de2f9dc4d3a85934c9a0a581abebdf32a2a2bbae 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ctype.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -42,8 +43,8 @@ static isc_result_t bind_ttl(isc_textregion_t *source, uint32_t *ttl);
  * Helper for dns_ttl_totext().
  */
 static isc_result_t
-ttlfmt(unsigned int t, const char *s, isc_boolean_t verbose,
-       isc_boolean_t space, isc_buffer_t *target)
+ttlfmt(unsigned int t, const char *s, bool verbose,
+       bool space, isc_buffer_t *target)
 {
        char tmp[60];
        unsigned int len;
@@ -71,13 +72,13 @@ ttlfmt(unsigned int t, const char *s, isc_boolean_t verbose,
  * Derived from bind8 ns_format_ttl().
  */
 isc_result_t
-dns_ttl_totext(uint32_t src, isc_boolean_t verbose, isc_buffer_t *target) {
-       return (dns_ttl_totext2(src, verbose, ISC_TRUE, target));
+dns_ttl_totext(uint32_t src, bool verbose, isc_buffer_t *target) {
+       return (dns_ttl_totext2(src, verbose, true, target));
 }
 
 isc_result_t
-dns_ttl_totext2(uint32_t src, isc_boolean_t verbose,
-               isc_boolean_t upcase, isc_buffer_t *target)
+dns_ttl_totext2(uint32_t src, bool verbose,
+               bool upcase, isc_buffer_t *target)
 {
        unsigned secs, mins, hours, days, weeks, x;
 
@@ -90,24 +91,24 @@ dns_ttl_totext2(uint32_t src, isc_boolean_t verbose,
 
        x = 0;
        if (weeks != 0) {
-               RETERR(ttlfmt(weeks, "week", verbose, ISC_TF(x > 0), target));
+               RETERR(ttlfmt(weeks, "week", verbose, (x > 0), target));
                x++;
        }
        if (days != 0) {
-               RETERR(ttlfmt(days, "day", verbose, ISC_TF(x > 0), target));
+               RETERR(ttlfmt(days, "day", verbose, (x > 0), target));
                x++;
        }
        if (hours != 0) {
-               RETERR(ttlfmt(hours, "hour", verbose, ISC_TF(x > 0), target));
+               RETERR(ttlfmt(hours, "hour", verbose, (x > 0), target));
                x++;
        }
        if (mins != 0) {
-               RETERR(ttlfmt(mins, "minute", verbose, ISC_TF(x > 0), target));
+               RETERR(ttlfmt(mins, "minute", verbose, (x > 0), target));
                x++;
        }
        if (secs != 0 ||
            (weeks == 0 && days == 0 && hours == 0 && mins == 0)) {
-               RETERR(ttlfmt(secs, "second", verbose, ISC_TF(x > 0), target));
+               RETERR(ttlfmt(secs, "second", verbose, (x > 0), target));
                x++;
        }
        INSIST (x > 0);
index 3cd62dde3dd9462d8640e3d263e2ab773a5dc387..1cc5f88673c2e0732de44aee0f9a0cb4af6ea828 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <time.h>
 
 #include <isc/log.h>
@@ -205,7 +206,7 @@ update_log(dns_update_log_t *callback, dns_zone_t *zone,
        if (callback == NULL)
                return;
 
-       if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE)
+       if (isc_log_wouldlog(dns_lctx, level) == false)
                return;
 
 
@@ -350,7 +351,7 @@ foreach_rrset(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        dns_rdatasetiter_t *iter;
 
        node = NULL;
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -435,9 +436,9 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        node = NULL;
        if (type == dns_rdatatype_nsec3 ||
            (type == dns_rdatatype_rrsig && covers == dns_rdatatype_nsec3))
-               result = dns_db_findnsec3node(db, name, ISC_FALSE, &node);
+               result = dns_db_findnsec3node(db, name, false, &node);
        else
-               result = dns_db_findnode(db, name, ISC_FALSE, &node);
+               result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -485,7 +486,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
  * Function type for predicate functions that compare a database RR 'db_rr'
  * against an update RR 'update_rr'.
  */
-typedef isc_boolean_t rr_predicate(dns_rdata_t *update_rr, dns_rdata_t *db_rr);
+typedef bool rr_predicate(dns_rdata_t *update_rr, dns_rdata_t *db_rr);
 
 /*%
  * Helper function for rrset_exists().
@@ -501,7 +502,7 @@ rrset_exists_action(void *data, rr_t *rr) {
  * Utility macro for RR existence checking functions.
  *
  * If the variable 'result' has the value ISC_R_EXISTS or
- * ISC_R_SUCCESS, set *exists to ISC_TRUE or ISC_FALSE,
+ * ISC_R_SUCCESS, set *exists to true or false,
  * respectively, and return success.
  *
  * If 'result' has any other value, there was a failure.
@@ -512,9 +513,9 @@ rrset_exists_action(void *data, rr_t *rr) {
  */
 #define RETURN_EXISTENCE_FLAG                          \
        return ((result == ISC_R_EXISTS) ?              \
-               (*exists = ISC_TRUE, ISC_R_SUCCESS) :   \
+               (*exists = true, ISC_R_SUCCESS) :       \
                ((result == ISC_R_SUCCESS) ?            \
-                (*exists = ISC_FALSE, ISC_R_SUCCESS) : \
+                (*exists = false, ISC_R_SUCCESS) :     \
                 result))
 
 /*%
@@ -524,7 +525,7 @@ rrset_exists_action(void *data, rr_t *rr) {
 static isc_result_t
 rrset_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
             dns_rdatatype_t type, dns_rdatatype_t covers,
-            isc_boolean_t *exists)
+            bool *exists)
 {
        isc_result_t result;
        result = foreach_rr(db, ver, name, type, covers,
@@ -539,7 +540,7 @@ rrset_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
  */
 static isc_result_t
 rrset_visible(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-             dns_rdatatype_t type, isc_boolean_t *visible)
+             dns_rdatatype_t type, bool *visible)
 {
        isc_result_t result;
        dns_fixedname_t fixed;
@@ -550,7 +551,7 @@ rrset_visible(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                             dns_fixedname_name(&fixed), NULL, NULL);
        switch (result) {
        case ISC_R_SUCCESS:
-               *visible = ISC_TRUE;
+               *visible = true;
                break;
        /*
         * Glue, obscured, deleted or replaced records.
@@ -562,11 +563,11 @@ rrset_visible(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        case DNS_R_NXRRSET:
        case DNS_R_EMPTYNAME:
        case DNS_R_COVERINGNSEC:
-               *visible = ISC_FALSE;
+               *visible = false;
                result = ISC_R_SUCCESS;
                break;
        default:
-               *visible = ISC_FALSE;    /* silence false compiler warning */
+               *visible = false;        /* silence false compiler warning */
                break;
        }
        return (result);
@@ -588,7 +589,7 @@ name_exists_action(void *data, dns_rdataset_t *rrset) {
  */
 static isc_result_t
 name_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-           isc_boolean_t *exists)
+           bool *exists)
 {
        isc_result_t result;
        result = foreach_rrset(db, ver, name,
@@ -654,21 +655,21 @@ typedef struct {
 /*%
  * Return true always.
  */
-static isc_boolean_t
+static bool
 true_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        UNUSED(update_rr);
        UNUSED(db_rr);
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*%
  * Return true if the record is a RRSIG.
  */
-static isc_boolean_t
+static bool
 rrsig_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
        UNUSED(update_rr);
        return ((db_rr->type == dns_rdatatype_rrsig) ?
-               ISC_TRUE : ISC_FALSE);
+               true : false);
 }
 
 /*%
@@ -786,12 +787,12 @@ is_non_nsec_action(void *data, dns_rdataset_t *rrset) {
  * i.e., anything that justifies the continued existence of a name
  * after a secure update.
  *
- * If such an rrset exists, set '*exists' to ISC_TRUE.
- * Otherwise, set it to ISC_FALSE.
+ * If such an rrset exists, set '*exists' to true.
+ * Otherwise, set it to false.
  */
 static isc_result_t
 non_nsec_rrset_exists(dns_db_t *db, dns_dbversion_t *ver,
-                    dns_name_t *name, isc_boolean_t *exists)
+                    dns_name_t *name, bool *exists)
 {
        isc_result_t result;
        result = foreach_rrset(db, ver, name, is_non_nsec_action, NULL);
@@ -834,7 +835,7 @@ uniqify_name_list(dns_diff_t *list) {
 
 static isc_result_t
 is_active(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-         isc_boolean_t *flag, isc_boolean_t *cut, isc_boolean_t *unsecure)
+         bool *flag, bool *cut, bool *unsecure)
 {
        isc_result_t result;
        dns_fixedname_t foundname;
@@ -845,14 +846,14 @@ is_active(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                             dns_fixedname_name(&foundname),
                             NULL, NULL);
        if (result == ISC_R_SUCCESS || result == DNS_R_EMPTYNAME) {
-               *flag = ISC_TRUE;
-               *cut = ISC_FALSE;
+               *flag = true;
+               *cut = false;
                if (unsecure != NULL)
-                       *unsecure = ISC_FALSE;
+                       *unsecure = false;
                return (ISC_R_SUCCESS);
        } else if (result == DNS_R_ZONECUT) {
-               *flag = ISC_TRUE;
-               *cut = ISC_TRUE;
+               *flag = true;
+               *cut = true;
                if (unsecure != NULL) {
                        /*
                         * We are at the zonecut.  Check to see if there
@@ -862,26 +863,26 @@ is_active(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                                        (isc_stdtime_t) 0, NULL,
                                        dns_fixedname_name(&foundname),
                                        NULL, NULL) == DNS_R_NXRRSET)
-                               *unsecure = ISC_TRUE;
+                               *unsecure = true;
                        else
-                               *unsecure = ISC_FALSE;
+                               *unsecure = false;
                }
                return (ISC_R_SUCCESS);
        } else if (result == DNS_R_GLUE || result == DNS_R_DNAME ||
                   result == DNS_R_DELEGATION || result == DNS_R_NXDOMAIN) {
-               *flag = ISC_FALSE;
-               *cut = ISC_FALSE;
+               *flag = false;
+               *cut = false;
                if (unsecure != NULL)
-                       *unsecure = ISC_FALSE;
+                       *unsecure = false;
                return (ISC_R_SUCCESS);
        } else {
                /*
                 * Silence compiler.
                 */
-               *flag = ISC_FALSE;
-               *cut = ISC_FALSE;
+               *flag = false;
+               *cut = false;
                if (unsecure != NULL)
-                       *unsecure = ISC_FALSE;
+                       *unsecure = false;
                return (result);
        }
 }
@@ -895,13 +896,13 @@ is_active(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
 static isc_result_t
 next_active(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
            dns_dbversion_t *ver, dns_name_t *oldname, dns_name_t *newname,
-           isc_boolean_t forward)
+           bool forward)
 {
        isc_result_t result;
        dns_dbiterator_t *dbit = NULL;
-       isc_boolean_t has_nsec = ISC_FALSE;
+       bool has_nsec = false;
        unsigned int wraps = 0;
-       isc_boolean_t secure = dns_db_issecure(db);
+       bool secure = dns_db_issecure(db);
 
        CHECK(dns_db_createiterator(db, 0, &dbit));
 
@@ -956,7 +957,7 @@ next_active(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                            result == DNS_R_CNAME ||
                            (result == DNS_R_DELEGATION &&
                             dns_name_equal(newname, found))) {
-                               has_nsec = ISC_TRUE;
+                               has_nsec = true;
                                result = ISC_R_SUCCESS;
                        } else if (result != DNS_R_NXDOMAIN)
                                break;
@@ -991,12 +992,12 @@ add_nsec(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
        /*
         * Find the successor name, aka NSEC target.
         */
-       CHECK(next_active(log, zone, db, ver, name, target, ISC_TRUE));
+       CHECK(next_active(log, zone, db, ver, name, target, true));
 
        /*
         * Create the NSEC RDATA.
         */
-       CHECK(dns_db_findnode(db, name, ISC_FALSE, &node));
+       CHECK(dns_db_findnode(db, name, false, &node));
        dns_rdata_init(&rdata);
        CHECK(dns_nsec_buildrdata(db, ver, node, target, buffer, &rdata));
        dns_db_detachnode(db, &node);
@@ -1051,7 +1052,7 @@ find_zone_keys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
        isc_result_t result;
        dns_dbnode_t *node = NULL;
        const char *directory = dns_zone_getkeydirectory(zone);
-       CHECK(dns_db_findnode(db, dns_db_origin(db), ISC_FALSE, &node));
+       CHECK(dns_db_findnode(db, dns_db_origin(db), false, &node));
        CHECK(dns_dnssec_findzonekeys2(db, ver, node, dns_db_origin(db),
                                       directory, mctx, maxkeys, keys, nkeys));
  failure:
@@ -1068,7 +1069,7 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
         dns_dbversion_t *ver, dns_name_t *name, dns_rdatatype_t type,
         dns_diff_t *diff, dst_key_t **keys, unsigned int nkeys,
         isc_stdtime_t inception, isc_stdtime_t expire,
-        isc_boolean_t check_ksk, isc_boolean_t keyset_kskonly)
+        bool check_ksk, bool keyset_kskonly)
 {
        isc_result_t result;
        dns_dbnode_t *node = NULL;
@@ -1077,7 +1078,7 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
        isc_buffer_t buffer;
        unsigned char data[1024]; /* XXX */
        unsigned int i, j;
-       isc_boolean_t added_sig = ISC_FALSE;
+       bool added_sig = false;
        isc_mem_t *mctx = diff->mctx;
 
        dns_rdataset_init(&rdataset);
@@ -1085,9 +1086,9 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
 
        /* Get the rdataset to sign. */
        if (type == dns_rdatatype_nsec3)
-               CHECK(dns_db_findnsec3node(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnsec3node(db, name, false, &node));
        else
-               CHECK(dns_db_findnode(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnode(db, name, false, &node));
        CHECK(dns_db_findrdataset(db, node, ver, type, 0,
                                  (isc_stdtime_t) 0, &rdataset, NULL));
        dns_db_detachnode(db, &node);
@@ -1102,7 +1103,7 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
         * algorithm.
         */
        for (i = 0; i < nkeys; i++) {
-               isc_boolean_t both = ISC_FALSE;
+               bool both = false;
 
                if (!dst_key_isprivate(keys[i]))
                        continue;
@@ -1110,13 +1111,13 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                        continue;
 
                if (check_ksk && !REVOKE(keys[i])) {
-                       isc_boolean_t have_ksk, have_nonksk;
+                       bool have_ksk, have_nonksk;
                        if (KSK(keys[i])) {
-                               have_ksk = ISC_TRUE;
-                               have_nonksk = ISC_FALSE;
+                               have_ksk = true;
+                               have_nonksk = false;
                        } else {
-                               have_ksk = ISC_FALSE;
-                               have_nonksk = ISC_TRUE;
+                               have_ksk = false;
+                               have_nonksk = true;
                        }
                        for (j = 0; j < nkeys; j++) {
                                if (j == i || ALG(keys[i]) != ALG(keys[j]))
@@ -1128,9 +1129,9 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                                if (REVOKE(keys[j]))
                                        continue;
                                if (KSK(keys[j]))
-                                       have_ksk = ISC_TRUE;
+                                       have_ksk = true;
                                else
-                                       have_nonksk = ISC_TRUE;
+                                       have_nonksk = true;
                                both = have_ksk && have_nonksk;
                                if (both)
                                        break;
@@ -1164,7 +1165,7 @@ add_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                                    rdataset.ttl, &sig_rdata));
                dns_rdata_reset(&sig_rdata);
                isc_buffer_init(&buffer, data, sizeof(data));
-               added_sig = ISC_TRUE;
+               added_sig = true;
        }
        if (!added_sig) {
                update_log(log, zone, ISC_LOG_ERROR,
@@ -1195,11 +1196,11 @@ del_keysigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        unsigned int i;
        dns_rdata_rrsig_t rrsig;
-       isc_boolean_t found;
+       bool found;
 
        dns_rdataset_init(&rdataset);
 
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -1220,10 +1221,10 @@ del_keysigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                dns_rdataset_current(&rdataset, &rdata);
                result = dns_rdata_tostruct(&rdata, &rrsig, NULL);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
-               found = ISC_FALSE;
+               found = false;
                for (i = 0; i < nkeys; i++) {
                        if (rrsig.keyid == dst_key_id(keys[i])) {
-                               found = ISC_TRUE;
+                               found = true;
                                if (!dst_key_isprivate(keys[i]) &&
                                    !dst_key_inactive(keys[i]))
                                {
@@ -1261,10 +1262,10 @@ failure:
 
 static isc_result_t
 add_exposed_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
-                dns_dbversion_t *ver, dns_name_t *name, isc_boolean_t cut,
+                dns_dbversion_t *ver, dns_name_t *name, bool cut,
                 dns_diff_t *diff, dst_key_t **keys, unsigned int nkeys,
                 isc_stdtime_t inception, isc_stdtime_t expire,
-                isc_boolean_t check_ksk, isc_boolean_t keyset_kskonly,
+                bool check_ksk, bool keyset_kskonly,
                 unsigned int *sigs)
 {
        isc_result_t result;
@@ -1272,7 +1273,7 @@ add_exposed_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
        dns_rdatasetiter_t *iter;
 
        node = NULL;
-       result = dns_db_findnode(db, name, ISC_FALSE, &node);
+       result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -1290,7 +1291,7 @@ add_exposed_sigs(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
        {
                dns_rdataset_t rdataset;
                dns_rdatatype_t type;
-               isc_boolean_t flag;
+               bool flag;
 
                dns_rdataset_init(&rdataset);
                dns_rdatasetiter_current(iter, &rdataset);
@@ -1361,7 +1362,7 @@ struct dns_update_state {
        unsigned int nkeys;
        isc_stdtime_t inception, expire;
        dns_ttl_t nsecttl;
-       isc_boolean_t check_ksk, keyset_kskonly, build_nsec3;
+       bool check_ksk, keyset_kskonly, build_nsec3;
        enum { sign_updates, remove_orphaned, build_chain, process_nsec,
               sign_nsec, update_nsec3, process_nsec3, sign_nsec3 } state;
 };
@@ -1376,15 +1377,15 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
        dns_update_state_t mystate, *state;
 
        dns_difftuple_t *t, *next;
-       isc_boolean_t flag, build_nsec;
+       bool flag, build_nsec;
        unsigned int i;
        isc_stdtime_t now;
        dns_rdata_soa_t soa;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdataset_t rdataset;
        dns_dbnode_t *node = NULL;
-       isc_boolean_t unsecure;
-       isc_boolean_t cut;
+       bool unsecure;
+       bool cut;
        dns_rdatatype_t privatetype = dns_zone_getprivatetype(zone);
        unsigned int sigs = 0;
        unsigned int maxsigs = dns_zone_getsignatures(zone);
@@ -1405,7 +1406,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                dns_diff_init(diff->mctx, &state->nsec_mindiff);
                dns_diff_init(diff->mctx, &state->work);
                state->nkeys = 0;
-               state->build_nsec3 = ISC_FALSE;
+               state->build_nsec3 = false;
 
                result = find_zone_keys(zone, db, newver, diff->mctx,
                                        DNS_MAXZONEKEYS, state->zone_keys,
@@ -1427,15 +1428,15 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                 * check the keys flags to make sure at least one has a ksk set
                 * and one doesn't.
                 */
-               state->check_ksk = ISC_TF((dns_zone_getoptions(zone) &
-                                   DNS_ZONEOPT_UPDATECHECKKSK) != 0);
-               state->keyset_kskonly = ISC_TF((dns_zone_getoptions(zone) &
-                                       DNS_ZONEOPT_DNSKEYKSKONLY) != 0);
+               state->check_ksk =
+                       (dns_zone_getoptions(zone) & DNS_ZONEOPT_UPDATECHECKKSK);
+               state->keyset_kskonly =
+                       (dns_zone_getoptions(zone) & DNS_ZONEOPT_DNSKEYKSKONLY);
 
                /*
                 * Get the NSEC/NSEC3 TTL from the SOA MINIMUM field.
                 */
-               CHECK(dns_db_findnode(db, dns_db_origin(db), ISC_FALSE, &node));
+               CHECK(dns_db_findnode(db, dns_db_origin(db), false, &node));
                dns_rdataset_init(&rdataset);
                CHECK(dns_db_findrdataset(db, node, newver, dns_rdatatype_soa,
                                          0, (isc_stdtime_t) 0, &rdataset,
@@ -1590,7 +1591,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                     t != NULL;
                     t = ISC_LIST_NEXT(t, link))
                {
-                       isc_boolean_t existed, exists;
+                       bool existed, exists;
                        dns_fixedname_t fixedname;
                        dns_name_t *prevname;
 
@@ -1600,7 +1601,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                                CHECK(name_exists(db, oldver, &t->name,
                                                  &existed));
                        else
-                               existed = ISC_FALSE;
+                               existed = false;
                        CHECK(name_exists(db, newver, &t->name, &exists));
                        if (exists == existed)
                                continue;
@@ -1617,7 +1618,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                         * "affected" list in any case.
                         */
                        CHECK(next_active(log, zone, db, newver,
-                                         &t->name, prevname, ISC_FALSE));
+                                         &t->name, prevname, false));
                        CHECK(namelist_append_name(&state->affected, prevname));
                }
 
@@ -1630,21 +1631,21 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                     t != NULL;
                     t = ISC_LIST_NEXT(t, link))
                {
-                       isc_boolean_t ns_existed, dname_existed;
-                       isc_boolean_t ns_exists, dname_exists;
+                       bool ns_existed, dname_existed;
+                       bool ns_exists, dname_exists;
 
                        if (oldver != NULL)
                                CHECK(rrset_exists(db, oldver, &t->name,
                                                  dns_rdatatype_ns, 0,
                                                  &ns_existed));
                        else
-                               ns_existed = ISC_FALSE;
+                               ns_existed = false;
                        if (oldver != NULL)
                                CHECK(rrset_exists(db, oldver, &t->name,
                                                   dns_rdatatype_dname, 0,
                                                   &dname_existed));
                        else
-                               dname_existed = ISC_FALSE;
+                               dname_existed = false;
                        CHECK(rrset_exists(db, newver, &t->name,
                                           dns_rdatatype_ns, 0, &ns_exists));
                        CHECK(rrset_exists(db, newver, &t->name,
@@ -1678,7 +1679,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                 * should be part of the NSEC chain.
                 */
                while ((t = ISC_LIST_HEAD(state->affected.tuples)) != NULL) {
-                       isc_boolean_t exists;
+                       bool exists;
                        dns_name_t *name = &t->name;
 
                        CHECK(name_exists(db, newver, name, &exists));
@@ -1855,9 +1856,9 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                while (t != NULL) {
                        dns_name_t *name = &t->name;
 
-                       isc_boolean_t ns_existed, dname_existed;
-                       isc_boolean_t ns_exists, dname_exists;
-                       isc_boolean_t exists, existed;
+                       bool ns_existed, dname_existed;
+                       bool ns_exists, dname_exists;
+                       bool exists, existed;
 
                        if (t->rdata.type == dns_rdatatype_nsec ||
                            t->rdata.type == dns_rdatatype_rrsig) {
@@ -1872,13 +1873,13 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                                                   dns_rdatatype_ns,
                                                   0, &ns_existed));
                        else
-                               ns_existed = ISC_FALSE;
+                               ns_existed = false;
                        if (oldver != NULL)
                                CHECK(rrset_exists(db, oldver, name,
                                                   dns_rdatatype_dname, 0,
                                                   &dname_existed));
                        else
-                               dname_existed = ISC_FALSE;
+                               dname_existed = false;
                        CHECK(rrset_exists(db, newver, name, dns_rdatatype_ns,
                                           0, &ns_exists));
                        CHECK(rrset_exists(db, newver, name,
@@ -1907,7 +1908,7 @@ dns_update_signaturesinc(dns_update_log_t *log, dns_zone_t *zone, dns_db_t *db,
                while ((t = ISC_LIST_HEAD(state->affected.tuples)) != NULL) {
                        dns_name_t *name = &t->name;
 
-                       unsecure = ISC_FALSE;   /* Silence compiler warning. */
+                       unsecure = false;       /* Silence compiler warning. */
                        CHECK(is_active(db, newver, name, &flag, &cut,
                                        &unsecure));
 
index a5ab339f23dde3f13b65d4f9adce452453cee4c7..9ae11a2330a265f229a2d2f6fb4d66b9a748d1f3 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/base32.h>
 #include <isc/mem.h>
@@ -133,17 +134,17 @@ get_dst_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo,
            dns_rdataset_t *rdataset);
 
 static isc_result_t
-validate(dns_validator_t *val, isc_boolean_t resume);
+validate(dns_validator_t *val, bool resume);
 
 static isc_result_t
 validatezonekey(dns_validator_t *val);
 
 static isc_result_t
-nsecvalidate(dns_validator_t *val, isc_boolean_t resume);
+nsecvalidate(dns_validator_t *val, bool resume);
 
 static isc_result_t
-proveunsecure(dns_validator_t *val, isc_boolean_t have_ds,
-             isc_boolean_t resume);
+proveunsecure(dns_validator_t *val, bool have_ds,
+             bool resume);
 
 static void
 validator_logv(dns_validator_t *val, isc_logcategory_t *category,
@@ -166,7 +167,7 @@ static void
 dlv_validator_start(dns_validator_t *val);
 
 static isc_result_t
-finddlvsep(dns_validator_t *val, isc_boolean_t resume);
+finddlvsep(dns_validator_t *val, bool resume);
 
 static isc_result_t
 startfinddlvsep(dns_validator_t *val, dns_name_t *unsecure);
@@ -189,7 +190,7 @@ marksecure(dns_validatorevent_t *event) {
        dns_rdataset_settrust(event->rdataset, dns_trust_secure);
        if (event->sigrdataset != NULL)
                dns_rdataset_settrust(event->sigrdataset, dns_trust_secure);
-       event->secure = ISC_TRUE;
+       event->secure = true;
 }
 
 static void
@@ -212,26 +213,26 @@ validator_done(dns_validator_t *val, isc_result_t result) {
        isc_task_sendanddetach(&task, (isc_event_t **)&val->event);
 }
 
-static inline isc_boolean_t
+static inline bool
 exit_check(dns_validator_t *val) {
        /*
         * Caller must be holding the lock.
         */
        if (!SHUTDOWN(val))
-               return (ISC_FALSE);
+               return (false);
 
        INSIST(val->event == NULL);
 
        if (val->fetch != NULL || val->subvalidator != NULL)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*
  * Check that we have atleast one supported algorithm in the DLV RRset.
  */
-static inline isc_boolean_t
+static inline bool
 dlv_algorithm_supported(dns_validator_t *val) {
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdata_dlv_t dlv;
@@ -255,16 +256,16 @@ dlv_algorithm_supported(dns_validator_t *val) {
                                                      dlv.digest_type))
                        continue;
 
-               return (ISC_TRUE);
+               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%
  * Look in the NSEC record returned from a DS query to see if there is
  * a NS RRset at this name.  If it is found we are at a delegation point.
  */
-static isc_boolean_t
+static bool
 isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
             isc_result_t dbresult)
 {
@@ -276,7 +277,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
        dns_rdataset_t set;
        int order;
        int scope;
-       isc_boolean_t found;
+       bool found;
        isc_buffer_t buffer;
        isc_result_t result;
        unsigned char hash[NSEC3_MAX_HASH_LENGTH];
@@ -294,12 +295,12 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
                if (result == ISC_R_NOTFOUND)
                        goto trynsec3;
                if (result != ISC_R_SUCCESS)
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        INSIST(set.type == dns_rdatatype_nsec);
 
-       found = ISC_FALSE;
+       found = false;
        result = dns_rdataset_first(&set);
        if (result == ISC_R_SUCCESS) {
                dns_rdataset_current(&set, &rdata);
@@ -313,7 +314,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
        /*
         * Iterate over the ncache entry.
         */
-       found = ISC_FALSE;
+       found = false;
        dns_name_init(&nsec3name, NULL);
        dns_fixedname_init(&fixed);
        dns_name_downcase(name, dns_fixedname_name(&fixed), NULL);
@@ -369,7 +370,7 @@ isdelegation(dns_name_t *name, dns_rdataset_t *rdataset,
                                        memcmp(hash, nsec3.next, length) < 0)))
                        {
                                dns_rdataset_disassociate(&set);
-                               return (ISC_TRUE);
+                               return (true);
                        }
                }
                dns_rdataset_disassociate(&set);
@@ -387,7 +388,7 @@ fetch_callback_validator(isc_task_t *task, isc_event_t *event) {
        dns_fetchevent_t *devent;
        dns_validator_t *val;
        dns_rdataset_t *rdataset;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
        isc_result_t eresult;
        isc_result_t saved_result;
@@ -429,7 +430,7 @@ fetch_callback_validator(isc_task_t *task, isc_event_t *event) {
                        if (result == ISC_R_SUCCESS)
                                val->keyset = &val->frdataset;
                }
-               result = validate(val, ISC_TRUE);
+               result = validate(val, true);
                if (result == DNS_R_NOVALIDSIG &&
                    (val->attributes & VALATTR_TRIEDVERIFY) == 0)
                {
@@ -437,7 +438,7 @@ fetch_callback_validator(isc_task_t *task, isc_event_t *event) {
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "falling back to insecurity proof");
                        val->attributes |= VALATTR_INSECURITY;
-                       result = proveunsecure(val, ISC_FALSE, ISC_FALSE);
+                       result = proveunsecure(val, false, false);
                        if (result == DNS_R_NOTINSECURE)
                                result = saved_result;
                }
@@ -470,7 +471,7 @@ dsfetched(isc_task_t *task, isc_event_t *event) {
        dns_fetchevent_t *devent;
        dns_validator_t *val;
        dns_rdataset_t *rdataset;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
        isc_result_t eresult;
        dns_fetch_t *fetch;
@@ -516,7 +517,7 @@ dsfetched(isc_task_t *task, isc_event_t *event) {
                              "falling back to insecurity proof (%s)",
                              dns_result_totext(eresult));
                val->attributes |= VALATTR_INSECURITY;
-               result = proveunsecure(val, ISC_FALSE, ISC_FALSE);
+               result = proveunsecure(val, false, false);
                if (result != DNS_R_WAIT)
                        validator_done(val, result);
        } else {
@@ -552,7 +553,7 @@ dsfetched2(isc_task_t *task, isc_event_t *event) {
        dns_fetchevent_t *devent;
        dns_validator_t *val;
        dns_name_t *tname;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
        isc_result_t eresult;
        dns_fetch_t *fetch;
@@ -604,7 +605,7 @@ dsfetched2(isc_task_t *task, isc_event_t *event) {
                                        validator_done(val, result);
                        }
                } else {
-                       result = proveunsecure(val, ISC_FALSE, ISC_TRUE);
+                       result = proveunsecure(val, false, true);
                        if (result != DNS_R_WAIT)
                                validator_done(val, result);
                }
@@ -617,8 +618,8 @@ dsfetched2(isc_task_t *task, isc_event_t *event) {
                 * In either case we are still in a secure zone resume
                 * validation.
                 */
-               result = proveunsecure(val, ISC_TF(eresult == ISC_R_SUCCESS),
-                                      ISC_TRUE);
+               result = proveunsecure(val, (eresult == ISC_R_SUCCESS),
+                                      true);
                if (result != DNS_R_WAIT)
                        validator_done(val, result);
        } else {
@@ -645,7 +646,7 @@ static void
 keyvalidated(isc_task_t *task, isc_event_t *event) {
        dns_validatorevent_t *devent;
        dns_validator_t *val;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
        isc_result_t eresult;
        isc_result_t saved_result;
@@ -675,7 +676,7 @@ keyvalidated(isc_task_t *task, isc_event_t *event) {
                 */
                if (val->frdataset.trust >= dns_trust_secure)
                        (void) get_dst_key(val, val->siginfo, &val->frdataset);
-               result = validate(val, ISC_TRUE);
+               result = validate(val, true);
                if (result == DNS_R_NOVALIDSIG &&
                    (val->attributes & VALATTR_TRIEDVERIFY) == 0)
                {
@@ -683,7 +684,7 @@ keyvalidated(isc_task_t *task, isc_event_t *event) {
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "falling back to insecurity proof");
                        val->attributes |= VALATTR_INSECURITY;
-                       result = proveunsecure(val, ISC_FALSE, ISC_FALSE);
+                       result = proveunsecure(val, false, false);
                        if (result == DNS_R_NOTINSECURE)
                                result = saved_result;
                }
@@ -716,7 +717,7 @@ static void
 dsvalidated(isc_task_t *task, isc_event_t *event) {
        dns_validatorevent_t *devent;
        dns_validator_t *val;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
        isc_result_t eresult;
 
@@ -737,14 +738,14 @@ dsvalidated(isc_task_t *task, isc_event_t *event) {
        if (CANCELED(val)) {
                validator_done(val, ISC_R_CANCELED);
        } else if (eresult == ISC_R_SUCCESS) {
-               isc_boolean_t have_dsset;
+               bool have_dsset;
                dns_name_t *name;
                validator_log(val, ISC_LOG_DEBUG(3),
                              "%s with trust %s",
                              val->frdataset.type == dns_rdatatype_ds ?
                              "dsset" : "ds non-existance",
                              dns_trust_totext(val->frdataset.trust));
-               have_dsset = ISC_TF(val->frdataset.type == dns_rdatatype_ds);
+               have_dsset = (val->frdataset.type == dns_rdatatype_ds);
                name = dns_fixedname_name(&val->fname);
                if ((val->attributes & VALATTR_INSECURITY) != 0 &&
                    val->frdataset.covers == dns_rdatatype_ds &&
@@ -761,7 +762,7 @@ dsvalidated(isc_task_t *task, isc_event_t *event) {
                        } else
                                result = startfinddlvsep(val, name);
                } else if ((val->attributes & VALATTR_INSECURITY) != 0) {
-                       result = proveunsecure(val, have_dsset, ISC_TRUE);
+                       result = proveunsecure(val, have_dsset, true);
                } else
                        result = validatezonekey(val);
                if (result != DNS_R_WAIT)
@@ -793,7 +794,7 @@ static void
 cnamevalidated(isc_task_t *task, isc_event_t *event) {
        dns_validatorevent_t *devent;
        dns_validator_t *val;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
        isc_result_t eresult;
 
@@ -817,7 +818,7 @@ cnamevalidated(isc_task_t *task, isc_event_t *event) {
        } else if (eresult == ISC_R_SUCCESS) {
                validator_log(val, ISC_LOG_DEBUG(3), "cname with trust %s",
                              dns_trust_totext(val->frdataset.trust));
-               result = proveunsecure(val, ISC_FALSE, ISC_TRUE);
+               result = proveunsecure(val, false, true);
                if (result != DNS_R_WAIT)
                        validator_done(val, result);
        } else {
@@ -850,9 +851,9 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
        dns_validatorevent_t *devent;
        dns_validator_t *val;
        dns_rdataset_t *rdataset;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t result;
-       isc_boolean_t exists, data;
+       bool exists, data;
 
        UNUSED(task);
        INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
@@ -878,7 +879,7 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
                if (result == ISC_R_CANCELED)
                        validator_done(val, result);
                else {
-                       result = nsecvalidate(val, ISC_TRUE);
+                       result = nsecvalidate(val, true);
                        if (result != DNS_R_WAIT)
                                validator_done(val, result);
                }
@@ -887,7 +888,7 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
                dns_name_t *wild = dns_fixedname_name(&val->wild);
 
                if (rdataset->trust == dns_trust_secure)
-                       val->seensig = ISC_TRUE;
+                       val->seensig = true;
 
                if (rdataset->type == dns_rdatatype_nsec &&
                    rdataset->trust == dns_trust_secure &&
@@ -932,7 +933,7 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
                        }
                }
 
-               result = nsecvalidate(val, ISC_TRUE);
+               result = nsecvalidate(val, true);
                if (result != DNS_R_WAIT)
                        validator_done(val, result);
        }
@@ -997,7 +998,7 @@ view_find(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type) {
                options |= DNS_DBFIND_COVERINGNSEC;
        foundname = dns_fixedname_initname(&fixedname);
        result = dns_view_find(val->view, name, type, 0, options,
-                              ISC_FALSE, NULL, NULL, foundname,
+                              false, NULL, NULL, foundname,
                               &val->frdataset, &val->fsigrdataset);
 
        if (result == DNS_R_NXDOMAIN) {
@@ -1095,7 +1096,7 @@ view_find(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type) {
  * 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 isc_boolean_t
+static inline bool
 check_deadlock(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
               dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
@@ -1119,10 +1120,10 @@ check_deadlock(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "continuing validation would lead to "
                                      "deadlock: aborting validation");
-                       return (ISC_TRUE);
+                       return (true);
                }
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*%
@@ -1208,12 +1209,12 @@ get_dst_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo,
        isc_buffer_t b;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dst_key_t *oldkey = val->key;
-       isc_boolean_t foundold;
+       bool foundold;
 
        if (oldkey == NULL)
-               foundold = ISC_TRUE;
+               foundold = true;
        else {
-               foundold = ISC_FALSE;
+               foundold = false;
                val->key = NULL;
        }
 
@@ -1241,9 +1242,9 @@ get_dst_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo,
                                 * This is the key we're looking for.
                                 */
                                return (ISC_R_SUCCESS);
-                       else if (dst_key_compare(oldkey, val->key) == ISC_TRUE)
+                       else if (dst_key_compare(oldkey, val->key) == true)
                        {
-                               foundold = ISC_TRUE;
+                               foundold = true;
                                dst_key_free(&oldkey);
                        }
                }
@@ -1416,7 +1417,7 @@ compute_keytag(dns_rdata_t *rdata, dns_rdata_dnskey_t *key) {
 /*%
  * Is this keyset self-signed?
  */
-static isc_boolean_t
+static bool
 isselfsigned(dns_validator_t *val) {
        dns_rdataset_t *rdataset, *sigrdataset;
        dns_rdata_t rdata = DNS_RDATA_INIT;
@@ -1428,7 +1429,7 @@ isselfsigned(dns_validator_t *val) {
        isc_result_t result;
        dst_key_t *dstkey;
        isc_mem_t *mctx;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
 
        rdataset = val->event->rdataset;
        sigrdataset = val->event->sigrdataset;
@@ -1471,14 +1472,14 @@ isselfsigned(dns_validator_t *val) {
                                continue;
 
                        result = dns_dnssec_verify3(name, rdataset, dstkey,
-                                                   ISC_TRUE,
+                                                   true,
                                                    val->view->maxbits,
                                                    mctx, &sigrdata, NULL);
                        dst_key_free(&dstkey);
                        if (result != ISC_R_SUCCESS)
                                continue;
                        if ((key.flags & DNS_KEYFLAG_REVOKE) == 0) {
-                               answer = ISC_TRUE;
+                               answer = true;
                                continue;
                        }
                        dns_view_untrust(val->view, name, &key, mctx);
@@ -1502,7 +1503,7 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
 {
        isc_result_t result;
        dns_fixedname_t fixed;
-       isc_boolean_t ignore = ISC_FALSE;
+       bool ignore = false;
        dns_name_t *wild;
 
        val->attributes |= VALATTR_TRIEDVERIFY;
@@ -1514,7 +1515,7 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
        if ((result == DNS_R_SIGEXPIRED || result == DNS_R_SIGFUTURE) &&
            val->view->acceptexpired)
        {
-               ignore = ISC_TRUE;
+               ignore = true;
                goto again;
        }
        if (ignore && (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD))
@@ -1560,7 +1561,7 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
  * \li Other return codes are possible and all indicate failure.
  */
 static isc_result_t
-validate(dns_validator_t *val, isc_boolean_t resume) {
+validate(dns_validator_t *val, bool resume) {
        isc_result_t result, vresult = DNS_R_NOVALIDSIG;
        dns_validatorevent_t *event;
        dns_rdata_t rdata = DNS_RDATA_INIT;
@@ -1604,7 +1605,7 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
                if (!dns_resolver_algorithm_supported(val->view->resolver,
                                                    event->name,
                                                    val->siginfo->algorithm)) {
-                       resume = ISC_FALSE;
+                       resume = false;
                        continue;
                }
 
@@ -1621,7 +1622,7 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
                 * onto the next RRSIG.
                 */
                if (val->key == NULL) {
-                       resume = ISC_FALSE;
+                       resume = false;
                        continue;
                }
 
@@ -1682,7 +1683,7 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
                        }
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "looking for noqname proof");
-                       return (nsecvalidate(val, ISC_FALSE));
+                       return (nsecvalidate(val, false));
                } else if (vresult == ISC_R_SUCCESS) {
                        marksecure(event);
                        validator_log(val, ISC_LOG_DEBUG(3),
@@ -1693,7 +1694,7 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "verify failure: %s",
                                      isc_result_totext(result));
-                       resume = ISC_FALSE;
+                       resume = false;
                }
        }
        if (result != ISC_R_NOMORE) {
@@ -1801,7 +1802,7 @@ dlv_validatezonekey(dns_validator_t *val) {
        dns_rdata_t dlvrdata = DNS_RDATA_INIT;
        dns_rdata_t keyrdata = DNS_RDATA_INIT;
        dns_rdataset_t trdataset;
-       isc_boolean_t supported_algorithm;
+       bool supported_algorithm;
        isc_result_t result;
        char digest_types[256];
 
@@ -1812,7 +1813,7 @@ dlv_validatezonekey(dns_validator_t *val) {
         * key set and the matching signature.  For each such key, attempt
         * verification.
         */
-       supported_algorithm = ISC_FALSE;
+       supported_algorithm = false;
 
        /*
         * If DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present we
@@ -1871,7 +1872,7 @@ dlv_validatezonekey(dns_validator_t *val) {
                                                      dlv.algorithm))
                        continue;
 
-               supported_algorithm = ISC_TRUE;
+               supported_algorithm = true;
 
                dns_rdataset_init(&trdataset);
                dns_rdataset_clone(val->event->rdataset, &trdataset);
@@ -1944,8 +1945,8 @@ validatezonekey(dns_validator_t *val) {
        dns_rdata_ds_t ds;
        dns_rdata_rrsig_t sig;
        dst_key_t *dstkey;
-       isc_boolean_t supported_algorithm;
-       isc_boolean_t atsep = ISC_FALSE;
+       bool supported_algorithm;
+       bool atsep = false;
        char digest_types[256];
 
        /*
@@ -2014,7 +2015,7 @@ validatezonekey(dns_validator_t *val) {
                        }
                        if (result == DNS_R_PARTIALMATCH ||
                            result == ISC_R_SUCCESS)
-                               atsep = ISC_TRUE;
+                               atsep = true;
                        while (result == ISC_R_SUCCESS) {
                                dns_keynode_t *nextnode = NULL;
                                dstkey = dns_keynode_key(keynode);
@@ -2171,7 +2172,7 @@ validatezonekey(dns_validator_t *val) {
         * verification.
         */
 
-       supported_algorithm = ISC_FALSE;
+       supported_algorithm = false;
 
        /*
         * If DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present we
@@ -2230,7 +2231,7 @@ validatezonekey(dns_validator_t *val) {
                                                      ds.algorithm))
                        continue;
 
-               supported_algorithm = ISC_TRUE;
+               supported_algorithm = true;
 
                dns_rdataset_init(&trdataset);
                dns_rdataset_clone(val->event->rdataset, &trdataset);
@@ -2295,7 +2296,7 @@ start_positive_validation(dns_validator_t *val) {
         * If this is not a key, go straight into validate().
         */
        if (val->event->type != dns_rdatatype_dnskey || !isselfsigned(val))
-               return (validate(val, ISC_FALSE));
+               return (validate(val, false));
 
        return (validatezonekey(val));
 }
@@ -2387,7 +2388,7 @@ checkwildcard(dns_validator_t *val, dns_rdatatype_t type, dns_name_t *zonename)
 {
        dns_name_t *name, *wild, tname;
        isc_result_t result;
-       isc_boolean_t exists, data;
+       bool exists, data;
        char namebuf[DNS_NAME_FORMATSIZE];
        dns_rdataset_t *rdataset, trdataset;
 
@@ -2482,8 +2483,8 @@ static isc_result_t
 findnsec3proofs(dns_validator_t *val) {
        dns_name_t *name, tname;
        isc_result_t result;
-       isc_boolean_t exists, data, optout, unknown;
-       isc_boolean_t setclosest, setnearest, *setclosestp;
+       bool exists, data, optout, unknown;
+       bool setclosest, setnearest, *setclosestp;
        dns_fixedname_t fclosest, fnearest, fzonename;
        dns_name_t *closest, *nearest, *zonename, *closestp;
        dns_name_t **proofs = val->event->proofs;
@@ -2561,9 +2562,9 @@ findnsec3proofs(dns_validator_t *val) {
                 * We process all NSEC3 records to find the closest
                 * encloser and nearest name to the closest encloser.
                 */
-               setclosest = setnearest = ISC_FALSE;
-               optout = ISC_FALSE;
-               unknown = ISC_FALSE;
+               setclosest = setnearest = false;
+               optout = false;
+               unknown = false;
                result = dns_nsec3_noexistnodata(val->event->type,
                                                 val->event->name,
                                                 name, rdataset, zonename,
@@ -2628,7 +2629,7 @@ findnsec3proofs(dns_validator_t *val) {
  * Validate the authority section records.
  */
 static isc_result_t
-validate_authority(dns_validator_t *val, isc_boolean_t resume) {
+validate_authority(dns_validator_t *val, bool resume) {
        dns_name_t *name;
        dns_message_t *message = val->event->message;
        isc_result_t result;
@@ -2649,7 +2650,7 @@ validate_authority(dns_validator_t *val, isc_boolean_t resume) {
                if (resume) {
                        rdataset = ISC_LIST_NEXT(val->currentset, link);
                        val->currentset = NULL;
-                       resume = ISC_FALSE;
+                       resume = false;
                } else
                        rdataset = ISC_LIST_HEAD(name->list);
 
@@ -2713,7 +2714,7 @@ validate_authority(dns_validator_t *val, isc_boolean_t resume) {
  * Validate the ncache elements.
  */
 static isc_result_t
-validate_ncache(dns_validator_t *val, isc_boolean_t resume) {
+validate_ncache(dns_validator_t *val, bool resume) {
        dns_name_t *name;
        isc_result_t result;
 
@@ -2798,7 +2799,7 @@ validate_ncache(dns_validator_t *val, isc_boolean_t resume) {
  * response.
  */
 static isc_result_t
-nsecvalidate(dns_validator_t *val, isc_boolean_t resume) {
+nsecvalidate(dns_validator_t *val, bool resume) {
        isc_result_t result;
 
        if (resume)
@@ -2830,7 +2831,7 @@ nsecvalidate(dns_validator_t *val, isc_boolean_t resume) {
                                         != 0) {
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "optout proof found");
-                       val->event->optout = ISC_TRUE;
+                       val->event->optout = true;
                        markanswer(val, "nsecvalidate (1)");
                        return (ISC_R_SUCCESS);
                } else if ((val->attributes & VALATTR_FOUNDUNKNOWN) != 0) {
@@ -2862,13 +2863,13 @@ nsecvalidate(dns_validator_t *val, isc_boolean_t resume) {
             NEEDNOWILDCARD(val) && FOUNDNOWILDCARD(val) &&
             FOUNDCLOSEST(val))) {
                if ((val->attributes & VALATTR_FOUNDOPTOUT) != 0)
-                       val->event->optout = ISC_TRUE;
+                       val->event->optout = true;
                validator_log(val, ISC_LOG_DEBUG(3),
                              "nonexistence proof(s) found");
                if (val->event->message == NULL)
                        marksecure(val->event);
                else
-                       val->event->secure = ISC_TRUE;
+                       val->event->secure = true;
                return (ISC_R_SUCCESS);
        }
 
@@ -2877,10 +2878,10 @@ nsecvalidate(dns_validator_t *val, isc_boolean_t resume) {
        validator_log(val, ISC_LOG_DEBUG(3),
                      "nonexistence proof(s) not found");
        val->attributes |= VALATTR_INSECURITY;
-       return (proveunsecure(val, ISC_FALSE, ISC_FALSE));
+       return (proveunsecure(val, false, false));
 }
 
-static isc_boolean_t
+static bool
 check_ds(dns_validator_t *val, dns_name_t *name, dns_rdataset_t *rdataset) {
        dns_rdata_t dsrdata = DNS_RDATA_INIT;
        dns_rdata_ds_t ds;
@@ -2898,11 +2899,11 @@ check_ds(dns_validator_t *val, dns_name_t *name, dns_rdataset_t *rdataset) {
                    dns_resolver_algorithm_supported(val->view->resolver,
                                                     name, ds.algorithm)) {
                        dns_rdata_reset(&dsrdata);
-                       return (ISC_TRUE);
+                       return (true);
                }
                dns_rdata_reset(&dsrdata);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static void
@@ -2910,7 +2911,7 @@ dlvvalidated(isc_task_t *task, isc_event_t *event) {
        dns_validatorevent_t *devent;
        dns_validator_t *val;
        isc_result_t eresult;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
 
        UNUSED(task);
        INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
@@ -2933,7 +2934,7 @@ dlvvalidated(isc_task_t *task, isc_event_t *event) {
                              "dlvset with trust %s",
                              dns_trust_totext(val->frdataset.trust));
                dns_rdataset_clone(&val->frdataset, &val->dlv);
-               val->havedlvsep = ISC_TRUE;
+               val->havedlvsep = true;
                if (dlv_algorithm_supported(val))
                        dlv_validator_start(val);
                else {
@@ -2968,7 +2969,7 @@ dlvfetched(isc_task_t *task, isc_event_t *event) {
        char namebuf[DNS_NAME_FORMATSIZE];
        dns_fetchevent_t *devent;
        dns_validator_t *val;
-       isc_boolean_t want_destroy;
+       bool want_destroy;
        isc_result_t eresult;
        isc_result_t result;
        dns_fetch_t *fetch;
@@ -2999,7 +3000,7 @@ dlvfetched(isc_task_t *task, isc_event_t *event) {
                dns_name_format(dns_fixedname_name(&val->dlvsep), namebuf,
                                sizeof(namebuf));
                dns_rdataset_clone(&val->frdataset, &val->dlv);
-               val->havedlvsep = ISC_TRUE;
+               val->havedlvsep = true;
                if (dlv_algorithm_supported(val)) {
                        validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found",
                                      namebuf);
@@ -3015,7 +3016,7 @@ dlvfetched(isc_task_t *task, isc_event_t *event) {
                   eresult == DNS_R_NXDOMAIN ||
                   eresult == DNS_R_NCACHENXRRSET ||
                   eresult == DNS_R_NCACHENXDOMAIN) {
-               result = finddlvsep(val, ISC_TRUE);
+               result = finddlvsep(val, true);
                if (result == ISC_R_SUCCESS) {
                        if (dlv_algorithm_supported(val)) {
                                dns_name_format(dns_fixedname_name(&val->dlvsep),
@@ -3082,7 +3083,7 @@ startfinddlvsep(dns_validator_t *val, dns_name_t *unsecure) {
        }
 
        val->dlvlabels = dns_name_countlabels(unsecure) - 1;
-       result = finddlvsep(val, ISC_FALSE);
+       result = finddlvsep(val, false);
        if (result == ISC_R_NOTFOUND) {
                validator_log(val, ISC_LOG_DEBUG(3), "DLV not found");
                markanswer(val, "startfinddlvsep (1)");
@@ -3122,7 +3123,7 @@ startfinddlvsep(dns_validator_t *val, dns_name_t *unsecure) {
  * \li Others on validation failure.
  */
 static isc_result_t
-finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
+finddlvsep(dns_validator_t *val, bool resume) {
        char namebuf[DNS_NAME_FORMATSIZE];
        dns_fixedname_t dlvfixed;
        dns_name_t *dlvname;
@@ -3214,7 +3215,7 @@ finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
                                              "DLV not validated");
                                return (DNS_R_NOVALIDSIG);
                        }
-                       val->havedlvsep = ISC_TRUE;
+                       val->havedlvsep = true;
                        dns_rdataset_clone(&val->frdataset, &val->dlv);
                        return (ISC_R_SUCCESS);
                }
@@ -3265,7 +3266,7 @@ finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
  * \li DNS_R_BROKENCHAIN
  */
 static isc_result_t
-proveunsecure(dns_validator_t *val, isc_boolean_t have_ds, isc_boolean_t resume)
+proveunsecure(dns_validator_t *val, bool have_ds, bool resume)
 {
        isc_result_t result;
        dns_fixedname_t fixedsecroot;
@@ -3399,7 +3400,7 @@ proveunsecure(dns_validator_t *val, isc_boolean_t have_ds, isc_boolean_t resume)
                        if (result == DNS_R_NXRRSET &&
                            !dns_rdataset_isassociated(&val->frdataset) &&
                            dns_view_findzonecut2(val->view, tname, found,
-                                                0, 0, ISC_FALSE, ISC_FALSE,
+                                                0, 0, false, false,
                                                 NULL, NULL) == ISC_R_SUCCESS &&
                            dns_name_equal(tname, found)) {
                                if (val->mustbesecure) {
@@ -3607,7 +3608,7 @@ static void
 validator_start(isc_task_t *task, isc_event_t *event) {
        dns_validator_t *val;
        dns_validatorevent_t *vevent;
-       isc_boolean_t want_destroy = ISC_FALSE;
+       bool want_destroy = false;
        isc_result_t result = ISC_R_FAILURE;
 
        UNUSED(task);
@@ -3651,7 +3652,7 @@ validator_start(isc_task_t *task, isc_event_t *event) {
                        validator_log(val, ISC_LOG_DEBUG(3),
                                      "falling back to insecurity proof");
                        val->attributes |= VALATTR_INSECURITY;
-                       result = proveunsecure(val, ISC_FALSE, ISC_FALSE);
+                       result = proveunsecure(val, false, false);
                        if (result == DNS_R_NOTINSECURE)
                                result = saved_result;
                }
@@ -3666,7 +3667,7 @@ validator_start(isc_task_t *task, isc_event_t *event) {
                              "attempting insecurity proof");
 
                val->attributes |= VALATTR_INSECURITY;
-               result = proveunsecure(val, ISC_FALSE, ISC_FALSE);
+               result = proveunsecure(val, false, false);
                if (result == DNS_R_NOTINSECURE)
                        validator_log(val, ISC_LOG_INFO,
                                      "got insecure response; "
@@ -3685,7 +3686,7 @@ validator_start(isc_task_t *task, isc_event_t *event) {
                        val->attributes |= VALATTR_NEEDNOWILDCARD;
                } else
                        val->attributes |= VALATTR_NEEDNODATA;
-               result = nsecvalidate(val, ISC_FALSE);
+               result = nsecvalidate(val, false);
        } else if (val->event->rdataset != NULL &&
                    NEGATIVE(val->event->rdataset))
        {
@@ -3700,7 +3701,7 @@ validator_start(isc_task_t *task, isc_event_t *event) {
                        val->attributes |= VALATTR_NEEDNOWILDCARD;
                } else
                        val->attributes |= VALATTR_NEEDNODATA;
-               result = nsecvalidate(val, ISC_FALSE);
+               result = nsecvalidate(val, false);
        } else {
                /*
                 * This shouldn't happen.
@@ -3759,8 +3760,8 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
        event->sigrdataset = sigrdataset;
        event->message = message;
        memset(event->proofs, 0, sizeof(event->proofs));
-       event->optout = ISC_FALSE;
-       event->secure = ISC_FALSE;
+       event->optout = false;
+       event->secure = false;
        result = isc_mutex_init(&val->lock);
        if (result != ISC_R_SUCCESS)
                goto cleanup_event;
@@ -3786,8 +3787,8 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
        val->keyset = NULL;
        val->dsset = NULL;
        dns_rdataset_init(&val->dlv);
-       val->seensig = ISC_FALSE;
-       val->havedlvsep = ISC_FALSE;
+       val->seensig = false;
+       val->havedlvsep = false;
        val->depth = 0;
        val->authcount = 0;
        val->authfail = 0;
@@ -3904,7 +3905,7 @@ destroy(dns_validator_t *val) {
 void
 dns_validator_destroy(dns_validator_t **validatorp) {
        dns_validator_t *val;
-       isc_boolean_t want_destroy = ISC_FALSE;
+       bool want_destroy = false;
 
        REQUIRE(validatorp != NULL);
        val = *validatorp;
index 26bf21565f2214323d6b64e90e2ca4d83b57307d..4fb3e3b0c4204aae8bb7d502db6a5f93c735aff3 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <limits.h>
 #include <inttypes.h>
+#include <stdbool.h>
 
 #ifdef HAVE_LMDB
  #include <lmdb.h>
@@ -153,7 +154,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->adb = NULL;
        view->requestmgr = NULL;
        view->rdclass = rdclass;
-       view->frozen = ISC_FALSE;
+       view->frozen = false;
        view->task = NULL;
        result = isc_refcount_init(&view->references, 1);
        if (result != ISC_R_SUCCESS)
@@ -165,33 +166,33 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->dynamickeys = NULL;
        view->matchclients = NULL;
        view->matchdestinations = NULL;
-       view->matchrecursiveonly = ISC_FALSE;
+       view->matchrecursiveonly = false;
        result = dns_tsigkeyring_create(view->mctx, &view->dynamickeys);
        if (result != ISC_R_SUCCESS)
                goto cleanup_references;
        view->peers = NULL;
        view->order = NULL;
        view->delonly = NULL;
-       view->rootdelonly = ISC_FALSE;
+       view->rootdelonly = false;
        view->rootexclude = NULL;
        view->adbstats = NULL;
        view->resstats = NULL;
        view->resquerystats = NULL;
-       view->cacheshared = ISC_FALSE;
+       view->cacheshared = false;
        ISC_LIST_INIT(view->dns64);
        view->dns64cnt = 0;
 
        /*
         * Initialize configuration data with default values.
         */
-       view->recursion = ISC_TRUE;
-       view->auth_nxdomain = ISC_FALSE; /* Was true in BIND 8 */
-       view->additionalfromcache = ISC_TRUE;
-       view->additionalfromauth = ISC_TRUE;
-       view->enablednssec = ISC_TRUE;
-       view->enablevalidation = ISC_TRUE;
-       view->acceptexpired = ISC_FALSE;
-       view->minimal_any = ISC_FALSE;
+       view->recursion = true;
+       view->auth_nxdomain = false; /* Was true in BIND 8 */
+       view->additionalfromcache = true;
+       view->additionalfromauth = true;
+       view->enablednssec = true;
+       view->enablevalidation = true;
+       view->acceptexpired = false;
+       view->minimal_any = false;
        view->minimalresponses = dns_minimal_no;
        view->transfer_format = dns_one_answer;
        view->cacheacl = NULL;
@@ -207,12 +208,12 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->upfwdacl = NULL;
        view->denyansweracl = NULL;
        view->nocasecompress = NULL;
-       view->msgcompression = ISC_TRUE;
+       view->msgcompression = true;
        view->answeracl_exclude = NULL;
        view->denyanswernames = NULL;
        view->answernames_exclude = NULL;
        view->rrl = NULL;
-       view->provideixfr = ISC_TRUE;
+       view->provideixfr = true;
        view->maxcachettl = 7 * 24 * 3600;
        view->maxncachettl = 3 * 3600;
        view->nta_lifetime = 0;
@@ -221,7 +222,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->prefetch_trigger = 0;
        view->dstport = 53;
        view->preferred_glue = 0;
-       view->flush = ISC_FALSE;
+       view->flush = false;
        view->dlv = NULL;
        view->maxudp = 0;
        view->nocookieudp = 0;
@@ -236,11 +237,11 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->redirect = NULL;
        view->redirectzone = NULL;
        dns_fixedname_init(&view->redirectfixed);
-       view->requestnsid = ISC_FALSE;
-       view->sendcookie = ISC_TRUE;
-       view->requireservercookie = ISC_FALSE;
-       view->trust_anchor_telemetry = ISC_TRUE;
-       view->root_key_sentinel = ISC_TRUE;
+       view->requestnsid = false;
+       view->sendcookie = true;
+       view->requireservercookie = false;
+       view->trust_anchor_telemetry = true;
+       view->root_key_sentinel = true;
        view->new_zone_file = NULL;
        view->new_zone_db = NULL;
        view->new_zone_dbenv = NULL;
@@ -516,7 +517,7 @@ destroy(dns_view_t *view) {
        if (view->dtenv != NULL)
                dns_dt_detach(&view->dtenv);
 #endif /* HAVE_DNSTAP */
-       dns_view_setnewzones(view, ISC_FALSE, NULL, NULL, 0ULL);
+       dns_view_setnewzones(view, false, NULL, NULL, 0ULL);
        if (view->new_zone_file != NULL) {
                isc_mem_free(view->mctx, view->new_zone_file);
                view->new_zone_file = NULL;
@@ -547,15 +548,15 @@ destroy(dns_view_t *view) {
  * Return true iff 'view' may be freed.
  * The caller must be holding the view lock.
  */
-static isc_boolean_t
+static bool
 all_done(dns_view_t *view) {
 
        if (isc_refcount_current(&view->references) == 0 &&
            view->weakrefs == 0 &&
            RESSHUTDOWN(view) && ADBSHUTDOWN(view) && REQSHUTDOWN(view))
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 void
@@ -570,17 +571,17 @@ dns_view_attach(dns_view_t *source, dns_view_t **targetp) {
 }
 
 static void
-view_flushanddetach(dns_view_t **viewp, isc_boolean_t flush) {
+view_flushanddetach(dns_view_t **viewp, bool flush) {
        dns_view_t *view;
        unsigned int refs;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 
        REQUIRE(viewp != NULL);
        view = *viewp;
        REQUIRE(DNS_VIEW_VALID(view));
 
        if (flush)
-               view->flush = ISC_TRUE;
+               view->flush = true;
        isc_refcount_decrement(&view->references, &refs);
        if (refs == 0) {
                dns_zone_t *mkzone = NULL, *rdzone = NULL;
@@ -634,12 +635,12 @@ view_flushanddetach(dns_view_t **viewp, isc_boolean_t flush) {
 
 void
 dns_view_flushanddetach(dns_view_t **viewp) {
-       view_flushanddetach(viewp, ISC_TRUE);
+       view_flushanddetach(viewp, true);
 }
 
 void
 dns_view_detach(dns_view_t **viewp) {
-       view_flushanddetach(viewp, ISC_FALSE);
+       view_flushanddetach(viewp, false);
 }
 
 static isc_result_t
@@ -654,7 +655,7 @@ dns_view_dialup(dns_view_t *view) {
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(view->zonetable != NULL);
 
-       (void)dns_zt_apply(view->zonetable, ISC_FALSE, dialup, NULL);
+       (void)dns_zt_apply(view->zonetable, false, dialup, NULL);
 }
 
 void
@@ -673,7 +674,7 @@ dns_view_weakattach(dns_view_t *source, dns_view_t **targetp) {
 void
 dns_view_weakdetach(dns_view_t **viewp) {
        dns_view_t *view;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 
        REQUIRE(viewp != NULL);
        view = *viewp;
@@ -696,7 +697,7 @@ dns_view_weakdetach(dns_view_t **viewp) {
 static void
 resolver_shutdown(isc_task_t *task, isc_event_t *event) {
        dns_view_t *view = event->ev_arg;
-       isc_boolean_t done;
+       bool done;
 
        REQUIRE(event->ev_type == DNS_EVENT_VIEWRESSHUTDOWN);
        REQUIRE(DNS_VIEW_VALID(view));
@@ -720,7 +721,7 @@ resolver_shutdown(isc_task_t *task, isc_event_t *event) {
 static void
 adb_shutdown(isc_task_t *task, isc_event_t *event) {
        dns_view_t *view = event->ev_arg;
-       isc_boolean_t done;
+       bool done;
 
        REQUIRE(event->ev_type == DNS_EVENT_VIEWADBSHUTDOWN);
        REQUIRE(DNS_VIEW_VALID(view));
@@ -744,7 +745,7 @@ adb_shutdown(isc_task_t *task, isc_event_t *event) {
 static void
 req_shutdown(isc_task_t *task, isc_event_t *event) {
        dns_view_t *view = event->ev_arg;
-       isc_boolean_t done;
+       bool done;
 
        REQUIRE(event->ev_type == DNS_EVENT_VIEWREQSHUTDOWN);
        REQUIRE(DNS_VIEW_VALID(view));
@@ -848,11 +849,11 @@ dns_view_createresolver(dns_view_t *view,
 
 void
 dns_view_setcache(dns_view_t *view, dns_cache_t *cache) {
-       dns_view_setcache2(view, cache, ISC_FALSE);
+       dns_view_setcache2(view, cache, false);
 }
 
 void
-dns_view_setcache2(dns_view_t *view, dns_cache_t *cache, isc_boolean_t shared) {
+dns_view_setcache2(dns_view_t *view, dns_cache_t *cache, bool shared) {
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(!view->frozen);
 
@@ -871,7 +872,7 @@ dns_view_setcache2(dns_view_t *view, dns_cache_t *cache, isc_boolean_t shared) {
                dns_acache_setdb(view->acache, view->cachedb);
 }
 
-isc_boolean_t
+bool
 dns_view_iscacheshared(dns_view_t *view) {
        REQUIRE(DNS_VIEW_VALID(view));
 
@@ -950,7 +951,7 @@ dns_view_freeze(dns_view_t *view) {
                INSIST(view->cachedb != NULL);
                dns_resolver_freeze(view->resolver);
        }
-       view->frozen = ISC_TRUE;
+       view->frozen = true;
 }
 
 void
@@ -958,7 +959,7 @@ dns_view_thaw(dns_view_t *view) {
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(view->frozen);
 
-       view->frozen = ISC_FALSE;
+       view->frozen = false;
 }
 
 isc_result_t
@@ -996,25 +997,25 @@ dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep) {
 
 isc_result_t
 dns_view_find(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
-             isc_stdtime_t now, unsigned int options, isc_boolean_t use_hints,
+             isc_stdtime_t now, unsigned int options, bool use_hints,
              dns_db_t **dbp, dns_dbnode_t **nodep, dns_name_t *foundname,
              dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
        return (dns_view_find2(view, name, type, now, options, use_hints,
-                              ISC_FALSE, dbp, nodep, foundname, rdataset,
+                              false, dbp, nodep, foundname, rdataset,
                               sigrdataset));
 }
 
 isc_result_t
 dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
               isc_stdtime_t now, unsigned int options,
-              isc_boolean_t use_hints, isc_boolean_t use_static_stub,
+              bool use_hints, bool use_static_stub,
               dns_db_t **dbp, dns_dbnode_t **nodep, dns_name_t *foundname,
               dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
        isc_result_t result;
        dns_db_t *db, *zdb;
        dns_dbnode_t *node, *znode;
-       isc_boolean_t is_cache, is_staticstub_zone;
+       bool is_cache, is_staticstub_zone;
        dns_rdataset_t zrdataset, zsigrdataset;
        dns_zone_t *zone;
 
@@ -1042,7 +1043,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
         */
        db = NULL;
        node = NULL;
-       is_staticstub_zone = ISC_FALSE;
+       is_staticstub_zone = false;
        zone = NULL;
        LOCK(&view->lock);
        if (view->zonetable != NULL)
@@ -1061,7 +1062,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                        goto cleanup;
                if (dns_zone_gettype(zone) == dns_zone_staticstub &&
                    dns_name_equal(name, dns_zone_getorigin(zone))) {
-                       is_staticstub_zone = ISC_TRUE;
+                       is_staticstub_zone = true;
                }
        } else if (result == ISC_R_NOTFOUND && view->cachedb != NULL)
                dns_db_attach(view->cachedb, &db);
@@ -1095,7 +1096,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                                 * static-stub zone we stop the search here
                                 * (see the function description in view.h).
                                 */
-                               is_cache = ISC_TRUE;
+                               is_cache = true;
                                dns_db_attach(view->cachedb, &db);
                                goto db_find;
                        }
@@ -1128,7 +1129,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                         * We found an answer, but the cache may be better.
                         * Remember what we've got and go look in the cache.
                         */
-                       is_cache = ISC_TRUE;
+                       is_cache = true;
                        dns_rdataset_clone(rdataset, &zrdataset);
                        dns_rdataset_disassociate(rdataset);
                        if (sigrdataset != NULL &&
@@ -1220,7 +1221,7 @@ dns_view_find2(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
 isc_result_t
 dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
                    isc_stdtime_t now, unsigned int options,
-                   isc_boolean_t use_hints,
+                   bool use_hints,
                    dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
        isc_result_t result;
@@ -1264,23 +1265,23 @@ dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
 isc_result_t
 dns_view_findzonecut(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                     isc_stdtime_t now, unsigned int options,
-                    isc_boolean_t use_hints,
+                    bool use_hints,
                     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
        return(dns_view_findzonecut2(view, name, fname, now, options,
-                                    use_hints, ISC_TRUE,
+                                    use_hints, true,
                                     rdataset, sigrdataset));
 }
 
 isc_result_t
 dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                      isc_stdtime_t now, unsigned int options,
-                     isc_boolean_t use_hints,  isc_boolean_t use_cache,
+                     bool use_hints,   bool use_cache,
                      dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
 {
        isc_result_t result;
        dns_db_t *db;
-       isc_boolean_t is_cache, use_zone, try_hints;
+       bool is_cache, use_zone, try_hints;
        dns_zone_t *zone;
        dns_name_t *zfname;
        dns_rdataset_t zrdataset, zsigrdataset;
@@ -1291,8 +1292,8 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
        REQUIRE(view->frozen);
 
        db = NULL;
-       use_zone = ISC_FALSE;
-       try_hints = ISC_FALSE;
+       use_zone = false;
+       try_hints = false;
        zfname = NULL;
 
        /*
@@ -1332,7 +1333,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                        /*
                         * Maybe we have hints...
                         */
-                       try_hints = ISC_TRUE;
+                       try_hints = true;
                        goto finish;
                }
        } else if (result != ISC_R_SUCCESS) {
@@ -1371,7 +1372,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                        }
                        dns_db_detach(&db);
                        dns_db_attach(view->cachedb, &db);
-                       is_cache = ISC_TRUE;
+                       is_cache = true;
                        goto db_find;
                }
        } else {
@@ -1386,7 +1387,7 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                                 * We found a zonecut in the cache, but our
                                 * zone delegation is better.
                                 */
-                               use_zone = ISC_TRUE;
+                               use_zone = true;
                        }
                } else if (result == ISC_R_NOTFOUND) {
                        if (zfname != NULL) {
@@ -1394,12 +1395,12 @@ dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
                                 * We didn't find anything in the cache, but we
                                 * have a zone delegation, so use it.
                                 */
-                               use_zone = ISC_TRUE;
+                               use_zone = true;
                        } else {
                                /*
                                 * Maybe we have hints...
                                 */
-                               try_hints = ISC_TRUE;
+                               try_hints = true;
                        }
                } else {
                        /*
@@ -1480,7 +1481,7 @@ dns_viewlist_find(dns_viewlist_t *list, const char *name,
 
 isc_result_t
 dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name,
-                     isc_boolean_t allclasses, dns_rdataclass_t rdclass,
+                     bool allclasses, dns_rdataclass_t rdclass,
                      dns_zone_t **zonep)
 {
        dns_view_t *view;
@@ -1494,7 +1495,7 @@ dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name,
        for (view = ISC_LIST_HEAD(*list);
             view != NULL;
             view = ISC_LIST_NEXT(view, link)) {
-               if (allclasses == ISC_FALSE && view->rdclass != rdclass)
+               if (allclasses == false && view->rdclass != rdclass)
                        continue;
 
                /*
@@ -1537,7 +1538,7 @@ dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name,
 }
 
 isc_result_t
-dns_view_load(dns_view_t *view, isc_boolean_t stop) {
+dns_view_load(dns_view_t *view, bool stop) {
 
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(view->zonetable != NULL);
@@ -1546,7 +1547,7 @@ dns_view_load(dns_view_t *view, isc_boolean_t stop) {
 }
 
 isc_result_t
-dns_view_loadnew(dns_view_t *view, isc_boolean_t stop) {
+dns_view_loadnew(dns_view_t *view, bool stop) {
 
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(view->zonetable != NULL);
@@ -1624,11 +1625,11 @@ dns_view_dumpdbtostream(dns_view_t *view, FILE *fp) {
 
 isc_result_t
 dns_view_flushcache(dns_view_t *view) {
-       return (dns_view_flushcache2(view, ISC_FALSE));
+       return (dns_view_flushcache2(view, false));
 }
 
 isc_result_t
-dns_view_flushcache2(dns_view_t *view, isc_boolean_t fixuponly) {
+dns_view_flushcache2(dns_view_t *view, bool fixuponly) {
        isc_result_t result;
 
        REQUIRE(DNS_VIEW_VALID(view));
@@ -1657,11 +1658,11 @@ dns_view_flushcache2(dns_view_t *view, isc_boolean_t fixuponly) {
 
 isc_result_t
 dns_view_flushname(dns_view_t *view, dns_name_t *name) {
-       return (dns_view_flushnode(view, name, ISC_FALSE));
+       return (dns_view_flushnode(view, name, false));
 }
 
 isc_result_t
-dns_view_flushnode(dns_view_t *view, dns_name_t *name, isc_boolean_t tree) {
+dns_view_flushnode(dns_view_t *view, dns_name_t *name, bool tree) {
        isc_result_t result = ISC_R_SUCCESS;
 
        REQUIRE(DNS_VIEW_VALID(view));
@@ -1705,7 +1706,7 @@ dns_view_adddelegationonly(dns_view_t *view, dns_name_t *name) {
                for (hash = 0; hash < DNS_VIEW_DELONLYHASH; hash++)
                        ISC_LIST_INIT(view->delonly[hash]);
        }
-       hash = dns_name_hash(name, ISC_FALSE) % DNS_VIEW_DELONLYHASH;
+       hash = dns_name_hash(name, false) % DNS_VIEW_DELONLYHASH;
        item = ISC_LIST_HEAD(view->delonly[hash]);
        while (item != NULL && !dns_name_equal(item, name))
                item = ISC_LIST_NEXT(item, link);
@@ -1740,7 +1741,7 @@ dns_view_excludedelegationonly(dns_view_t *view, dns_name_t *name) {
                for (hash = 0; hash < DNS_VIEW_DELONLYHASH; hash++)
                        ISC_LIST_INIT(view->rootexclude[hash]);
        }
-       hash = dns_name_hash(name, ISC_FALSE) % DNS_VIEW_DELONLYHASH;
+       hash = dns_name_hash(name, false) % DNS_VIEW_DELONLYHASH;
        item = ISC_LIST_HEAD(view->rootexclude[hash]);
        while (item != NULL && !dns_name_equal(item, name))
                item = ISC_LIST_NEXT(item, link);
@@ -1758,7 +1759,7 @@ dns_view_excludedelegationonly(dns_view_t *view, dns_name_t *name) {
        return (result);
 }
 
-isc_boolean_t
+bool
 dns_view_isdelegationonly(dns_view_t *view, dns_name_t *name) {
        dns_name_t *item;
        uint32_t hash;
@@ -1766,44 +1767,44 @@ dns_view_isdelegationonly(dns_view_t *view, dns_name_t *name) {
        REQUIRE(DNS_VIEW_VALID(view));
 
        if (!view->rootdelonly && view->delonly == NULL)
-               return (ISC_FALSE);
+               return (false);
 
-       hash = dns_name_hash(name, ISC_FALSE) % DNS_VIEW_DELONLYHASH;
+       hash = dns_name_hash(name, false) % DNS_VIEW_DELONLYHASH;
        if (view->rootdelonly && dns_name_countlabels(name) <= 2) {
                if (view->rootexclude == NULL)
-                       return (ISC_TRUE);
+                       return (true);
                item = ISC_LIST_HEAD(view->rootexclude[hash]);
                while (item != NULL && !dns_name_equal(item, name))
                        item = ISC_LIST_NEXT(item, link);
                if (item == NULL)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
        if (view->delonly == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        item = ISC_LIST_HEAD(view->delonly[hash]);
        while (item != NULL && !dns_name_equal(item, name))
                item = ISC_LIST_NEXT(item, link);
        if (item == NULL)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 void
-dns_view_setrootdelonly(dns_view_t *view, isc_boolean_t value) {
+dns_view_setrootdelonly(dns_view_t *view, bool value) {
        REQUIRE(DNS_VIEW_VALID(view));
        view->rootdelonly = value;
 }
 
-isc_boolean_t
+bool
 dns_view_getrootdelonly(dns_view_t *view) {
        REQUIRE(DNS_VIEW_VALID(view));
        return (view->rootdelonly);
 }
 
 isc_result_t
-dns_view_freezezones(dns_view_t *view, isc_boolean_t value) {
+dns_view_freezezones(dns_view_t *view, bool value) {
 
        REQUIRE(DNS_VIEW_VALID(view));
        REQUIRE(view->zonetable != NULL);
@@ -1905,25 +1906,25 @@ dns_view_getsecroots(dns_view_t *view, dns_keytable_t **ktp) {
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 dns_view_ntacovers(dns_view_t *view, isc_stdtime_t now,
                   dns_name_t *name, dns_name_t *anchor)
 {
        REQUIRE(DNS_VIEW_VALID(view));
 
        if (view->ntatable_priv == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        return (dns_ntatable_covered(view->ntatable_priv, now, name, anchor));
 }
 
 isc_result_t
 dns_view_issecuredomain(dns_view_t *view, dns_name_t *name,
-                       isc_stdtime_t now, isc_boolean_t checknta,
-                       isc_boolean_t *secure_domain)
+                       isc_stdtime_t now, bool checknta,
+                       bool *secure_domain)
 {
        isc_result_t result;
-       isc_boolean_t secure = ISC_FALSE;
+       bool secure = false;
        dns_fixedname_t fn;
        dns_name_t *anchor;
 
@@ -1941,7 +1942,7 @@ dns_view_issecuredomain(dns_view_t *view, dns_name_t *name,
 
        if (checknta && secure && view->ntatable_priv != NULL &&
            dns_ntatable_covered(view->ntatable_priv, now, name, anchor))
-               secure = ISC_FALSE;
+               secure = false;
 
        *secure_domain = secure;
        return (ISC_R_SUCCESS);
@@ -1995,7 +1996,7 @@ dns_view_untrust(dns_view_t *view, dns_name_t *keyname,
 }
 
 isc_result_t
-dns_view_setnewzones(dns_view_t *view, isc_boolean_t allow, void *cfgctx,
+dns_view_setnewzones(dns_view_t *view, bool allow, void *cfgctx,
                     void (*cfg_destroy)(void **), uint64_t mapsize)
 {
        isc_result_t result = ISC_R_SUCCESS;
@@ -2216,7 +2217,7 @@ dns_view_setfailttl(dns_view_t *view, uint32_t fail_ttl) {
 isc_result_t
 dns_view_saventa(dns_view_t *view) {
        isc_result_t result;
-       isc_boolean_t removefile = ISC_FALSE;
+       bool removefile = false;
        dns_ntatable_t *ntatable = NULL;
        FILE *fp = NULL;
 
@@ -2230,7 +2231,7 @@ dns_view_saventa(dns_view_t *view) {
 
        result = dns_view_getntatable(view, &ntatable);
        if (result == ISC_R_NOTFOUND) {
-               removefile = ISC_TRUE;
+               removefile = true;
                result = ISC_R_SUCCESS;
                goto cleanup;
        } else
@@ -2238,7 +2239,7 @@ dns_view_saventa(dns_view_t *view) {
 
        result = dns_ntatable_save(ntatable, fp);
        if (result == ISC_R_NOTFOUND) {
-               removefile = ISC_TRUE;
+               removefile = true;
                result = ISC_R_SUCCESS;
        } else if (result == ISC_R_SUCCESS) {
                result = isc_stdio_close(fp);
@@ -2288,7 +2289,7 @@ dns_view_loadnta(dns_view_t *view) {
                dns_name_t *ntaname;
                isc_buffer_t b;
                isc_stdtime_t t;
-               isc_boolean_t forced;
+               bool forced;
 
                CHECK(isc_lex_gettoken(lex, options, &token));
                if (token.type == isc_tokentype_eof)
@@ -2315,9 +2316,9 @@ dns_view_loadnta(dns_view_t *view) {
                type = TSTR(token);
 
                if (strcmp(type, "regular") == 0)
-                       forced = ISC_FALSE;
+                       forced = false;
                else if (strcmp(type, "forced") == 0)
-                       forced = ISC_TRUE;
+                       forced = true;
                else
                        CHECK(ISC_R_UNEXPECTEDTOKEN);
 
index 6aa99c6b6ffb7c1e7450e4d6f65e0c163ad88710..d39ca26f6dbd9e1e6a33904458128b9be0de2c75 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/print.h>
@@ -103,13 +104,13 @@ struct dns_xfrin_ctx {
        int                     connects;       /*%< Connect in progress */
        int                     sends;          /*%< Send in progress */
        int                     recvs;          /*%< Receive in progress */
-       isc_boolean_t           shuttingdown;
+       bool            shuttingdown;
        isc_result_t            shutdown_result;
 
        dns_name_t              name;           /*%< Name of zone to transfer */
        dns_rdataclass_t        rdclass;
 
-       isc_boolean_t           checkid;
+       bool            checkid;
        dns_messageid_t         id;
 
        /*%
@@ -130,7 +131,7 @@ struct dns_xfrin_ctx {
 
        /*% Incoming reply TCP message */
        dns_tcpmsg_t            tcpmsg;
-       isc_boolean_t           tcpmsg_valid;
+       bool            tcpmsg_valid;
 
        dns_db_t                *db;
        dns_dbversion_t         *ver;
@@ -139,7 +140,7 @@ struct dns_xfrin_ctx {
 
        xfrin_state_t           state;
        uint32_t                end_serial;
-       isc_boolean_t           is_ixfr;
+       bool            is_ixfr;
 
        unsigned int            nmsg;           /*%< Number of messages recvd */
        unsigned int            nrecs;          /*%< Number of records recvd */
@@ -254,7 +255,7 @@ static isc_result_t
 axfr_init(dns_xfrin_ctx_t *xfr) {
        isc_result_t result;
 
-       xfr->is_ixfr = ISC_FALSE;
+       xfr->is_ixfr = false;
 
        if (xfr->db != NULL)
                dns_db_detach(&xfr->db);
@@ -346,7 +347,7 @@ static isc_result_t
 axfr_finalize(dns_xfrin_ctx_t *xfr) {
        isc_result_t result;
 
-       CHECK(dns_zone_replacedb(xfr->zone, xfr->db, ISC_TRUE));
+       CHECK(dns_zone_replacedb(xfr->zone, xfr->db, true));
 
        result = ISC_R_SUCCESS;
  failure:
@@ -369,7 +370,7 @@ ixfr_init(dns_xfrin_ctx_t *xfr) {
                return (DNS_R_FORMERR);
        }
 
-       xfr->is_ixfr = ISC_TRUE;
+       xfr->is_ixfr = true;
        INSIST(xfr->db != NULL);
        xfr->difflen = 0;
 
@@ -447,7 +448,7 @@ ixfr_commit(dns_xfrin_ctx_t *xfr) {
                /* XXX enter ready-to-commit state here */
                if (xfr->ixfr.journal != NULL)
                        CHECK(dns_journal_commit(xfr->ixfr.journal));
-               dns_db_closeversion(xfr->db, &xfr->ver, ISC_TRUE);
+               dns_db_closeversion(xfr->db, &xfr->ver, true);
                dns_zone_markdirty(xfr->zone);
        }
        result = ISC_R_SUCCESS;
@@ -529,7 +530,7 @@ xfr_rr(dns_xfrin_ctx_t *xfr, dns_name_t *name, uint32_t ttl,
                        FAIL(DNS_R_UPTODATE);
                }
                if (xfr->reqtype == dns_rdatatype_axfr)
-                       xfr->checkid = ISC_FALSE;
+                       xfr->checkid = false;
                xfr->state = XFRST_FIRSTDATA;
                break;
 
@@ -773,11 +774,11 @@ xfrin_reset(dns_xfrin_ctx_t *xfr) {
 
        if (xfr->tcpmsg_valid) {
                dns_tcpmsg_invalidate(&xfr->tcpmsg);
-               xfr->tcpmsg_valid = ISC_FALSE;
+               xfr->tcpmsg_valid = false;
        }
 
        if (xfr->ver != NULL)
-               dns_db_closeversion(xfr->db, &xfr->ver, ISC_FALSE);
+               dns_db_closeversion(xfr->db, &xfr->ver, false);
 }
 
 
@@ -800,7 +801,7 @@ xfrin_fail(dns_xfrin_ctx_t *xfr, isc_result_t result, const char *msg) {
                (xfr->done)(xfr->zone, result);
                xfr->done = NULL;
        }
-       xfr->shuttingdown = ISC_TRUE;
+       xfr->shuttingdown = true;
        xfr->shutdown_result = result;
        maybe_free(xfr);
 }
@@ -842,13 +843,13 @@ xfrin_create(isc_mem_t *mctx,
        xfr->connects = 0;
        xfr->sends = 0;
        xfr->recvs = 0;
-       xfr->shuttingdown = ISC_FALSE;
+       xfr->shuttingdown = false;
        xfr->shutdown_result = ISC_R_UNSET;
 
        dns_name_init(&xfr->name, NULL);
        xfr->rdclass = rdclass;
        isc_random_get(&tmp);
-       xfr->checkid = ISC_TRUE;
+       xfr->checkid = true;
        xfr->id = (uint16_t)(tmp & 0xffff);
        xfr->reqtype = reqtype;
        xfr->dscp = dscp;
@@ -858,7 +859,7 @@ xfrin_create(isc_mem_t *mctx,
        /* qbuffer */
        /* qbuffer_data */
        /* tcpmsg */
-       xfr->tcpmsg_valid = ISC_FALSE;
+       xfr->tcpmsg_valid = false;
 
        xfr->db = NULL;
        if (db != NULL)
@@ -885,7 +886,7 @@ xfrin_create(isc_mem_t *mctx,
        xfr->lasttsig = NULL;
        xfr->tsigctx = NULL;
        xfr->sincetsig = 0;
-       xfr->is_ixfr = ISC_FALSE;
+       xfr->is_ixfr = false;
 
        /* ixfr.request_serial */
        /* ixfr.current_serial */
@@ -901,7 +902,7 @@ xfrin_create(isc_mem_t *mctx,
        CHECK(dns_timer_setidle(xfr->timer,
                                dns_zone_getmaxxfrin(xfr->zone),
                                dns_zone_getidlein(xfr->zone),
-                               ISC_FALSE));
+                               false));
 
        xfr->masteraddr = *masteraddr;
 
@@ -962,11 +963,11 @@ xfrin_start(dns_xfrin_ctx_t *xfr) {
 static isc_result_t
 render(dns_message_t *msg, isc_mem_t *mctx, isc_buffer_t *buf) {
        dns_compress_t cctx;
-       isc_boolean_t cleanup_cctx = ISC_FALSE;
+       bool cleanup_cctx = false;
        isc_result_t result;
 
        CHECK(dns_compress_init(&cctx, -1, mctx));
-       cleanup_cctx = ISC_TRUE;
+       cleanup_cctx = true;
        CHECK(dns_message_renderbegin(msg, &cctx, buf));
        CHECK(dns_message_rendersection(msg, DNS_SECTION_QUESTION, 0));
        CHECK(dns_message_rendersection(msg, DNS_SECTION_ANSWER, 0));
@@ -1038,7 +1039,7 @@ xfrin_connect_done(isc_task_t *task, isc_event_t *event) {
                  sourcetext, sep, signer);
 
        dns_tcpmsg_init(xfr->mctx, xfr->socket, &xfr->tcpmsg);
-       xfr->tcpmsg_valid = ISC_TRUE;
+       xfr->tcpmsg_valid = true;
 
        CHECK(xfrin_send_request(xfr));
  failure:
@@ -1150,7 +1151,7 @@ xfrin_send_request(dns_xfrin_ctx_t *xfr) {
                CHECK(dns_db_getsoaserial(xfr->db, NULL,
                                          &xfr->ixfr.request_serial));
 
-       xfr->checkid = ISC_TRUE;
+       xfr->checkid = true;
        xfr->id++;
        xfr->nmsg = 0;
        xfr->nrecs = 0;
@@ -1198,7 +1199,7 @@ xfrin_send_request(dns_xfrin_ctx_t *xfr) {
        if (soatuple != NULL)
                dns_difftuple_free(&soatuple);
        if (ver != NULL)
-               dns_db_closeversion(xfr->db, &ver, ISC_FALSE);
+               dns_db_closeversion(xfr->db, &ver, false);
        return (result);
 }
 
@@ -1438,7 +1439,7 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
                 * We should have no outstanding events at this
                 * point, thus maybe_free() should succeed.
                 */
-               xfr->shuttingdown = ISC_TRUE;
+               xfr->shuttingdown = true;
                xfr->shutdown_result = ISC_R_SUCCESS;
                maybe_free(xfr);
                break;
@@ -1547,7 +1548,7 @@ maybe_free(dns_xfrin_ctx_t *xfr) {
                dns_name_free(&xfr->name, xfr->mctx);
 
        if (xfr->ver != NULL)
-               dns_db_closeversion(xfr->db, &xfr->ver, ISC_FALSE);
+               dns_db_closeversion(xfr->db, &xfr->ver, false);
 
        if (xfr->db != NULL)
                dns_db_detach(&xfr->db);
@@ -1588,7 +1589,7 @@ xfrin_log1(int level, const char *zonetext, isc_sockaddr_t *masteraddr,
 {
        va_list ap;
 
-       if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE)
+       if (isc_log_wouldlog(dns_lctx, level) == false)
                return;
 
        va_start(ap, fmt);
@@ -1606,7 +1607,7 @@ xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...)
        va_list ap;
        char zonetext[DNS_NAME_MAXTEXT+32];
 
-       if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE)
+       if (isc_log_wouldlog(dns_lctx, level) == false)
                return;
 
        dns_zone_name(xfr->zone, zonetext, sizeof(zonetext));
index 1cb559c32d49374f59ce45ab3f6970eec55901d9..ca07972bc37f8f3ec083db2c56c723f1d70e3278 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 #include <errno.h>
+#include <stdbool.h>
 
 #include <isc/file.h>
 #include <isc/hex.h>
@@ -153,24 +154,24 @@ typedef struct dns_include dns_include_t;
 #ifdef DNS_ZONE_CHECKLOCK
 #define LOCK_ZONE(z) \
         do { LOCK(&(z)->lock); \
-             INSIST((z)->locked == ISC_FALSE); \
-            (z)->locked = ISC_TRUE; \
+             INSIST((z)->locked == false); \
+            (z)->locked = true; \
                } while (0)
 #define UNLOCK_ZONE(z) \
-       do { (z)->locked = ISC_FALSE; UNLOCK(&(z)->lock); } while (0)
+       do { (z)->locked = false; UNLOCK(&(z)->lock); } while (0)
 #define LOCKED_ZONE(z) ((z)->locked)
 #define TRYLOCK_ZONE(result, z) \
        do { \
              result = isc_mutex_trylock(&(z)->lock); \
              if (result == ISC_R_SUCCESS) {  \
-                    INSIST((z)->locked == ISC_FALSE); \
-                    (z)->locked = ISC_TRUE; \
+                    INSIST((z)->locked == false); \
+                    (z)->locked = true; \
              } \
        } while (0)
 #else
 #define LOCK_ZONE(z) LOCK(&(z)->lock)
 #define UNLOCK_ZONE(z) UNLOCK(&(z)->lock)
-#define LOCKED_ZONE(z) ISC_TRUE
+#define LOCKED_ZONE(z) true
 #define TRYLOCK_ZONE(result, z) \
        do { result = isc_mutex_trylock(&(z)->lock); } while (0)
 #endif
@@ -188,7 +189,7 @@ typedef struct dns_include dns_include_t;
 #endif
 
 #ifdef ENABLE_AFL
-extern isc_boolean_t dns_fuzzing_resolver;
+extern bool dns_fuzzing_resolver;
 #endif
 
 struct dns_zone {
@@ -196,7 +197,7 @@ struct dns_zone {
        unsigned int            magic;
        isc_mutex_t             lock;
 #ifdef DNS_ZONE_CHECKLOCK
-       isc_boolean_t           locked;
+       bool            locked;
 #endif
        isc_mem_t               *mctx;
        isc_refcount_t          erefs;
@@ -259,7 +260,7 @@ struct dns_zone {
        isc_sockaddr_t          *masters;
        isc_dscp_t              *masterdscps;
        dns_name_t              **masterkeynames;
-       isc_boolean_t           *mastersok;
+       bool            *mastersok;
        unsigned int            masterscnt;
        unsigned int            curmaster;
        isc_sockaddr_t          masteraddr;
@@ -293,8 +294,8 @@ struct dns_zone {
        dns_acl_t               *query_acl;
        dns_acl_t               *queryon_acl;
        dns_acl_t               *xfr_acl;
-       isc_boolean_t           update_disabled;
-       isc_boolean_t           zero_no_soa_ttl;
+       bool            update_disabled;
+       bool            zero_no_soa_ttl;
        dns_severity_t          check_names;
        ISC_LIST(dns_notify_t)  notifies;
        dns_request_t           *request;
@@ -334,7 +335,7 @@ struct dns_zone {
         * module.
         */
        dns_zonestat_level_t    statlevel;
-       isc_boolean_t           requeststats_on;
+       bool            requeststats_on;
        isc_stats_t             *requeststats;
        dns_stats_t             *rcvquerystats;
        uint32_t                notifydelay;
@@ -370,12 +371,12 @@ struct dns_zone {
        /*%
         * True if added by "rndc addzone"
         */
-       isc_boolean_t           added;
+       bool           added;
 
        /*%
         * True if added by automatically by named.
         */
-       isc_boolean_t           automatic;
+       bool           automatic;
 
        /*%
         * response policy data to be relayed to the database
@@ -401,12 +402,12 @@ struct dns_zone {
        /*%
         * whether ixfr is requested
         */
-       isc_boolean_t           requestixfr;
+       bool            requestixfr;
 
        /*%
         * whether EDNS EXPIRE is requested
         */
-       isc_boolean_t           requestexpire;
+       bool            requestexpire;
 
        /*%
         * Outstanding forwarded UPDATE requests.
@@ -416,7 +417,7 @@ struct dns_zone {
        dns_zone_t              *raw;
        dns_zone_t              *secure;
 
-       isc_boolean_t           sourceserialset;
+       bool            sourceserialset;
        uint32_t                sourceserial;
 
        /*%
@@ -441,10 +442,10 @@ struct dns_zone {
        do { \
                dns__zonediff_t *_z = (z); \
                (_z)->diff = (d); \
-               (_z)->offline = ISC_FALSE; \
+               (_z)->offline = false; \
        } while (0)
 
-#define DNS_ZONE_FLAG(z,f) (ISC_TF(((z)->flags & (f)) != 0))
+#define DNS_ZONE_FLAG(z,f) ((z)->flags & (f))
 #define DNS_ZONE_SETFLAG(z,f) do { \
                INSIST(LOCKED_ZONE(z)); \
                (z)->flags |= (f); \
@@ -636,7 +637,7 @@ struct dns_forward {
 struct dns_io {
        unsigned int    magic;
        dns_zonemgr_t   *zmgr;
-       isc_boolean_t   high;
+       bool    high;
        isc_task_t      *task;
        ISC_LINK(dns_io_t) link;
        isc_event_t     *event;
@@ -652,8 +653,8 @@ struct dns_signing {
        dns_dbiterator_t        *dbiterator;
        dns_secalg_t            algorithm;
        uint16_t                keyid;
-       isc_boolean_t           deleteit;
-       isc_boolean_t           done;
+       bool            deleteit;
+       bool            done;
        ISC_LINK(dns_signing_t) link;
 };
 
@@ -663,10 +664,10 @@ struct dns_nsec3chain {
        dns_dbiterator_t                *dbiterator;
        dns_rdata_nsec3param_t          nsec3param;
        unsigned char                   salt[255];
-       isc_boolean_t                   done;
-       isc_boolean_t                   seen_nsec;
-       isc_boolean_t                   delete_nsec;
-       isc_boolean_t                   save_delete_nsec;
+       bool                    done;
+       bool                    seen_nsec;
+       bool                    delete_nsec;
+       bool                    save_delete_nsec;
        ISC_LINK(dns_nsec3chain_t)      link;
 };
 /*%<
@@ -749,7 +750,7 @@ static void zone_expire(dns_zone_t *zone);
 static void zone_iattach(dns_zone_t *source, dns_zone_t **target);
 static void zone_idetach(dns_zone_t **zonep);
 static isc_result_t zone_replacedb(dns_zone_t *zone, dns_db_t *db,
-                                  isc_boolean_t dump);
+                                  bool dump);
 static inline void zone_attachdb(dns_zone_t *zone, dns_db_t *db);
 static inline void zone_detachdb(dns_zone_t *zone);
 static isc_result_t default_journal(dns_zone_t *zone);
@@ -789,13 +790,13 @@ static isc_result_t notify_createmessage(dns_zone_t *zone,
                                         dns_message_t **messagep);
 static void notify_done(isc_task_t *task, isc_event_t *event);
 static void notify_send_toaddr(isc_task_t *task, isc_event_t *event);
-static isc_result_t zone_dump(dns_zone_t *, isc_boolean_t);
+static isc_result_t zone_dump(dns_zone_t *, bool);
 static void got_transfer_quota(isc_task_t *task, isc_event_t *event);
 static isc_result_t zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr,
                                             dns_zone_t *zone);
-static void zmgr_resume_xfrs(dns_zonemgr_t *zmgr, isc_boolean_t multi);
+static void zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi);
 static void zonemgr_free(dns_zonemgr_t *zmgr);
-static isc_result_t zonemgr_getio(dns_zonemgr_t *zmgr, isc_boolean_t high,
+static isc_result_t zonemgr_getio(dns_zonemgr_t *zmgr, bool high,
                                  isc_task_t *task, isc_taskaction_t action,
                                  void *arg, dns_io_t **iop);
 static void zonemgr_putio(dns_io_t **iop);
@@ -817,7 +818,7 @@ static void zone_notify(dns_zone_t *zone, isc_time_t *now);
 static void dump_done(void *arg, isc_result_t result);
 static isc_result_t zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm,
                                     uint16_t keyid,
-                                    isc_boolean_t deleteit);
+                                    bool deleteit);
 static isc_result_t delete_nsec(dns_db_t *db, dns_dbversion_t *ver,
                                dns_dbnode_t *node, dns_name_t *name,
                                dns_diff_t *diff);
@@ -863,8 +864,8 @@ typedef struct nsec3param nsec3param_t;
 struct nsec3param {
        unsigned char data[DNS_NSEC3PARAM_BUFFERSIZE + 1];
        unsigned int length;
-       isc_boolean_t nsec;
-       isc_boolean_t replace;
+       bool nsec;
+       bool replace;
        ISC_LINK(nsec3param_t)  link;
 };
 typedef ISC_LIST(nsec3param_t) nsec3paramlist_t;
@@ -921,7 +922,7 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
 
        /* XXX MPA check that all elements are initialised */
 #ifdef DNS_ZONE_CHECKLOCK
-       zone->locked = ISC_FALSE;
+       zone->locked = false;
 #endif
        zone->db = NULL;
        zone->zmgr = NULL;
@@ -993,8 +994,8 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
        zone->query_acl = NULL;
        zone->queryon_acl = NULL;
        zone->xfr_acl = NULL;
-       zone->update_disabled = ISC_FALSE;
-       zone->zero_no_soa_ttl = ISC_TRUE;
+       zone->update_disabled = false;
+       zone->zero_no_soa_ttl = true;
        zone->check_names = dns_severity_ignore;
        zone->request = NULL;
        zone->lctx = NULL;
@@ -1034,7 +1035,7 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
        ISC_LINK_INIT(zone, statelink);
        zone->statelist = NULL;
        zone->stats = NULL;
-       zone->requeststats_on = ISC_FALSE;
+       zone->requeststats_on = false;
        zone->statlevel = dns_zonestat_none;
        zone->requeststats = NULL;
        zone->rcvquerystats = NULL;
@@ -1046,8 +1047,8 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
        zone->signatures = 10;
        zone->nodes = 100;
        zone->privatetype = (dns_rdatatype_t)0xffffU;
-       zone->added = ISC_FALSE;
-       zone->automatic = ISC_FALSE;
+       zone->added = false;
+       zone->automatic = false;
        zone->rpzs = NULL;
        zone->rpz_num = DNS_RPZ_INVALID_NUM;
 
@@ -1058,9 +1059,9 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
        zone->raw = NULL;
        zone->secure = NULL;
        zone->sourceserial = 0;
-       zone->sourceserialset = ISC_FALSE;
-       zone->requestixfr = ISC_TRUE;
-       zone->requestexpire = ISC_TRUE;
+       zone->sourceserialset = false;
+       zone->requestixfr = true;
+       zone->requestexpire = true;
        ISC_LIST_INIT(zone->rss_events);
        zone->rss_db = NULL;
        zone->rss_raw = NULL;
@@ -1261,27 +1262,27 @@ zone_free(dns_zone_t *zone) {
 }
 
 /*
- * Returns ISC_TRUE iff this the signed side of an inline-signing zone.
+ * Returns true iff this the signed side of an inline-signing zone.
  * Caller should hold zone lock.
  */
-static inline isc_boolean_t
+static inline bool
 inline_secure(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        if (zone->raw != NULL)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 /*
- * Returns ISC_TRUE iff this the unsigned side of an inline-signing zone
+ * Returns true iff this the unsigned side of an inline-signing zone
  * Caller should hold zone lock.
  */
-static inline isc_boolean_t
+static inline bool
 inline_raw(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        if (zone->secure != NULL)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 /*
@@ -1765,27 +1766,27 @@ dns_zone_getjournal(dns_zone_t *zone) {
  * allow dynamic updates either by having an update policy ("ssutable")
  * or an "allow-update" ACL with a value other than exactly "{ none; }".
  */
-isc_boolean_t
-dns_zone_isdynamic(dns_zone_t *zone, isc_boolean_t ignore_freeze) {
+bool
+dns_zone_isdynamic(dns_zone_t *zone, bool ignore_freeze) {
        REQUIRE(DNS_ZONE_VALID(zone));
 
        if (zone->type == dns_zone_slave || zone->type == dns_zone_stub ||
            zone->type == dns_zone_key ||
            (zone->type == dns_zone_redirect && zone->masters != NULL))
-               return (ISC_TRUE);
+               return (true);
 
        /* Inline zones are always dynamic. */
        if (zone->type == dns_zone_master && zone->raw != NULL)
-               return (ISC_TRUE);
+               return (true);
 
        /* If !ignore_freeze, we need check whether updates are disabled.  */
        if (zone->type == dns_zone_master &&
            (!zone->update_disabled || ignore_freeze) &&
            ((zone->ssutable != NULL) ||
             (zone->update_acl != NULL && !dns_acl_isnone(zone->update_acl))))
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 
 }
 
@@ -1888,7 +1889,7 @@ dns_zone_get_parentcatz(const dns_zone_t *zone) {
 }
 
 
-static isc_boolean_t
+static bool
 zone_touched(dns_zone_t *zone) {
        isc_result_t result;
        isc_time_t modtime;
@@ -1899,7 +1900,7 @@ zone_touched(dns_zone_t *zone) {
        result = isc_file_getmodtime(zone->masterfile, &modtime);
        if (result != ISC_R_SUCCESS ||
            isc_time_compare(&modtime, &zone->loadtime) > 0)
-               return (ISC_TRUE);
+               return (true);
 
        for (include = ISC_LIST_HEAD(zone->includes);
             include != NULL;
@@ -1908,19 +1909,19 @@ zone_touched(dns_zone_t *zone) {
                result = isc_file_getmodtime(include->name, &modtime);
                if (result != ISC_R_SUCCESS ||
                    isc_time_compare(&modtime, &include->filetime) > 0)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
-zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
+zone_load(dns_zone_t *zone, unsigned int flags, bool locked) {
        isc_result_t result;
        isc_time_t now;
        isc_time_t loadtime;
        dns_db_t *db = NULL;
-       isc_boolean_t rbt, hasraw;
+       bool rbt, hasraw;
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -1930,7 +1931,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
        INSIST(zone != zone->raw);
        hasraw = inline_secure(zone);
        if (hasraw) {
-               result = zone_load(zone->raw, flags, ISC_FALSE);
+               result = zone_load(zone->raw, flags, false);
                if (result != ISC_R_SUCCESS) {
                        if (!locked)
                                UNLOCK_ZONE(zone);
@@ -1963,7 +1964,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
                goto cleanup;
        }
 
-       if (zone->db != NULL && dns_zone_isdynamic(zone, ISC_FALSE)) {
+       if (zone->db != NULL && dns_zone_isdynamic(zone, false)) {
                /*
                 * This is a slave, stub, or dynamically updated
                 * zone being reloaded.  Do nothing - the database
@@ -2162,12 +2163,12 @@ zone_load(dns_zone_t *zone, unsigned int flags, isc_boolean_t locked) {
 
 isc_result_t
 dns_zone_load(dns_zone_t *zone) {
-       return (zone_load(zone, 0, ISC_FALSE));
+       return (zone_load(zone, 0, false));
 }
 
 isc_result_t
 dns_zone_loadnew(dns_zone_t *zone) {
-       return (zone_load(zone, DNS_ZONELOADFLAG_NOSTAT, ISC_FALSE));
+       return (zone_load(zone, DNS_ZONELOADFLAG_NOSTAT, false));
 }
 
 static void
@@ -2183,7 +2184,7 @@ zone_asyncload(isc_task_t *task, isc_event_t *event) {
        isc_event_free(&event);
 
        LOCK_ZONE(zone);
-       result = zone_load(zone, 0, ISC_TRUE);
+       result = zone_load(zone, 0, true);
        if (result != DNS_R_CONTINUE) {
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_LOADPENDING);
        }
@@ -2244,11 +2245,11 @@ dns_zone_asyncload(dns_zone_t *zone, dns_zt_zoneloaded_t done, void *arg) {
        return (result);
 }
 
-isc_boolean_t
+bool
 dns__zone_loadpending(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
 
-       return (ISC_TF(DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADPENDING)));
+       return (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADPENDING));
 }
 
 isc_result_t
@@ -2257,9 +2258,9 @@ dns_zone_loadandthaw(dns_zone_t *zone) {
 
        if (inline_raw(zone))
                result = zone_load(zone->secure, DNS_ZONELOADFLAG_THAW,
-                                  ISC_FALSE);
+                                  false);
        else
-               result = zone_load(zone, DNS_ZONELOADFLAG_THAW, ISC_FALSE);
+               result = zone_load(zone, DNS_ZONELOADFLAG_THAW, false);
 
        switch (result) {
        case DNS_R_CONTINUE:
@@ -2268,10 +2269,10 @@ dns_zone_loadandthaw(dns_zone_t *zone) {
        case DNS_R_UPTODATE:
        case ISC_R_SUCCESS:
        case DNS_R_SEENINCLUDE:
-               zone->update_disabled = ISC_FALSE;
+               zone->update_disabled = false;
                break;
        case DNS_R_NOMASTERFILE:
-               zone->update_disabled = ISC_FALSE;
+               zone->update_disabled = false;
                break;
        default:
                /* Error, remain in disabled state. */
@@ -2437,7 +2438,7 @@ zone_gotwritehandle(isc_task_t *task, isc_event_t *event) {
                                             output_style, zone->masterfile,
                                             zone->task, dump_done, zone,                                                    &zone->dctx, zone->masterformat,
                                             &rawdata);
-               dns_db_closeversion(zone->db, &version, ISC_FALSE);
+               dns_db_closeversion(zone->db, &version, false);
        } else
                result = ISC_R_CANCELED;
        ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
@@ -2462,7 +2463,7 @@ zone_setrawdata(dns_zone_t *zone, dns_masterrawheader_t *header) {
                return;
 
        zone->sourceserial = header->sourceserial;
-       zone->sourceserialset = ISC_TRUE;
+       zone->sourceserialset = true;
 }
 
 void
@@ -2508,7 +2509,7 @@ zone_startload(dns_db_t *db, dns_zone_t *zone, isc_time_t loadtime) {
                result = dns_db_beginload(db, &load->callbacks);
                if (result != ISC_R_SUCCESS)
                        goto cleanup;
-               result = zonemgr_getio(zone->zmgr, ISC_TRUE, zone->loadtask,
+               result = zonemgr_getio(zone->zmgr, true, zone->loadtask,
                                       zone_gotreadhandle, load,
                                       &zone->readio);
                if (result != ISC_R_SUCCESS) {
@@ -2557,7 +2558,7 @@ zone_startload(dns_db_t *db, dns_zone_t *zone, isc_time_t loadtime) {
        return (result);
 }
 
-static isc_boolean_t
+static bool
 zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
              dns_name_t *owner)
 {
@@ -2573,7 +2574,7 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
         * "." means the services does not exist.
         */
        if (dns_name_equal(name, dns_rootname))
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Outside of zone.
@@ -2581,7 +2582,7 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        if (!dns_name_issubdomain(name, &zone->origin)) {
                if (zone->checkmx != NULL)
                        return ((zone->checkmx)(zone, name, owner));
-               return (ISC_TRUE);
+               return (true);
        }
 
        if (zone->type == dns_zone_master)
@@ -2594,13 +2595,13 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        result = dns_db_find(db, name, NULL, dns_rdatatype_a,
                             0, 0, NULL, foundname, NULL, NULL);
        if (result == ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
 
        if (result == DNS_R_NXRRSET) {
                result = dns_db_find(db, name, NULL, dns_rdatatype_aaaa,
                                     0, 0, NULL, foundname, NULL, NULL);
                if (result == ISC_R_SUCCESS)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
        dns_name_format(owner, ownerbuf, sizeof ownerbuf);
@@ -2612,7 +2613,7 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                dns_zone_log(zone, level,
                             "%s/MX '%s' has no address records (A or AAAA)",
                             ownerbuf, namebuf);
-               return ((level == ISC_LOG_WARNING) ? ISC_TRUE : ISC_FALSE);
+               return ((level == ISC_LOG_WARNING) ? true : false);
        }
 
        if (result == DNS_R_CNAME) {
@@ -2623,7 +2624,7 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                        dns_zone_log(zone, level,
                                     "%s/MX '%s' is a CNAME (illegal)",
                                     ownerbuf, namebuf);
-               return ((level == ISC_LOG_WARNING) ? ISC_TRUE : ISC_FALSE);
+               return ((level == ISC_LOG_WARNING) ? true : false);
        }
 
        if (result == DNS_R_DNAME) {
@@ -2636,16 +2637,16 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                                     " '%s' (illegal)", ownerbuf, namebuf,
                                     altbuf);
                }
-               return ((level == ISC_LOG_WARNING) ? ISC_TRUE : ISC_FALSE);
+               return ((level == ISC_LOG_WARNING) ? true : false);
        }
 
        if (zone->checkmx != NULL && result == DNS_R_DELEGATION)
                return ((zone->checkmx)(zone, name, owner));
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
               dns_name_t *owner)
 {
@@ -2661,7 +2662,7 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
         * "." means the services does not exist.
         */
        if (dns_name_equal(name, dns_rootname))
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Outside of zone.
@@ -2669,7 +2670,7 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        if (!dns_name_issubdomain(name, &zone->origin)) {
                if (zone->checksrv != NULL)
                        return ((zone->checksrv)(zone, name, owner));
-               return (ISC_TRUE);
+               return (true);
        }
 
        if (zone->type == dns_zone_master)
@@ -2682,13 +2683,13 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        result = dns_db_find(db, name, NULL, dns_rdatatype_a,
                             0, 0, NULL, foundname, NULL, NULL);
        if (result == ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
 
        if (result == DNS_R_NXRRSET) {
                result = dns_db_find(db, name, NULL, dns_rdatatype_aaaa,
                                     0, 0, NULL, foundname, NULL, NULL);
                if (result == ISC_R_SUCCESS)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
        dns_name_format(owner, ownerbuf, sizeof ownerbuf);
@@ -2699,7 +2700,7 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                             "%s/SRV '%s' has no address records (A or AAAA)",
                             ownerbuf, namebuf);
                /* XXX950 make fatal for 9.5.0. */
-               return (ISC_TRUE);
+               return (true);
        }
 
        if (result == DNS_R_CNAME) {
@@ -2710,7 +2711,7 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                        dns_zone_log(zone, level,
                                     "%s/SRV '%s' is a CNAME (illegal)",
                                     ownerbuf, namebuf);
-               return ((level == ISC_LOG_WARNING) ? ISC_TRUE : ISC_FALSE);
+               return ((level == ISC_LOG_WARNING) ? true : false);
        }
 
        if (result == DNS_R_DNAME) {
@@ -2723,20 +2724,20 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                                     "DNAME '%s' (illegal)", ownerbuf, namebuf,
                                     altbuf);
                }
-               return ((level == ISC_LOG_WARNING) ? ISC_TRUE : ISC_FALSE);
+               return ((level == ISC_LOG_WARNING) ? true : false);
        }
 
        if (zone->checksrv != NULL && result == DNS_R_DELEGATION)
                return ((zone->checksrv)(zone, name, owner));
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                dns_name_t *owner)
 {
-       isc_boolean_t answer = ISC_TRUE;
+       bool answer = true;
        isc_result_t result, tresult;
        char ownerbuf[DNS_NAME_FORMATSIZE];
        char namebuf[DNS_NAME_FORMATSIZE];
@@ -2753,7 +2754,7 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        if (!dns_name_issubdomain(name, &zone->origin)) {
                if (zone->checkns != NULL)
                        return ((zone->checkns)(zone, name, owner, NULL, NULL));
-               return (ISC_TRUE);
+               return (true);
        }
 
        if (zone->type == dns_zone_master)
@@ -2785,7 +2786,7 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        }
        if (result == ISC_R_SUCCESS) {
                dns_rdataset_disassociate(&a);
-               return (ISC_TRUE);
+               return (true);
        } else if (result == DNS_R_DELEGATION)
                dns_rdataset_disassociate(&a);
 
@@ -2798,7 +2799,7 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                        if (dns_rdataset_isassociated(&a))
                                dns_rdataset_disassociate(&a);
                        dns_rdataset_disassociate(&aaaa);
-                       return (ISC_TRUE);
+                       return (true);
                }
                if (tresult == DNS_R_DELEGATION || tresult == DNS_R_DNAME)
                        dns_rdataset_disassociate(&aaaa);
@@ -2822,10 +2823,10 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        if (result == DNS_R_NXRRSET || result == DNS_R_NXDOMAIN ||
            result == DNS_R_EMPTYNAME || result == DNS_R_DELEGATION) {
                const char *what;
-               isc_boolean_t required = ISC_FALSE;
+               bool required = false;
                if (dns_name_issubdomain(name, owner)) {
                        what = "REQUIRED GLUE ";
-                       required = ISC_TRUE;
+                       required = true;
                 } else if (result == DNS_R_DELEGATION)
                        what = "SIBLING GLUE ";
                else
@@ -2843,20 +2844,20 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
                                (void)(zone->checkns)(zone, name, owner,
                                                      &a, &aaaa);
                        /* XXX950 make fatal for 9.5.0. */
-                       /* answer = ISC_FALSE; */
+                       /* answer = false; */
                }
        } else if (result == DNS_R_CNAME) {
                dns_zone_log(zone, level, "%s/NS '%s' is a CNAME (illegal)",
                             ownerbuf, namebuf);
                /* XXX950 make fatal for 9.5.0. */
-               /* answer = ISC_FALSE; */
+               /* answer = false; */
        } else if (result == DNS_R_DNAME) {
                dns_name_format(foundname, altbuf, sizeof altbuf);
                dns_zone_log(zone, level,
                             "%s/NS '%s' is below a DNAME '%s' (illegal)",
                             ownerbuf, namebuf, altbuf);
                /* XXX950 make fatal for 9.5.0. */
-               /* answer = ISC_FALSE; */
+               /* answer = false; */
        }
 
        if (dns_rdataset_isassociated(&a))
@@ -2866,14 +2867,14 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
        return (answer);
 }
 
-static isc_boolean_t
+static bool
 zone_rrset_check_dup(dns_zone_t *zone, dns_name_t *owner,
                     dns_rdataset_t *rdataset)
 {
        dns_rdataset_t tmprdataset;
        isc_result_t result;
-       isc_boolean_t answer = ISC_TRUE;
-       isc_boolean_t format = ISC_TRUE;
+       bool answer = true;
+       bool format = true;
        int level = ISC_LOG_WARNING;
        char ownerbuf[DNS_NAME_FORMATSIZE];
        char typebuf[DNS_RDATATYPE_FORMATSIZE];
@@ -2907,13 +2908,13 @@ zone_rrset_check_dup(dns_zone_t *zone, dns_name_t *owner,
                                        dns_rdatatype_format(rdata1.type,
                                                             typebuf,
                                                             sizeof(typebuf));
-                                       format = ISC_FALSE;
+                                       format = false;
                                }
                                dns_zone_log(zone, level, "%s/%s has "
                                             "semantically identical records",
                                             ownerbuf, typebuf);
                                if (level == ISC_LOG_ERROR)
-                                       answer = ISC_FALSE;
+                                       answer = false;
                                break;
                        }
                }
@@ -2924,7 +2925,7 @@ zone_rrset_check_dup(dns_zone_t *zone, dns_name_t *owner,
        return (answer);
 }
 
-static isc_boolean_t
+static bool
 zone_check_dup(dns_zone_t *zone, dns_db_t *db) {
        dns_dbiterator_t *dbiterator = NULL;
        dns_dbnode_t *node = NULL;
@@ -2932,7 +2933,7 @@ zone_check_dup(dns_zone_t *zone, dns_db_t *db) {
        dns_name_t *name;
        dns_rdataset_t rdataset;
        dns_rdatasetiter_t *rdsit = NULL;
-       isc_boolean_t ok = ISC_TRUE;
+       bool ok = true;
        isc_result_t result;
 
        name = dns_fixedname_initname(&fixed);
@@ -2940,7 +2941,7 @@ zone_check_dup(dns_zone_t *zone, dns_db_t *db) {
 
        result = dns_db_createiterator(db, 0, &dbiterator);
        if (result != ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
 
        for (result = dns_dbiterator_first(dbiterator);
             result == ISC_R_SUCCESS;
@@ -2958,7 +2959,7 @@ zone_check_dup(dns_zone_t *zone, dns_db_t *db) {
                     result = dns_rdatasetiter_next(rdsit)) {
                        dns_rdatasetiter_current(rdsit, &rdataset);
                        if (!zone_rrset_check_dup(zone, name, &rdataset))
-                               ok = ISC_FALSE;
+                               ok = false;
                        dns_rdataset_disassociate(&rdataset);
                }
                dns_rdatasetiter_destroy(&rdsit);
@@ -2972,7 +2973,7 @@ zone_check_dup(dns_zone_t *zone, dns_db_t *db) {
        return (ok);
 }
 
-static isc_boolean_t
+static bool
 isspf(const dns_rdata_t *rdata) {
        char buf[1024];
        const unsigned char *data = rdata->data;
@@ -2992,15 +2993,15 @@ isspf(const dns_rdata_t *rdata) {
        }
 
        if (i < 6U)
-               return(ISC_FALSE);
+               return(false);
 
        buf[i] = 0;
        if (strncmp(buf, "v=spf1", 6) == 0 && (buf[6] == 0 || buf[6] == ' '))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 integrity_checks(dns_zone_t *zone, dns_db_t *db) {
        dns_dbiterator_t *dbiterator = NULL;
        dns_dbnode_t *node = NULL;
@@ -3014,7 +3015,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
        dns_name_t *name;
        dns_name_t *bottom;
        isc_result_t result;
-       isc_boolean_t ok = ISC_TRUE, have_spf, have_txt;
+       bool ok = true, have_spf, have_txt;
 
        name = dns_fixedname_initname(&fixed);
        bottom = dns_fixedname_initname(&fixedbottom);
@@ -3023,7 +3024,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
 
        result = dns_db_createiterator(db, 0, &dbiterator);
        if (result != ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
 
        result = dns_dbiterator_first(dbiterator);
        while (result == ISC_R_SUCCESS) {
@@ -3060,7 +3061,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
                        result = dns_rdata_tostruct(&rdata, &ns, NULL);
                        RUNTIME_CHECK(result == ISC_R_SUCCESS);
                        if (!zone_check_glue(zone, db, &ns.name, name))
-                               ok = ISC_FALSE;
+                               ok = false;
                        dns_rdata_reset(&rdata);
                        result = dns_rdataset_next(&rdataset);
                }
@@ -3089,7 +3090,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
                        result = dns_rdata_tostruct(&rdata, &mx, NULL);
                        RUNTIME_CHECK(result == ISC_R_SUCCESS);
                        if (!zone_check_mx(zone, db, &mx.mx, name))
-                               ok = ISC_FALSE;
+                               ok = false;
                        dns_rdata_reset(&rdata);
                        result = dns_rdataset_next(&rdataset);
                }
@@ -3108,7 +3109,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
                        result = dns_rdata_tostruct(&rdata, &srv, NULL);
                        RUNTIME_CHECK(result == ISC_R_SUCCESS);
                        if (!zone_check_srv(zone, db, &srv.target, name))
-                               ok = ISC_FALSE;
+                               ok = false;
                        dns_rdata_reset(&rdata);
                        result = dns_rdataset_next(&rdataset);
                }
@@ -3123,12 +3124,12 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
                        goto next;
                if (zone->rdclass != dns_rdataclass_in)
                        goto next;
-               have_spf = have_txt = ISC_FALSE;
+               have_spf = have_txt = false;
                result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_spf,
                                             0, 0, &rdataset, NULL);
                if (result == ISC_R_SUCCESS) {
                        dns_rdataset_disassociate(&rdataset);
-                       have_spf = ISC_TRUE;
+                       have_spf = true;
                }
                result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_txt,
                                             0, 0, &rdataset, NULL);
@@ -3181,10 +3182,10 @@ zone_check_dnskeys(dns_zone_t *zone, dns_db_t *db) {
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdataset_t rdataset;
        isc_result_t result;
-       isc_boolean_t logit, foundrsa = ISC_FALSE, foundmd5 = ISC_FALSE;
+       bool logit, foundrsa = false, foundmd5 = false;
        const char *algorithm;
 
-       result = dns_db_findnode(db, &zone->origin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, &zone->origin, false, &node);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -3210,11 +3211,11 @@ zone_check_dnskeys(dns_zone_t *zone, dns_db_t *db) {
                {
                        if (dnskey.algorithm == DST_ALG_RSASHA1) {
                                logit = !foundrsa;
-                               foundrsa = ISC_TRUE;
+                               foundrsa = true;
                                algorithm = "RSASHA1";
                        } else {
                                logit = !foundmd5;
-                               foundmd5 = ISC_TRUE;
+                               foundmd5 = true;
                                algorithm = "RSAMD5";
                        }
                        if (logit)
@@ -3233,7 +3234,7 @@ zone_check_dnskeys(dns_zone_t *zone, dns_db_t *db) {
        if (node != NULL)
                dns_db_detachnode(db, &node);
        if (version != NULL)
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
 }
 
 static void
@@ -3252,7 +3253,7 @@ resume_signingwithkey(dns_zone_t *zone) {
        if (db == NULL)
                goto cleanup;
 
-       result = dns_db_findnode(db, &zone->origin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, &zone->origin, false, &node);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -3280,7 +3281,7 @@ resume_signingwithkey(dns_zone_t *zone) {
 
                result = zone_signwithkey(zone, rdata.data[0],
                                          (rdata.data[1] << 8) | rdata.data[2],
-                                         ISC_TF(rdata.data[3]));
+                                         rdata.data[3]);
                if (result != ISC_R_SUCCESS) {
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "zone_signwithkey failed: %s",
@@ -3295,7 +3296,7 @@ resume_signingwithkey(dns_zone_t *zone) {
                if (node != NULL)
                        dns_db_detachnode(db, &node);
                if (version != NULL)
-                       dns_db_closeversion(db, &version, ISC_FALSE);
+                       dns_db_closeversion(db, &version, false);
                dns_db_detach(&db);
        }
 }
@@ -3310,7 +3311,7 @@ static isc_result_t
 zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) {
        dns_nsec3chain_t *nsec3chain, *current;
        dns_dbversion_t *version = NULL;
-       isc_boolean_t nseconly = ISC_FALSE, nsec3ok = ISC_FALSE;
+       bool nseconly = false, nsec3ok = false;
        isc_result_t result;
        isc_time_t now;
        unsigned int options = 0;
@@ -3336,7 +3337,7 @@ zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) {
        dns_db_currentversion(db, &version);
        result = dns_nsec_nseconly(db, version, &nseconly);
        nsec3ok = (result == ISC_R_SUCCESS && !nseconly);
-       dns_db_closeversion(db, &version, ISC_FALSE);
+       dns_db_closeversion(db, &version, false);
        if (!nsec3ok && (nsec3param->flags & DNS_NSEC3FLAG_REMOVE) == 0) {
                result = ISC_R_SUCCESS;
                goto cleanup;
@@ -3354,7 +3355,7 @@ zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) {
        }
 
        nsec3chain->magic = 0;
-       nsec3chain->done = ISC_FALSE;
+       nsec3chain->done = false;
        nsec3chain->db = NULL;
        nsec3chain->dbiterator = NULL;
        nsec3chain->nsec3param.common.rdclass = nsec3param->common.rdclass;
@@ -3365,9 +3366,9 @@ zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) {
        nsec3chain->nsec3param.salt_length = nsec3param->salt_length;
        memmove(nsec3chain->salt, nsec3param->salt, nsec3param->salt_length);
        nsec3chain->nsec3param.salt = nsec3chain->salt;
-       nsec3chain->seen_nsec = ISC_FALSE;
-       nsec3chain->delete_nsec = ISC_FALSE;
-       nsec3chain->save_delete_nsec = ISC_FALSE;
+       nsec3chain->seen_nsec = false;
+       nsec3chain->delete_nsec = false;
+       nsec3chain->save_delete_nsec = false;
 
        /*
         * Log NSEC3 parameters defined by supplied NSEC3PARAM RDATA.
@@ -3425,7 +3426,7 @@ zone_addnsec3chain(dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) {
                    current->nsec3param.salt_length == nsec3param->salt_length
                    && !memcmp(current->nsec3param.salt, nsec3param->salt,
                               nsec3param->salt_length))
-                       current->done = ISC_TRUE;
+                       current->done = true;
        }
 
        /*
@@ -3489,7 +3490,7 @@ resume_addnsec3chain(dns_zone_t *zone) {
        dns_rdataset_t rdataset;
        isc_result_t result;
        dns_rdata_nsec3param_t nsec3param;
-       isc_boolean_t nseconly = ISC_FALSE, nsec3ok = ISC_FALSE;
+       bool nseconly = false, nsec3ok = false;
        dns_db_t *db = NULL;
 
        INSIST(LOCKED_ZONE(zone));
@@ -3504,7 +3505,7 @@ resume_addnsec3chain(dns_zone_t *zone) {
        if (db == NULL)
                goto cleanup;
 
-       result = dns_db_findnode(db, &zone->origin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, &zone->origin, false, &node);
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
@@ -3570,7 +3571,7 @@ resume_addnsec3chain(dns_zone_t *zone) {
                if (node != NULL)
                        dns_db_detachnode(db, &node);
                if (version != NULL)
-                       dns_db_closeversion(db, &version, ISC_FALSE);
+                       dns_db_closeversion(db, &version, false);
                dns_db_detach(&db);
        }
 }
@@ -3628,14 +3629,14 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) {
        dns_rdataset_t rdataset;
        dns_dbversion_t *version = NULL;
        dns_rdata_nsec3param_t nsec3param;
-       isc_boolean_t ok = ISC_FALSE;
+       bool ok = false;
        isc_result_t result;
        dns_rdata_t rdata = DNS_RDATA_INIT;
-       isc_boolean_t dynamic = (zone->type == dns_zone_master) ?
-                               dns_zone_isdynamic(zone, ISC_FALSE) : ISC_FALSE;
+       bool dynamic = (zone->type == dns_zone_master) ?
+                               dns_zone_isdynamic(zone, false) : false;
 
        dns_rdataset_init(&rdataset);
-       result = dns_db_findnode(db, &zone->origin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, &zone->origin, false, &node);
        if (result != ISC_R_SUCCESS) {
                dns_zone_log(zone, ISC_LOG_ERROR,
                             "nsec3param lookup failure: %s",
@@ -3679,7 +3680,7 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) {
                        dns_zone_log(zone, ISC_LOG_WARNING,
                             "nsec3 test \"unknown\" hash algorithm found: %u",
                                     nsec3param.hash);
-                       ok = ISC_TRUE;
+                       ok = true;
                } else if (!dns_nsec3_supportedhash(nsec3param.hash)) {
                        if (dynamic) {
                                dns_zone_log(zone, ISC_LOG_ERROR,
@@ -3688,14 +3689,14 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) {
                                             nsec3param.hash);
                                result = DNS_R_BADZONE;
                                /* Stop second error message. */
-                               ok = ISC_TRUE;
+                               ok = true;
                                break;
                        } else
                                dns_zone_log(zone, ISC_LOG_WARNING,
                                     "unsupported nsec3 hash algorithm: %u",
                                             nsec3param.hash);
                } else
-                       ok = ISC_TRUE;
+                       ok = true;
        }
        if (result == ISC_R_NOMORE)
                result = ISC_R_SUCCESS;
@@ -3709,7 +3710,7 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) {
  cleanup:
        if (dns_rdataset_isassociated(&rdataset))
                dns_rdataset_disassociate(&rdataset);
-       dns_db_closeversion(db, &version, ISC_FALSE);
+       dns_db_closeversion(db, &version, false);
        dns_db_detachnode(db, &node);
        return (result);
 }
@@ -3721,7 +3722,7 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) {
  */
 static void
 set_refreshkeytimer(dns_zone_t *zone, dns_rdata_keydata_t *key,
-                   isc_stdtime_t now, isc_boolean_t force)
+                   isc_stdtime_t now, bool force)
 {
        const char me[] = "set_refreshkeytimer";
        isc_stdtime_t then;
@@ -3753,12 +3754,12 @@ set_refreshkeytimer(dns_zone_t *zone, dns_rdata_keydata_t *key,
 
 /*
  * Convert key(s) linked from 'keynode' to KEYDATA and add to the key zone.
- * If the key zone is changed, set '*changed' to ISC_TRUE.
+ * If the key zone is changed, set '*changed' to true.
  */
 static isc_result_t
 create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
               dns_diff_t *diff, dns_keytable_t *keytable,
-              dns_keynode_t **keynodep, isc_boolean_t *changed)
+              dns_keynode_t **keynodep, bool *changed)
 {
        const char me[] = "create_keydata";
        isc_result_t result = ISC_R_SUCCESS;
@@ -3810,10 +3811,10 @@ create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
                /* Add rdata to zone. */
                CHECK(update_one_rr(db, ver, diff, DNS_DIFFOP_ADD,
                                    dst_key_name(key), 0, &rdata));
-               *changed = ISC_TRUE;
+               *changed = true;
 
                /* Refresh new keys from the zone apex as soon as possible. */
-               set_refreshkeytimer(zone, &keydata, now, ISC_TRUE);
+               set_refreshkeytimer(zone, &keydata, now, true);
 
  skip:
                result = dns_keytable_nextkeynode(keytable, keynode, &nextnode);
@@ -3907,7 +3908,7 @@ trust_key(dns_zone_t *zone, dns_name_t *keyname,
                goto failure;
 
        CHECK(dns_dnssec_keyfromrdata(keyname, &rdata, mctx, &dstkey));
-       CHECK(dns_keytable_add(sr, ISC_TRUE, &dstkey));
+       CHECK(dns_keytable_add(sr, true, &dstkey));
        dns_keytable_detach(&sr);
 
   failure:
@@ -3971,7 +3972,7 @@ load_secroots(dns_zone_t *zone, dns_name_t *name, dns_rdataset_t *rdataset) {
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
                /* Set the key refresh timer to force a fast refresh. */
-               set_refreshkeytimer(zone, &keydata, now, ISC_TRUE);
+               set_refreshkeytimer(zone, &keydata, now, true);
 
                /* If the removal timer is nonzero, this key was revoked. */
                if (keydata.removehd != 0) {
@@ -4165,7 +4166,7 @@ add_soa(dns_zone_t *zone, dns_db_t *db) {
 failure:
        dns_diff_clear(&diff);
        if (ver != NULL)
-               dns_db_closeversion(db, &ver, ISC_TF(result == ISC_R_SUCCESS));
+               dns_db_closeversion(db, &ver, (result == ISC_R_SUCCESS));
 
        INSIST(ver == NULL);
 
@@ -4177,7 +4178,7 @@ struct addifmissing_arg {
        dns_dbversion_t *ver;
        dns_diff_t *diff;
        dns_zone_t *zone;
-       isc_boolean_t *changed;
+       bool *changed;
        isc_result_t result;
 };
 
@@ -4187,7 +4188,7 @@ addifmissing(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
        dns_dbversion_t *ver = ((struct addifmissing_arg *)arg)->ver;
        dns_diff_t *diff = ((struct addifmissing_arg *)arg)->diff;
        dns_zone_t *zone = ((struct addifmissing_arg *)arg)->zone;
-       isc_boolean_t *changed = ((struct addifmissing_arg *)arg)->changed;
+       bool *changed = ((struct addifmissing_arg *)arg)->changed;
        isc_result_t result;
        dns_keynode_t *dummy = NULL;
 
@@ -4231,8 +4232,8 @@ addifmissing(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
 static isc_result_t
 sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t changed = ISC_FALSE;
-       isc_boolean_t commit = ISC_FALSE;
+       bool changed = false;
+       bool commit = false;
        dns_keynode_t *keynode = NULL;
        dns_view_t *view = zone->view;
        dns_keytable_t *sr = NULL;
@@ -4283,11 +4284,11 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
                result = dns_keytable_find(sr, rrname, &keynode);
                if ((result != ISC_R_SUCCESS &&
                     result != DNS_R_PARTIALMATCH) ||
-                   dns_keynode_managed(keynode) == ISC_FALSE)
+                   dns_keynode_managed(keynode) == false)
                {
                        CHECK(delete_keydata(db, ver, &diff,
                                             rrname, rdataset));
-                       changed = ISC_TRUE;
+                       changed = true;
                } else {
                        load_secroots(zone, rrname, rdataset);
                }
@@ -4317,7 +4318,7 @@ sync_keyzone(dns_zone_t *zone, dns_db_t *db) {
 
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED);
                zone_needdump(zone, 30);
-               commit = ISC_TRUE;
+               commit = true;
        }
 
  failure:
@@ -4391,16 +4392,16 @@ maybe_send_secure(dns_zone_t *zone) {
                DNS_ZONE_SETFLAG(zone->raw, DNS_ZONEFLG_SENDSECURE);
 }
 
-static isc_boolean_t
+static bool
 zone_unchanged(dns_db_t *db1, dns_db_t *db2, isc_mem_t *mctx) {
        isc_result_t result;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
        dns_diff_t diff;
 
        dns_diff_init(mctx, &diff);
        result = dns_db_diffx(&diff, db1, NULL, db2, NULL, NULL);
        if (result == ISC_R_SUCCESS && ISC_LIST_EMPTY(diff.tuples))
-               answer = ISC_TRUE;
+               answer = true;
        dns_diff_clear(&diff);
        return (answer);
 }
@@ -4418,9 +4419,9 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
        unsigned int errors = 0;
        uint32_t serial, oldserial, refresh, retry, expire, minimum;
        isc_time_t now;
-       isc_boolean_t needdump = ISC_FALSE;
-       isc_boolean_t hasinclude = DNS_ZONE_FLAG(zone, DNS_ZONEFLG_HASINCLUDE);
-       isc_boolean_t nomaster = ISC_FALSE;
+       bool needdump = false;
+       bool hasinclude = DNS_ZONE_FLAG(zone, DNS_ZONEFLG_HASINCLUDE);
+       bool nomaster = false;
        unsigned int options;
        dns_include_t *inc;
 
@@ -4464,7 +4465,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                                     "loading from master file %s failed: %s",
                                     zone->masterfile,
                                     dns_result_totext(result));
-                       nomaster = ISC_TRUE;
+                       nomaster = true;
                }
 
                if (zone->type != dns_zone_key)
@@ -4527,7 +4528,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                             "successfully: %s",
                             dns_result_totext(result));
                if (result == ISC_R_SUCCESS)
-                       needdump = ISC_TRUE;
+                       needdump = true;
        }
 
        /*
@@ -4547,7 +4548,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
         * journal file if it isn't, as we wouldn't be able to apply
         * updates otherwise.
         */
-       if (zone->journal != NULL && dns_zone_isdynamic(zone, ISC_TRUE) &&
+       if (zone->journal != NULL && dns_zone_isdynamic(zone, true) &&
            ! DNS_ZONE_OPTION(zone, DNS_ZONEOPT_IXFRFROMDIFFS)) {
                uint32_t jserial;
                dns_journal_t *journal = NULL;
@@ -4765,7 +4766,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
 
        ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write);
        if (zone->db != NULL) {
-               result = zone_replacedb(zone, db, ISC_FALSE);
+               result = zone_replacedb(zone, db, false);
                ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write);
                if (result != ISC_R_SUCCESS)
                        goto cleanup;
@@ -4814,7 +4815,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
 
                if (zone->type == dns_zone_master &&
                    !DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_NORESIGN) &&
-                   dns_zone_isdynamic(zone, ISC_FALSE) &&
+                   dns_zone_isdynamic(zone, false) &&
                    dns_db_issecure(db)) {
                        dns_name_t *name;
                        dns_fixedname_t fixed;
@@ -4917,7 +4918,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 exit_check(dns_zone_t *zone) {
        REQUIRE(LOCKED_ZONE(zone));
 
@@ -4926,14 +4927,14 @@ exit_check(dns_zone_t *zone) {
                 * DNS_ZONEFLG_SHUTDOWN can only be set if erefs == 0.
                 */
                INSIST(isc_refcount_current(&zone->erefs) == 0);
-               return (ISC_TRUE);
+               return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-static isc_boolean_t
+static bool
 zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
-             dns_name_t *name, isc_boolean_t logit)
+             dns_name_t *name, bool logit)
 {
        isc_result_t result;
        char namebuf[DNS_NAME_FORMATSIZE];
@@ -4943,7 +4944,7 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
        int level;
 
        if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_NOCHECKNS))
-               return (ISC_TRUE);
+               return (true);
 
        if (zone->type == dns_zone_master)
                level = ISC_LOG_ERROR;
@@ -4955,13 +4956,13 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
        result = dns_db_find(db, name, version, dns_rdatatype_a,
                             0, 0, NULL, foundname, NULL, NULL);
        if (result == ISC_R_SUCCESS)
-               return (ISC_TRUE);
+               return (true);
 
        if (result == DNS_R_NXRRSET) {
                result = dns_db_find(db, name, version, dns_rdatatype_aaaa,
                                     0, 0, NULL, foundname, NULL, NULL);
                if (result == ISC_R_SUCCESS)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
        if (result == DNS_R_NXRRSET || result == DNS_R_NXDOMAIN ||
@@ -4971,7 +4972,7 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
                        dns_zone_log(zone, level, "NS '%s' has no address "
                                     "records (A or AAAA)", namebuf);
                }
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (result == DNS_R_CNAME) {
@@ -4980,7 +4981,7 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
                        dns_zone_log(zone, level, "NS '%s' is a CNAME "
                                     "(illegal)", namebuf);
                }
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (result == DNS_R_DNAME) {
@@ -4990,16 +4991,16 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
                        dns_zone_log(zone, level, "NS '%s' is below a DNAME "
                                     "'%s' (illegal)", namebuf, altbuf);
                }
-               return (ISC_FALSE);
+               return (false);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static isc_result_t
 zone_count_ns_rr(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node,
                 dns_dbversion_t *version, unsigned int *nscount,
-                unsigned int *errors, isc_boolean_t logit)
+                unsigned int *errors, bool logit)
 {
        isc_result_t result;
        unsigned int count = 0;
@@ -5179,7 +5180,7 @@ zone_get_from_db(dns_zone_t *zone, dns_db_t *db, unsigned int *nscount,
                *errors = 0;
 
        node = NULL;
-       result = dns_db_findnode(db, &zone->origin, ISC_FALSE, &node);
+       result = dns_db_findnode(db, &zone->origin, false, &node);
        if (result != ISC_R_SUCCESS) {
                answer = result;
                goto closeversion;
@@ -5187,7 +5188,7 @@ zone_get_from_db(dns_zone_t *zone, dns_db_t *db, unsigned int *nscount,
 
        if (nscount != NULL || errors != NULL) {
                result = zone_count_ns_rr(zone, db, node, version,
-                                         nscount, errors, ISC_TRUE);
+                                         nscount, errors, true);
                if (result != ISC_R_SUCCESS)
                        answer = result;
        }
@@ -5203,7 +5204,7 @@ zone_get_from_db(dns_zone_t *zone, dns_db_t *db, unsigned int *nscount,
 
        dns_db_detachnode(db, &node);
  closeversion:
-       dns_db_closeversion(db, &version, ISC_FALSE);
+       dns_db_closeversion(db, &version, false);
 
        return (answer);
 }
@@ -5222,7 +5223,7 @@ dns_zone_detach(dns_zone_t **zonep) {
        dns_zone_t *raw = NULL;
        dns_zone_t *secure = NULL;
        unsigned int refs;
-       isc_boolean_t free_now = ISC_FALSE;
+       bool free_now = false;
 
        REQUIRE(zonep != NULL && DNS_ZONE_VALID(*zonep));
 
@@ -5258,7 +5259,7 @@ dns_zone_detach(dns_zone_t **zonep) {
                         * with the view already locked.
                         */
                        INSIST(zone->view == NULL);
-                       free_now = ISC_TRUE;
+                       free_now = true;
                        raw = zone->raw;
                        zone->raw = NULL;
                        secure = zone->secure;
@@ -5320,7 +5321,7 @@ zone_idetach(dns_zone_t **zonep) {
 void
 dns_zone_idetach(dns_zone_t **zonep) {
        dns_zone_t *zone;
-       isc_boolean_t free_needed;
+       bool free_needed;
 
        REQUIRE(zonep != NULL && DNS_ZONE_VALID(*zonep));
        zone = *zonep;
@@ -5350,7 +5351,7 @@ dns_zone_getmgr(dns_zone_t *zone) {
 }
 
 void
-dns_zone_setflag(dns_zone_t *zone, unsigned int flags, isc_boolean_t value) {
+dns_zone_setflag(dns_zone_t *zone, unsigned int flags, bool value) {
        REQUIRE(DNS_ZONE_VALID(zone));
 
        LOCK_ZONE(zone);
@@ -5363,7 +5364,7 @@ dns_zone_setflag(dns_zone_t *zone, unsigned int flags, isc_boolean_t value) {
 
 void
 dns_zone_setoption(dns_zone_t *zone, unsigned int option,
-                  isc_boolean_t value)
+                  bool value)
 {
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -5377,7 +5378,7 @@ dns_zone_setoption(dns_zone_t *zone, unsigned int option,
 
 void
 dns_zone_setoption2(dns_zone_t *zone, unsigned int option,
-                   isc_boolean_t value)
+                   bool value)
 {
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -5404,7 +5405,7 @@ dns_zone_getoptions2(dns_zone_t *zone) {
 }
 
 void
-dns_zone_setkeyopt(dns_zone_t *zone, unsigned int keyopt, isc_boolean_t value)
+dns_zone_setkeyopt(dns_zone_t *zone, unsigned int keyopt, bool value)
 {
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -5615,7 +5616,7 @@ dns_zone_getnotifysrc6(dns_zone_t *zone) {
        return (&zone->notifysrc6);
 }
 
-static isc_boolean_t
+static bool
 same_addrs(isc_sockaddr_t const *oldlist, isc_sockaddr_t const *newlist,
           uint32_t count)
 {
@@ -5623,29 +5624,29 @@ same_addrs(isc_sockaddr_t const *oldlist, isc_sockaddr_t const *newlist,
 
        for (i = 0; i < count; i++)
                if (!isc_sockaddr_equal(&oldlist[i], &newlist[i]))
-                       return (ISC_FALSE);
-       return (ISC_TRUE);
+                       return (false);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 same_keynames(dns_name_t * const *oldlist, dns_name_t * const *newlist,
              uint32_t count)
 {
        unsigned int i;
 
        if (oldlist == NULL && newlist == NULL)
-               return (ISC_TRUE);
+               return (true);
        if (oldlist == NULL || newlist == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        for (i = 0; i < count; i++) {
                if (oldlist[i] == NULL && newlist[i] == NULL)
                        continue;
                if (oldlist[i] == NULL || newlist[i] == NULL ||
                    !dns_name_equal(oldlist[i], newlist[i]))
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -5870,7 +5871,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone,
        isc_sockaddr_t *newaddrs = NULL;
        isc_dscp_t *newdscps = NULL;
        dns_name_t **newnames = NULL;
-       isc_boolean_t *newok;
+       bool *newok;
        unsigned int i;
 
        REQUIRE(DNS_ZONE_VALID(zone));
@@ -5900,7 +5901,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone,
         */
        if (zone->mastersok != NULL) {
                isc_mem_put(zone->mctx, zone->mastersok,
-                           zone->masterscnt * sizeof(isc_boolean_t));
+                           zone->masterscnt * sizeof(bool));
                zone->mastersok = NULL;
        }
        clear_addresskeylist(&zone->masters, &zone->masterdscps,
@@ -5923,7 +5924,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone,
                goto unlock;
        };
        for (i = 0; i < count; i++)
-               newok[i] = ISC_FALSE;
+               newok[i] = false;
 
        /*
         * Now set up the masters and masterkey lists
@@ -5996,9 +5997,9 @@ dns_zone_maintenance(dns_zone_t *zone) {
        UNLOCK_ZONE(zone);
 }
 
-static inline isc_boolean_t
+static inline bool
 was_dumping(dns_zone_t *zone) {
-       isc_boolean_t dumping;
+       bool dumping;
 
        REQUIRE(LOCKED_ZONE(zone));
 
@@ -6026,7 +6027,7 @@ dns__zone_findkeys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
        dns_dbnode_t *node = NULL;
        const char *directory = dns_zone_getkeydirectory(zone);
 
-       CHECK(dns_db_findnode(db, dns_db_origin(db), ISC_FALSE, &node));
+       CHECK(dns_db_findnode(db, dns_db_origin(db), false, &node));
        memset(keys, 0, sizeof(*keys) * maxkeys);
        result = dns_dnssec_findzonekeys3(db, ver, node, dns_db_origin(db),
                                          directory, now, mctx, maxkeys, keys,
@@ -6054,7 +6055,7 @@ offline(dns_db_t *db, dns_dbversion_t *ver, dns__zonediff_t *zonediff,
        rdata->flags |= DNS_RDATA_OFFLINE;
        result = update_one_rr(db, ver, zonediff->diff, DNS_DIFFOP_ADDRESIGN,
                               name, ttl, rdata);
-       zonediff->offline = ISC_TRUE;
+       zonediff->offline = true;
        return (result);
 }
 
@@ -6093,39 +6094,39 @@ set_key_expiry_warning(dns_zone_t *zone, isc_stdtime_t when, isc_stdtime_t now)
  * Helper function to del_sigs(). We don't want to delete RRSIGs that
  * have no new key.
  */
-static isc_boolean_t
+static bool
 delsig_ok(dns_rdata_rrsig_t *rrsig_ptr, dst_key_t **keys, unsigned int nkeys,
-         isc_boolean_t *warn)
+         bool *warn)
 {
        unsigned int i = 0;
-       isc_boolean_t have_ksk = ISC_FALSE, have_zsk = ISC_FALSE;
-       isc_boolean_t have_pksk = ISC_FALSE, have_pzsk = ISC_FALSE;
+       bool have_ksk = false, have_zsk = false;
+       bool have_pksk = false, have_pzsk = false;
 
        for (i = 0; i < nkeys; i++) {
                if (rrsig_ptr->algorithm != dst_key_alg(keys[i]))
                        continue;
                if (dst_key_isprivate(keys[i])) {
                        if (KSK(keys[i]))
-                               have_ksk = have_pksk = ISC_TRUE;
+                               have_ksk = have_pksk = true;
                        else
-                               have_zsk = have_pzsk = ISC_TRUE;
+                               have_zsk = have_pzsk = true;
                } else {
                        if (KSK(keys[i]))
-                               have_ksk = ISC_TRUE;
+                               have_ksk = true;
                        else
-                               have_zsk = ISC_TRUE;
+                               have_zsk = true;
                }
        }
 
        if (have_zsk && have_ksk && !have_pzsk)
-               *warn = ISC_TRUE;
+               *warn = true;
 
        /*
         * It's okay to delete a signature if there is an active key
         * with the same algorithm to replace it.
         */
        if (have_pksk || have_pzsk)
-               return (ISC_TRUE);
+               return (true);
 
        /*
         * Failing that, it is *not* okay to delete a signature
@@ -6134,13 +6135,13 @@ delsig_ok(dns_rdata_rrsig_t *rrsig_ptr, dst_key_t **keys, unsigned int nkeys,
        for (i = 0; i < nkeys; i++) {
                if ((rrsig_ptr->algorithm == dst_key_alg(keys[i])) &&
                    (rrsig_ptr->keyid == dst_key_id(keys[i])))
-                       return (ISC_FALSE);
+                       return (false);
        }
 
        /*
         * But if the key is gone, then go ahead.
         */
-       return (ISC_TRUE);
+       return (true);
 }
 
 /*
@@ -6150,22 +6151,22 @@ delsig_ok(dns_rdata_rrsig_t *rrsig_ptr, dst_key_t **keys, unsigned int nkeys,
 static isc_result_t
 del_sigs(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
         dns_rdatatype_t type, dns__zonediff_t *zonediff, dst_key_t **keys,
-        unsigned int nkeys, isc_stdtime_t now, isc_boolean_t incremental)
+        unsigned int nkeys, isc_stdtime_t now, bool incremental)
 {
        isc_result_t result;
        dns_dbnode_t *node = NULL;
        dns_rdataset_t rdataset;
        unsigned int i;
        dns_rdata_rrsig_t rrsig;
-       isc_boolean_t found;
+       bool found;
        int64_t timewarn = 0, timemaybe = 0;
 
        dns_rdataset_init(&rdataset);
 
        if (type == dns_rdatatype_nsec3)
-               result = dns_db_findnsec3node(db, name, ISC_FALSE, &node);
+               result = dns_db_findnsec3node(db, name, false, &node);
        else
-               result = dns_db_findnode(db, name, ISC_FALSE, &node);
+               result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -6193,14 +6194,14 @@ del_sigs(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
                if (type != dns_rdatatype_dnskey) {
-                       isc_boolean_t warn = ISC_FALSE, deleted = ISC_FALSE;
+                       bool warn = false, deleted = false;
                        if (delsig_ok(&rrsig, keys, nkeys, &warn)) {
                                result = update_one_rr(db, ver, zonediff->diff,
                                               DNS_DIFFOP_DELRESIGN, name,
                                               rdataset.ttl, &rdata);
                                if (result != ISC_R_SUCCESS)
                                        break;
-                               deleted = ISC_TRUE;
+                               deleted = true;
                        }
                        if (warn) {
                                /*
@@ -6249,11 +6250,11 @@ del_sigs(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                /*
                 * RRSIG(DNSKEY) requires special processing.
                 */
-               found = ISC_FALSE;
+               found = false;
                for (i = 0; i < nkeys; i++) {
                        if (rrsig.algorithm == dst_key_alg(keys[i]) &&
                            rrsig.keyid == dst_key_id(keys[i])) {
-                               found = ISC_TRUE;
+                               found = true;
                                /*
                                 * Mark offline RRSIG(DNSKEY).
                                 * We want the earliest offline expire time
@@ -6329,8 +6330,8 @@ static isc_result_t
 add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
         dns_rdatatype_t type, dns_diff_t *diff, dst_key_t **keys,
         unsigned int nkeys, isc_mem_t *mctx, isc_stdtime_t inception,
-        isc_stdtime_t expire, isc_boolean_t check_ksk,
-        isc_boolean_t keyset_kskonly)
+        isc_stdtime_t expire, bool check_ksk,
+        bool keyset_kskonly)
 {
        isc_result_t result;
        dns_dbnode_t *node = NULL;
@@ -6344,9 +6345,9 @@ add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        isc_buffer_init(&buffer, data, sizeof(data));
 
        if (type == dns_rdatatype_nsec3)
-               result = dns_db_findnsec3node(db, name, ISC_FALSE, &node);
+               result = dns_db_findnsec3node(db, name, false, &node);
        else
-               result = dns_db_findnode(db, name, ISC_FALSE, &node);
+               result = dns_db_findnode(db, name, false, &node);
        if (result == ISC_R_NOTFOUND)
                return (ISC_R_SUCCESS);
        if (result != ISC_R_SUCCESS)
@@ -6364,7 +6365,7 @@ add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        }
 
        for (i = 0; i < nkeys; i++) {
-               isc_boolean_t both = ISC_FALSE;
+               bool both = false;
 
                if (!dst_key_isprivate(keys[i]))
                        continue;
@@ -6372,13 +6373,13 @@ add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                        continue;
 
                if (check_ksk && !REVOKE(keys[i])) {
-                       isc_boolean_t have_ksk, have_nonksk;
+                       bool have_ksk, have_nonksk;
                        if (KSK(keys[i])) {
-                               have_ksk = ISC_TRUE;
-                               have_nonksk = ISC_FALSE;
+                               have_ksk = true;
+                               have_nonksk = false;
                        } else {
-                               have_ksk = ISC_FALSE;
-                               have_nonksk = ISC_TRUE;
+                               have_ksk = false;
+                               have_nonksk = true;
                        }
                        for (j = 0; j < nkeys; j++) {
                                if (j == i || ALG(keys[i]) != ALG(keys[j]))
@@ -6390,9 +6391,9 @@ add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                                if (REVOKE(keys[j]))
                                        continue;
                                if (KSK(keys[j]))
-                                       have_ksk = ISC_TRUE;
+                                       have_ksk = true;
                                else
-                                       have_nonksk = ISC_TRUE;
+                                       have_nonksk = true;
                                both = have_ksk && have_nonksk;
                                if (both)
                                        break;
@@ -6440,7 +6441,7 @@ zone_resigninc(dns_zone_t *zone) {
        dns_rdataset_t rdataset;
        dns_rdatatype_t covers;
        dst_key_t *zone_keys[DNS_MAXZONEKEYS];
-       isc_boolean_t check_ksk, keyset_kskonly = ISC_FALSE;
+       bool check_ksk, keyset_kskonly = false;
        isc_result_t result;
        isc_stdtime_t now, inception, soaexpire, expire, stop;
        uint32_t jitter, sigvalidityinterval;
@@ -6537,7 +6538,7 @@ zone_resigninc(dns_zone_t *zone) {
                        break;
 
                result = del_sigs(zone, db, version, name, covers, &zonediff,
-                                 zone_keys, nkeys, now, ISC_TRUE);
+                                 zone_keys, nkeys, now, true);
                if (result != ISC_R_SUCCESS) {
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "zone_resigninc:del_sigs -> %s",
@@ -6569,7 +6570,7 @@ zone_resigninc(dns_zone_t *zone) {
                goto failure;
 
        result = del_sigs(zone, db, version, &zone->origin, dns_rdatatype_soa,
-                         &zonediff, zone_keys, nkeys, now, ISC_TRUE);
+                         &zonediff, zone_keys, nkeys, now, true);
        if (result != ISC_R_SUCCESS) {
                dns_zone_log(zone, ISC_LOG_ERROR,
                             "zone_resigninc:del_sigs -> %s",
@@ -6585,7 +6586,7 @@ zone_resigninc(dns_zone_t *zone) {
                 * Commit the changes if any key has been marked as offline.
                 */
                if (zonediff.offline)
-                       dns_db_closeversion(db, &version, ISC_TRUE);
+                       dns_db_closeversion(db, &version, true);
                goto failure;
        }
 
@@ -6617,14 +6618,14 @@ zone_resigninc(dns_zone_t *zone) {
        CHECK(zone_journal(zone, zonediff.diff, NULL, "zone_resigninc"));
 
        /* Everything has succeeded. Commit the changes. */
-       dns_db_closeversion(db, &version, ISC_TRUE);
+       dns_db_closeversion(db, &version, true);
 
  failure:
        dns_diff_clear(&_sig_diff);
        for (i = 0; i < nkeys; i++)
                dst_key_free(&zone_keys[i]);
        if (version != NULL) {
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
                dns_db_detach(&db);
        } else if (db != NULL)
                dns_db_detach(&db);
@@ -6648,7 +6649,7 @@ zone_resigninc(dns_zone_t *zone) {
 
 static isc_result_t
 next_active(dns_db_t *db, dns_dbversion_t *version, dns_name_t *oldname,
-           dns_name_t *newname, isc_boolean_t bottom)
+           dns_name_t *newname, bool bottom)
 {
        isc_result_t result;
        dns_dbiterator_t *dbit = NULL;
@@ -6685,7 +6686,7 @@ next_active(dns_db_t *db, dns_dbversion_t *version, dns_name_t *oldname,
        return (result);
 }
 
-static isc_boolean_t
+static bool
 signed_with_key(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                dns_rdatatype_t type, dst_key_t *key)
 {
@@ -6699,7 +6700,7 @@ signed_with_key(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                                     type, 0, &rdataset, NULL);
        if (result != ISC_R_SUCCESS) {
                INSIST(!dns_rdataset_isassociated(&rdataset));
-               return (ISC_FALSE);
+               return (false);
        }
        for (result = dns_rdataset_first(&rdataset);
             result == ISC_R_SUCCESS;
@@ -6710,17 +6711,17 @@ signed_with_key(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
                if (rrsig.algorithm == dst_key_alg(key) &&
                    rrsig.keyid == dst_key_id(key)) {
                        dns_rdataset_disassociate(&rdataset);
-                       return (ISC_TRUE);
+                       return (true);
                }
                dns_rdata_reset(&rdata);
        }
        dns_rdataset_disassociate(&rdataset);
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
 add_nsec(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
-        dns_dbnode_t *node, dns_ttl_t ttl, isc_boolean_t bottom,
+        dns_dbnode_t *node, dns_ttl_t ttl, bool bottom,
         dns_diff_t *diff)
 {
        dns_fixedname_t fixed;
@@ -6742,11 +6743,11 @@ add_nsec(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
 static isc_result_t
 sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
-           dns_dbversion_t *version, isc_boolean_t build_nsec3,
-           isc_boolean_t build_nsec, dst_key_t *key,
+           dns_dbversion_t *version, bool build_nsec3,
+           bool build_nsec, dst_key_t *key,
            isc_stdtime_t inception, isc_stdtime_t expire,
-           unsigned int minimum, isc_boolean_t is_ksk,
-           isc_boolean_t keyset_kskonly, isc_boolean_t *delegation,
+           unsigned int minimum, bool is_ksk,
+           bool keyset_kskonly, bool *delegation,
            dns_diff_t *diff, int32_t *signatures, isc_mem_t *mctx)
 {
        isc_result_t result;
@@ -6755,9 +6756,9 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
        dns_rdata_t rdata = DNS_RDATA_INIT;
        isc_buffer_t buffer;
        unsigned char data[1024];
-       isc_boolean_t seen_soa, seen_ns, seen_rr, seen_dname, seen_nsec,
+       bool seen_soa, seen_ns, seen_rr, seen_dname, seen_nsec,
                      seen_nsec3, seen_ds;
-       isc_boolean_t bottom;
+       bool bottom;
 
        result = dns_db_allrdatasets(db, node, version, 0, &iterator);
        if (result != ISC_R_SUCCESS) {
@@ -6769,37 +6770,37 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
        dns_rdataset_init(&rdataset);
        isc_buffer_init(&buffer, data, sizeof(data));
        seen_rr = seen_soa = seen_ns = seen_dname = seen_nsec =
-       seen_nsec3 = seen_ds = ISC_FALSE;
+       seen_nsec3 = seen_ds = false;
        for (result = dns_rdatasetiter_first(iterator);
             result == ISC_R_SUCCESS;
             result = dns_rdatasetiter_next(iterator)) {
                dns_rdatasetiter_current(iterator, &rdataset);
                if (rdataset.type == dns_rdatatype_soa)
-                       seen_soa = ISC_TRUE;
+                       seen_soa = true;
                else if (rdataset.type == dns_rdatatype_ns)
-                       seen_ns = ISC_TRUE;
+                       seen_ns = true;
                else if (rdataset.type == dns_rdatatype_ds)
-                       seen_ds = ISC_TRUE;
+                       seen_ds = true;
                else if (rdataset.type == dns_rdatatype_dname)
-                       seen_dname = ISC_TRUE;
+                       seen_dname = true;
                else if (rdataset.type == dns_rdatatype_nsec)
-                       seen_nsec = ISC_TRUE;
+                       seen_nsec = true;
                else if (rdataset.type == dns_rdatatype_nsec3)
-                       seen_nsec3 = ISC_TRUE;
+                       seen_nsec3 = true;
                if (rdataset.type != dns_rdatatype_rrsig)
-                       seen_rr = ISC_TRUE;
+                       seen_rr = true;
                dns_rdataset_disassociate(&rdataset);
        }
        if (result != ISC_R_NOMORE)
                goto failure;
        if (seen_ns && !seen_soa)
-               *delegation = ISC_TRUE;
+               *delegation = true;
        /*
         * Going from insecure to NSEC3.
         * Don't generate NSEC3 records for NSEC3 records.
         */
        if (build_nsec3 && !seen_nsec3 && seen_rr) {
-               isc_boolean_t unsecure = !seen_ds && seen_ns && !seen_soa;
+               bool unsecure = !seen_ds && seen_ns && !seen_soa;
                CHECK(dns_nsec3_addnsec3s(db, version, name, minimum,
                                          unsecure, diff));
                (*signatures)--;
@@ -6861,7 +6862,7 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
        if (result == ISC_R_NOMORE)
                result = ISC_R_SUCCESS;
        if (seen_dname)
-               *delegation = ISC_TRUE;
+               *delegation = true;
  failure:
        if (dns_rdataset_isassociated(&rdataset))
                dns_rdataset_disassociate(&rdataset);
@@ -6875,7 +6876,7 @@ sign_a_node(dns_db_t *db, dns_name_t *name, dns_dbnode_t *node,
  */
 static isc_result_t
 updatesecure(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
-            dns_ttl_t minimum, isc_boolean_t update_only, dns_diff_t *diff)
+            dns_ttl_t minimum, bool update_only, dns_diff_t *diff)
 {
        isc_result_t result;
        dns_rdataset_t rdataset;
@@ -6896,7 +6897,7 @@ updatesecure(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
                        goto failure;
        }
        CHECK(delete_nsec(db, version, node, name, diff));
-       CHECK(add_nsec(db, version, name, node, minimum, ISC_FALSE, diff));
+       CHECK(add_nsec(db, version, name, node, minimum, false, diff));
  success:
        result = ISC_R_SUCCESS;
  failure:
@@ -6907,7 +6908,7 @@ updatesecure(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
 
 static isc_result_t
 updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
-                 dns_dbversion_t *version, isc_boolean_t build_nsec3,
+                 dns_dbversion_t *version, bool build_nsec3,
                  dns_ttl_t minimum, dns_diff_t *diff)
 {
        isc_result_t result;
@@ -6915,8 +6916,8 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
        dns_rdataset_t rdataset;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        unsigned char data[5];
-       isc_boolean_t seen_done = ISC_FALSE;
-       isc_boolean_t have_rr = ISC_FALSE;
+       bool seen_done = false;
+       bool have_rr = false;
 
        dns_rdataset_init(&rdataset);
        result = dns_db_getoriginnode(signing->db, &node);
@@ -6946,7 +6947,7 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
                    rdata.data[0] != signing->algorithm ||
                    rdata.data[1] != ((signing->keyid >> 8) & 0xff) ||
                    rdata.data[2] != (signing->keyid & 0xff)) {
-                       have_rr = ISC_TRUE;
+                       have_rr = true;
                        dns_rdata_reset(&rdata);
                        continue;
                }
@@ -6962,8 +6963,8 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
                 * nameserver re-start.
                 */
                if (!signing->deleteit && rdata.data[4] != 0) {
-                       seen_done = ISC_TRUE;
-                       have_rr = ISC_TRUE;
+                       seen_done = true;
+                       have_rr = true;
                } else
                        CHECK(update_one_rr(signing->db, version, diff,
                                            DNS_DIFFOP_DEL, &zone->origin,
@@ -6997,9 +6998,9 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
                 */
                if (build_nsec3)
                        CHECK(dns_nsec3_addnsec3s(signing->db, version, origin,
-                                                 minimum, ISC_FALSE, diff));
+                                                 minimum, false, diff));
                CHECK(updatesecure(signing->db, version, origin, minimum,
-                                  ISC_TRUE, diff));
+                                  true, diff));
        }
 
  failure:
@@ -7015,7 +7016,7 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
  * processing status of given NSEC3 chain:
  *
  *   - If the supplied dns_nsec3chain_t structure has been fully processed
- *     (which is indicated by "active" being set to ISC_FALSE):
+ *     (which is indicated by "active" being set to false):
  *
  *       - remove all NSEC3PARAM records matching the relevant NSEC3 chain,
  *
@@ -7023,7 +7024,7 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
  *         the relevant NSEC3 chain.
  *
  *   - If the supplied dns_nsec3chain_t structure has not been fully processed
- *     (which is indicated by "active" being set to ISC_TRUE), only remove the
+ *     (which is indicated by "active" being set to true), only remove the
  *     NSEC3PARAM record which matches the relevant NSEC3 chain and has the
  *     "flags" field set to 0.
  *
@@ -7036,7 +7037,7 @@ updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
  */
 static isc_result_t
 fixup_nsec3param(dns_db_t *db, dns_dbversion_t *ver, dns_nsec3chain_t *chain,
-                isc_boolean_t active, dns_rdatatype_t privatetype,
+                bool active, dns_rdatatype_t privatetype,
                 dns_diff_t *diff)
 {
        dns_dbnode_t *node = NULL;
@@ -7048,7 +7049,7 @@ fixup_nsec3param(dns_db_t *db, dns_dbversion_t *ver, dns_nsec3chain_t *chain,
        isc_buffer_t buffer;
        unsigned char parambuf[DNS_NSEC3PARAM_BUFFERSIZE];
        dns_ttl_t ttl = 0;
-       isc_boolean_t nseconly = ISC_FALSE, nsec3ok = ISC_FALSE;
+       bool nseconly = false, nsec3ok = false;
 
        dns_rdataset_init(&rdataset);
 
@@ -7243,7 +7244,7 @@ deletematchingnsec3(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node,
 static isc_result_t
 need_nsec_chain(dns_db_t *db, dns_dbversion_t *ver,
                const dns_rdata_nsec3param_t *param,
-               isc_boolean_t *answer)
+               bool *answer)
 {
        dns_dbnode_t *node = NULL;
        dns_rdata_t rdata = DNS_RDATA_INIT;
@@ -7251,7 +7252,7 @@ need_nsec_chain(dns_db_t *db, dns_dbversion_t *ver,
        dns_rdataset_t rdataset;
        isc_result_t result;
 
-       *answer = ISC_FALSE;
+       *answer = false;
 
        result = dns_db_getoriginnode(db, &node);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
@@ -7273,7 +7274,7 @@ need_nsec_chain(dns_db_t *db, dns_dbversion_t *ver,
        result = dns_db_findrdataset(db, node, ver, dns_rdatatype_nsec3param,
                                     0, 0, &rdataset, NULL);
        if (result == ISC_R_NOTFOUND) {
-               *answer = ISC_TRUE;
+               *answer = true;
                dns_db_detachnode(db, &node);
                return (ISC_R_SUCCESS);
        }
@@ -7307,7 +7308,7 @@ need_nsec_chain(dns_db_t *db, dns_dbversion_t *ver,
                break;
        }
        if (result == ISC_R_NOMORE) {
-               *answer = ISC_TRUE;
+               *answer = true;
                result = ISC_R_SUCCESS;
        }
 
@@ -7328,7 +7329,7 @@ dns__zone_updatesigs(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *version,
                     dst_key_t *zone_keys[], unsigned int nkeys,
                     dns_zone_t *zone, isc_stdtime_t inception,
                     isc_stdtime_t expire, isc_stdtime_t now,
-                    isc_boolean_t check_ksk, isc_boolean_t keyset_kskonly,
+                    bool check_ksk, bool keyset_kskonly,
                     dns__zonediff_t *zonediff)
 {
        dns_difftuple_t *tuple;
@@ -7339,7 +7340,7 @@ dns__zone_updatesigs(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *version,
             tuple = ISC_LIST_HEAD(diff->tuples)) {
                result = del_sigs(zone, db, version, &tuple->name,
                                  tuple->rdata.type, zonediff,
-                                 zone_keys, nkeys, now, ISC_FALSE);
+                                 zone_keys, nkeys, now, false);
                if (result != ISC_R_SUCCESS) {
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "dns__zone_updatesigs:del_sigs -> %s",
@@ -7395,21 +7396,21 @@ zone_nsec3chain(dns_zone_t *zone) {
        dns_nsec3chainlist_t cleanup;
        dst_key_t *zone_keys[DNS_MAXZONEKEYS];
        int32_t signatures;
-       isc_boolean_t check_ksk, keyset_kskonly;
-       isc_boolean_t delegation;
-       isc_boolean_t first;
+       bool check_ksk, keyset_kskonly;
+       bool delegation;
+       bool first;
        isc_result_t result;
        isc_stdtime_t now, inception, soaexpire, expire;
        uint32_t jitter, sigvalidityinterval;
        unsigned int i;
        unsigned int nkeys = 0;
        uint32_t nodes;
-       isc_boolean_t unsecure = ISC_FALSE;
-       isc_boolean_t seen_soa, seen_ns, seen_dname, seen_ds;
-       isc_boolean_t seen_nsec, seen_nsec3, seen_rr;
+       bool unsecure = false;
+       bool seen_soa, seen_ns, seen_dname, seen_ds;
+       bool seen_nsec, seen_nsec3, seen_rr;
        dns_rdatasetiter_t *iterator = NULL;
-       isc_boolean_t buildnsecchain;
-       isc_boolean_t updatensec = ISC_FALSE;
+       bool buildnsecchain;
+       bool updatensec = false;
        dns_rdatatype_t privatetype = zone->privatetype;
 
        ENTER;
@@ -7503,7 +7504,7 @@ zone_nsec3chain(dns_zone_t *zone) {
        LOCK_ZONE(zone);
        nsec3chain = ISC_LIST_HEAD(zone->nsec3chain);
        UNLOCK_ZONE(zone);
-       first = ISC_TRUE;
+       first = true;
 
        if (nsec3chain != NULL)
                nsec3chain->save_delete_nsec = nsec3chain->delete_nsec;
@@ -7556,7 +7557,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                dns_dbiterator_current(nsec3chain->dbiterator, &node, name);
 
                if (nsec3chain->delete_nsec) {
-                       delegation = ISC_FALSE;
+                       delegation = false;
                        dns_dbiterator_pause(nsec3chain->dbiterator);
                        CHECK(delete_nsec(db, version, node, name, &nsec_diff));
                        goto next_addnode;
@@ -7565,8 +7566,8 @@ zone_nsec3chain(dns_zone_t *zone) {
                 * On the first pass we need to check if the current node
                 * has not been obscured.
                 */
-               delegation = ISC_FALSE;
-               unsecure = ISC_FALSE;
+               delegation = false;
+               unsecure = false;
                if (first) {
                        dns_fixedname_t ffound;
                        dns_name_t *found;
@@ -7583,7 +7584,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                 * we skip all obscured names.
                                 */
                                dns_name_copy(found, name, NULL);
-                               delegation = ISC_TRUE;
+                               delegation = true;
                                goto next_addnode;
                        }
                }
@@ -7598,22 +7599,22 @@ zone_nsec3chain(dns_zone_t *zone) {
                        goto failure;
 
                seen_soa = seen_ns = seen_dname = seen_ds = seen_nsec =
-                       ISC_FALSE;
+                       false;
                for (result = dns_rdatasetiter_first(iterator);
                     result == ISC_R_SUCCESS;
                     result = dns_rdatasetiter_next(iterator)) {
                        dns_rdatasetiter_current(iterator, &rdataset);
                        INSIST(rdataset.type != dns_rdatatype_nsec3);
                        if (rdataset.type == dns_rdatatype_soa)
-                               seen_soa = ISC_TRUE;
+                               seen_soa = true;
                        else if (rdataset.type == dns_rdatatype_ns)
-                               seen_ns = ISC_TRUE;
+                               seen_ns = true;
                        else if (rdataset.type == dns_rdatatype_dname)
-                               seen_dname = ISC_TRUE;
+                               seen_dname = true;
                        else if (rdataset.type == dns_rdatatype_ds)
-                               seen_ds = ISC_TRUE;
+                               seen_ds = true;
                        else if (rdataset.type == dns_rdatatype_nsec)
-                               seen_nsec = ISC_TRUE;
+                               seen_nsec = true;
                        dns_rdataset_disassociate(&rdataset);
                }
                dns_rdatasetiter_destroy(&iterator);
@@ -7621,11 +7622,11 @@ zone_nsec3chain(dns_zone_t *zone) {
                 * Is there a NSEC chain than needs to be cleaned up?
                 */
                if (seen_nsec)
-                       nsec3chain->seen_nsec = ISC_TRUE;
+                       nsec3chain->seen_nsec = true;
                if (seen_ns && !seen_soa && !seen_ds)
-                       unsecure = ISC_TRUE;
+                       unsecure = true;
                if ((seen_ns && !seen_soa) || seen_dname)
-                       delegation = ISC_TRUE;
+                       delegation = true;
 
                /*
                 * Process one node.
@@ -7656,7 +7657,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                 * Go onto next node.
                 */
  next_addnode:
-               first = ISC_FALSE;
+               first = false;
                dns_db_detachnode(db, &node);
                do {
                        result = dns_dbiterator_next(nsec3chain->dbiterator);
@@ -7664,7 +7665,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                        if (result == ISC_R_NOMORE && nsec3chain->delete_nsec) {
                                dns_dbiterator_pause(nsec3chain->dbiterator);
                                CHECK(fixup_nsec3param(db, version, nsec3chain,
-                                                      ISC_FALSE, privatetype,
+                                                      false, privatetype,
                                                       &param_diff));
                                LOCK_ZONE(zone);
                                ISC_LIST_UNLINK(zone->nsec3chain, nsec3chain,
@@ -7678,14 +7679,14 @@ zone_nsec3chain(dns_zone_t *zone) {
                                if (nsec3chain->seen_nsec) {
                                        CHECK(fixup_nsec3param(db, version,
                                                               nsec3chain,
-                                                              ISC_TRUE,
+                                                              true,
                                                               privatetype,
                                                               &param_diff));
-                                       nsec3chain->delete_nsec = ISC_TRUE;
+                                       nsec3chain->delete_nsec = true;
                                        goto same_addchain;
                                }
                                CHECK(fixup_nsec3param(db, version, nsec3chain,
-                                                      ISC_FALSE, privatetype,
+                                                      false, privatetype,
                                                       &param_diff));
                                LOCK_ZONE(zone);
                                ISC_LIST_UNLINK(zone->nsec3chain, nsec3chain,
@@ -7712,13 +7713,13 @@ zone_nsec3chain(dns_zone_t *zone) {
 
  same_addchain:
                CHECK(dns_dbiterator_first(nsec3chain->dbiterator));
-               first = ISC_TRUE;
+               first = true;
                continue;
 
  next_addchain:
                dns_dbiterator_pause(nsec3chain->dbiterator);
                nsec3chain = nextnsec3chain;
-               first = ISC_TRUE;
+               first = true;
                if (nsec3chain != NULL)
                        nsec3chain->save_delete_nsec = nsec3chain->delete_nsec;
        }
@@ -7742,8 +7743,8 @@ zone_nsec3chain(dns_zone_t *zone) {
        LOCK_ZONE(zone);
        nsec3chain = ISC_LIST_HEAD(zone->nsec3chain);
        UNLOCK_ZONE(zone);
-       first = ISC_TRUE;
-       buildnsecchain = ISC_FALSE;
+       first = true;
+       buildnsecchain = false;
        while (nsec3chain != NULL && nodes-- > 0 && signatures > 0) {
                LOCK_ZONE(zone);
                nextnsec3chain = ISC_LIST_NEXT(nsec3chain, link);
@@ -7779,7 +7780,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                     "buildnsecchain = %u\n", buildnsecchain);
 
                dns_dbiterator_current(nsec3chain->dbiterator, &node, name);
-               delegation = ISC_FALSE;
+               delegation = false;
 
                if (!buildnsecchain) {
                        /*
@@ -7788,7 +7789,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                        if (first) {
                                result = fixup_nsec3param(db, version,
                                                          nsec3chain,
-                                                         ISC_TRUE, privatetype,
+                                                         true, privatetype,
                                                          &param_diff);
                                if (result != ISC_R_SUCCESS) {
                                        dns_zone_log(zone, ISC_LOG_ERROR,
@@ -7831,7 +7832,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                 * we skip all obscured names.
                                 */
                                dns_name_copy(found, name, NULL);
-                               delegation = ISC_TRUE;
+                               delegation = true;
                                goto next_removenode;
                        }
                }
@@ -7846,23 +7847,23 @@ zone_nsec3chain(dns_zone_t *zone) {
                        goto failure;
 
                seen_soa = seen_ns = seen_dname = seen_nsec3 = seen_nsec =
-                       seen_rr = ISC_FALSE;
+                       seen_rr = false;
                for (result = dns_rdatasetiter_first(iterator);
                     result == ISC_R_SUCCESS;
                     result = dns_rdatasetiter_next(iterator)) {
                        dns_rdatasetiter_current(iterator, &rdataset);
                        if (rdataset.type == dns_rdatatype_soa)
-                               seen_soa = ISC_TRUE;
+                               seen_soa = true;
                        else if (rdataset.type == dns_rdatatype_ns)
-                               seen_ns = ISC_TRUE;
+                               seen_ns = true;
                        else if (rdataset.type == dns_rdatatype_dname)
-                               seen_dname = ISC_TRUE;
+                               seen_dname = true;
                        else if (rdataset.type == dns_rdatatype_nsec)
-                               seen_nsec = ISC_TRUE;
+                               seen_nsec = true;
                        else if (rdataset.type == dns_rdatatype_nsec3)
-                               seen_nsec3 = ISC_TRUE;
+                               seen_nsec3 = true;
                        if (rdataset.type != dns_rdatatype_rrsig)
-                               seen_rr = ISC_TRUE;
+                               seen_rr = true;
                        dns_rdataset_disassociate(&rdataset);
                }
                dns_rdatasetiter_destroy(&iterator);
@@ -7870,7 +7871,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                if (!seen_rr || seen_nsec3 || seen_nsec)
                        goto next_removenode;
                if ((seen_ns && !seen_soa) || seen_dname)
-                       delegation = ISC_TRUE;
+                       delegation = true;
 
                /*
                 * Add a NSEC record except at the origin.
@@ -7883,7 +7884,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                }
 
  next_removenode:
-               first = ISC_FALSE;
+               first = false;
                dns_db_detachnode(db, &node);
                do {
                        result = dns_dbiterator_next(nsec3chain->dbiterator);
@@ -7892,7 +7893,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                 * The NSEC chain should now be built.
                                 * We can now remove the NSEC3 chain.
                                 */
-                               updatensec = ISC_TRUE;
+                               updatensec = true;
                                goto same_removechain;
                        }
                        if (result == ISC_R_NOMORE) {
@@ -7903,7 +7904,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                ISC_LIST_APPEND(cleanup, nsec3chain, link);
                                dns_dbiterator_pause(nsec3chain->dbiterator);
                                result = fixup_nsec3param(db, version,
-                                                         nsec3chain, ISC_FALSE,
+                                                         nsec3chain, false,
                                                          privatetype,
                                                          &param_diff);
                                if (result != ISC_R_SUCCESS) {
@@ -7933,14 +7934,14 @@ zone_nsec3chain(dns_zone_t *zone) {
 
  same_removechain:
                CHECK(dns_dbiterator_first(nsec3chain->dbiterator));
-               buildnsecchain = ISC_FALSE;
-               first = ISC_TRUE;
+               buildnsecchain = false;
+               first = true;
                continue;
 
  next_removechain:
                dns_dbiterator_pause(nsec3chain->dbiterator);
                nsec3chain = nextnsec3chain;
-               first = ISC_TRUE;
+               first = true;
        }
 
  skip_removals:
@@ -7948,8 +7949,8 @@ zone_nsec3chain(dns_zone_t *zone) {
         * We may need to update the NSEC/NSEC3 records for the zone apex.
         */
        if (!ISC_LIST_EMPTY(param_diff.tuples)) {
-               isc_boolean_t rebuild_nsec = ISC_FALSE,
-                             rebuild_nsec3 = ISC_FALSE;
+               bool rebuild_nsec = false,
+                             rebuild_nsec3 = false;
                result = dns_db_getoriginnode(db, &node);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                result = dns_db_allrdatasets(db, node, version, 0, &iterator);
@@ -7964,9 +7965,9 @@ zone_nsec3chain(dns_zone_t *zone) {
                     result = dns_rdatasetiter_next(iterator)) {
                        dns_rdatasetiter_current(iterator, &rdataset);
                        if (rdataset.type == dns_rdatatype_nsec)
-                               rebuild_nsec = ISC_TRUE;
+                               rebuild_nsec = true;
                        if (rdataset.type == dns_rdatatype_nsec3param)
-                               rebuild_nsec3 = ISC_TRUE;
+                               rebuild_nsec3 = true;
                        dns_rdataset_disassociate(&rdataset);
                }
                dns_rdatasetiter_destroy(&iterator);
@@ -7977,7 +7978,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                dns_dbiterator_pause(nsec3chain->dbiterator);
 
                        result = updatesecure(db, version, &zone->origin,
-                                             zone->minimum, ISC_TRUE,
+                                             zone->minimum, true,
                                              &nsec_diff);
                        if (result != ISC_R_SUCCESS) {
                                dns_zone_log(zone, ISC_LOG_ERROR,
@@ -7994,7 +7995,7 @@ zone_nsec3chain(dns_zone_t *zone) {
 
                        result = dns_nsec3_addnsec3s(db, version,
                                                     dns_db_origin(db),
-                                                    zone->minimum, ISC_FALSE,
+                                                    zone->minimum, false,
                                                     &nsec3_diff);
                        if (result != ISC_R_SUCCESS) {
                                dns_zone_log(zone, ISC_LOG_ERROR,
@@ -8037,7 +8038,7 @@ zone_nsec3chain(dns_zone_t *zone) {
 
        if (updatensec) {
                result = updatesecure(db, version, &zone->origin,
-                                     zone->minimum, ISC_FALSE, &nsec_diff);
+                                     zone->minimum, false, &nsec_diff);
                if (result != ISC_R_SUCCESS) {
                        dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
                                     "updatesecure -> %s",
@@ -8063,13 +8064,13 @@ zone_nsec3chain(dns_zone_t *zone) {
        if (ISC_LIST_EMPTY(zonediff.diff->tuples)) {
                /*
                 * No need to call dns_db_closeversion() here as it is
-                * called with commit = ISC_TRUE below.
+                * called with commit = true below.
                 */
                goto done;
        }
 
        result = del_sigs(zone, db, version, &zone->origin, dns_rdatatype_soa,
-                         &zonediff, zone_keys, nkeys, now, ISC_FALSE);
+                         &zonediff, zone_keys, nkeys, now, false);
        if (result != ISC_R_SUCCESS) {
                dns_zone_log(zone, ISC_LOG_ERROR, "zone_nsec3chain:"
                             "del_sigs -> %s", dns_result_totext(result));
@@ -8117,7 +8118,7 @@ zone_nsec3chain(dns_zone_t *zone) {
         * Everything has succeeded. Commit the changes.
         * Unconditionally commit as zonediff.offline not checked above.
         */
-       dns_db_closeversion(db, &version, ISC_TRUE);
+       dns_db_closeversion(db, &version, true);
 
        /*
         * Everything succeeded so we can clean these up now.
@@ -8196,7 +8197,7 @@ zone_nsec3chain(dns_zone_t *zone) {
        if (node != NULL)
                dns_db_detachnode(db, &node);
        if (version != NULL) {
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
                dns_db_detach(&db);
        } else if (db != NULL)
                dns_db_detach(&db);
@@ -8220,19 +8221,19 @@ zone_nsec3chain(dns_zone_t *zone) {
  * Delete all RRSIG records with the given algorithm and keyid.
  * Remove the NSEC record and RRSIGs if nkeys is zero.
  * If all remaining RRsets are signed with the given algorithm
- * set *has_algp to ISC_TRUE.
+ * set *has_algp to true.
  */
 static isc_result_t
 del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        dns_dbnode_t *node, unsigned int nkeys, dns_secalg_t algorithm,
-       uint16_t keyid, isc_boolean_t *has_algp, dns_diff_t *diff)
+       uint16_t keyid, bool *has_algp, dns_diff_t *diff)
 {
        dns_rdata_rrsig_t rrsig;
        dns_rdataset_t rdataset;
        dns_rdatasetiter_t *iterator = NULL;
        isc_result_t result;
-       isc_boolean_t alg_missed = ISC_FALSE;
-       isc_boolean_t alg_found = ISC_FALSE;
+       bool alg_missed = false;
+       bool alg_found = false;
 
        char namebuf[DNS_NAME_FORMATSIZE];
        dns_name_format(name, namebuf, sizeof(namebuf));
@@ -8248,7 +8249,7 @@ del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
        for (result = dns_rdatasetiter_first(iterator);
             result == ISC_R_SUCCESS;
             result = dns_rdatasetiter_next(iterator)) {
-               isc_boolean_t has_alg = ISC_FALSE;
+               bool has_alg = false;
                dns_rdatasetiter_current(iterator, &rdataset);
                if (nkeys == 0 && rdataset.type == dns_rdatatype_nsec) {
                        for (result = dns_rdataset_first(&rdataset);
@@ -8281,7 +8282,7 @@ del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
                             rrsig.keyid != keyid))
                        {
                                if (rrsig.algorithm == algorithm) {
-                                       has_alg = ISC_TRUE;
+                                       has_alg = true;
                                }
                                continue;
                        }
@@ -8298,9 +8299,9 @@ del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
                 * 'algorithm', set alg_found; if not, set alg_missed.
                 */
                if (has_alg) {
-                       alg_found = ISC_TRUE;
+                       alg_found = true;
                } else {
-                       alg_missed = ISC_TRUE;
+                       alg_missed = true;
                }
        }
        if (result == ISC_R_NOMORE)
@@ -8310,7 +8311,7 @@ del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
         * Set `has_algp` if the algorithm was found in every RRset:
         * i.e., found in at least one, and not missing from any.
         */
-       *has_algp = ISC_TF(alg_found && !alg_missed);
+       *has_algp = (alg_found && !alg_missed);
  failure:
        if (dns_rdataset_isassociated(&rdataset))
                dns_rdataset_disassociate(&rdataset);
@@ -8339,13 +8340,13 @@ zone_sign(dns_zone_t *zone) {
        dns_signinglist_t cleanup;
        dst_key_t *zone_keys[DNS_MAXZONEKEYS];
        int32_t signatures;
-       isc_boolean_t check_ksk, keyset_kskonly, is_ksk;
-       isc_boolean_t with_ksk, with_zsk;
-       isc_boolean_t commit = ISC_FALSE;
-       isc_boolean_t delegation;
-       isc_boolean_t build_nsec = ISC_FALSE;
-       isc_boolean_t build_nsec3 = ISC_FALSE;
-       isc_boolean_t first;
+       bool check_ksk, keyset_kskonly, is_ksk;
+       bool with_ksk, with_zsk;
+       bool commit = false;
+       bool delegation;
+       bool build_nsec = false;
+       bool build_nsec3 = false;
+       bool first;
        isc_result_t result;
        isc_stdtime_t now, inception, soaexpire, expire;
        uint32_t jitter, sigvalidityinterval;
@@ -8428,7 +8429,7 @@ zone_sign(dns_zone_t *zone) {
        nodes = zone->nodes;
        signatures = zone->signatures;
        signing = ISC_LIST_HEAD(zone->signing);
-       first = ISC_TRUE;
+       first = true;
 
        check_ksk = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_UPDATECHECKKSK);
        keyset_kskonly = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_DNSKEYKSKONLY);
@@ -8439,10 +8440,10 @@ zone_sign(dns_zone_t *zone) {
 
        /* If neither chain is found, default to NSEC */
        if (!build_nsec && !build_nsec3)
-               build_nsec = ISC_TRUE;
+               build_nsec = true;
 
        while (signing != NULL && nodes-- > 0 && signatures > 0) {
-               isc_boolean_t has_alg = ISC_FALSE;
+               bool has_alg = false;
                nextsigning = ISC_LIST_NEXT(signing, link);
 
                ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
@@ -8462,7 +8463,7 @@ zone_sign(dns_zone_t *zone) {
                if (signing->db != db)
                        goto next_signing;
 
-               delegation = ISC_FALSE;
+               delegation = false;
 
                if (first && signing->deleteit) {
                        /*
@@ -8517,7 +8518,7 @@ zone_sign(dns_zone_t *zone) {
                                 * we skip all obscured names.
                                 */
                                dns_name_copy(found, name, NULL);
-                               delegation = ISC_TRUE;
+                               delegation = true;
                                goto next_node;
                        }
                }
@@ -8525,11 +8526,11 @@ zone_sign(dns_zone_t *zone) {
                /*
                 * Process one node.
                 */
-               with_ksk = ISC_FALSE;
-               with_zsk = ISC_FALSE;
+               with_ksk = false;
+               with_zsk = false;
                dns_dbiterator_pause(signing->dbiterator);
                for (i = 0; !has_alg && i < nkeys; i++) {
-                       isc_boolean_t both = ISC_FALSE;
+                       bool both = false;
 
                        /*
                         * Find the keys we want to sign with.
@@ -8562,13 +8563,13 @@ zone_sign(dns_zone_t *zone) {
                         * Do we do KSK processing?
                         */
                        if (check_ksk && !REVOKE(zone_keys[i])) {
-                               isc_boolean_t have_ksk, have_nonksk;
+                               bool have_ksk, have_nonksk;
                                if (KSK(zone_keys[i])) {
-                                       have_ksk = ISC_TRUE;
-                                       have_nonksk = ISC_FALSE;
+                                       have_ksk = true;
+                                       have_nonksk = false;
                                } else {
-                                       have_ksk = ISC_FALSE;
-                                       have_nonksk = ISC_TRUE;
+                                       have_ksk = false;
+                                       have_nonksk = true;
                                }
                                for (j = 0; j < nkeys; j++) {
                                        if (j == i ||
@@ -8585,9 +8586,9 @@ zone_sign(dns_zone_t *zone) {
                                        if (REVOKE(zone_keys[j]))
                                                continue;
                                        if (KSK(zone_keys[j]))
-                                               have_ksk = ISC_TRUE;
+                                               have_ksk = true;
                                        else
-                                               have_nonksk = ISC_TRUE;
+                                               have_nonksk = true;
                                        both = have_ksk && have_nonksk;
                                        if (both)
                                                break;
@@ -8596,7 +8597,7 @@ zone_sign(dns_zone_t *zone) {
                        if (both || REVOKE(zone_keys[i]))
                                is_ksk = KSK(zone_keys[i]);
                        else
-                               is_ksk = ISC_FALSE;
+                               is_ksk = false;
 
                        /*
                         * If deleting signatures, we need to ensure that
@@ -8614,7 +8615,7 @@ zone_sign(dns_zone_t *zone) {
                        CHECK(sign_a_node(db, name, node, version, build_nsec3,
                                          build_nsec, zone_keys[i], inception,
                                          expire, zone->minimum, is_ksk,
-                                         ISC_TF(both && keyset_kskonly),
+                                         (both && keyset_kskonly),
                                          &delegation, zonediff.diff,
                                          &signatures, zone->mctx));
                        /*
@@ -8625,10 +8626,10 @@ zone_sign(dns_zone_t *zone) {
                                break;
                        }
                        if (!is_ksk) {
-                               with_zsk = ISC_TRUE;
+                               with_zsk = true;
                        }
                        if (KSK(zone_keys[i])) {
-                               with_ksk = ISC_TRUE;
+                               with_ksk = true;
                        }
                }
 
@@ -8636,7 +8637,7 @@ zone_sign(dns_zone_t *zone) {
                 * Go onto next node.
                 */
  next_node:
-               first = ISC_FALSE;
+               first = false;
                dns_db_detachnode(db, &node);
                do {
                        result = dns_dbiterator_next(signing->dbiterator);
@@ -8656,7 +8657,7 @@ zone_sign(dns_zone_t *zone) {
                                        result = updatesecure(db, version,
                                                              &zone->origin,
                                                              zone->minimum,
-                                                             ISC_FALSE,
+                                                             false,
                                                              &post_diff);
                                        if (result != ISC_R_SUCCESS) {
                                                dns_zone_log(zone,
@@ -8677,7 +8678,7 @@ zone_sign(dns_zone_t *zone) {
                                                     dns_result_totext(result));
                                        goto failure;
                                }
-                               build_nsec = ISC_FALSE;
+                               build_nsec = false;
                                goto next_signing;
                        } else if (result != ISC_R_SUCCESS) {
                                dns_zone_log(zone, ISC_LOG_ERROR,
@@ -8698,7 +8699,7 @@ zone_sign(dns_zone_t *zone) {
  next_signing:
                dns_dbiterator_pause(signing->dbiterator);
                signing = nextsigning;
-               first = ISC_TRUE;
+               first = true;
        }
 
        if (ISC_LIST_HEAD(post_diff.tuples) != NULL) {
@@ -8720,15 +8721,15 @@ zone_sign(dns_zone_t *zone) {
         */
        if (ISC_LIST_EMPTY(zonediff.diff->tuples)) {
                if (zonediff.offline)
-                       commit = ISC_TRUE;
+                       commit = true;
                result = ISC_R_SUCCESS;
                goto pauseall;
        }
 
-       commit = ISC_TRUE;
+       commit = true;
 
        result = del_sigs(zone, db, version, &zone->origin, dns_rdatatype_soa,
-                         &zonediff, zone_keys, nkeys, now, ISC_FALSE);
+                         &zonediff, zone_keys, nkeys, now, false);
        if (result != ISC_R_SUCCESS) {
                dns_zone_log(zone, ISC_LOG_ERROR,
                             "zone_sign:del_sigs -> %s",
@@ -8834,7 +8835,7 @@ zone_sign(dns_zone_t *zone) {
                dns_db_detachnode(db, &node);
 
        if (version != NULL) {
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
                dns_db_detach(&db);
        } else if (db != NULL)
                dns_db_detach(&db);
@@ -8894,11 +8895,11 @@ normalize_key(dns_rdata_t *rr, dns_rdata_t *target,
  * 'rr' contains either a DNSKEY record, or a KEYDATA record
  *
  * After normalizing keys to the same format (DNSKEY, with revoke bit
- * cleared), return ISC_TRUE if a key that matches 'rr' is found in
- * 'rdset', or ISC_FALSE if not.
+ * cleared), return true if a key that matches 'rr' is found in
+ * 'rdset', or false if not.
  */
 
-static isc_boolean_t
+static bool
 matchkey(dns_rdataset_t *rdset, dns_rdata_t *rr) {
        unsigned char data1[4096], data2[4096];
        dns_rdata_t rdata, rdata1, rdata2;
@@ -8910,7 +8911,7 @@ matchkey(dns_rdataset_t *rdset, dns_rdata_t *rr) {
 
        result = normalize_key(rr, &rdata1, data1, sizeof(data1));
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        for (result = dns_rdataset_first(rdset);
             result == ISC_R_SUCCESS;
@@ -8921,10 +8922,10 @@ matchkey(dns_rdataset_t *rdset, dns_rdata_t *rr) {
                if (result != ISC_R_SUCCESS)
                        continue;
                if (dns_rdata_compare(&rdata1, &rdata2) == 0)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -8939,7 +8940,7 @@ matchkey(dns_rdataset_t *rdset, dns_rdata_t *rr) {
  *                        1/10 * RRSigExpirationInterval))
  */
 static inline isc_stdtime_t
-refresh_time(dns_keyfetch_t *kfetch, isc_boolean_t retry) {
+refresh_time(dns_keyfetch_t *kfetch, bool retry) {
        isc_result_t result;
        uint32_t t;
        dns_rdataset_t *rdset;
@@ -9031,8 +9032,8 @@ minimal_update(dns_keyfetch_t *kfetch, dns_dbversion_t *ver, dns_diff_t *diff)
                        continue;
                if (result != ISC_R_SUCCESS)
                        goto failure;
-               keydata.refresh = refresh_time(kfetch, ISC_TRUE);
-               set_refreshkeytimer(zone, &keydata, now, ISC_FALSE);
+               keydata.refresh = refresh_time(kfetch, true);
+               set_refreshkeytimer(zone, &keydata, now, false);
 
                dns_rdata_reset(&rdata);
                isc_buffer_init(&keyb, key_buf, sizeof(key_buf));
@@ -9052,7 +9053,7 @@ minimal_update(dns_keyfetch_t *kfetch, dns_dbversion_t *ver, dns_diff_t *diff)
 /*
  * Verify that DNSKEY set is signed by the key specified in 'keydata'.
  */
-static isc_boolean_t
+static bool
 revocable(dns_keyfetch_t *kfetch, dns_rdata_keydata_t *keydata) {
        isc_result_t result;
        dns_name_t *keyname;
@@ -9064,7 +9065,7 @@ revocable(dns_keyfetch_t *kfetch, dns_rdata_keydata_t *keydata) {
        dst_key_t *dstkey = NULL;
        unsigned char key_buf[4096];
        isc_buffer_t keyb;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
 
        REQUIRE(kfetch != NULL && keydata != NULL);
        REQUIRE(dns_rdataset_isassociated(&kfetch->dnskeysigset));
@@ -9079,7 +9080,7 @@ revocable(dns_keyfetch_t *kfetch, dns_rdata_keydata_t *keydata) {
                             dns_rdatatype_dnskey, &dnskey, &keyb);
        result = dns_dnssec_keyfromrdata(keyname, &rr, mctx, &dstkey);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        /* See if that key generated any of the signatures */
        for (result = dns_rdataset_first(&kfetch->dnskeysigset);
@@ -9099,7 +9100,7 @@ revocable(dns_keyfetch_t *kfetch, dns_rdata_keydata_t *keydata) {
                {
                        result = dns_dnssec_verify2(keyname,
                                            &kfetch->dnskeyset,
-                                           dstkey, ISC_FALSE, mctx, &sigrr,
+                                           dstkey, false, mctx, &sigrr,
                                            dns_fixedname_name(&fixed));
 
                        dns_zone_log(kfetch->zone, ISC_LOG_DEBUG(3),
@@ -9107,7 +9108,7 @@ revocable(dns_keyfetch_t *kfetch, dns_rdata_keydata_t *keydata) {
                                     "%s", dns_result_totext(result));
 
                        if (result == ISC_R_SUCCESS) {
-                               answer = ISC_TRUE;
+                               answer = true;
                                break;
                        }
                }
@@ -9132,8 +9133,8 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
        dns_keytable_t *secroots = NULL;
        dns_dbversion_t *ver = NULL;
        dns_diff_t diff;
-       isc_boolean_t alldone = ISC_FALSE;
-       isc_boolean_t commit = ISC_FALSE;
+       bool alldone = false;
+       bool commit = false;
        dns_name_t *keyname;
        dns_rdata_t sigrr = DNS_RDATA_INIT;
        dns_rdata_t dnskeyrr = DNS_RDATA_INIT;
@@ -9141,15 +9142,15 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
        dns_rdata_rrsig_t sig;
        dns_rdata_dnskey_t dnskey;
        dns_rdata_keydata_t keydata;
-       isc_boolean_t initializing;
+       bool initializing;
        char namebuf[DNS_NAME_FORMATSIZE];
        unsigned char key_buf[4096];
        isc_buffer_t keyb;
        dst_key_t *dstkey;
        isc_stdtime_t now;
        int pending = 0;
-       isc_boolean_t secure = ISC_FALSE;
-       isc_boolean_t free_needed;
+       bool secure = false;
+       bool free_needed;
 
        UNUSED(task);
        INSIST(event != NULL && event->ev_type == DNS_EVENT_FETCHDONE);
@@ -9186,7 +9187,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
        CHECK(dns_db_newversion(kfetch->db, &ver));
 
        zone->refreshkeycount--;
-       alldone = ISC_TF(zone->refreshkeycount == 0);
+       alldone = (zone->refreshkeycount == 0);
 
        if (alldone)
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESHING);
@@ -9247,7 +9248,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                            dst_key_id(dstkey) == sig.keyid) {
                                result = dns_dnssec_verify2(keyname,
                                                    &kfetch->dnskeyset,
-                                                   dstkey, ISC_FALSE,
+                                                   dstkey, false,
                                                    zone->view->mctx, &sigrr,
                                                    dns_fixedname_name(&fixed));
 
@@ -9276,7 +9277,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                        dns_keytable_detachkeynode(secroots, &keynode);
 
                if (kfetch->dnskeyset.trust == dns_trust_secure) {
-                       secure = ISC_TRUE;
+                       secure = true;
                        break;
                }
        }
@@ -9305,7 +9306,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
         *   - All keys not being removed have their refresh timers
         *     updated
         */
-       initializing = ISC_TRUE;
+       initializing = true;
        for (result = dns_rdataset_first(&kfetch->keydataset);
             result == ISC_R_SUCCESS;
             result = dns_rdataset_next(&kfetch->keydataset))
@@ -9327,18 +9328,18 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                 * that means we are *not* initializing it and shouldn't
                 * automatically trust all the keys we find at the zone apex.
                 */
-               initializing = initializing && ISC_TF(keydata.addhd == 0);
+               initializing = initializing && (keydata.addhd == 0);
 
                if (! matchkey(&kfetch->dnskeyset, &keydatarr)) {
-                       isc_boolean_t deletekey = ISC_FALSE;
+                       bool deletekey = false;
 
                        if (!secure) {
                                if (keydata.removehd != 0 &&
                                    keydata.removehd <= now) {
-                                       deletekey = ISC_TRUE;
+                                       deletekey = true;
                                }
                        } else if (keydata.addhd == 0) {
-                               deletekey = ISC_TRUE;
+                               deletekey = true;
                        } else if (keydata.addhd > now) {
                                dns_zone_log(zone, ISC_LOG_DEBUG(3),
                                             "Pending key %d for zone %s "
@@ -9349,7 +9350,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                        keydata.addhd =
                                                now + dns_zone_mkey_month;
                                keydata.refresh = refresh_time(kfetch,
-                                                              ISC_FALSE);
+                                                              false);
                        } else if (keydata.removehd == 0) {
                                dns_zone_log(zone, ISC_LOG_DEBUG(3),
                                             "Active key %d for zone %s "
@@ -9357,7 +9358,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                             keytag, namebuf);
                                keydata.refresh = now + dns_zone_mkey_hour;
                        } else if (keydata.removehd <= now) {
-                               deletekey = ISC_TRUE;
+                               deletekey = true;
                                dns_zone_log(zone, ISC_LOG_DEBUG(3),
                                             "Revoked key %d for zone %s "
                                             "missing: deleting from "
@@ -9365,7 +9366,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                             keytag, namebuf);
                        } else {
                                keydata.refresh = refresh_time(kfetch,
-                                                              ISC_FALSE);
+                                                              false);
                        }
 
                        if (secure || deletekey) {
@@ -9389,7 +9390,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                            DNS_DIFFOP_ADD, keyname, 0,
                                            &keydatarr));
 
-                       set_refreshkeytimer(zone, &keydata, now, ISC_FALSE);
+                       set_refreshkeytimer(zone, &keydata, now, false);
                }
        }
 
@@ -9413,11 +9414,11 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
             result == ISC_R_SUCCESS;
             result = dns_rdataset_next(&kfetch->dnskeyset))
        {
-               isc_boolean_t revoked = ISC_FALSE;
-               isc_boolean_t newkey = ISC_FALSE;
-               isc_boolean_t updatekey = ISC_FALSE;
-               isc_boolean_t deletekey = ISC_FALSE;
-               isc_boolean_t trustkey = ISC_FALSE;
+               bool revoked = false;
+               bool newkey = false;
+               bool updatekey = false;
+               bool deletekey = false;
+               bool trustkey = false;
                dns_keytag_t keytag;
 
                dns_rdata_reset(&dnskeyrr);
@@ -9426,13 +9427,13 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
                /* Skip ZSK's */
-               if (!ISC_TF(dnskey.flags & DNS_KEYFLAG_KSK))
+               if (!(dnskey.flags & DNS_KEYFLAG_KSK))
                        continue;
 
                result = compute_tag(keyname, &dnskey, mctx, &keytag);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
-               revoked = ISC_TF(dnskey.flags & DNS_KEYFLAG_REVOKE);
+               revoked = (dnskey.flags & DNS_KEYFLAG_REVOKE);
 
                if (matchkey(&kfetch->keydataset, &dnskeyrr)) {
                        dns_rdata_reset(&keydatarr);
@@ -9446,7 +9447,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                         * Key wasn't trusted yet, and now
                                         * it's been revoked?  Just remove it
                                         */
-                                       deletekey = ISC_TRUE;
+                                       deletekey = true;
                                        dns_zone_log(zone, ISC_LOG_DEBUG(3),
                                                     "Pending key %d "
                                                     "for zone %s is now "
@@ -9463,7 +9464,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
 
                                        /* If initializing, delete now */
                                        if (keydata.addhd == 0)
-                                               deletekey = ISC_TRUE;
+                                               deletekey = true;
                                        else {
                                                keydata.removehd = now +
                                                        dns_zone_mkey_month;
@@ -9478,7 +9479,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                                     keytag, namebuf);
                                } else if (keydata.removehd < now) {
                                        /* Scheduled for removal */
-                                       deletekey = ISC_TRUE;
+                                       deletekey = true;
 
                                        dns_zone_log(zone, ISC_LOG_INFO,
                                                     "Revoked key %d "
@@ -9504,8 +9505,8 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                         * back as if it were a fresh key,
                                         * with a 30-day acceptance timer.
                                         */
-                                       deletekey = ISC_TRUE;
-                                       newkey = ISC_TRUE;
+                                       deletekey = true;
+                                       newkey = true;
                                        keydata.removehd = 0;
                                        keydata.addhd =
                                                now + dns_zone_mkey_month;
@@ -9522,7 +9523,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                        keydata.addhd = now;
 
                                if (keydata.addhd <= now) {
-                                       trustkey = ISC_TRUE;
+                                       trustkey = true;
                                        dns_zone_log(zone, ISC_LOG_INFO,
                                                     "Key %d for zone %s "
                                                     "acceptance timer "
@@ -9546,7 +9547,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                        }
 
                        if (!deletekey && !newkey)
-                               updatekey = ISC_TRUE;
+                               updatekey = true;
                } else if (secure) {
                        /*
                         * Key wasn't in the key zone but it's
@@ -9556,7 +9557,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                continue;
 
                        /* Key wasn't in the key zone: add it */
-                       newkey = ISC_TRUE;
+                       newkey = true;
 
                        if (initializing) {
                                dns_zone_log(zone, ISC_LOG_WARNING,
@@ -9566,7 +9567,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                             "waiving the normal 30-day "
                                             "waiting period.",
                                             namebuf, keytag);
-                               trustkey = ISC_TRUE;
+                               trustkey = true;
                        } else {
                                dns_zone_log(zone, ISC_LOG_INFO,
                                             "New key %d observed "
@@ -9591,7 +9592,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
 
                if (updatekey) {
                        /* Set refresh timer */
-                       keydata.refresh = refresh_time(kfetch, ISC_FALSE);
+                       keydata.refresh = refresh_time(kfetch, false);
                        dns_rdata_reset(&keydatarr);
                        isc_buffer_init(&keyb, key_buf, sizeof(key_buf));
                        dns_rdata_fromstruct(&keydatarr, zone->rdclass,
@@ -9610,7 +9611,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                                               NULL);
                        keydata.addhd = initializing
                                         ? now : now + dns_zone_mkey_month;
-                       keydata.refresh = refresh_time(kfetch, ISC_FALSE);
+                       keydata.refresh = refresh_time(kfetch, false);
                        dns_rdata_reset(&keydatarr);
                        isc_buffer_init(&keyb, key_buf, sizeof(key_buf));
                        dns_rdata_fromstruct(&keydatarr, zone->rdclass,
@@ -9632,7 +9633,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
 
                if (secure && !deletekey) {
                        INSIST(newkey || updatekey);
-                       set_refreshkeytimer(zone, &keydata, now, ISC_FALSE);
+                       set_refreshkeytimer(zone, &keydata, now, false);
                }
        }
 
@@ -9655,7 +9656,7 @@ keyfetch_done(isc_task_t *task, isc_event_t *event) {
                CHECK(update_soa_serial(kfetch->db, ver, &diff, mctx,
                                        zone->updatemethod));
                CHECK(zone_journal(zone, &diff, NULL, "keyfetch_done"));
-               commit = ISC_TRUE;
+               commit = true;
 
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED);
                zone_needdump(zone, 30);
@@ -9722,8 +9723,8 @@ zone_refreshkeys(dns_zone_t *zone) {
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdata_keydata_t kd;
        isc_stdtime_t now;
-       isc_boolean_t commit = ISC_FALSE;
-       isc_boolean_t fetching = ISC_FALSE, fetch_err = ISC_FALSE;
+       bool commit = false;
+       bool fetching = false, fetch_err = false;
 
        ENTER;
        REQUIRE(zone->db != NULL);
@@ -9796,7 +9797,7 @@ zone_refreshkeys(dns_zone_t *zone) {
 
                kfetch = isc_mem_get(zone->mctx, sizeof(dns_keyfetch_t));
                if (kfetch == NULL) {
-                       fetch_err = ISC_TRUE;
+                       fetch_err = true;
                        goto failure;
                }
 
@@ -9835,7 +9836,7 @@ zone_refreshkeys(dns_zone_t *zone) {
                 */
 
 #ifdef ENABLE_AFL
-               if (dns_fuzzing_resolver == ISC_FALSE) {
+               if (dns_fuzzing_resolver == false) {
 #endif
                result = dns_resolver_createfetch(zone->view->resolver,
                                                  kname, dns_rdatatype_dnskey,
@@ -9854,7 +9855,7 @@ zone_refreshkeys(dns_zone_t *zone) {
                }
 #endif
                if (result == ISC_R_SUCCESS)
-                       fetching = ISC_TRUE;
+                       fetching = true;
                else {
                        zone->refreshkeycount--;
                        zone->irefs--;
@@ -9865,14 +9866,14 @@ zone_refreshkeys(dns_zone_t *zone) {
                        dns_zone_log(zone, ISC_LOG_WARNING,
                                     "Failed to create fetch for "
                                     "DNSKEY update");
-                       fetch_err = ISC_TRUE;
+                       fetch_err = true;
                }
        }
        if (!ISC_LIST_EMPTY(diff.tuples)) {
                CHECK(update_soa_serial(db, ver, &diff, zone->mctx,
                                        zone->updatemethod));
                CHECK(zone_journal(zone, &diff, NULL, "zone_refreshkeys"));
-               commit = ISC_TRUE;
+               commit = true;
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED);
                zone_needdump(zone, 30);
        }
@@ -9915,7 +9916,7 @@ zone_maintenance(dns_zone_t *zone) {
        const char me[] = "zone_maintenance";
        isc_time_t now;
        isc_result_t result;
-       isc_boolean_t dumping;
+       bool dumping;
 
        REQUIRE(DNS_ZONE_VALID(zone));
        ENTER;
@@ -10003,10 +10004,10 @@ zone_maintenance(dns_zone_t *zone) {
                    DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP)) {
                        dumping = was_dumping(zone);
                } else
-                       dumping = ISC_TRUE;
+                       dumping = true;
                UNLOCK_ZONE(zone);
                if (!dumping) {
-                       result = zone_dump(zone, ISC_TRUE); /* task locked */
+                       result = zone_dump(zone, true); /* task locked */
                        if (result != ISC_R_SUCCESS)
                                dns_zone_log(zone, ISC_LOG_WARNING,
                                             "dump failed: %s",
@@ -10217,7 +10218,7 @@ dns_zone_refresh(dns_zone_t *zone) {
 
        zone->curmaster = 0;
        for (j = 0; j < zone->masterscnt; j++)
-               zone->mastersok[j] = ISC_FALSE;
+               zone->mastersok[j] = false;
        /* initiate soa query */
        queue_soa_query(zone);
  unlock:
@@ -10227,7 +10228,7 @@ dns_zone_refresh(dns_zone_t *zone) {
 isc_result_t
 dns_zone_flush(dns_zone_t *zone) {
        isc_result_t result = ISC_R_SUCCESS;
-       isc_boolean_t dumping;
+       bool dumping;
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -10238,17 +10239,17 @@ dns_zone_flush(dns_zone_t *zone) {
                result = ISC_R_ALREADYRUNNING;
                dumping = was_dumping(zone);
        } else
-               dumping = ISC_TRUE;
+               dumping = true;
        UNLOCK_ZONE(zone);
        if (!dumping)
-               result = zone_dump(zone, ISC_FALSE);    /* Unknown task. */
+               result = zone_dump(zone, false);        /* Unknown task. */
        return (result);
 }
 
 isc_result_t
 dns_zone_dump(dns_zone_t *zone) {
        isc_result_t result = ISC_R_ALREADYRUNNING;
-       isc_boolean_t dumping;
+       bool dumping;
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -10256,7 +10257,7 @@ dns_zone_dump(dns_zone_t *zone) {
        dumping = was_dumping(zone);
        UNLOCK_ZONE(zone);
        if (!dumping)
-               result = zone_dump(zone, ISC_FALSE);    /* Unknown task. */
+               result = zone_dump(zone, false);        /* Unknown task. */
        return (result);
 }
 
@@ -10300,8 +10301,8 @@ dump_done(void *arg, isc_result_t result) {
        dns_zone_t *secure = NULL;
        dns_db_t *db;
        dns_dbversion_t *version;
-       isc_boolean_t again = ISC_FALSE;
-       isc_boolean_t compact = ISC_FALSE;
+       bool again = false;
+       bool compact = false;
        uint32_t serial;
        isc_result_t tresult;
 
@@ -10383,7 +10384,7 @@ dump_done(void *arg, isc_result_t result) {
                                break;
                        }
                } else if (tresult == ISC_R_SUCCESS) {
-                       compact = ISC_TRUE;
+                       compact = true;
                        zone->compact_serial = serial;
                }
        }
@@ -10404,7 +10405,7 @@ dump_done(void *arg, isc_result_t result) {
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDDUMP);
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_DUMPING);
                isc_time_settoepoch(&zone->dumptime);
-               again = ISC_TRUE;
+               again = true;
        } else if (result == ISC_R_SUCCESS)
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_FLUSH);
 
@@ -10413,16 +10414,16 @@ dump_done(void *arg, isc_result_t result) {
        zonemgr_putio(&zone->writeio);
        UNLOCK_ZONE(zone);
        if (again)
-               (void)zone_dump(zone, ISC_FALSE);
+               (void)zone_dump(zone, false);
        dns_zone_idetach(&zone);
 }
 
 static isc_result_t
-zone_dump(dns_zone_t *zone, isc_boolean_t compact) {
+zone_dump(dns_zone_t *zone, bool compact) {
        const char me[] = "zone_dump";
        isc_result_t result;
        dns_dbversion_t *version = NULL;
-       isc_boolean_t again;
+       bool again;
        dns_db_t *db = NULL;
        char *masterfile = NULL;
        dns_masterformat_t masterformat = dns_masterformat_none;
@@ -10458,7 +10459,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_t compact) {
                dns_zone_t *dummy = NULL;
                LOCK_ZONE(zone);
                zone_iattach(zone, &dummy);
-               result = zonemgr_getio(zone->zmgr, ISC_FALSE, zone->task,
+               result = zonemgr_getio(zone->zmgr, false, zone->task,
                                       zone_gotwritehandle, zone,
                                       &zone->writeio);
                if (result != ISC_R_SUCCESS)
@@ -10481,7 +10482,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_t compact) {
                result = dns_master_dump3(zone->mctx, db, version,
                                          output_style, masterfile,
                                          masterformat, &rawdata);
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
        }
  fail:
        if (db != NULL)
@@ -10493,7 +10494,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_t compact) {
        if (result == DNS_R_CONTINUE)
                return (ISC_R_SUCCESS); /* XXXMPA */
 
-       again = ISC_FALSE;
+       again = false;
        LOCK_ZONE(zone);
        DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_DUMPING);
        if (result != ISC_R_SUCCESS) {
@@ -10507,7 +10508,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_t compact) {
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDDUMP);
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_DUMPING);
                isc_time_settoepoch(&zone->dumptime);
-               again = ISC_TRUE;
+               again = true;
        } else
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_FLUSH);
        UNLOCK_ZONE(zone);
@@ -10547,7 +10548,7 @@ dumptostream(dns_zone_t *zone, FILE *fd, const dns_master_style_t *style,
        }
        result = dns_master_dumptostream3(zone->mctx, db, version, style,
                                          format, &rawdata, fd);
-       dns_db_closeversion(db, &version, ISC_FALSE);
+       dns_db_closeversion(db, &version, false);
        dns_db_detach(&db);
        return (result);
 }
@@ -10694,7 +10695,7 @@ dns_zone_setmaxrecords(dns_zone_t *zone, uint32_t val) {
        zone->maxrecords = val;
 }
 
-static isc_boolean_t
+static bool
 notify_isqueued(dns_zone_t *zone, unsigned int flags, dns_name_t *name,
                isc_sockaddr_t *addr, dns_tsigkey_t *key)
 {
@@ -10714,7 +10715,7 @@ notify_isqueued(dns_zone_t *zone, unsigned int flags, dns_name_t *name,
                    notify->key == key)
                        goto requeue;
        }
-       return (ISC_FALSE);
+       return (false);
 
 requeue:
        /*
@@ -10728,7 +10729,7 @@ requeue:
                result = isc_ratelimiter_dequeue(zmgr->startupnotifyrl,
                                                 notify->event);
                if (result != ISC_R_SUCCESS)
-                       return (ISC_TRUE);
+                       return (true);
 
                notify->flags &= ~DNS_NOTIFY_STARTUP;
                result = isc_ratelimiter_enqueue(notify->zone->zmgr->notifyrl,
@@ -10736,24 +10737,24 @@ requeue:
                                                 &notify->event);
                if (result != ISC_R_SUCCESS) {
                        isc_event_free(&notify->event);
-                       return (ISC_FALSE);
+                       return (false);
                }
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static isc_boolean_t
+static bool
 notify_isself(dns_zone_t *zone, isc_sockaddr_t *dst) {
        dns_tsigkey_t *key = NULL;
        isc_sockaddr_t src;
        isc_sockaddr_t any;
-       isc_boolean_t isself;
+       bool isself;
        isc_netaddr_t dstaddr;
        isc_result_t result;
 
        if (zone->view == NULL || zone->isself == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        switch (isc_sockaddr_pf(dst)) {
        case PF_INET:
@@ -10765,7 +10766,7 @@ notify_isself(dns_zone_t *zone, isc_sockaddr_t *dst) {
                isc_sockaddr_any6(&any);
                break;
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -10778,7 +10779,7 @@ notify_isself(dns_zone_t *zone, isc_sockaddr_t *dst) {
        isc_netaddr_fromsockaddr(&dstaddr, dst);
        result = dns_view_getpeertsig(zone->view, &dstaddr, &key);
        if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND)
-               return (ISC_FALSE);
+               return (false);
        isself = (zone->isself)(zone->view, key, &src, dst, zone->rdclass,
                                zone->isselfarg);
        if (key != NULL)
@@ -10787,7 +10788,7 @@ notify_isself(dns_zone_t *zone, isc_sockaddr_t *dst) {
 }
 
 static void
-notify_destroy(dns_notify_t *notify, isc_boolean_t locked) {
+notify_destroy(dns_notify_t *notify, bool locked) {
        isc_mem_t *mctx;
 
        REQUIRE(DNS_NOTIFY_VALID(notify));
@@ -10869,7 +10870,7 @@ process_adb_event(isc_task_t *task, isc_event_t *ev) {
                notify_send(notify);
                UNLOCK_ZONE(notify->zone);
        }
-       notify_destroy(notify, ISC_FALSE);
+       notify_destroy(notify, false);
 }
 
 static void
@@ -10906,12 +10907,12 @@ notify_find_address(dns_notify_t *notify) {
        UNLOCK_ZONE(notify->zone);
 
  destroy:
-       notify_destroy(notify, ISC_FALSE);
+       notify_destroy(notify, false);
 }
 
 
 static isc_result_t
-notify_send_queue(dns_notify_t *notify, isc_boolean_t startup) {
+notify_send_queue(dns_notify_t *notify, bool startup) {
        isc_event_t *e;
        isc_result_t result;
 
@@ -10945,8 +10946,8 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
        char addrbuf[ISC_SOCKADDR_FORMATSIZE];
        isc_sockaddr_t src;
        unsigned int options, timeout;
-       isc_boolean_t have_notifysource = ISC_FALSE;
-       isc_boolean_t have_notifydscp = ISC_FALSE;
+       bool have_notifysource = false;
+       bool have_notifydscp = false;
        isc_dscp_t dscp = -1;
 
        notify = event->ev_arg;
@@ -11011,16 +11012,16 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
        options = 0;
        if (notify->zone->view->peers != NULL) {
                dns_peer_t *peer = NULL;
-               isc_boolean_t usetcp = ISC_FALSE;
+               bool usetcp = false;
                result = dns_peerlist_peerbyaddr(notify->zone->view->peers,
                                                 &dstip, &peer);
                if (result == ISC_R_SUCCESS) {
                        result = dns_peer_getnotifysource(peer, &src);
                        if (result == ISC_R_SUCCESS)
-                               have_notifysource = ISC_TRUE;
+                               have_notifysource = true;
                        dns_peer_getnotifydscp(peer, &dscp);
                        if (dscp != -1)
-                               have_notifydscp = ISC_TRUE;
+                               have_notifydscp = true;
                        result = dns_peer_getforcetcp(peer, &usetcp);
                        if (result == ISC_R_SUCCESS && usetcp)
                                options |= DNS_FETCHOPT_TCP;
@@ -11070,7 +11071,7 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
        UNLOCK_ZONE(notify->zone);
        isc_event_free(&event);
        if (result != ISC_R_SUCCESS)
-               notify_destroy(notify, ISC_FALSE);
+               notify_destroy(notify, false);
 }
 
 static void
@@ -11080,7 +11081,7 @@ notify_send(dns_notify_t *notify) {
        isc_result_t result;
        dns_notify_t *newnotify = NULL;
        unsigned int flags;
-       isc_boolean_t startup;
+       bool startup;
 
        /*
         * Zone lock held by caller.
@@ -11108,7 +11109,7 @@ notify_send(dns_notify_t *notify) {
                zone_iattach(notify->zone, &newnotify->zone);
                ISC_LIST_APPEND(newnotify->zone->notifies, newnotify, link);
                newnotify->dst = dst;
-               startup = ISC_TF((notify->flags & DNS_NOTIFY_STARTUP) != 0);
+               startup = (notify->flags & DNS_NOTIFY_STARTUP);
                result = notify_send_queue(newnotify, startup);
                if (result != ISC_R_SUCCESS)
                        goto cleanup;
@@ -11117,7 +11118,7 @@ notify_send(dns_notify_t *notify) {
 
  cleanup:
        if (newnotify != NULL)
-               notify_destroy(newnotify, ISC_TRUE);
+               notify_destroy(newnotify, true);
 }
 
 void
@@ -11150,11 +11151,11 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
        isc_result_t result;
        unsigned int i;
        isc_sockaddr_t dst;
-       isc_boolean_t isqueued;
+       bool isqueued;
        dns_notifytype_t notifytype;
        unsigned int flags = 0;
-       isc_boolean_t loggednotify = ISC_FALSE;
-       isc_boolean_t startup;
+       bool loggednotify = false;
+       bool startup;
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -11202,7 +11203,7 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
        if (zonedb == NULL)
                return;
        dns_db_currentversion(zonedb, &version);
-       result = dns_db_findnode(zonedb, origin, ISC_FALSE, &node);
+       result = dns_db_findnode(zonedb, origin, false, &node);
        if (result != ISC_R_SUCCESS)
                goto cleanup1;
 
@@ -11271,12 +11272,12 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
                ISC_LIST_APPEND(zone->notifies, notify, link);
                result = notify_send_queue(notify, startup);
                if (result != ISC_R_SUCCESS)
-                       notify_destroy(notify, ISC_TRUE);
+                       notify_destroy(notify, true);
                if (!loggednotify) {
                        notify_log(zone, ISC_LOG_INFO,
                                   "sending notifies (serial %u)",
                                   serial);
-                       loggednotify = ISC_TRUE;
+                       loggednotify = true;
                }
        }
        UNLOCK_ZONE(zone);
@@ -11316,7 +11317,7 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
                        notify_log(zone, ISC_LOG_INFO,
                                   "sending notifies (serial %u)",
                                   serial);
-                       loggednotify = ISC_TRUE;
+                       loggednotify = true;
                }
 
                LOCK_ZONE(zone);
@@ -11333,7 +11334,7 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
                result = dns_name_dup(&ns.name, zone->mctx, &notify->ns);
                if (result != ISC_R_SUCCESS) {
                        LOCK_ZONE(zone);
-                       notify_destroy(notify, ISC_TRUE);
+                       notify_destroy(notify, true);
                        UNLOCK_ZONE(zone);
                        continue;
                }
@@ -11351,7 +11352,7 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
  cleanup2:
        dns_db_detachnode(zonedb, &node);
  cleanup1:
-       dns_db_closeversion(zonedb, &version, ISC_FALSE);
+       dns_db_closeversion(zonedb, &version, false);
        dns_db_detach(&zonedb);
 }
 
@@ -11382,7 +11383,7 @@ save_nsrrset(dns_message_t *message, dns_name_t *name,
        /*
         * Add NS rdataset.
         */
-       result = dns_db_findnode(db, name, ISC_TRUE, &node);
+       result = dns_db_findnode(db, name, true, &node);
        if (result != ISC_R_SUCCESS)
                goto fail;
        result = dns_db_addrdataset(db, node, version, 0,
@@ -11409,7 +11410,7 @@ save_nsrrset(dns_message_t *message, dns_name_t *name,
                                              &rdataset);
                if (result == ISC_R_SUCCESS) {
                        result = dns_db_findnode(db, &ns.name,
-                                                ISC_TRUE, &node);
+                                                true, &node);
                        if (result != ISC_R_SUCCESS)
                                goto fail;
                        result = dns_db_addrdataset(db, node, version, 0,
@@ -11425,7 +11426,7 @@ save_nsrrset(dns_message_t *message, dns_name_t *name,
                                              &rdataset);
                if (result == ISC_R_SUCCESS) {
                        result = dns_db_findnode(db, &ns.name,
-                                                ISC_TRUE, &node);
+                                                true, &node);
                        if (result != ISC_R_SUCCESS)
                                goto fail;
                        result = dns_db_addrdataset(db, node, version, 0,
@@ -11456,7 +11457,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
        uint32_t nscnt, cnamecnt, refresh, retry, expire;
        isc_result_t result;
        isc_time_t now;
-       isc_boolean_t exiting = ISC_FALSE;
+       bool exiting = false;
        isc_interval_t i;
        unsigned int j, soacount;
 
@@ -11475,7 +11476,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
 
        if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
                zone_debuglog(zone, me, 1, "exiting");
-               exiting = ISC_TRUE;
+               exiting = true;
                goto next_master;
        }
 
@@ -11597,7 +11598,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
        /*
         * Tidy up.
         */
-       dns_db_closeversion(stub->db, &stub->version, ISC_TRUE);
+       dns_db_closeversion(stub->db, &stub->version, true);
        ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write);
        if (zone->db == NULL)
                zone_attachdb(zone, stub->db);
@@ -11632,7 +11633,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
 
  next_master:
        if (stub->version != NULL)
-               dns_db_closeversion(stub->db, &stub->version, ISC_FALSE);
+               dns_db_closeversion(stub->db, &stub->version, false);
        if (stub->db != NULL)
                dns_db_detach(&stub->db);
        if (msg != NULL)
@@ -11648,7 +11649,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
                 zone->mastersok[zone->curmaster]);
        DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
        if (exiting || zone->curmaster >= zone->masterscnt) {
-               isc_boolean_t done = ISC_TRUE;
+               bool done = true;
                if (!exiting &&
                    DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
                    !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
@@ -11656,12 +11657,12 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
                         * Did we get a good answer from all the masters?
                         */
                        for (j = 0; j < zone->masterscnt; j++)
-                               if (zone->mastersok[j] == ISC_FALSE) {
-                                       done = ISC_FALSE;
+                               if (zone->mastersok[j] == false) {
+                                       done = false;
                                        break;
                                }
                } else
-                       done = ISC_TRUE;
+                       done = true;
                if (!done) {
                        zone->curmaster = 0;
                        /*
@@ -11806,7 +11807,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
        isc_result_t result;
        uint32_t serial, oldserial = 0;
        unsigned int j;
-       isc_boolean_t do_queue_xfrin = ISC_FALSE;
+       bool do_queue_xfrin = false;
 
        zone = revent->ev_arg;
        INSIST(DNS_ZONE_VALID(zone));
@@ -12073,7 +12074,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
                dns_request_destroy(&zone->request);
                if (zone->type == dns_zone_slave ||
                    zone->type == dns_zone_redirect) {
-                       do_queue_xfrin = ISC_TRUE;
+                       do_queue_xfrin = true;
                } else {
                        INSIST(zone->type == dns_zone_stub);
                        ns_query(zone, rdataset, NULL);
@@ -12101,7 +12102,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
                }
 
                DNS_ZONE_JITTER_ADD(&now, zone->refresh, &zone->refreshtime);
-               zone->mastersok[zone->curmaster] = ISC_TRUE;
+               zone->mastersok[zone->curmaster] = true;
                goto next_master;
        } else {
                if (!DNS_ZONE_OPTION(zone, DNS_ZONEOPT_MULTIMASTER))
@@ -12110,7 +12111,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
                                     soa.serial, master, oldserial);
                else
                        zone_debuglog(zone, me, 1, "ahead");
-               zone->mastersok[zone->curmaster] = ISC_TRUE;
+               zone->mastersok[zone->curmaster] = true;
                goto next_master;
        }
        if (msg != NULL)
@@ -12131,19 +12132,19 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
                 zone->mastersok[zone->curmaster]);
        DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
        if (zone->curmaster >= zone->masterscnt) {
-               isc_boolean_t done = ISC_TRUE;
+               bool done = true;
                if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
                    !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
                        /*
                         * Did we get a good answer from all the masters?
                         */
                        for (j = 0; j < zone->masterscnt; j++)
-                               if (zone->mastersok[j] == ISC_FALSE) {
-                                       done = ISC_FALSE;
+                               if (zone->mastersok[j] == false) {
+                                       done = false;
                                        break;
                                }
                } else
-                       done = ISC_TRUE;
+                       done = true;
                if (!done) {
                        DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
                        zone->curmaster = 0;
@@ -12273,8 +12274,8 @@ create_query(dns_zone_t *zone, dns_rdatatype_t rdtype,
 }
 
 static isc_result_t
-add_opt(dns_message_t *message, uint16_t udpsize, isc_boolean_t reqnsid,
-       isc_boolean_t reqexpire)
+add_opt(dns_message_t *message, uint16_t udpsize, bool reqnsid,
+       bool reqexpire)
 {
        isc_result_t result;
        dns_rdataset_t *rdataset = NULL;
@@ -12314,9 +12315,9 @@ soa_query(isc_task_t *task, isc_event_t *event) {
        isc_netaddr_t masterip;
        dns_tsigkey_t *key = NULL;
        uint32_t options;
-       isc_boolean_t cancel = ISC_TRUE;
+       bool cancel = true;
        int timeout;
-       isc_boolean_t have_xfrsource, have_xfrdscp, reqnsid, reqexpire;
+       bool have_xfrsource, have_xfrdscp, reqnsid, reqexpire;
        uint16_t udpsize = SEND_BUFFER_SIZE;
        isc_dscp_t dscp = -1;
 
@@ -12331,7 +12332,7 @@ soa_query(isc_task_t *task, isc_event_t *event) {
            DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING) ||
            zone->view->requestmgr == NULL) {
                if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING))
-                       cancel = ISC_FALSE;
+                       cancel = false;
                goto cleanup;
        }
 
@@ -12376,12 +12377,12 @@ soa_query(isc_task_t *task, isc_event_t *event) {
 
        options = DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEVC) ?
                  DNS_REQUESTOPT_TCP : 0;
-       have_xfrsource = have_xfrdscp = ISC_FALSE;
+       have_xfrsource = have_xfrdscp = false;
        reqnsid = zone->view->requestnsid;
        reqexpire = zone->requestexpire;
        if (zone->view->peers != NULL) {
                dns_peer_t *peer = NULL;
-               isc_boolean_t edns, usetcp;
+               bool edns, usetcp;
                result = dns_peerlist_peerbyaddr(zone->view->peers,
                                                 &masterip, &peer);
                if (result == ISC_R_SUCCESS) {
@@ -12391,10 +12392,10 @@ soa_query(isc_task_t *task, isc_event_t *event) {
                        result = dns_peer_gettransfersource(peer,
                                                            &zone->sourceaddr);
                        if (result == ISC_R_SUCCESS)
-                               have_xfrsource = ISC_TRUE;
+                               have_xfrsource = true;
                        (void)dns_peer_gettransferdscp(peer, &dscp);
                        if (dscp != -1)
-                               have_xfrdscp = ISC_TRUE;
+                               have_xfrdscp = true;
                        if (zone->view->resolver != NULL)
                                udpsize =
                                  dns_resolver_getudpsize(zone->view->resolver);
@@ -12470,7 +12471,7 @@ soa_query(isc_task_t *task, isc_event_t *event) {
                else
                        inc_stats(zone, dns_zonestatscounter_soaoutv6);
        }
-       cancel = ISC_FALSE;
+       cancel = false;
 
  cleanup:
        if (key != NULL)
@@ -12512,8 +12513,8 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
        dns_tsigkey_t *key = NULL;
        dns_dbnode_t *node = NULL;
        int timeout;
-       isc_boolean_t have_xfrsource = ISC_FALSE, have_xfrdscp = ISC_FALSE;
-       isc_boolean_t reqnsid;
+       bool have_xfrsource = false, have_xfrdscp = false;
+       bool reqnsid;
        uint16_t udpsize = SEND_BUFFER_SIZE;
        isc_dscp_t dscp = -1;
 
@@ -12581,7 +12582,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
                /*
                 * Update SOA record.
                 */
-               result = dns_db_findnode(stub->db, &zone->origin, ISC_TRUE,
+               result = dns_db_findnode(stub->db, &zone->origin, true,
                                         &node);
                if (result != ISC_R_SUCCESS) {
                        dns_zone_log(zone, ISC_LOG_INFO, "refreshing stub: "
@@ -12635,7 +12636,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
        reqnsid = zone->view->requestnsid;
        if (zone->view->peers != NULL) {
                dns_peer_t *peer = NULL;
-               isc_boolean_t edns;
+               bool edns;
                result = dns_peerlist_peerbyaddr(zone->view->peers,
                                                 &masterip, &peer);
                if (result == ISC_R_SUCCESS) {
@@ -12645,10 +12646,10 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
                        result = dns_peer_gettransfersource(peer,
                                                            &zone->sourceaddr);
                        if (result == ISC_R_SUCCESS)
-                               have_xfrsource = ISC_TRUE;
+                               have_xfrsource = true;
                        result = dns_peer_gettransferdscp(peer, &dscp);
                        if (result == ISC_R_SUCCESS && dscp != -1)
-                               have_xfrdscp = ISC_TRUE;
+                               have_xfrdscp = true;
                        if (zone->view->resolver != NULL)
                                udpsize =
                                  dns_resolver_getudpsize(zone->view->resolver);
@@ -12658,7 +12659,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
 
        }
        if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOEDNS)) {
-               result = add_opt(message, udpsize, reqnsid, ISC_FALSE);
+               result = add_opt(message, udpsize, reqnsid, false);
                if (result != ISC_R_SUCCESS)
                        zone_debuglog(zone, me, 1,
                                      "unable to add opt record: %s",
@@ -12719,7 +12720,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
                stub->magic = 0;
                if (stub->version != NULL)
                        dns_db_closeversion(stub->db, &stub->version,
-                                           ISC_FALSE);
+                                           false);
                if (stub->db != NULL)
                        dns_db_detach(&stub->db);
                if (stub->zone != NULL)
@@ -12741,7 +12742,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) {
 static void
 zone_shutdown(isc_task_t *task, isc_event_t *event) {
        dns_zone_t *zone = (dns_zone_t *) event->ev_arg;
-       isc_boolean_t free_needed, linked = ISC_FALSE;
+       bool free_needed, linked = false;
        dns_zone_t *raw = NULL, *secure = NULL;
 
        UNUSED(task);
@@ -12769,14 +12770,14 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) {
                if (zone->statelist == &zone->zmgr->waiting_for_xfrin) {
                        ISC_LIST_UNLINK(zone->zmgr->waiting_for_xfrin, zone,
                                        statelink);
-                       linked = ISC_TRUE;
+                       linked = true;
                        zone->statelist = NULL;
                }
                if (zone->statelist == &zone->zmgr->xfrin_in_progress) {
                        ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone,
                                        statelink);
                        zone->statelist = NULL;
-                       zmgr_resume_xfrs(zone->zmgr, ISC_FALSE);
+                       zmgr_resume_xfrs(zone->zmgr, false);
                }
                RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
        }
@@ -12981,7 +12982,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
        if (isc_time_isepoch(&next)) {
                zone_debuglog(zone, me, 10, "settimer inactive");
                result = isc_timer_reset(zone->timer, isc_timertype_inactive,
-                                         NULL, NULL, ISC_TRUE);
+                                         NULL, NULL, true);
                if (result != ISC_R_SUCCESS)
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "could not deactivate zone timer: %s",
@@ -12990,7 +12991,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
                if (isc_time_compare(&next, now) <= 0)
                        next = *now;
                result = isc_timer_reset(zone->timer, isc_timertype_once,
-                                        &next, NULL, ISC_TRUE);
+                                        &next, NULL, true);
                if (result != ISC_R_SUCCESS)
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "could not reset zone timer: %s",
@@ -13093,7 +13094,7 @@ notify_createmessage(dns_zone_t *zone, unsigned int flags,
        dns_name_init(tempname, NULL);
        dns_name_clone(&zone->origin, tempname);
        dns_db_currentversion(zonedb, &version);
-       result = dns_db_findnode(zonedb, tempname, ISC_FALSE, &node);
+       result = dns_db_findnode(zonedb, tempname, false, &node);
        if (result != ISC_R_SUCCESS)
                goto soa_cleanup;
 
@@ -13141,7 +13142,7 @@ notify_createmessage(dns_zone_t *zone, unsigned int flags,
        if (node != NULL)
                dns_db_detachnode(zonedb, &node);
        if (version != NULL)
-               dns_db_closeversion(zonedb, &version, ISC_FALSE);
+               dns_db_closeversion(zonedb, &version, false);
        if (zonedb != NULL)
                dns_db_detach(&zonedb);
        if (tempname != NULL)
@@ -13186,7 +13187,7 @@ dns_zone_notifyreceive2(dns_zone_t *zone, isc_sockaddr_t *from,
        int match = 0;
        isc_netaddr_t netaddr;
        uint32_t serial = 0;
-       isc_boolean_t have_serial = ISC_FALSE;
+       bool have_serial = false;
        dns_tsigkey_t *tsigkey;
        dns_name_t *tsig;
 
@@ -13315,7 +13316,7 @@ dns_zone_notifyreceive2(dns_zone_t *zone, isc_sockaddr_t *from,
                        result = dns_rdata_tostruct(&rdata, &soa, NULL);
                        RUNTIME_CHECK(result == ISC_R_SUCCESS);
                        serial = soa.serial;
-                       have_serial = ISC_TRUE;
+                       have_serial = true;
                        /*
                         * The following should safely be performed without DB
                         * lock and succeed in this context.
@@ -13559,7 +13560,7 @@ dns_zone_clearxfracl(dns_zone_t *zone) {
        UNLOCK_ZONE(zone);
 }
 
-isc_boolean_t
+bool
 dns_zone_getupdatedisabled(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        return (zone->update_disabled);
@@ -13567,12 +13568,12 @@ dns_zone_getupdatedisabled(dns_zone_t *zone) {
 }
 
 void
-dns_zone_setupdatedisabled(dns_zone_t *zone, isc_boolean_t state) {
+dns_zone_setupdatedisabled(dns_zone_t *zone, bool state) {
        REQUIRE(DNS_ZONE_VALID(zone));
        zone->update_disabled = state;
 }
 
-isc_boolean_t
+bool
 dns_zone_getzeronosoattl(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        return (zone->zero_no_soa_ttl);
@@ -13580,7 +13581,7 @@ dns_zone_getzeronosoattl(dns_zone_t *zone) {
 }
 
 void
-dns_zone_setzeronosoattl(dns_zone_t *zone, isc_boolean_t state) {
+dns_zone_setzeronosoattl(dns_zone_t *zone, bool state) {
        REQUIRE(DNS_ZONE_VALID(zone));
        zone->zero_no_soa_ttl = state;
 }
@@ -13631,7 +13632,7 @@ zone_namerd_tostr(dns_zone_t *zone, char *buf, size_t length) {
        isc_buffer_init(&buffer, buf, (unsigned int)length - 1);
        if (zone->type != dns_zone_redirect && zone->type != dns_zone_key) {
                if (dns_name_dynamic(&zone->origin))
-                       result = dns_name_totext(&zone->origin, ISC_TRUE, &buffer);
+                       result = dns_name_totext(&zone->origin, true, &buffer);
                if (result != ISC_R_SUCCESS &&
                    isc_buffer_availablelength(&buffer) >= (sizeof("<UNKNOWN>") - 1))
                        isc_buffer_putstr(&buffer, "<UNKNOWN>");
@@ -13668,7 +13669,7 @@ zone_name_tostr(dns_zone_t *zone, char *buf, size_t length) {
         */
        isc_buffer_init(&buffer, buf, (unsigned int)length - 1);
        if (dns_name_dynamic(&zone->origin))
-               result = dns_name_totext(&zone->origin, ISC_TRUE, &buffer);
+               result = dns_name_totext(&zone->origin, true, &buffer);
        if (result != ISC_R_SUCCESS &&
            isc_buffer_availablelength(&buffer) >= (sizeof("<UNKNOWN>") - 1))
                isc_buffer_putstr(&buffer, "<UNKNOWN>");
@@ -13962,19 +13963,19 @@ notify_done(isc_task_t *task, isc_event_t *event) {
        isc_event_free(&event);
        if (message != NULL && message->rcode == dns_rcode_formerr &&
            (notify->flags & DNS_NOTIFY_NOSOA) == 0) {
-               isc_boolean_t startup;
+               bool startup;
 
                notify->flags |= DNS_NOTIFY_NOSOA;
                dns_request_destroy(&notify->request);
-               startup = ISC_TF((notify->flags & DNS_NOTIFY_STARTUP) != 0);
+               startup = (notify->flags & DNS_NOTIFY_STARTUP);
                result = notify_send_queue(notify, startup);
                if (result != ISC_R_SUCCESS)
-                       notify_destroy(notify, ISC_FALSE);
+                       notify_destroy(notify, false);
        } else {
                if (result == ISC_R_TIMEDOUT)
                        notify_log(notify->zone, ISC_LOG_DEBUG(1),
                                   "notify to %s: retries exceeded", addrbuf);
-               notify_destroy(notify, ISC_FALSE);
+               notify_destroy(notify, false);
        }
        if (message != NULL)
                dns_message_destroy(&message);
@@ -14088,7 +14089,7 @@ sync_secure_db(dns_zone_t *seczone, dns_zone_t *raw, dns_db_t *secdb,
        dns_db_attach(raw->db, &rawdb);
        dns_db_currentversion(rawdb, &rawver);
        result = dns_db_diffx(diff, rawdb, rawver, secdb, secver, NULL);
-       dns_db_closeversion(rawdb, &rawver, ISC_FALSE);
+       dns_db_closeversion(rawdb, &rawver, false);
        dns_db_detach(&rawdb);
 
        if (result != ISC_R_SUCCESS)
@@ -14347,15 +14348,15 @@ receive_secure_serial(isc_task_t *task, isc_event_t *event) {
        DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
 
        zone->sourceserial = end;
-       zone->sourceserialset = ISC_TRUE;
+       zone->sourceserialset = true;
        zone_needdump(zone, DNS_DUMP_DELAY);
 
        TIME_NOW(&timenow);
        zone_settimer(zone, &timenow);
        UNLOCK_ZONE(zone);
 
-       dns_db_closeversion(zone->rss_db, &zone->rss_oldver, ISC_FALSE);
-       dns_db_closeversion(zone->rss_db, &zone->rss_newver, ISC_TRUE);
+       dns_db_closeversion(zone->rss_db, &zone->rss_oldver, false);
+       dns_db_closeversion(zone->rss_db, &zone->rss_newver, true);
 
        if (newserial != 0) {
                dns_zone_log(zone, ISC_LOG_INFO, "serial %u (unsigned %u)",
@@ -14378,10 +14379,10 @@ receive_secure_serial(isc_task_t *task, isc_event_t *event) {
        if (zone->rss_db != NULL) {
                if (zone->rss_oldver != NULL)
                        dns_db_closeversion(zone->rss_db, &zone->rss_oldver,
-                                           ISC_FALSE);
+                                           false);
                if (zone->rss_newver != NULL)
                        dns_db_closeversion(zone->rss_db, &zone->rss_newver,
-                                           ISC_FALSE);
+                                           false);
                dns_db_detach(&zone->rss_db);
        }
        INSIST(zone->rss_oldver == NULL);
@@ -14625,7 +14626,7 @@ save_nsec3param(dns_zone_t *zone, nsec3paramlist_t *nsec3list) {
        if (node != NULL)
                dns_db_detachnode(db, &node);
        if (version != NULL)
-               dns_db_closeversion(db, &version, ISC_FALSE);
+               dns_db_closeversion(db, &version, false);
        if (db != NULL)
                dns_db_detach(&db);
        if (dns_rdataset_isassociated(&rdataset))
@@ -14694,7 +14695,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
        dns_dbversion_t *version = NULL;
        isc_time_t loadtime;
        unsigned int oldserial = 0;
-       isc_boolean_t have_oldserial = ISC_FALSE;
+       bool have_oldserial = false;
        nsec3paramlist_t nsec3list;
 
        UNUSED(task);
@@ -14719,7 +14720,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
        if (zone->db != NULL) {
                result = dns_db_getsoaserial(zone->db, NULL, &oldserial);
                if (result == ISC_R_SUCCESS)
-                       have_oldserial = ISC_TRUE;
+                       have_oldserial = true;
 
                /*
                 * assemble nsec3parameters from the old zone, and set a flag
@@ -14754,7 +14755,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
                if (result != ISC_R_SUCCESS)
                        continue;
 
-               result = dns_db_findnode(db, name, ISC_TRUE, &node);
+               result = dns_db_findnode(db, name, true, &node);
                if (result != ISC_R_SUCCESS)
                        goto failure;
 
@@ -14803,7 +14804,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
                }
        }
 
-       dns_db_closeversion(db, &version, ISC_TRUE);
+       dns_db_closeversion(db, &version, true);
 
        /*
         * Lock hierarchy: zmgr, zone, raw.
@@ -14833,7 +14834,7 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
                if (node != NULL)
                        dns_db_detachnode(db, &node);
                if (version != NULL)
-                       dns_db_closeversion(db, &version, ISC_FALSE);
+                       dns_db_closeversion(db, &version, false);
                dns_db_detach(&db);
        }
        if (rawnode != NULL)
@@ -14868,7 +14869,7 @@ zone_send_securedb(dns_zone_t *zone, dns_db_t *db) {
 }
 
 isc_result_t
-dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
+dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
        isc_result_t result;
        dns_zone_t *secure = NULL;
 
@@ -14898,7 +14899,7 @@ dns_zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
 }
 
 static isc_result_t
-zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
+zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
        dns_dbversion_t *ver;
        isc_result_t result;
        unsigned int soacount = 0;
@@ -15076,7 +15077,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
                        zone_send_securedb(zone, db);
        }
 
-       dns_db_closeversion(db, &ver, ISC_FALSE);
+       dns_db_closeversion(db, &ver, false);
 
        dns_zone_log(zone, ISC_LOG_DEBUG(3), "replacing zone database");
 
@@ -15088,7 +15089,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
        return (ISC_R_SUCCESS);
 
  fail:
-       dns_db_closeversion(db, &ver, ISC_FALSE);
+       dns_db_closeversion(db, &ver, false);
        return (result);
 }
 
@@ -15122,12 +15123,12 @@ zone_detachdb(dns_zone_t *zone) {
 static void
 zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
        isc_time_t now;
-       isc_boolean_t again = ISC_FALSE;
+       bool again = false;
        unsigned int soacount;
        unsigned int nscount;
        uint32_t serial, refresh, retry, expire, minimum;
        isc_result_t xfrresult = result;
-       isc_boolean_t free_needed;
+       bool free_needed;
        dns_zone_t *secure = NULL;
 
        REQUIRE(DNS_ZONE_VALID(zone));
@@ -15313,12 +15314,12 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
                                while (zone->curmaster < zone->masterscnt &&
                                       zone->mastersok[zone->curmaster])
                                        zone->curmaster++;
-                               again = ISC_TRUE;
+                               again = true;
                        } else
                                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
                } else {
                        DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_REFRESH);
-                       again = ISC_TRUE;
+                       again = true;
                }
                inc_stats(zone, dns_zonestatscounter_xfrfail);
                break;
@@ -15374,7 +15375,7 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
                RWLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
                ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone, statelink);
                zone->statelist = NULL;
-               zmgr_resume_xfrs(zone->zmgr, ISC_FALSE);
+               zmgr_resume_xfrs(zone->zmgr, false);
                RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
                LOCK_ZONE(zone);
        }
@@ -15440,7 +15441,7 @@ zone_loaddone(void *arg, isc_result_t result) {
         */
        if ((result == ISC_R_SUCCESS || result == DNS_R_SEENINCLUDE) &&
             DNS_ZONE_FLAG(zone, DNS_ZONEFLG_THAW))
-               zone->update_disabled = ISC_FALSE;
+               zone->update_disabled = false;
        DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_THAW);
        if (inline_secure(zone))
                UNLOCK_ZONE(zone->raw);
@@ -15565,7 +15566,7 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
        isc_time_t now;
        const char *soa_before = "";
        isc_dscp_t dscp = -1;
-       isc_boolean_t loaded;
+       bool loaded;
 
        UNUSED(task);
 
@@ -15600,7 +15601,7 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
         * Decide whether we should request IXFR or AXFR.
         */
        ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
-       loaded = ISC_TF(zone->db != NULL);
+       loaded = (zone->db != NULL);
        ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
 
        if (!loaded) {
@@ -15622,12 +15623,12 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLAG_NOIXFR);
                UNLOCK_ZONE(zone);
        } else {
-               isc_boolean_t use_ixfr = ISC_TRUE;
+               bool use_ixfr = true;
                if (peer != NULL)
                        result = dns_peer_getrequestixfr(peer, &use_ixfr);
                if (peer == NULL || result != ISC_R_SUCCESS)
                        use_ixfr = zone->requestixfr;
-               if (use_ixfr == ISC_FALSE) {
+               if (use_ixfr == false) {
                        dns_zone_log(zone, ISC_LOG_DEBUG(1),
                                     "IXFR disabled, requesting %sAXFR from %s",
                                     soa_before, master);
@@ -16060,8 +16061,8 @@ dns_zonemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
        setrl(zmgr->startupnotifyrl, &zmgr->startupnotifyrate, 20);
        setrl(zmgr->refreshrl, &zmgr->serialqueryrate, 20);
        setrl(zmgr->startuprefreshrl, &zmgr->startupserialqueryrate, 20);
-       isc_ratelimiter_setpushpop(zmgr->startupnotifyrl, ISC_TRUE);
-       isc_ratelimiter_setpushpop(zmgr->startuprefreshrl, ISC_TRUE);
+       isc_ratelimiter_setpushpop(zmgr->startupnotifyrl, true);
+       isc_ratelimiter_setpushpop(zmgr->startuprefreshrl, true);
 
        zmgr->iolimit = 1;
        zmgr->ioactive = 0;
@@ -16187,7 +16188,7 @@ dns_zonemgr_managezone(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
 
 void
 dns_zonemgr_releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
-       isc_boolean_t free_now = ISC_FALSE;
+       bool free_now = false;
 
        REQUIRE(DNS_ZONE_VALID(zone));
        REQUIRE(DNS_ZONEMGR_VALID(zmgr));
@@ -16200,7 +16201,7 @@ dns_zonemgr_releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
        zone->zmgr = NULL;
        zmgr->refs--;
        if (zmgr->refs == 0)
-               free_now = ISC_TRUE;
+               free_now = true;
 
        UNLOCK_ZONE(zone);
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
@@ -16226,7 +16227,7 @@ dns_zonemgr_attach(dns_zonemgr_t *source, dns_zonemgr_t **target) {
 void
 dns_zonemgr_detach(dns_zonemgr_t **zmgrp) {
        dns_zonemgr_t *zmgr;
-       isc_boolean_t free_now = ISC_FALSE;
+       bool free_now = false;
 
        REQUIRE(zmgrp != NULL);
        zmgr = *zmgrp;
@@ -16235,7 +16236,7 @@ dns_zonemgr_detach(dns_zonemgr_t **zmgrp) {
        RWLOCK(&zmgr->rwlock, isc_rwlocktype_write);
        zmgr->refs--;
        if (zmgr->refs == 0)
-               free_now = ISC_TRUE;
+               free_now = true;
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
 
        if (free_now)
@@ -16265,7 +16266,7 @@ dns_zonemgr_forcemaint(dns_zonemgr_t *zmgr) {
         * possible.
         */
        RWLOCK(&zmgr->rwlock, isc_rwlocktype_write);
-       zmgr_resume_xfrs(zmgr, ISC_TRUE);
+       zmgr_resume_xfrs(zmgr, true);
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
        return (ISC_R_SUCCESS);
 }
@@ -16276,7 +16277,7 @@ dns_zonemgr_resumexfrs(dns_zonemgr_t *zmgr) {
        REQUIRE(DNS_ZONEMGR_VALID(zmgr));
 
        RWLOCK(&zmgr->rwlock, isc_rwlocktype_write);
-       zmgr_resume_xfrs(zmgr, ISC_TRUE);
+       zmgr_resume_xfrs(zmgr, true);
        RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
 }
 
@@ -16394,7 +16395,7 @@ dns_zonemgr_setsize(dns_zonemgr_t *zmgr, int num_zones) {
         * rest of the time.  For now, however, it's okay to just
         * set it and forget it.
         */
-       isc_taskpool_setprivilege(zmgr->loadtasks, ISC_TRUE);
+       isc_taskpool_setprivilege(zmgr->loadtasks, true);
 
        /* Create or resize the zone memory context pool. */
        if (zmgr->mctxpool == NULL)
@@ -16467,7 +16468,7 @@ dns_zonemgr_getttransfersperns(dns_zonemgr_t *zmgr) {
  *     The zone manager is locked by the caller.
  */
 static void
-zmgr_resume_xfrs(dns_zonemgr_t *zmgr, isc_boolean_t multi) {
+zmgr_resume_xfrs(dns_zonemgr_t *zmgr, bool multi) {
        dns_zone_t *zone;
        dns_zone_t *next;
 
@@ -16632,12 +16633,12 @@ dns_zonemgr_getiolimit(dns_zonemgr_t *zmgr) {
  */
 
 static isc_result_t
-zonemgr_getio(dns_zonemgr_t *zmgr, isc_boolean_t high,
+zonemgr_getio(dns_zonemgr_t *zmgr, bool high,
              isc_task_t *task, isc_taskaction_t action, void *arg,
              dns_io_t **iop)
 {
        dns_io_t *io;
-       isc_boolean_t queue;
+       bool queue;
 
        REQUIRE(DNS_ZONEMGR_VALID(zmgr));
        REQUIRE(iop != NULL && *iop == NULL);
@@ -16662,7 +16663,7 @@ zonemgr_getio(dns_zonemgr_t *zmgr, isc_boolean_t high,
 
        LOCK(&zmgr->iolock);
        zmgr->ioactive++;
-       queue = ISC_TF(zmgr->ioactive > zmgr->iolimit);
+       queue = (zmgr->ioactive > zmgr->iolimit);
        if (queue) {
                if (io->high)
                        ISC_LIST_APPEND(zmgr->high, io, link);
@@ -16717,7 +16718,7 @@ zonemgr_putio(dns_io_t **iop) {
 
 static void
 zonemgr_cancelio(dns_io_t *io) {
-       isc_boolean_t send_event = ISC_FALSE;
+       bool send_event = false;
 
        REQUIRE(DNS_IO_VALID(io));
 
@@ -16731,7 +16732,7 @@ zonemgr_cancelio(dns_io_t *io) {
                else
                        ISC_LIST_UNLINK(io->zmgr->low, io, link);
 
-               send_event = ISC_TRUE;
+               send_event = true;
                INSIST(io->event != NULL);
        }
        UNLOCK(&io->zmgr->iolock);
@@ -16865,7 +16866,7 @@ dns_zonemgr_getserialqueryrate(dns_zonemgr_t *zmgr) {
        return (zmgr->serialqueryrate);
 }
 
-isc_boolean_t
+bool
 dns_zonemgr_unreachable(dns_zonemgr_t *zmgr, isc_sockaddr_t *remote,
                        isc_sockaddr_t *local, isc_time_t *now)
 {
@@ -16893,7 +16894,7 @@ dns_zonemgr_unreachable(dns_zonemgr_t *zmgr, isc_sockaddr_t *remote,
                }
        }
        RWUNLOCK(&zmgr->urlock, locktype);
-       return (ISC_TF(i < UNREACH_CHACHE_SIZE && count > 1U));
+       return (i < UNREACH_CHACHE_SIZE && count > 1U);
 }
 
 void
@@ -17007,7 +17008,7 @@ dns_zone_forcereload(dns_zone_t *zone) {
        dns_zone_refresh(zone);
 }
 
-isc_boolean_t
+bool
 dns_zone_isforced(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
 
@@ -17015,7 +17016,7 @@ dns_zone_isforced(dns_zone_t *zone) {
 }
 
 isc_result_t
-dns_zone_setstatistics(dns_zone_t *zone, isc_boolean_t on) {
+dns_zone_setstatistics(dns_zone_t *zone, bool on) {
        /*
         * This function is obsoleted.
         */
@@ -17051,11 +17052,11 @@ dns_zone_setrequeststats(dns_zone_t *zone, isc_stats_t *stats) {
 
        LOCK_ZONE(zone);
        if (zone->requeststats_on && stats == NULL)
-               zone->requeststats_on = ISC_FALSE;
+               zone->requeststats_on = false;
        else if (!zone->requeststats_on && stats != NULL) {
                if (zone->requeststats == NULL) {
                        isc_stats_attach(stats, &zone->requeststats);
-                       zone->requeststats_on = ISC_TRUE;
+                       zone->requeststats_on = true;
                }
        }
        UNLOCK_ZONE(zone);
@@ -17070,7 +17071,7 @@ dns_zone_setrcvquerystats(dns_zone_t *zone, dns_stats_t *stats) {
        if (zone->requeststats_on && stats != NULL) {
                if (zone->rcvquerystats == NULL) {
                        dns_stats_attach(stats, &zone->rcvquerystats);
-                       zone->requeststats_on = ISC_TRUE;
+                       zone->requeststats_on = true;
                }
        }
        UNLOCK_ZONE(zone);
@@ -17237,8 +17238,8 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state) {
 
 isc_result_t
 dns_zone_checknames(dns_zone_t *zone, dns_name_t *name, dns_rdata_t *rdata) {
-       isc_boolean_t ok = ISC_TRUE;
-       isc_boolean_t fail = ISC_FALSE;
+       bool ok = true;
+       bool fail = false;
        char namebuf[DNS_NAME_FORMATSIZE];
        char namebuf2[DNS_NAME_FORMATSIZE];
        char typebuf[DNS_RDATATYPE_FORMATSIZE];
@@ -17254,10 +17255,10 @@ dns_zone_checknames(dns_zone_t *zone, dns_name_t *name, dns_rdata_t *rdata) {
        if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_CHECKNAMESFAIL) ||
            rdata->type == dns_rdatatype_nsec3) {
                level = ISC_LOG_ERROR;
-               fail = ISC_TRUE;
+               fail = true;
        }
 
-       ok = dns_rdata_checkowner(name, rdata->rdclass, rdata->type, ISC_TRUE);
+       ok = dns_rdata_checkowner(name, rdata->rdclass, rdata->type, true);
        if (!ok) {
                dns_name_format(name, namebuf, sizeof(namebuf));
                dns_rdatatype_format(rdata->type, typebuf, sizeof(typebuf));
@@ -17328,7 +17329,7 @@ dns_zone_getnotifydelay(dns_zone_t *zone) {
 
 isc_result_t
 dns_zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm,
-                    uint16_t keyid, isc_boolean_t deleteit)
+                    uint16_t keyid, bool deleteit)
 {
        isc_result_t result;
        REQUIRE(DNS_ZONE_VALID(zone));
@@ -17413,7 +17414,7 @@ dns_zone_getprivatetype(dns_zone_t *zone) {
 
 static isc_result_t
 zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm, uint16_t keyid,
-                isc_boolean_t deleteit)
+                bool deleteit)
 {
        dns_signing_t *signing;
        dns_signing_t *current;
@@ -17431,7 +17432,7 @@ zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm, uint16_t keyid,
        signing->algorithm = algorithm;
        signing->keyid = keyid;
        signing->deleteit = deleteit;
-       signing->done = ISC_FALSE;
+       signing->done = false;
 
        TIME_NOW(&now);
 
@@ -17454,7 +17455,7 @@ zone_signwithkey(dns_zone_t *zone, dns_secalg_t algorithm, uint16_t keyid,
                    current->algorithm == signing->algorithm &&
                    current->keyid == signing->keyid) {
                        if (current->deleteit != signing->deleteit)
-                               current->done = ISC_TRUE;
+                               current->done = true;
                        else
                                goto cleanup;
                }
@@ -17534,7 +17535,7 @@ next_keyevent(dst_key_t *key, isc_stdtime_t *timep) {
 
 static isc_result_t
 rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
-         const dns_rdata_t *rdata, isc_boolean_t *flag)
+         const dns_rdata_t *rdata, bool *flag)
 {
        dns_rdataset_t rdataset;
        dns_dbnode_t *node = NULL;
@@ -17542,13 +17543,13 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
 
        dns_rdataset_init(&rdataset);
        if (rdata->type == dns_rdatatype_nsec3)
-               CHECK(dns_db_findnsec3node(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnsec3node(db, name, false, &node));
        else
-               CHECK(dns_db_findnode(db, name, ISC_FALSE, &node));
+               CHECK(dns_db_findnode(db, name, false, &node));
        result = dns_db_findrdataset(db, node, ver, rdata->type, 0,
                                     (isc_stdtime_t) 0, &rdataset, NULL);
        if (result == ISC_R_NOTFOUND) {
-               *flag = ISC_FALSE;
+               *flag = false;
                result = ISC_R_SUCCESS;
                goto failure;
        }
@@ -17563,9 +17564,9 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        }
        dns_rdataset_disassociate(&rdataset);
        if (result == ISC_R_SUCCESS) {
-               *flag = ISC_TRUE;
+               *flag = true;
        } else if (result == ISC_R_NOMORE) {
-               *flag = ISC_FALSE;
+               *flag = false;
                result = ISC_R_SUCCESS;
        }
 
@@ -17581,12 +17582,12 @@ rr_exists(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
 static isc_result_t
 add_signing_records(dns_db_t *db, dns_rdatatype_t privatetype,
                    dns_dbversion_t *ver, dns_diff_t *diff,
-                   isc_boolean_t sign_all)
+                   bool sign_all)
 {
        dns_difftuple_t *tuple, *newtuple = NULL;
        dns_rdata_dnskey_t dnskey;
        dns_rdata_t rdata = DNS_RDATA_INIT;
-       isc_boolean_t flag;
+       bool flag;
        isc_region_t r;
        isc_result_t result = ISC_R_SUCCESS;
        uint16_t keyid;
@@ -17653,7 +17654,7 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
 {
        isc_result_t result;
        isc_stdtime_t inception, soaexpire;
-       isc_boolean_t check_ksk, keyset_kskonly;
+       bool check_ksk, keyset_kskonly;
        dst_key_t *zone_keys[DNS_MAXZONEKEYS];
        unsigned int nkeys = 0, i;
        dns_difftuple_t *tuple;
@@ -17688,7 +17689,7 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
        if (tuple == NULL) {
                result = del_sigs(zone, db, ver, &zone->origin,
                                  dns_rdatatype_dnskey, zonediff,
-                                 zone_keys, nkeys, now, ISC_FALSE);
+                                 zone_keys, nkeys, now, false);
                if (result != ISC_R_SUCCESS) {
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "sign_apex:del_sigs -> %s",
@@ -17728,13 +17729,13 @@ sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
  * NSEC only DNSKEYs are present with NSEC3 chains.
  * See update.c:check_dnssec()
  */
-static isc_boolean_t
+static bool
 dnskey_sane(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
            dns_diff_t *diff)
 {
        isc_result_t result;
        dns_difftuple_t *tuple;
-       isc_boolean_t nseconly = ISC_FALSE, nsec3 = ISC_FALSE;
+       bool nseconly = false, nsec3 = false;
        dns_rdatatype_t privatetype = dns_zone_getprivatetype(zone);
 
        /* Scan the tuples for an NSEC-only DNSKEY */
@@ -17749,7 +17750,7 @@ dnskey_sane(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
                alg = tuple->rdata.data[3];
                if (alg == DST_ALG_RSAMD5 || alg == DST_ALG_RSASHA1 ||
                    alg == DST_ALG_DSA || alg == DST_ALG_ECC) {
-                       nseconly = ISC_TRUE;
+                       nseconly = true;
                        break;
                }
        }
@@ -17764,7 +17765,7 @@ dnskey_sane(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
 
        /* Check existing DB for NSEC3 */
        if (!nsec3)
-               CHECK(dns_nsec3_activex(db, ver, ISC_FALSE,
+               CHECK(dns_nsec3_activex(db, ver, false,
                                        privatetype, &nsec3));
 
        /* Refuse to allow NSEC3 with NSEC-only keys */
@@ -17774,10 +17775,10 @@ dnskey_sane(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
                goto failure;
        }
 
-       return (ISC_TRUE);
+       return (true);
 
  failure:
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -17798,7 +17799,7 @@ clean_nsec3param(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
        if (result != ISC_R_NOTFOUND)
                goto failure;
 
-       result = dns_nsec3param_deletechains(db, ver, zone, ISC_TRUE, diff);
+       result = dns_nsec3param_deletechains(db, ver, zone, true, diff);
 
  failure:
        if (node != NULL)
@@ -17810,7 +17811,7 @@ clean_nsec3param(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
  * Given an RRSIG rdataset and an algorithm, determine whether there
  * are any signatures using that algorithm.
  */
-static isc_boolean_t
+static bool
 signed_with_alg(dns_rdataset_t *rdataset, dns_secalg_t alg) {
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_rdata_rrsig_t rrsig;
@@ -17818,7 +17819,7 @@ signed_with_alg(dns_rdataset_t *rdataset, dns_secalg_t alg) {
 
        REQUIRE(rdataset == NULL || rdataset->type == dns_rdatatype_rrsig);
        if (rdataset == NULL || !dns_rdataset_isassociated(rdataset)) {
-               return (ISC_FALSE);
+               return (false);
        }
 
        for (result = dns_rdataset_first(rdataset);
@@ -17830,10 +17831,10 @@ signed_with_alg(dns_rdataset_t *rdataset, dns_secalg_t alg) {
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                dns_rdata_reset(&rdata);
                if (rrsig.algorithm == alg)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -17841,7 +17842,7 @@ add_chains(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
           dns_diff_t *diff)
 {
        dns_name_t *origin;
-       isc_boolean_t build_nsec3;
+       bool build_nsec3;
        isc_result_t result;
 
        origin = dns_db_origin(db);
@@ -17849,8 +17850,8 @@ add_chains(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
                                 &build_nsec3));
        if (build_nsec3)
                CHECK(dns_nsec3_addnsec3sx(db, ver, origin, zone->minimum,
-                                          ISC_FALSE, zone->privatetype, diff));
-       CHECK(updatesecure(db, ver, origin, zone->minimum, ISC_TRUE, diff));
+                                          false, zone->privatetype, diff));
+       CHECK(updatesecure(db, ver, origin, zone->minimum, true, diff));
 
  failure:
        return (result);
@@ -17867,9 +17868,9 @@ zone_rekey(dns_zone_t *zone) {
        dns_dnsseckey_t *key;
        dns_diff_t diff, _sig_diff;
        dns__zonediff_t zonediff;
-       isc_boolean_t commit = ISC_FALSE, newactive = ISC_FALSE;
-       isc_boolean_t newalg = ISC_FALSE;
-       isc_boolean_t fullsign;
+       bool commit = false, newactive = false;
+       bool newalg = false;
+       bool fullsign;
        dns_ttl_t ttl = 3600;
        const char *dir;
        isc_mem_t *mctx;
@@ -17918,7 +17919,7 @@ zone_rekey(dns_zone_t *zone) {
                CHECK(dns_dnssec_keylistfromrdataset(&zone->origin, dir,
                                                     mctx, &keyset,
                                                     &keysigs, &soasigs,
-                                                    ISC_FALSE, ISC_FALSE,
+                                                    false, false,
                                                     &dnskeys));
        } else if (result != ISC_R_NOTFOUND)
                goto failure;
@@ -17940,17 +17941,17 @@ zone_rekey(dns_zone_t *zone) {
         * True when called from "rndc sign".  Indicates the zone should be
         * fully signed now.
         */
-       fullsign = ISC_TF(DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_FULLSIGN) != 0);
+       fullsign = DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_FULLSIGN);
 
        result = dns_dnssec_findmatchingkeys2(&zone->origin, dir, now, mctx,
                                              &keys);
        if (result == ISC_R_SUCCESS) {
-               isc_boolean_t check_ksk;
+               bool check_ksk;
                check_ksk = DNS_ZONE_OPTION(zone, DNS_ZONEOPT_UPDATECHECKKSK);
 
                result = dns_dnssec_updatekeys(&dnskeys, &keys, &rmkeys,
                                               &zone->origin, ttl, &diff,
-                                              ISC_TF(!check_ksk),
+                                              !check_ksk,
                                               mctx, logmsg);
                /*
                 * Keys couldn't be updated for some reason;
@@ -17989,10 +17990,10 @@ zone_rekey(dns_zone_t *zone) {
                        if (!key->first_sign)
                                continue;
 
-                       newactive = ISC_TRUE;
+                       newactive = true;
 
                        if (!dns_rdataset_isassociated(&keysigs)) {
-                               newalg = ISC_TRUE;
+                               newalg = true;
                                break;
                        }
 
@@ -18002,9 +18003,9 @@ zone_rekey(dns_zone_t *zone) {
                                 * first_sign so we won't sign the
                                 * whole zone with this key later
                                 */
-                               key->first_sign = ISC_FALSE;
+                               key->first_sign = false;
                        } else {
-                               newalg = ISC_TRUE;
+                               newalg = true;
                                break;
                        }
                }
@@ -18015,18 +18016,18 @@ zone_rekey(dns_zone_t *zone) {
                        CHECK(clean_nsec3param(zone, db, ver, &diff));
                        CHECK(add_signing_records(db, zone->privatetype,
                                                  ver, &diff,
-                                                 ISC_TF(newalg || fullsign)));
+                                                 (newalg || fullsign)));
                        CHECK(update_soa_serial(db, ver, &diff, mctx,
                                                zone->updatemethod));
                        CHECK(add_chains(zone, db, ver, &diff));
                        CHECK(sign_apex(zone, db, ver, now, &diff, &zonediff));
                        CHECK(zone_journal(zone, zonediff.diff, NULL,
                                           "zone_rekey"));
-                       commit = ISC_TRUE;
+                       commit = true;
                }
        }
 
-       dns_db_closeversion(db, &ver, ISC_TRUE);
+       dns_db_closeversion(db, &ver, true);
 
        if (commit) {
                dns_difftuple_t *tuple;
@@ -18046,7 +18047,7 @@ zone_rekey(dns_zone_t *zone) {
                                result = zone_signwithkey(zone,
                                                          dst_key_alg(key->key),
                                                          dst_key_id(key->key),
-                                                         ISC_TRUE);
+                                                         true);
                                if (result != ISC_R_SUCCESS) {
                                        dns_zone_log(zone, ISC_LOG_ERROR,
                                             "zone_signwithkey failed: %s",
@@ -18069,7 +18070,7 @@ zone_rekey(dns_zone_t *zone) {
                                result = zone_signwithkey(zone,
                                                          dst_key_alg(key->key),
                                                          dst_key_id(key->key),
-                                                         ISC_FALSE);
+                                                         false);
                                if (result != ISC_R_SUCCESS) {
                                        dns_zone_log(zone, ISC_LOG_ERROR,
                                             "zone_signwithkey failed: %s",
@@ -18092,7 +18093,7 @@ zone_rekey(dns_zone_t *zone) {
                                result = zone_signwithkey(zone,
                                                          dst_key_alg(key->key),
                                                          dst_key_id(key->key),
-                                                         ISC_FALSE);
+                                                         false);
                                if (result != ISC_R_SUCCESS) {
                                        dns_zone_log(zone, ISC_LOG_ERROR,
                                             "zone_signwithkey failed: %s",
@@ -18201,7 +18202,7 @@ zone_rekey(dns_zone_t *zone) {
        clear_keylist(&rmkeys, mctx);
 
        if (ver != NULL)
-               dns_db_closeversion(db, &ver, ISC_FALSE);
+               dns_db_closeversion(db, &ver, false);
        if (dns_rdataset_isassociated(&cdsset))
                dns_rdataset_disassociate(&cdsset);
        if (dns_rdataset_isassociated(&keyset))
@@ -18231,7 +18232,7 @@ zone_rekey(dns_zone_t *zone) {
 }
 
 void
-dns_zone_rekey(dns_zone_t *zone, isc_boolean_t fullsign) {
+dns_zone_rekey(dns_zone_t *zone, bool fullsign) {
        isc_time_t now;
 
        if (zone->type == dns_zone_master && zone->task != NULL) {
@@ -18262,7 +18263,7 @@ dns_zone_nscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
        if (result != ISC_R_SUCCESS)
                return (result);
        result = zone_count_ns_rr(zone, db, node, version, NULL, errors,
-                                 ISC_FALSE);
+                                 false);
        dns_db_detachnode(db, &node);
        return (result);
 }
@@ -18410,7 +18411,7 @@ dns_zone_cdscheck(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version) {
 }
 
 void
-dns_zone_setautomatic(dns_zone_t *zone, isc_boolean_t automatic) {
+dns_zone_setautomatic(dns_zone_t *zone, bool automatic) {
        REQUIRE(DNS_ZONE_VALID(zone));
 
        LOCK_ZONE(zone);
@@ -18418,14 +18419,14 @@ dns_zone_setautomatic(dns_zone_t *zone, isc_boolean_t automatic) {
        UNLOCK_ZONE(zone);
 }
 
-isc_boolean_t
+bool
 dns_zone_getautomatic(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        return (zone->automatic);
 }
 
 void
-dns_zone_setadded(dns_zone_t *zone, isc_boolean_t added) {
+dns_zone_setadded(dns_zone_t *zone, bool added) {
        REQUIRE(DNS_ZONE_VALID(zone));
 
        LOCK_ZONE(zone);
@@ -18433,7 +18434,7 @@ dns_zone_setadded(dns_zone_t *zone, isc_boolean_t added) {
        UNLOCK_ZONE(zone);
 }
 
-isc_boolean_t
+bool
 dns_zone_getadded(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        return (zone->added);
@@ -18491,24 +18492,24 @@ dns_zone_setrefreshkeyinterval(dns_zone_t *zone, uint32_t interval) {
 }
 
 void
-dns_zone_setrequestixfr(dns_zone_t *zone, isc_boolean_t flag) {
+dns_zone_setrequestixfr(dns_zone_t *zone, bool flag) {
        REQUIRE(DNS_ZONE_VALID(zone));
        zone->requestixfr = flag;
 }
 
-isc_boolean_t
+bool
 dns_zone_getrequestixfr(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        return (zone->requestixfr);
 }
 
 void
-dns_zone_setrequestexpire(dns_zone_t *zone, isc_boolean_t flag) {
+dns_zone_setrequestexpire(dns_zone_t *zone, bool flag) {
        REQUIRE(DNS_ZONE_VALID(zone));
        zone->requestexpire = flag;
 }
 
-isc_boolean_t
+bool
 dns_zone_getrequestexpire(dns_zone_t *zone) {
        REQUIRE(DNS_ZONE_VALID(zone));
        return (zone->requestexpire);
@@ -18604,7 +18605,7 @@ dns_zone_getraw(dns_zone_t *zone, dns_zone_t **raw) {
 
 struct keydone {
        isc_event_t event;
-       isc_boolean_t all;
+       bool all;
        unsigned char data[5];
 };
 
@@ -18613,7 +18614,7 @@ struct keydone {
 static void
 keydone(isc_task_t *task, isc_event_t *event) {
        const char *me = "keydone";
-       isc_boolean_t commit = ISC_FALSE;
+       bool commit = false;
        isc_result_t result;
        dns_rdata_t rdata = DNS_RDATA_INIT;
        dns_dbversion_t *oldver = NULL, *newver = NULL;
@@ -18624,7 +18625,7 @@ keydone(isc_task_t *task, isc_event_t *event) {
        dns_diff_t diff;
        struct keydone *kd = (struct keydone *)event;
        dns_update_log_t log = { update_log_cb, NULL };
-       isc_boolean_t clear_pending = ISC_FALSE;
+       bool clear_pending = false;
 
        UNUSED(task);
 
@@ -18670,22 +18671,22 @@ keydone(isc_task_t *task, isc_event_t *event) {
        for (result = dns_rdataset_first(&rdataset);
             result == ISC_R_SUCCESS;
             result = dns_rdataset_next(&rdataset)) {
-               isc_boolean_t found = ISC_FALSE;
+               bool found = false;
 
                dns_rdataset_current(&rdataset, &rdata);
 
                if (kd->all) {
                        if (rdata.length == 5 && rdata.data[0] != 0 &&
                               rdata.data[3] == 0 && rdata.data[4] == 1)
-                               found = ISC_TRUE;
+                               found = true;
                        else if (rdata.data[0] == 0 &&
                                 (rdata.data[2] & PENDINGFLAGS) != 0) {
-                               found = ISC_TRUE;
-                               clear_pending = ISC_TRUE;
+                               found = true;
+                               clear_pending = true;
                        }
                } else if (rdata.length == 5 &&
                           memcmp(rdata.data, kd->data, 5) == 0)
-                       found = ISC_TRUE;
+                       found = true;
 
                if (found)
                        CHECK(update_one_rr(db, newver, &diff, DNS_DIFFOP_DEL,
@@ -18706,7 +18707,7 @@ keydone(isc_task_t *task, isc_event_t *event) {
                        CHECK(result);
 
                CHECK(zone_journal(zone, &diff, NULL, "keydone"));
-               commit = ISC_TRUE;
+               commit = true;
 
                LOCK_ZONE(zone);
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED);
@@ -18721,7 +18722,7 @@ keydone(isc_task_t *task, isc_event_t *event) {
                if (node != NULL)
                        dns_db_detachnode(db, &node);
                if (oldver != NULL)
-                       dns_db_closeversion(db, &oldver, ISC_FALSE);
+                       dns_db_closeversion(db, &oldver, false);
                if (newver != NULL)
                        dns_db_closeversion(db, &newver, commit);
                dns_db_detach(&db);
@@ -18755,7 +18756,7 @@ dns_zone_keydone(dns_zone_t *zone, const char *keystr) {
 
        kd = (struct keydone *) e;
        if (strcasecmp(keystr, "all") == 0)
-               kd->all = ISC_TRUE;
+               kd->all = true;
        else {
                isc_textregion_t r;
                const char *algstr;
@@ -18763,7 +18764,7 @@ dns_zone_keydone(dns_zone_t *zone, const char *keystr) {
                dns_secalg_t alg;
                size_t n;
 
-               kd->all = ISC_FALSE;
+               kd->all = false;
 
                n = sscanf(keystr, "%hu/", &keyid);
                if (n == 0U)
@@ -18813,7 +18814,7 @@ dns_zone_keydone(dns_zone_t *zone, const char *keystr) {
 static void
 setnsec3param(isc_task_t *task, isc_event_t *event) {
        const char *me = "setnsec3param";
-       isc_boolean_t commit = ISC_FALSE;
+       bool commit = false;
        isc_result_t result;
        dns_dbversion_t *oldver = NULL, *newver = NULL;
        dns_zone_t *zone;
@@ -18825,8 +18826,8 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
        nsec3param_t *np;
        dns_update_log_t log = { update_log_cb, NULL };
        dns_rdata_t rdata;
-       isc_boolean_t nseconly;
-       isc_boolean_t exists = ISC_FALSE;
+       bool nseconly;
+       bool exists = false;
 
        UNUSED(task);
 
@@ -18874,7 +18875,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
 
                        if (np->length == rdata.length &&
                            memcmp(rdata.data, np->data, np->length) == 0) {
-                               exists = ISC_TRUE;
+                               exists = true;
                                break;
                        }
                }
@@ -18900,7 +18901,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
                            memcmp(rdata.data, np->data + 1,
                                   np->length - 1) == 0)
                        {
-                               exists = ISC_TRUE;
+                               exists = true;
                                break;
                        }
                }
@@ -18947,7 +18948,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
 
        /*
         * If we changed anything in the zone, write changes to journal file
-        * and set commit to ISC_TRUE so that resume_addnsec3chain() will be
+        * and set commit to true so that resume_addnsec3chain() will be
         * called below in order to kick off adding/removing relevant NSEC3
         * records.
         */
@@ -18960,7 +18961,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
                if (result != ISC_R_NOTFOUND)
                        CHECK(result);
                CHECK(zone_journal(zone, &diff, NULL, "setnsec3param"));
-               commit = ISC_TRUE;
+               commit = true;
 
                LOCK_ZONE(zone);
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED);
@@ -18976,7 +18977,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
        if (node != NULL)
                dns_db_detachnode(db, &node);
        if (oldver != NULL)
-               dns_db_closeversion(db, &oldver, ISC_FALSE);
+               dns_db_closeversion(db, &oldver, false);
        if (newver != NULL)
                dns_db_closeversion(db, &newver, commit);
        if (db != NULL)
@@ -19001,7 +19002,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
  * the NSEC3 changes requested for the zone:
  *
  *   - if NSEC3 is to be disabled ("-nsec3param none"), only set the "nsec"
- *     field of the structure to ISC_TRUE and the "replace" field to the value
+ *     field of the structure to true and the "replace" field to the value
  *     of the "replace" argument, leaving other fields initialized to zeros, to
  *     signal that the zone should be signed using NSEC instead of NSEC3,
  *
@@ -19016,7 +19017,7 @@ setnsec3param(isc_task_t *task, isc_event_t *event) {
 isc_result_t
 dns_zone_setnsec3param(dns_zone_t *zone, uint8_t hash, uint8_t flags,
                       uint16_t iter, uint8_t saltlen,
-                      unsigned char *salt, isc_boolean_t replace)
+                      unsigned char *salt, bool replace)
 {
        isc_result_t result = ISC_R_SUCCESS;
        dns_rdata_nsec3param_t param;
@@ -19047,7 +19048,7 @@ dns_zone_setnsec3param(dns_zone_t *zone, uint8_t hash, uint8_t flags,
        np->replace = replace;
        if (hash == 0) {
                np->length = 0;
-               np->nsec = ISC_TRUE;
+               np->nsec = true;
        } else {
                param.common.rdclass = zone->rdclass;
                param.common.rdtype = dns_rdatatype_nsec3param;
@@ -19065,7 +19066,7 @@ dns_zone_setnsec3param(dns_zone_t *zone, uint8_t hash, uint8_t flags,
                dns_nsec3param_toprivate(&nrdata, &prdata, zone->privatetype,
                                         np->data, sizeof(np->data));
                np->length = prdata.length;
-               np->nsec = ISC_FALSE;
+               np->nsec = false;
        }
 
        zone_iattach(zone, &dummy);
@@ -19170,7 +19171,7 @@ static void
 setserial(isc_task_t *task, isc_event_t *event) {
        uint32_t oldserial, desired;
        const char *me = "setserial";
-       isc_boolean_t commit = ISC_FALSE;
+       bool commit = false;
        isc_result_t result;
        dns_dbversion_t *oldver = NULL, *newver = NULL;
        dns_zone_t *zone;
@@ -19238,7 +19239,7 @@ setserial(isc_task_t *task, isc_event_t *event) {
 
        /* Write changes to journal file. */
        CHECK(zone_journal(zone, &diff, NULL, "setserial"));
-       commit = ISC_TRUE;
+       commit = true;
 
        LOCK_ZONE(zone);
        zone_needdump(zone, 30);
@@ -19250,7 +19251,7 @@ setserial(isc_task_t *task, isc_event_t *event) {
        if (newtuple != NULL)
                dns_difftuple_free(&newtuple);
        if (oldver != NULL)
-               dns_db_closeversion(db, &oldver, ISC_FALSE);
+               dns_db_closeversion(db, &oldver, false);
        if (newver != NULL)
                dns_db_closeversion(db, &newver, commit);
        if (db != NULL)
@@ -19275,7 +19276,7 @@ dns_zone_setserial(dns_zone_t *zone, uint32_t serial) {
        LOCK_ZONE(zone);
 
        if (!inline_secure(zone)) {
-               if (!dns_zone_isdynamic(zone, ISC_TRUE)) {
+               if (!dns_zone_isdynamic(zone, true)) {
                        result = DNS_R_NOTDYNAMIC;
                        goto failure;
                }
index 8d088e4fe8debce968f11f86f4ffecfd9b9a3745..1f4432a221a2a4aa35e373260caab875dd6a2f7b 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef DNS_ZONE_P_H
 #define DNS_ZONE_P_H
 
+#include <stdbool.h>
+
 /*! \file */
 
 /*%
@@ -23,7 +25,7 @@ ISC_LANG_BEGINDECLS
 
 typedef struct {
        dns_diff_t      *diff;
-       isc_boolean_t   offline;
+       bool    offline;
 } dns__zonediff_t;
 
 isc_result_t
@@ -36,7 +38,7 @@ dns__zone_updatesigs(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *version,
                     dst_key_t *zone_keys[], unsigned int nkeys,
                     dns_zone_t *zone, isc_stdtime_t inception,
                     isc_stdtime_t expire, isc_stdtime_t now,
-                    isc_boolean_t check_ksk, isc_boolean_t keyset_kskonly,
+                    bool check_ksk, bool keyset_kskonly,
                     dns__zonediff_t *zonediff);
 
 ISC_LANG_ENDDECLS
index bdb71dc5c612a0b65727b90c45f8a12451cb0d5b..ca55520372dc8cda5fd4a93cecc7547c24968e29 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/result.h>
 #include <isc/types.h>
 #include <isc/util.h>
 #include <dns/types.h>
 #include <dns/zonekey.h>
 
-isc_boolean_t
+bool
 dns_zonekey_iszonekey(dns_rdata_t *keyrdata) {
        isc_result_t result;
        dns_rdata_dnskey_t key;
-       isc_boolean_t iszonekey = ISC_TRUE;
+       bool iszonekey = true;
 
        REQUIRE(keyrdata != NULL);
 
        result = dns_rdata_tostruct(keyrdata, &key, NULL);
        if (result != ISC_R_SUCCESS)
-               return (ISC_FALSE);
+               return (false);
 
        if ((key.flags & DNS_KEYTYPE_NOAUTH) != 0)
-               iszonekey = ISC_FALSE;
+               iszonekey = false;
        if ((key.flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
-               iszonekey = ISC_FALSE;
+               iszonekey = false;
        if (key.protocol != DNS_KEYPROTO_DNSSEC &&
        key.protocol != DNS_KEYPROTO_ANY)
-               iszonekey = ISC_FALSE;
+               iszonekey = false;
 
        return (iszonekey);
 }
index 6a1776652e7bf689cfd3612831ad213799c6bbfa..7572498cc4d1dfd445a5da8d1d64500f106ae1f1 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/file.h>
 #include <isc/magic.h>
@@ -41,7 +42,7 @@ struct dns_zt {
        dns_zt_allloaded_t      loaddone;
        void *                  loaddone_arg;
        /* Locked by lock. */
-       isc_boolean_t           flush;
+       bool            flush;
        uint32_t                references;
        unsigned int            loads_pending;
        dns_rbt_t               *table;
@@ -91,7 +92,7 @@ dns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, dns_zt_t **ztp) {
        zt->mctx = NULL;
        isc_mem_attach(mctx, &zt->mctx);
        zt->references = 1;
-       zt->flush = ISC_FALSE;
+       zt->flush = false;
        zt->rdclass = rdclass;
        zt->magic = ZTMAGIC;
        zt->loaddone = NULL;
@@ -142,7 +143,7 @@ dns_zt_unmount(dns_zt_t *zt, dns_zone_t *zone) {
 
        RWLOCK(&zt->rwlock, isc_rwlocktype_write);
 
-       result = dns_rbt_deletename(zt->table, name, ISC_FALSE);
+       result = dns_rbt_deletename(zt->table, name, false);
 
        RWUNLOCK(&zt->rwlock, isc_rwlocktype_write);
 
@@ -200,7 +201,7 @@ flush(dns_zone_t *zone, void *uap) {
 static void
 zt_destroy(dns_zt_t *zt) {
        if (zt->flush)
-               (void)dns_zt_apply(zt, ISC_FALSE, flush, NULL);
+               (void)dns_zt_apply(zt, false, flush, NULL);
        dns_rbt_destroy(&zt->table);
        isc_rwlock_destroy(&zt->rwlock);
        zt->magic = 0;
@@ -208,8 +209,8 @@ zt_destroy(dns_zt_t *zt) {
 }
 
 static void
-zt_flushanddetach(dns_zt_t **ztp, isc_boolean_t need_flush) {
-       isc_boolean_t destroy = ISC_FALSE;
+zt_flushanddetach(dns_zt_t **ztp, bool need_flush) {
+       bool destroy = false;
        dns_zt_t *zt;
 
        REQUIRE(ztp != NULL && VALID_ZT(*ztp));
@@ -221,9 +222,9 @@ zt_flushanddetach(dns_zt_t **ztp, isc_boolean_t need_flush) {
        INSIST(zt->references > 0);
        zt->references--;
        if (zt->references == 0)
-               destroy = ISC_TRUE;
+               destroy = true;
        if (need_flush)
-               zt->flush = ISC_TRUE;
+               zt->flush = true;
 
        RWUNLOCK(&zt->rwlock, isc_rwlocktype_write);
 
@@ -235,16 +236,16 @@ zt_flushanddetach(dns_zt_t **ztp, isc_boolean_t need_flush) {
 
 void
 dns_zt_flushanddetach(dns_zt_t **ztp) {
-       zt_flushanddetach(ztp, ISC_TRUE);
+       zt_flushanddetach(ztp, true);
 }
 
 void
 dns_zt_detach(dns_zt_t **ztp) {
-       zt_flushanddetach(ztp, ISC_FALSE);
+       zt_flushanddetach(ztp, false);
 }
 
 isc_result_t
-dns_zt_load(dns_zt_t *zt, isc_boolean_t stop) {
+dns_zt_load(dns_zt_t *zt, bool stop) {
        isc_result_t result;
 
        REQUIRE(VALID_ZT(zt));
@@ -278,7 +279,7 @@ dns_zt_asyncload(dns_zt_t *zt, dns_zt_allloaded_t alldone, void *arg) {
        RWLOCK(&zt->rwlock, isc_rwlocktype_write);
 
        INSIST(zt->loads_pending == 0);
-       result = dns_zt_apply2(zt, ISC_FALSE, NULL, asyncload, &dl);
+       result = dns_zt_apply2(zt, false, NULL, asyncload, &dl);
 
        pending = zt->loads_pending;
        if (pending != 0) {
@@ -323,7 +324,7 @@ asyncload(dns_zone_t *zone, void *callback) {
 }
 
 isc_result_t
-dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop) {
+dns_zt_loadnew(dns_zt_t *zt, bool stop) {
        isc_result_t result;
 
        REQUIRE(VALID_ZT(zt));
@@ -347,13 +348,13 @@ loadnew(dns_zone_t *zone, void *uap) {
 }
 
 isc_result_t
-dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze) {
+dns_zt_freezezones(dns_zt_t *zt, bool freeze) {
        isc_result_t result, tresult;
 
        REQUIRE(VALID_ZT(zt));
 
        RWLOCK(&zt->rwlock, isc_rwlocktype_read);
-       result = dns_zt_apply2(zt, ISC_FALSE, &tresult, freezezones, &freeze);
+       result = dns_zt_apply2(zt, false, &tresult, freezezones, &freeze);
        RWUNLOCK(&zt->rwlock, isc_rwlocktype_read);
        if (tresult == ISC_R_NOTFOUND)
                tresult = ISC_R_SUCCESS;
@@ -362,8 +363,8 @@ dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze) {
 
 static isc_result_t
 freezezones(dns_zone_t *zone, void *uap) {
-       isc_boolean_t freeze = *(isc_boolean_t *)uap;
-       isc_boolean_t frozen;
+       bool freeze = *(bool *)uap;
+       bool frozen;
        isc_result_t result = ISC_R_SUCCESS;
        char classstr[DNS_RDATACLASS_FORMATSIZE];
        char zonename[DNS_NAME_FORMATSIZE];
@@ -381,7 +382,7 @@ freezezones(dns_zone_t *zone, void *uap) {
                        dns_zone_detach(&raw);
                return (ISC_R_SUCCESS);
        }
-       if (!dns_zone_isdynamic(zone, ISC_TRUE)) {
+       if (!dns_zone_isdynamic(zone, true)) {
                if (raw != NULL)
                        dns_zone_detach(&raw);
                return (ISC_R_SUCCESS);
@@ -476,14 +477,14 @@ dns_zt_setviewrevert(dns_zt_t *zt) {
 }
 
 isc_result_t
-dns_zt_apply(dns_zt_t *zt, isc_boolean_t stop,
+dns_zt_apply(dns_zt_t *zt, bool stop,
             isc_result_t (*action)(dns_zone_t *, void *), void *uap)
 {
        return (dns_zt_apply2(zt, stop, NULL, action, uap));
 }
 
 isc_result_t
-dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
+dns_zt_apply2(dns_zt_t *zt, bool stop, isc_result_t *sub,
              isc_result_t (*action)(dns_zone_t *, void *), void *uap)
 {
        dns_rbtnode_t *node;
@@ -537,7 +538,7 @@ dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
  */
 static isc_result_t
 doneloading(dns_zt_t *zt, dns_zone_t *zone, isc_task_t *task) {
-       isc_boolean_t destroy = ISC_FALSE;
+       bool destroy = false;
        dns_zt_allloaded_t alldone = NULL;
        void *arg = NULL;
 
@@ -551,7 +552,7 @@ doneloading(dns_zt_t *zt, dns_zone_t *zone, isc_task_t *task) {
        INSIST(zt->references != 0);
        zt->references--;
        if (zt->references == 0)
-               destroy = ISC_TRUE;
+               destroy = true;
        zt->loads_pending--;
        if (zt->loads_pending == 0) {
                alldone = zt->loaddone;
index 00d160ea3c5b4e36133858fc6adc8eed3a4ebd93..b64469389e358412865ba52211e9c62754b8a282 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/app.h>
 #include <isc/lib.h>
 #include <isc/magic.h>
@@ -46,7 +48,7 @@
 #ifndef ISC_PLATFORM_USETHREADS
 irs_context_t *irs_g_context = NULL;
 #else
-static isc_boolean_t thread_key_initialized = ISC_FALSE;
+static bool thread_key_initialized = false;
 static isc_mutex_t thread_key_mutex;
 static isc_thread_key_t irs_context_key;
 static isc_once_t once = ISC_ONCE_INIT;
@@ -157,7 +159,7 @@ thread_key_init(void) {
                                          free_specific_context) != 0) {
                        result = ISC_R_FAILURE;
                } else
-                       thread_key_initialized = ISC_TRUE;
+                       thread_key_initialized = true;
 
                UNLOCK(&thread_key_mutex);
        }
index 8063cca8e1b18d548463484d5b98faad8f0861ea..33a7fb5fd403629f302ae97626762dbbc55839f7 100644 (file)
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
@@ -505,7 +506,7 @@ done:
 
 typedef struct gai_restrans {
        dns_clientrestrans_t    *xid;
-       isc_boolean_t           is_inprogress;
+       bool            is_inprogress;
        int                     error;
        struct addrinfo         ai_sentinel;
        struct gai_resstate     *resstate;
@@ -543,8 +544,8 @@ make_resstate(isc_mem_t *mctx, gai_statehead_t *head, const char *hostname,
        dns_name_t *qdomain;
        unsigned int namelen;
        isc_buffer_t b;
-       isc_boolean_t need_v4 = ISC_FALSE;
-       isc_boolean_t need_v6 = ISC_FALSE;
+       bool need_v4 = false;
+       bool need_v6 = false;
 
        state = isc_mem_get(mctx, sizeof(*state));
        if (state == NULL)
@@ -573,9 +574,9 @@ make_resstate(isc_mem_t *mctx, gai_statehead_t *head, const char *hostname,
        }
 
        if (head->ai_family == AF_UNSPEC || head->ai_family == AF_INET)
-               need_v4 = ISC_TRUE;
+               need_v4 = true;
        if (head->ai_family == AF_UNSPEC || head->ai_family == AF_INET6)
-               need_v6 = ISC_TRUE;
+               need_v6 = true;
 
        state->trans6 = NULL;
        state->trans4 = NULL;
@@ -588,7 +589,7 @@ make_resstate(isc_mem_t *mctx, gai_statehead_t *head, const char *hostname,
                state->trans4->error = 0;
                state->trans4->xid = NULL;
                state->trans4->resstate = state;
-               state->trans4->is_inprogress = ISC_TRUE;
+               state->trans4->is_inprogress = true;
                state->trans4->ai_sentinel.ai_next = NULL;
        }
        if (need_v6) {
@@ -603,7 +604,7 @@ make_resstate(isc_mem_t *mctx, gai_statehead_t *head, const char *hostname,
                state->trans6->error = 0;
                state->trans6->xid = NULL;
                state->trans6->resstate = state;
-               state->trans6->is_inprogress = ISC_TRUE;
+               state->trans6->is_inprogress = true;
                state->trans6->ai_sentinel.ai_next = NULL;
        }
 
@@ -683,7 +684,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
        dns_clientresevent_t *rev = (dns_clientresevent_t *)event;
        dns_rdatatype_t qtype;
        dns_name_t *name;
-       isc_boolean_t wantcname;
+       bool wantcname;
 
        REQUIRE(trans != NULL);
        resstate = trans->resstate;
@@ -700,7 +701,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
        }
 
        INSIST(trans->is_inprogress);
-       trans->is_inprogress = ISC_FALSE;
+       trans->is_inprogress = false;
 
        switch (rev->result) {
        case ISC_R_SUCCESS:
@@ -727,7 +728,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
                goto done;
        }
 
-       wantcname = ISC_TF((resstate->head->ai_flags & AI_CANONNAME) != 0);
+       wantcname = (resstate->head->ai_flags & AI_CANONNAME);
 
        /* Parse the response and construct the addrinfo chain */
        for (name = ISC_LIST_HEAD(rev->answerlist); name != NULL;
@@ -740,7 +741,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
                        isc_buffer_t b;
 
                        isc_buffer_init(&b, cname, sizeof(cname));
-                       result = dns_name_totext(name, ISC_TRUE, &b);
+                       result = dns_name_totext(name, true, &b);
                        if (result != ISC_R_SUCCESS) {
                                error = EAI_FAIL;
                                goto done;
@@ -907,7 +908,7 @@ resolve_name(int family, const char *hostname, int flags,
        dns_client_t *client;
        gai_resstate_t *resstate;
        gai_statehead_t head;
-       isc_boolean_t all_fail = ISC_TRUE;
+       bool all_fail = true;
 
        /* get IRS context and the associated parameters */
        irsctx = NULL;
@@ -954,10 +955,10 @@ resolve_name(int family, const char *hostname, int flags,
                                                         resstate->trans4,
                                                         &resstate->trans4->xid);
                        if (result == ISC_R_SUCCESS) {
-                               resstate->trans4->is_inprogress = ISC_TRUE;
-                               all_fail = ISC_FALSE;
+                               resstate->trans4->is_inprogress = true;
+                               all_fail = false;
                        } else
-                               resstate->trans4->is_inprogress = ISC_FALSE;
+                               resstate->trans4->is_inprogress = false;
                }
                if (resstate->trans6 != NULL) {
                        result = dns_client_startresolve(client,
@@ -969,10 +970,10 @@ resolve_name(int family, const char *hostname, int flags,
                                                         resstate->trans6,
                                                         &resstate->trans6->xid);
                        if (result == ISC_R_SUCCESS) {
-                               resstate->trans6->is_inprogress = ISC_TRUE;
-                               all_fail = ISC_FALSE;
+                               resstate->trans6->is_inprogress = true;
+                               all_fail = false;
                        } else
-                               resstate->trans6->is_inprogress= ISC_FALSE;
+                               resstate->trans6->is_inprogress= false;
                }
        }
        UNLOCK(&head.list_lock);
index 44dd76a6201dd93c33465d20ec11d2d8e1ca8b49..5069ba7a7f4df2272ae34925888955e8f1c9405d 100644 (file)
@@ -90,6 +90,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -275,7 +276,7 @@ getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen,
                dns_name_t *ptrname;
                irs_context_t *irsctx = NULL;
                dns_client_t *client;
-               isc_boolean_t found = ISC_FALSE;
+               bool found = false;
                dns_namelist_t answerlist;
                dns_rdataset_t *rdataset;
                isc_region_t hostregion;
@@ -359,7 +360,7 @@ getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen,
                                                        sizeof(hoststr));
                                        iresult =
                                                dns_name_totext(&rdata_ptr.ptr,
-                                                               ISC_TRUE, &b);
+                                                               true, &b);
                                        dns_rdata_freestruct(&rdata_ptr);
                                        if (iresult == ISC_R_SUCCESS) {
                                                /*
@@ -368,7 +369,7 @@ getnameinfo(const struct sockaddr *sa, IRS_GETNAMEINFO_SOCKLEN_T salen,
                                                 * getnameinfo() can return
                                                 * at most one hostname.
                                                 */
-                                               found = ISC_TRUE;
+                                               found = true;
                                                isc_buffer_usedregion(
                                                        &b, &hostregion);
                                                goto ptrfound;
index bf53df2529665caba475516fcc56395a27505c4a..25d792371ea3f54d88a32b4159d205d20851c4cb 100644 (file)
@@ -180,8 +180,8 @@ isc_aes_crypt(const unsigned char *key, CK_ULONG keylen,
        pk11_context_t ctx;
 
        DE_CONST(key, keyTemplate[5].pValue);
-       RUNTIME_CHECK(pk11_get_session(&ctx, OP_AES, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(&ctx, OP_AES, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx.object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx.session, keyTemplate,
index 5563c7cc0b773db877af4fce3a07def826f47c18..425eb5ab92584eb6f53da5143919c515bb76e8c8 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/app.h>
@@ -23,7 +24,7 @@
 static isc_mutex_t createlock;
 static isc_once_t once = ISC_ONCE_INIT;
 static isc_appctxcreatefunc_t appctx_createfunc = NULL;
-static isc_boolean_t is_running = ISC_FALSE;
+static bool is_running = false;
 
 #define ISCAPI_APPMETHODS_VALID(m) ISC_MAGIC_VALID(m, ISCAPI_APPMETHODS_MAGIC)
 
@@ -196,9 +197,9 @@ isc_app_run() {
        if (isc_bind9) {
                isc_result_t result;
 
-               is_running = ISC_TRUE;
+               is_running = true;
                result = isc__app_run();
-               is_running = ISC_FALSE;
+               is_running = false;
 
                return (result);
        }
@@ -206,7 +207,7 @@ isc_app_run() {
        return (ISC_R_NOTIMPLEMENTED);
 }
 
-isc_boolean_t
+bool
 isc_app_isrunning() {
        return (is_running);
 }
index edbb4db01207559304e0321848db703f27a1e086..bb8c2e19c5f0e0b9e6c2743b906e7fced998e167 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/base32.h>
 #include <isc/buffer.h>
 #include <isc/lex.h>
@@ -142,19 +144,19 @@ typedef struct {
        int length;             /*%< Desired length of binary data or -1 */
        isc_buffer_t *target;   /*%< Buffer for resulting binary data */
        int digits;             /*%< Number of buffered base32 digits */
-       isc_boolean_t seen_end; /*%< True if "=" end marker seen */
+       bool seen_end;  /*%< True if "=" end marker seen */
        int val[8];
        const char *base;       /*%< Which encoding we are using */
        int seen_32;            /*%< Number of significant bytes if non zero */
-       isc_boolean_t pad;      /*%< Expect padding */
+       bool pad;       /*%< Expect padding */
 } base32_decode_ctx_t;
 
 static inline void
 base32_decode_init(base32_decode_ctx_t *ctx, int length, const char base[],
-                  isc_boolean_t pad, isc_buffer_t *target)
+                  bool pad, isc_buffer_t *target)
 {
        ctx->digits = 0;
-       ctx->seen_end = ISC_FALSE;
+       ctx->seen_end = false;
        ctx->seen_32 = 0;
        ctx->length = length;
        ctx->target = target;
@@ -237,7 +239,7 @@ base32_decode_char(base32_decode_ctx_t *ctx, int c) {
                unsigned char buf[5];
 
                if (ctx->seen_32 != 0) {
-                       ctx->seen_end = ISC_TRUE;
+                       ctx->seen_end = true;
                        n = ctx->seen_32;
                }
                buf[0] = (ctx->val[0]<<3)|(ctx->val[1]>>2);
@@ -266,7 +268,7 @@ base32_decode_finish(base32_decode_ctx_t *ctx) {
         * Add missing padding if required.
         */
        if (!ctx->pad && ctx->digits != 0) {
-               ctx->pad = ISC_TRUE;
+               ctx->pad = true;
                do {
                        RETERR(base32_decode_char(ctx, '='));
                } while (ctx->digits != 0);
@@ -277,13 +279,13 @@ base32_decode_finish(base32_decode_ctx_t *ctx) {
 }
 
 static isc_result_t
-base32_tobuffer(isc_lex_t *lexer, const char base[], isc_boolean_t pad,
+base32_tobuffer(isc_lex_t *lexer, const char base[], bool pad,
                isc_buffer_t *target, int length)
 {
        base32_decode_ctx_t ctx;
        isc_textregion_t *tr;
        isc_token_t token;
-       isc_boolean_t eol;
+       bool eol;
 
        base32_decode_init(&ctx, length, base, pad, target);
 
@@ -291,9 +293,9 @@ base32_tobuffer(isc_lex_t *lexer, const char base[], isc_boolean_t pad,
                unsigned int i;
 
                if (length > 0)
-                       eol = ISC_FALSE;
+                       eol = false;
                else
-                       eol = ISC_TRUE;
+                       eol = true;
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string, eol));
                if (token.type != isc_tokentype_string)
@@ -310,21 +312,21 @@ base32_tobuffer(isc_lex_t *lexer, const char base[], isc_boolean_t pad,
 
 isc_result_t
 isc_base32_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
-       return (base32_tobuffer(lexer, base32, ISC_TRUE, target, length));
+       return (base32_tobuffer(lexer, base32, true, target, length));
 }
 
 isc_result_t
 isc_base32hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
-       return (base32_tobuffer(lexer, base32hex, ISC_TRUE, target, length));
+       return (base32_tobuffer(lexer, base32hex, true, target, length));
 }
 
 isc_result_t
 isc_base32hexnp_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
-       return (base32_tobuffer(lexer, base32hex, ISC_FALSE, target, length));
+       return (base32_tobuffer(lexer, base32hex, false, target, length));
 }
 
 static isc_result_t
-base32_decodestring(const char *cstr, const char base[], isc_boolean_t pad,
+base32_decodestring(const char *cstr, const char base[], bool pad,
                    isc_buffer_t *target)
 {
        base32_decode_ctx_t ctx;
@@ -344,22 +346,22 @@ base32_decodestring(const char *cstr, const char base[], isc_boolean_t pad,
 
 isc_result_t
 isc_base32_decodestring(const char *cstr, isc_buffer_t *target) {
-       return (base32_decodestring(cstr, base32, ISC_TRUE, target));
+       return (base32_decodestring(cstr, base32, true, target));
 }
 
 isc_result_t
 isc_base32hex_decodestring(const char *cstr, isc_buffer_t *target) {
-       return (base32_decodestring(cstr, base32hex, ISC_TRUE, target));
+       return (base32_decodestring(cstr, base32hex, true, target));
 }
 
 isc_result_t
 isc_base32hexnp_decodestring(const char *cstr, isc_buffer_t *target) {
-       return (base32_decodestring(cstr, base32hex, ISC_FALSE, target));
+       return (base32_decodestring(cstr, base32hex, false, target));
 }
 
 static isc_result_t
 base32_decoderegion(isc_region_t *source, const char base[],
-                   isc_boolean_t pad, isc_buffer_t *target)
+                   bool pad, isc_buffer_t *target)
 {
        base32_decode_ctx_t ctx;
 
@@ -375,17 +377,17 @@ base32_decoderegion(isc_region_t *source, const char base[],
 
 isc_result_t
 isc_base32_decoderegion(isc_region_t *source, isc_buffer_t *target) {
-       return (base32_decoderegion(source, base32, ISC_TRUE, target));
+       return (base32_decoderegion(source, base32, true, target));
 }
 
 isc_result_t
 isc_base32hex_decoderegion(isc_region_t *source, isc_buffer_t *target) {
-       return (base32_decoderegion(source, base32hex, ISC_TRUE, target));
+       return (base32_decoderegion(source, base32hex, true, target));
 }
 
 isc_result_t
 isc_base32hexnp_decoderegion(isc_region_t *source, isc_buffer_t *target) {
-       return (base32_decoderegion(source, base32hex, ISC_FALSE, target));
+       return (base32_decoderegion(source, base32hex, false, target));
 }
 
 static isc_result_t
index 5dc49748015585718aaba44e7dfdf50f339c87b1..c7a1722ddde6de6f720ebc90f3a98c4e6b4c4b05 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/base64.h>
 #include <isc/buffer.h>
 #include <isc/lex.h>
@@ -96,7 +98,7 @@ typedef struct {
        int length;             /*%< Desired length of binary data or -1 */
        isc_buffer_t *target;   /*%< Buffer for resulting binary data */
        int digits;             /*%< Number of buffered base64 digits */
-       isc_boolean_t seen_end; /*%< True if "=" end marker seen */
+       bool seen_end;  /*%< True if "=" end marker seen */
        int val[4];
 } base64_decode_ctx_t;
 
@@ -104,7 +106,7 @@ static inline void
 base64_decode_init(base64_decode_ctx_t *ctx, int length, isc_buffer_t *target)
 {
        ctx->digits = 0;
-       ctx->seen_end = ISC_FALSE;
+       ctx->seen_end = false;
        ctx->length = length;
        ctx->target = target;
 }
@@ -139,7 +141,7 @@ base64_decode_char(base64_decode_ctx_t *ctx, int c) {
                n = (ctx->val[2] == 64) ? 1 :
                        (ctx->val[3] == 64) ? 2 : 3;
                if (n != 3) {
-                       ctx->seen_end = ISC_TRUE;
+                       ctx->seen_end = true;
                        if (ctx->val[2] == 64)
                                ctx->val[2] = 0;
                        if (ctx->val[3] == 64)
@@ -174,7 +176,7 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
        base64_decode_ctx_t ctx;
        isc_textregion_t *tr;
        isc_token_t token;
-       isc_boolean_t eol;
+       bool eol;
 
        base64_decode_init(&ctx, length, target);
 
@@ -182,9 +184,9 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
                unsigned int i;
 
                if (length > 0)
-                       eol = ISC_FALSE;
+                       eol = false;
                else
-                       eol = ISC_TRUE;
+                       eol = true;
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string, eol));
                if (token.type != isc_tokentype_string)
index 868d1087f864b834699439d0efb2a95d53728462..e5b2fefcc0ed29ae55fbb735ec2935c5b092aa39 100644 (file)
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/bind9.h>
 
 /*
  * This determines whether we are using the libisc/libdns libraries
- * in BIND9 or in some other application. It is initialized to ISC_TRUE
+ * in BIND9 or in some other application. It is initialized to true
  * and remains unchanged for BIND9 and related tools; export library
- * clients will run isc_lib_register(), which sets it to ISC_FALSE,
+ * clients will run isc_lib_register(), which sets it to false,
  * overriding certain BIND9 behaviors.
  */
-LIBISC_EXTERNAL_DATA isc_boolean_t isc_bind9 = ISC_TRUE;
+LIBISC_EXTERNAL_DATA bool isc_bind9 = true;
index be59fba5afd135bb040fcbb8662af57e768eabeb..9de1e0664c75849f652b53391234868770cc6ee8 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdarg.h>
 
 #include <isc/buffer.h>
@@ -82,7 +83,7 @@ isc__buffer_invalidate(isc_buffer_t *b) {
 }
 
 void
-isc_buffer_setautorealloc(isc_buffer_t *b, isc_boolean_t enable) {
+isc_buffer_setautorealloc(isc_buffer_t *b, bool enable) {
        REQUIRE(ISC_BUFFER_VALID(b));
        REQUIRE(b->mctx != NULL);
        b->autore = enable;
index 69197bc93f6f23c7e672b04f678f25bd98a86be4..efee967aa621d13eda8659bf48445d01fb13e00f 100644 (file)
@@ -49,6 +49,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/commandline.h>
@@ -67,9 +68,9 @@ LIBISC_EXTERNAL_DATA char *isc_commandline_argument;
 /*% For printing error messages. */
 LIBISC_EXTERNAL_DATA char *isc_commandline_progname;
 /*% Print error messages. */
-LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE;
+LIBISC_EXTERNAL_DATA bool isc_commandline_errprint = true;
 /*% Reset processing. */
-LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE;
+LIBISC_EXTERNAL_DATA bool isc_commandline_reset = true;
 
 static char endopt = '\0';
 
@@ -95,7 +96,7 @@ isc_commandline_parse(int argc, char * const *argv, const char *options) {
        if (isc_commandline_reset || *place == '\0') {
                if (isc_commandline_reset) {
                        isc_commandline_index = 1;
-                       isc_commandline_reset = ISC_FALSE;
+                       isc_commandline_reset = false;
                }
 
                if (isc_commandline_progname == NULL)
index be7a62f74021ab4d6a64bd86703277353c4a423a..8c700518370eccf28c839078189f58c92ecd63aa 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stddef.h>
 
 #include <isc/counter.h>
@@ -113,7 +114,7 @@ destroy(isc_counter_t *counter) {
 void
 isc_counter_detach(isc_counter_t **counterp) {
        isc_counter_t *counter;
-       isc_boolean_t want_destroy = ISC_FALSE;
+       bool want_destroy = false;
 
        REQUIRE(counterp != NULL && *counterp != NULL);
        counter = *counterp;
@@ -125,7 +126,7 @@ isc_counter_detach(isc_counter_t **counterp) {
        INSIST(counter->references > 0);
        counter->references--;
        if (counter->references == 0)
-               want_destroy = ISC_TRUE;
+               want_destroy = true;
        UNLOCK(&counter->lock);
 
        if (want_destroy)
index d79dc3e3cac9e835f5668a8f06df874af86b2c1e..ab2f617028b12dd3a479aad06b1600ccb882017d 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/buffer.h>
@@ -123,7 +124,7 @@ typedef struct {
 } isc_entropysamplesource_t;
 
 typedef struct {
-       isc_boolean_t           start_called;
+       bool            start_called;
        isc_entropystart_t      startfunc;
        isc_entropyget_t        getfunc;
        isc_entropystop_t       stopfunc;
@@ -142,8 +143,8 @@ struct isc_entropysource {
        uint32_t        total;          /*%< entropy from this source */
        ISC_LINK(isc_entropysource_t)   link;
        char            name[32];
-       isc_boolean_t   bad;
-       isc_boolean_t   warn_keyboard;
+       bool    bad;
+       bool    warn_keyboard;
        isc_keyboard_t  kbd;
        union {
                isc_entropysamplesource_t       sample;
@@ -175,7 +176,7 @@ struct isc_entropysource {
  * include this file.
  */
 static void
-fillpool(isc_entropy_t *, unsigned int, isc_boolean_t);
+fillpool(isc_entropy_t *, unsigned int, bool);
 
 static int
 wait_for_sources(isc_entropy_t *);
@@ -483,7 +484,7 @@ crunchsamples(isc_entropy_t *ent, sample_queue_t *sq) {
 
 static unsigned int
 get_from_callback(isc_entropysource_t *source, unsigned int desired,
-                 isc_boolean_t blocking)
+                 bool blocking)
 {
        isc_entropy_t *ent = source->ent;
        isc_cbsource_t *cbs = &source->sources.callback;
@@ -501,7 +502,7 @@ get_from_callback(isc_entropysource_t *source, unsigned int desired,
                result = cbs->startfunc(source, cbs->arg, blocking);
                if (result != ISC_R_SUCCESS)
                        return (0);
-               cbs->start_called = ISC_TRUE;
+               cbs->start_called = true;
        }
 
        added = 0;
@@ -515,7 +516,7 @@ get_from_callback(isc_entropysource_t *source, unsigned int desired,
                        result = ISC_R_SUCCESS;
                } else if (result != ISC_R_SUCCESS &&
                           result != ISC_R_NOTBLOCKING)
-                       source->bad = ISC_TRUE;
+                       source->bad = true;
 
        }
 
@@ -542,15 +543,15 @@ isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length,
        unsigned char digest[ISC_SHA1_DIGESTLENGTH];
        uint32_t remain, deltae, count, total;
        uint8_t *buf;
-       isc_boolean_t goodonly, partial, blocking;
+       bool goodonly, partial, blocking;
 
        REQUIRE(VALID_ENTROPY(ent));
        REQUIRE(data != NULL);
        REQUIRE(length > 0);
 
-       goodonly = ISC_TF((flags & ISC_ENTROPY_GOODONLY) != 0);
-       partial = ISC_TF((flags & ISC_ENTROPY_PARTIAL) != 0);
-       blocking = ISC_TF((flags & ISC_ENTROPY_BLOCKING) != 0);
+       goodonly = (flags & ISC_ENTROPY_GOODONLY);
+       partial = (flags & ISC_ENTROPY_PARTIAL);
+       blocking = (flags & ISC_ENTROPY_BLOCKING);
 
        REQUIRE(!partial || returned != NULL);
 
@@ -581,7 +582,7 @@ isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length,
                         * pool full.
                         */
                        if (ent->pool.entropy >= THRESHOLD_BITS)
-                               fillpool(ent, fillcount, ISC_FALSE);
+                               fillpool(ent, fillcount, false);
                        else
                                fillpool(ent, fillcount, blocking);
 
@@ -603,7 +604,7 @@ isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length,
                        if (ent->initialized < THRESHOLD_BITS)
                                fillpool(ent, THRESHOLD_BITS, blocking);
                        else
-                               fillpool(ent, 0, ISC_FALSE);
+                               fillpool(ent, 0, false);
 
                        /*
                         * If we've not initialized with enough good random
@@ -754,7 +755,7 @@ destroysource(isc_entropysource_t **sourcep) {
                cbs = &source->sources.callback;
                if (cbs->start_called && cbs->stopfunc != NULL) {
                        cbs->stopfunc(source, cbs->arg);
-                       cbs->start_called = ISC_FALSE;
+                       cbs->start_called = false;
                }
                samplequeue_release(ent, &cbs->samplequeue);
                break;
@@ -764,12 +765,12 @@ destroysource(isc_entropysource_t **sourcep) {
        isc_mem_put(ent->mctx, source, sizeof(*source));
 }
 
-static inline isc_boolean_t
+static inline bool
 destroy_check(isc_entropy_t *ent) {
        isc_entropysource_t *source;
 
        if (ent->refcnt > 0)
-               return (ISC_FALSE);
+               return (false);
 
        source = ISC_LIST_HEAD(ent->sources);
        while (source != NULL) {
@@ -778,12 +779,12 @@ destroy_check(isc_entropy_t *ent) {
                case ENTROPY_SOURCETYPE_USOCKET:
                        break;
                default:
-                       return (ISC_FALSE);
+                       return (false);
                }
                source = ISC_LIST_NEXT(source, link);
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -836,7 +837,7 @@ void
 isc_entropy_destroysource(isc_entropysource_t **sourcep) {
        isc_entropysource_t *source;
        isc_entropy_t *ent;
-       isc_boolean_t killit;
+       bool killit;
 
        REQUIRE(sourcep != NULL);
        REQUIRE(VALID_SOURCE(*sourcep));
@@ -882,7 +883,7 @@ isc_entropy_createcallbacksource(isc_entropy_t *ent,
                result = ISC_R_NOMEMORY;
                goto errout;
        }
-       source->bad = ISC_FALSE;
+       source->bad = false;
 
        cbs = &source->sources.callback;
 
@@ -890,7 +891,7 @@ isc_entropy_createcallbacksource(isc_entropy_t *ent,
        if (result != ISC_R_SUCCESS)
                goto errout;
 
-       cbs->start_called = ISC_FALSE;
+       cbs->start_called = false;
        cbs->startfunc = start;
        cbs->getfunc = get;
        cbs->stopfunc = stop;
@@ -941,7 +942,7 @@ isc_entropy_stopcallbacksources(isc_entropy_t *ent) {
                        cbs = &source->sources.callback;
                        if (cbs->start_called && cbs->stopfunc != NULL) {
                                cbs->stopfunc(source, cbs->arg);
-                               cbs->start_called = ISC_FALSE;
+                               cbs->start_called = false;
                        }
                }
 
@@ -1138,7 +1139,7 @@ isc_entropy_attach(isc_entropy_t *ent, isc_entropy_t **entp) {
 void
 isc_entropy_detach(isc_entropy_t **entp) {
        isc_entropy_t *ent;
-       isc_boolean_t killit;
+       bool killit;
 
        REQUIRE(entp != NULL && VALID_ENTROPY(*entp));
        ent = *entp;
@@ -1158,13 +1159,13 @@ isc_entropy_detach(isc_entropy_t **entp) {
 }
 
 static isc_result_t
-kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
+kbdstart(isc_entropysource_t *source, void *arg, bool blocking) {
        /*
         * The intent of "first" is to provide a warning message only once
         * during the run of a program that might try to gather keyboard
         * entropy multiple times.
         */
-       static isc_boolean_t first = ISC_TRUE;
+       static bool first = true;
 
        UNUSED(arg);
 
@@ -1176,7 +1177,7 @@ kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
                        fprintf(stderr, "You must use the keyboard to create "
                                "entropy, since your system is lacking\n"
                                "/dev/random (or equivalent)\n\n");
-               first = ISC_FALSE;
+               first = false;
        }
        fprintf(stderr, "start typing:\n");
 
@@ -1195,7 +1196,7 @@ kbdstop(isc_entropysource_t *source, void *arg) {
 }
 
 static isc_result_t
-kbdget(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
+kbdget(isc_entropysource_t *source, void *arg, bool blocking) {
        isc_result_t result;
        isc_time_t t;
        uint32_t sample;
@@ -1234,7 +1235,7 @@ isc_entropy_usebestsource(isc_entropy_t *ectx, isc_entropysource_t **source,
 {
        isc_result_t result;
        isc_result_t final_result = ISC_R_NOENTROPY;
-       isc_boolean_t userfile = ISC_TRUE;
+       bool userfile = true;
 
        REQUIRE(VALID_ENTROPY(ectx));
        REQUIRE(source != NULL && *source == NULL);
@@ -1250,7 +1251,7 @@ isc_entropy_usebestsource(isc_entropy_t *ectx, isc_entropysource_t **source,
 #ifdef PATH_RANDOMDEV
        if (randomfile == NULL) {
                randomfile = PATH_RANDOMDEV;
-               userfile = ISC_FALSE;
+               userfile = false;
        }
 #endif
 
@@ -1271,8 +1272,7 @@ isc_entropy_usebestsource(isc_entropy_t *ectx, isc_entropysource_t **source,
                                                          NULL, source);
                if (result == ISC_R_SUCCESS)
                        (*source)->warn_keyboard =
-                               ISC_TF(use_keyboard ==
-                                      ISC_ENTROPY_KEYBOARDMAYBE);
+                               (use_keyboard == ISC_ENTROPY_KEYBOARDMAYBE);
 
                if (final_result != ISC_R_SUCCESS)
                        final_result = result;
index 296ada28b917b2fe5b57aaa36b588e53c7fbcdee..deaffd8b1d22e648aa809fade3a0cc91a84a8933 100644 (file)
@@ -14,6 +14,9 @@
  * \brief
  * This file contains the OS-independent functionality of the API.
  */
+
+#include <stdbool.h>
+
 #include <isc/fsaccess.h>
 #include <isc/print.h>
 #include <isc/result.h>
@@ -60,7 +63,7 @@ isc_fsaccess_remove(int trustee, int permission, isc_fsaccess_t *access) {
 }
 
 static isc_result_t
-check_bad_bits(isc_fsaccess_t access, isc_boolean_t is_dir) {
+check_bad_bits(isc_fsaccess_t access, bool is_dir) {
        isc_fsaccess_t bits;
 
        /*
index 35c678d0091e621db62c63c2c00d7c0f7b334911..54be2fa8af56c05e742586aec2efe6b6cf31dedd 100644 (file)
@@ -50,6 +50,8 @@ if advised of the possibility of such damage.
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/entropy.h>
 #include <isc/hash.h>
 #include <isc/mem.h>
@@ -83,7 +85,7 @@ struct isc_hash {
        unsigned int    magic;
        isc_mem_t       *mctx;
        isc_mutex_t     lock;
-       isc_boolean_t   initialized;
+       bool    initialized;
        isc_refcount_t  refcnt;
        isc_entropy_t   *entropy; /*%< entropy source */
        size_t          limit;  /*%< upper limit of key length */
@@ -178,7 +180,7 @@ isc_hash_ctxcreate(isc_mem_t *mctx, isc_entropy_t *entropy,
        hctx->magic = HASH_MAGIC;
        hctx->mctx = NULL;
        isc_mem_attach(mctx, &hctx->mctx);
-       hctx->initialized = ISC_FALSE;
+       hctx->initialized = false;
        result = isc_refcount_init(&hctx->refcnt, 1);
        if (result != ISC_R_SUCCESS)
                goto cleanup_lock;
@@ -232,7 +234,7 @@ void
 isc_hash_ctxinit(isc_hash_t *hctx) {
        LOCK(&hctx->lock);
 
-       if (hctx->initialized == ISC_TRUE)
+       if (hctx->initialized == true)
                goto out;
 
        if (hctx->entropy != NULL) {
@@ -262,7 +264,7 @@ isc_hash_ctxinit(isc_hash_t *hctx) {
                       hctx->vectorlen);
        }
 
-       hctx->initialized = ISC_TRUE;
+       hctx->initialized = true;
 
  out:
        UNLOCK(&hctx->lock);
@@ -341,14 +343,14 @@ isc_hash_destroy(void) {
 
 static inline unsigned int
 hash_calc(isc_hash_t *hctx, const unsigned char *key, unsigned int keylen,
-         isc_boolean_t case_sensitive)
+         bool case_sensitive)
 {
        hash_accum_t partial_sum = 0;
        hash_random_t *p = hctx->rndvector;
        unsigned int i = 0;
 
        /* Make it sure that the hash context is initialized. */
-       if (hctx->initialized == ISC_FALSE)
+       if (hctx->initialized == false)
                isc_hash_ctxinit(hctx);
 
        if (case_sensitive) {
@@ -366,7 +368,7 @@ hash_calc(isc_hash_t *hctx, const unsigned char *key, unsigned int keylen,
 
 unsigned int
 isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key,
-                unsigned int keylen, isc_boolean_t case_sensitive)
+                unsigned int keylen, bool case_sensitive)
 {
        REQUIRE(hctx != NULL && VALID_HASH(hctx));
        REQUIRE(keylen <= hctx->limit);
@@ -376,7 +378,7 @@ isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key,
 
 unsigned int
 isc_hash_calc(const unsigned char *key, unsigned int keylen,
-             isc_boolean_t case_sensitive)
+             bool case_sensitive)
 {
        INSIST(isc_hashctx != NULL && VALID_HASH(isc_hashctx));
        REQUIRE(keylen <= isc_hashctx->limit);
@@ -400,7 +402,7 @@ isc__hash_setvec(const uint16_t *vec) {
 
 static uint32_t fnv_offset_basis;
 static isc_once_t fnv_once = ISC_ONCE_INIT;
-static isc_boolean_t fnv_initialized = ISC_FALSE;
+static bool fnv_initialized = false;
 
 static void
 fnv_initialize(void) {
@@ -413,7 +415,7 @@ fnv_initialize(void) {
                isc_random_get(&fnv_offset_basis);
        }
 
-       fnv_initialized = ISC_TRUE;
+       fnv_initialized = true;
 }
 
 const void *
@@ -440,7 +442,7 @@ isc_hash_set_initializer(const void *initializer) {
 
 uint32_t
 isc_hash_function(const void *data, size_t length,
-                 isc_boolean_t case_sensitive,
+                 bool case_sensitive,
                  const uint32_t *previous_hashp)
 {
        uint32_t hval;
@@ -509,7 +511,7 @@ isc_hash_function(const void *data, size_t length,
 
 uint32_t
 isc_hash_function_reverse(const void *data, size_t length,
-                         isc_boolean_t case_sensitive,
+                         bool case_sensitive,
                          const uint32_t *previous_hashp)
 {
        uint32_t hval;
index 3bd510fac915dac4ddaefa44cb8ac8a6aaef32f0..22fa81ca0edfa4f6bf559a8280a6752bee705c24 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/heap.h>
 #include <isc/magic.h>
 #include <isc/mem.h>
@@ -125,7 +127,7 @@ isc_heap_destroy(isc_heap_t **heapp) {
        *heapp = NULL;
 }
 
-static isc_boolean_t
+static bool
 resize(isc_heap_t *heap) {
        void **new_array;
        unsigned int new_size;
@@ -135,7 +137,7 @@ resize(isc_heap_t *heap) {
        new_size = heap->size + heap->size_increment;
        new_array = isc_mem_get(heap->mctx, new_size * sizeof(void *));
        if (new_array == NULL)
-               return (ISC_FALSE);
+               return (false);
        if (heap->array != NULL) {
                memmove(new_array, heap->array, heap->size * sizeof(void *));
                isc_mem_put(heap->mctx, heap->array,
@@ -144,7 +146,7 @@ resize(isc_heap_t *heap) {
        heap->size = new_size;
        heap->array = new_array;
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static void
@@ -213,7 +215,7 @@ isc_heap_insert(isc_heap_t *heap, void *elt) {
 void
 isc_heap_delete(isc_heap_t *heap, unsigned int idx) {
        void *elt;
-       isc_boolean_t less;
+       bool less;
 
        REQUIRE(VALID_HEAP(heap));
        REQUIRE(idx >= 1 && idx <= heap->last);
index d9917681676b7dcf599f84e3ba1203261552a8a6..6d231abe5ba693b1118e0ae7f164de5e5b7f52d7 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/hex.h>
@@ -123,7 +124,7 @@ isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
        hex_decode_ctx_t ctx;
        isc_textregion_t *tr;
        isc_token_t token;
-       isc_boolean_t eol;
+       bool eol;
 
        hex_decode_init(&ctx, length, target);
 
@@ -131,9 +132,9 @@ isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
                unsigned int i;
 
                if (length > 0)
-                       eol = ISC_FALSE;
+                       eol = false;
                else
-                       eol = ISC_TRUE;
+                       eol = true;
                RETERR(isc_lex_getmastertoken(lexer, &token,
                                              isc_tokentype_string, eol));
                if (token.type != isc_tokentype_string)
index 1fb694ad850da5ab847ac25d8bab568f7d0a1931..0aa270d8f2e3890ec3db6fe0b47a8abfa7cb6928 100644 (file)
@@ -22,6 +22,8 @@
 
 #ifndef PK11_MD5_DISABLE
 
+#include <stdbool.h>
+
 #include <isc/assertions.h>
 #include <isc/hmacmd5.h>
 #include <isc/md5.h>
@@ -111,8 +113,8 @@ isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
 #else
        DE_CONST(key, keyTemplate[5].pValue);
 #endif
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx->object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx->session, keyTemplate,
@@ -176,8 +178,8 @@ isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
        unsigned char ipad[PADLEN];
        unsigned int i;
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        RUNTIME_CHECK((ctx->key = pk11_mem_get(PADLEN)) != NULL);
        if (len > PADLEN) {
                CK_BYTE_PTR kPart;
@@ -325,12 +327,12 @@ isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest) {
  * Verify signature - finalize MD5 operation and reapply MD5, then
  * compare to the supplied digest.
  */
-isc_boolean_t
+bool
 isc_hmacmd5_verify(isc_hmacmd5_t *ctx, unsigned char *digest) {
        return (isc_hmacmd5_verify2(ctx, digest, ISC_MD5_DIGESTLENGTH));
 }
 
-isc_boolean_t
+bool
 isc_hmacmd5_verify2(isc_hmacmd5_t *ctx, unsigned char *digest, size_t len) {
        unsigned char newdigest[ISC_MD5_DIGESTLENGTH];
 
@@ -348,7 +350,7 @@ isc_hmacmd5_verify2(isc_hmacmd5_t *ctx, unsigned char *digest, size_t len) {
  * Standard use is testing 0 and expecting result true.
  * Testing use is testing 1..4 and expecting result false.
  */
-isc_boolean_t
+bool
 isc_hmacmd5_check(int testing) {
        isc_hmacmd5_t ctx;
        unsigned char key[] = { /* 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b */
@@ -366,7 +368,7 @@ isc_hmacmd5_check(int testing) {
                0xad, 0xb8, 0x48, 0x05, 0xb8, 0x8d, 0x03, 0xe5,
                0x90, 0x1e, 0x4b, 0x05, 0x69, 0xce, 0x35, 0xea
        };
-       isc_boolean_t result;
+       bool result;
 
        /*
         * Introduce a fault for testing.
index bc30ecb86f6685e2bd5bd2cace9b80d9583d3bc6..2839f4f1c83dedcfbb67d8f461bf308bc10851ad 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+
 #include <isc/assertions.h>
 #include <isc/hmacsha.h>
 #include <isc/platform.h>
@@ -281,8 +283,8 @@ isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
 #else
        DE_CONST(key, keyTemplate[5].pValue);
 #endif
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx->object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx->session, keyTemplate,
@@ -344,8 +346,8 @@ isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
        unsigned char ipad[ISC_SHA1_BLOCK_LENGTH];
        unsigned int i;
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        RUNTIME_CHECK((ctx->key = pk11_mem_get(ISC_SHA1_BLOCK_LENGTH))
                      != NULL);
        if (len > ISC_SHA1_BLOCK_LENGTH) {
@@ -451,8 +453,8 @@ isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
 #else
        DE_CONST(key, keyTemplate[5].pValue);
 #endif
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx->object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx->session, keyTemplate,
@@ -514,8 +516,8 @@ isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
        unsigned char ipad[ISC_SHA224_BLOCK_LENGTH];
        unsigned int i;
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        RUNTIME_CHECK((ctx->key = pk11_mem_get(ISC_SHA224_BLOCK_LENGTH))
                      != NULL);
        if (len > ISC_SHA224_BLOCK_LENGTH) {
@@ -621,8 +623,8 @@ isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
 #else
        DE_CONST(key, keyTemplate[5].pValue);
 #endif
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx->object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx->session, keyTemplate,
@@ -684,8 +686,8 @@ isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
        unsigned char ipad[ISC_SHA256_BLOCK_LENGTH];
        unsigned int i;
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        RUNTIME_CHECK((ctx->key = pk11_mem_get(ISC_SHA256_BLOCK_LENGTH))
                      != NULL);
        if (len > ISC_SHA256_BLOCK_LENGTH) {
@@ -791,8 +793,8 @@ isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
 #else
        DE_CONST(key, keyTemplate[5].pValue);
 #endif
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx->object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx->session, keyTemplate,
@@ -854,8 +856,8 @@ isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
        unsigned char ipad[ISC_SHA384_BLOCK_LENGTH];
        unsigned int i;
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        RUNTIME_CHECK((ctx->key = pk11_mem_get(ISC_SHA384_BLOCK_LENGTH))
                      != NULL);
        if (len > ISC_SHA384_BLOCK_LENGTH) {
@@ -961,8 +963,8 @@ isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
 #else
        DE_CONST(key, keyTemplate[5].pValue);
 #endif
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        ctx->object = CK_INVALID_HANDLE;
        PK11_FATALCHECK(pkcs_C_CreateObject,
                        (ctx->session, keyTemplate,
@@ -1024,8 +1026,8 @@ isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
        unsigned char ipad[ISC_SHA512_BLOCK_LENGTH];
        unsigned int i;
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        RUNTIME_CHECK((ctx->key = pk11_mem_get(ISC_SHA512_BLOCK_LENGTH))
                      != NULL);
        if (len > ISC_SHA512_BLOCK_LENGTH) {
@@ -1442,7 +1444,7 @@ isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
  * Verify signature - finalize SHA1 operation and reapply SHA1, then
  * compare to the supplied digest.
  */
-isc_boolean_t
+bool
 isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
        unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
 
@@ -1455,7 +1457,7 @@ isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
  * Verify signature - finalize SHA224 operation and reapply SHA224, then
  * compare to the supplied digest.
  */
-isc_boolean_t
+bool
 isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
        unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
 
@@ -1468,7 +1470,7 @@ isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len)
  * Verify signature - finalize SHA256 operation and reapply SHA256, then
  * compare to the supplied digest.
  */
-isc_boolean_t
+bool
 isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
        unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
 
@@ -1481,7 +1483,7 @@ isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len)
  * Verify signature - finalize SHA384 operation and reapply SHA384, then
  * compare to the supplied digest.
  */
-isc_boolean_t
+bool
 isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
        unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
 
@@ -1494,7 +1496,7 @@ isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len)
  * Verify signature - finalize SHA512 operation and reapply SHA512, then
  * compare to the supplied digest.
  */
-isc_boolean_t
+bool
 isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
        unsigned char newdigest[ISC_SHA512_DIGESTLENGTH];
 
@@ -1512,7 +1514,7 @@ isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len)
  * Standard use is testing 0 and expecting result true.
  * Testing use is testing 1..4 and expecting result false.
  */
-isc_boolean_t
+bool
 isc_hmacsha1_check(int testing) {
        isc_hmacsha1_t ctx;
        unsigned char key[] = { /* 20*0x0b */
@@ -1533,7 +1535,7 @@ isc_hmacsha1_check(int testing) {
                0xb2, 0xab, 0xc5, 0x19, 0x8f, 0x38, 0x62, 0x36,
                0x42, 0xbd, 0xec, 0xde
        };
-       isc_boolean_t result;
+       bool result;
 
        /*
         * Introduce a fault for testing.
index 5b18c73c9a7e43094de5b252dcbe5630bd76da63..b3c6825f1f85a9597d72aca62318ea1f53ad4fd7 100644 (file)
@@ -129,7 +129,7 @@ isc_ht_add(isc_ht_t *ht, const unsigned char *key,
        REQUIRE(ISC_HT_VALID(ht));
        REQUIRE(key != NULL && keysize > 0);
 
-       hash = isc_hash_function(key, keysize, ISC_TRUE, NULL);
+       hash = isc_hash_function(key, keysize, true, NULL);
        node = ht->table[hash & ht->mask];
        while (node != NULL) {
                if (keysize == node->keysize &&
@@ -164,7 +164,7 @@ isc_ht_find(const isc_ht_t *ht, const unsigned char *key,
        REQUIRE(key != NULL && keysize > 0);
        REQUIRE(valuep != NULL);
 
-       hash = isc_hash_function(key, keysize, ISC_TRUE, NULL);
+       hash = isc_hash_function(key, keysize, true, NULL);
        node = ht->table[hash & ht->mask];
        while (node != NULL) {
                if (keysize == node->keysize &&
@@ -187,7 +187,7 @@ isc_ht_delete(isc_ht_t *ht, const unsigned char *key, uint32_t keysize) {
        REQUIRE(key != NULL && keysize > 0);
 
        prev = NULL;
-       hash = isc_hash_function(key, keysize, ISC_TRUE, NULL);
+       hash = isc_hash_function(key, keysize, true, NULL);
        node = ht->table[hash & ht->mask];
        while (node != NULL) {
                if (keysize == node->keysize &&
@@ -302,7 +302,7 @@ isc_ht_iter_delcurrent_next(isc_ht_iter_t *it) {
                        it->cur = ht->table[it->i];
        }
 
-       hash = isc_hash_function(to_delete->key, to_delete->keysize, ISC_TRUE,
+       hash = isc_hash_function(to_delete->key, to_delete->keysize, true,
                                 NULL);
        node = ht->table[hash & ht->mask];
        while (node != to_delete) {
index 312bdbeadab2ee6cb0c51cc30eb384edf77784dc..06e7a8b68b536411ea01b5a56f22d172db517b91 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <string.h>
 
 #include <isc/buffer.h>
@@ -378,7 +379,7 @@ httpdmgr_destroy(isc_httpdmgr_t *httpdmgr) {
  * Look for the given header in headers.
  * If value is specified look for it terminated with a character in eov.
  */
-static isc_boolean_t
+static bool
 have_header(isc_httpd_t *httpd, const char *header, const char *value,
            const char *eov)
 {
@@ -407,13 +408,13 @@ have_header(isc_httpd_t *httpd, const char *header, const char *value,
                        if (h == NULL || (nl != NULL && nl < h))
                                h = nl;
                        if (h == NULL)
-                               return (ISC_FALSE);
+                               return (false);
                        h++;
                        continue;
                }
 
                if (value == NULL)
-                       return (ISC_TRUE);
+                       return (true);
 
                /*
                 * Skip optional leading white space.
@@ -427,7 +428,7 @@ have_header(isc_httpd_t *httpd, const char *header, const char *value,
                while (*h != 0 && *h != '\r' && *h != '\n') {
                        if (strncasecmp(h, value, vlen) == 0)
                                if (strchr(eov, h[vlen]) != NULL)
-                                       return (ISC_TRUE);
+                                       return (true);
                        /*
                         * Skip to next token.
                         */
@@ -437,7 +438,7 @@ have_header(isc_httpd_t *httpd, const char *header, const char *value,
                        if (h[0] != 0)
                                h++;
                }
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -845,7 +846,7 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev) {
        isc_socketevent_t *sev = (isc_socketevent_t *)ev;
        isc_httpdurl_t *url;
        isc_time_t now;
-       isc_boolean_t is_compressed = ISC_FALSE;
+       bool is_compressed = false;
        char datebuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
 
        ENTER("recv");
@@ -925,7 +926,7 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev) {
        if (httpd->flags & HTTPD_ACCEPT_DEFLATE) {
                        result = isc_httpd_compress(httpd);
                        if (result == ISC_R_SUCCESS) {
-                               is_compressed = ISC_TRUE;
+                               is_compressed = true;
                        }
        }
 #endif
@@ -951,7 +952,7 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev) {
 
        isc_httpd_addheader(httpd, "Server: libisc", NULL);
 
-       if (is_compressed == ISC_TRUE) {
+       if (is_compressed == true) {
                isc_httpd_addheader(httpd, "Content-Encoding", "deflate");
                isc_httpd_addheaderuint(httpd, "Content-Length",
                                        isc_buffer_usedlength(&httpd->compbuffer));
@@ -968,7 +969,7 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev) {
         * rendered into it.  If no data is present, we won't do anything
         * with the buffer.
         */
-       if (is_compressed == ISC_TRUE) {
+       if (is_compressed == true) {
                ISC_LIST_APPEND(httpd->bufflist, &httpd->compbuffer, link);
        } else {
                if (isc_buffer_length(&httpd->bodybuffer) > 0) {
@@ -1229,12 +1230,12 @@ isc_result_t
 isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
                    isc_httpdaction_t *func, void *arg)
 {
-       return (isc_httpdmgr_addurl2(httpdmgr, url, ISC_FALSE, func, arg));
+       return (isc_httpdmgr_addurl2(httpdmgr, url, false, func, arg));
 }
 
 isc_result_t
 isc_httpdmgr_addurl2(isc_httpdmgr_t *httpdmgr, const char *url,
-                    isc_boolean_t isstatic,
+                    bool isstatic,
                     isc_httpdaction_t *func, void *arg)
 {
        isc_httpdurl_t *item;
index 310adc7ec1f9d099720d3447459daab511925be7..5ed27502854b7f19e0605ea91617494e2ee92574 100644 (file)
@@ -77,6 +77,8 @@
  *     None.
  */
 
+#include <stdbool.h>
+
 #include <isc/eventclass.h>
 #include <isc/lang.h>
 #include <isc/magic.h>
@@ -196,14 +198,14 @@ isc_app_run(void);
  *\li  ISC_R_RELOAD                    Reload has been requested.
  */
 
-isc_boolean_t
+bool
 isc_app_isrunning(void);
 /*!<
  * \brief Return if the ISC library application is running.
  *
  * Returns:
- *\li  ISC_TRUE    App is running.
- *\li  ISC_FALSE   App is not running.
+ *\li  true    App is running.
+ *\li  false   App is not running.
  */
 
 isc_result_t
index 7edd7c070c9912c8f8c6886d3cef763c6f4b9789..5a2837fac247aba9e5e1072910f549333a8e8def 100644 (file)
 #ifndef ISC_BIND9_H
 #define ISC_BIND9_H 1
 
-#include <isc/boolean.h>
+#include <stdbool.h>
+
 #include <isc/platform.h>
 
 /*
  * This determines whether we are using the libisc/libdns libraries
  * in BIND9 or in some other application.  For BIND9 (named and related
- * tools) it must be set to ISC_TRUE at runtime.  Export library clients
- * will call isc_lib_register(), which will set it to ISC_FALSE.
+ * tools) it must be set to true at runtime.  Export library clients
+ * will call isc_lib_register(), which will set it to false.
  */
-LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_bind9;
+LIBISC_EXTERNAL_DATA extern bool isc_bind9;
 
 #endif /* ISC_BIND9_H */
diff --git a/lib/isc/include/isc/boolean.h b/lib/isc/include/isc/boolean.h
deleted file mode 100644 (file)
index ead4565..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-/* $Id: boolean.h,v 1.19 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_BOOLEAN_H
-#define ISC_BOOLEAN_H 1
-
-/*! \file isc/boolean.h */
-
-typedef enum { isc_boolean_false = 0, isc_boolean_true = 1 } isc_boolean_t;
-
-#define ISC_FALSE isc_boolean_false
-#define ISC_TRUE isc_boolean_true
-#define ISC_TF(x) ((x) ? ISC_TRUE : ISC_FALSE)
-
-#endif /* ISC_BOOLEAN_H */
index 65100fc9a07707c963a8d40f9672d9e5c88c9ce9..caaac5754d3ec250b86f1af8c1f5095555a4cdd3 100644 (file)
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/assertions.h>
 #include <isc/formatcheck.h>
@@ -185,7 +186,7 @@ struct isc_buffer {
        /*! private internal elements */
        isc_mem_t              *mctx;
        /* automatically realloc buffer at put* */
-       isc_boolean_t           autore;
+       bool            autore;
 };
 
 /***
@@ -319,7 +320,7 @@ isc__buffer_invalidate(isc_buffer_t *b);
  */
 
 void
-isc_buffer_setautorealloc(isc_buffer_t *b, isc_boolean_t enable);
+isc_buffer_setautorealloc(isc_buffer_t *b, bool enable);
 /*!<
  * \brief Enable or disable autoreallocation on 'b'.
  *
@@ -786,7 +787,7 @@ ISC_LANG_ENDDECLS
                (_b)->mctx = NULL; \
                ISC_LINK_INIT(_b, link); \
                (_b)->magic = ISC_BUFFER_MAGIC; \
-               (_b)->autore = ISC_FALSE; \
+               (_b)->autore = false; \
        } while (0)
 
 #define ISC__BUFFER_INITNULL(_b) ISC__BUFFER_INIT(_b, NULL, 0)
index 480629f6ebe04dbf3ab31dbcb0e5be463a1cead9..a1a256ed257583ca38ae3d931ea453ae98858057 100644 (file)
@@ -15,7 +15,8 @@
 
 /*! \file isc/commandline.h */
 
-#include <isc/boolean.h>
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/platform.h>
 #include <isc/result.h>
@@ -29,9 +30,9 @@ LIBISC_EXTERNAL_DATA extern char *isc_commandline_argument;
 /*% For printing error messages. */
 LIBISC_EXTERNAL_DATA extern char *isc_commandline_progname;
 /*% Print error message. */
-LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_errprint;
+LIBISC_EXTERNAL_DATA extern bool isc_commandline_errprint;
 /*% Reset getopt. */
-LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_reset;
+LIBISC_EXTERNAL_DATA extern bool isc_commandline_reset;
 
 ISC_LANG_BEGINDECLS
 
index 5c75612c64cd56ff988c744474e43a7dc2bec22b..4bba8e161dcf3fcd9932f64f77061b42e191f412 100644 (file)
@@ -49,6 +49,7 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/lang.h>
@@ -57,9 +58,9 @@
 /*@{*/
 /*% Entropy callback function. */
 typedef isc_result_t (*isc_entropystart_t)(isc_entropysource_t *source,
-                                          void *arg, isc_boolean_t blocking);
+                                          void *arg, bool blocking);
 typedef isc_result_t (*isc_entropyget_t)(isc_entropysource_t *source,
-                                        void *arg, isc_boolean_t blocking);
+                                        void *arg, bool blocking);
 typedef void (*isc_entropystop_t)(isc_entropysource_t *source, void *arg);
 /*@}*/
 
index d19e4e8b827837070ae3badecd53f159b4fcef33..0797f027bcd5e344df09726d365c1b54d03d4c2c 100644 (file)
@@ -15,6 +15,7 @@
 
 /*! \file isc/file.h */
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/lang.h>
@@ -175,18 +176,18 @@ isc_file_rename(const char *oldname, const char *newname);
  * \brief Rename the file 'oldname' to 'newname'.
  */
 
-isc_boolean_t
+bool
 isc_file_exists(const char *pathname);
 /*!<
- * \brief Return #ISC_TRUE if the calling process can tell that the given file exists.
+ * \brief Return #true if the calling process can tell that the given file exists.
  * Will not return true if the calling process has insufficient privileges
  * to search the entire path.
  */
 
-isc_boolean_t
+bool
 isc_file_isabsolute(const char *filename);
 /*!<
- * \brief Return #ISC_TRUE if the given file name is absolute.
+ * \brief Return #true if the given file name is absolute.
  */
 
 isc_result_t
@@ -229,16 +230,16 @@ isc_file_isdirectory(const char *name);
  *             These occur when stat returns -1 and an errno.
  */
 
-isc_boolean_t
+bool
 isc_file_iscurrentdir(const char *filename);
 /*!<
- * \brief Return #ISC_TRUE if the given file name is the current directory (".").
+ * \brief Return #true if the given file name is the current directory (".").
  */
 
-isc_boolean_t
+bool
 isc_file_ischdiridempotent(const char *filename);
 /*%<
- * Return #ISC_TRUE if calling chdir(filename) multiple times will give
+ * Return #true if calling chdir(filename) multiple times will give
  * the same result as calling it once.
  */
 
@@ -386,7 +387,7 @@ isc_file_sanitize(const char *dir, const char *base, const char *ext,
  * - ISC_R_NOSPACE if the resulting path would be longer than 'length'
  */
 
-isc_boolean_t
+bool
 isc_file_isdirwritable(const char *path);
 /*%<
  *     Return true if the path is a directory and is writable
index f554245bb2acf780e40915c9d2f94c616f5af87f..fd558f7a2d8e5b9ce76cc2d6c783cf4c3cd63a19 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef ISC_HASH_H
 #define ISC_HASH_H 1
 
+#include <stdbool.h>
+
 #include <isc/deprecated.h>
 #include <isc/types.h>
 
@@ -155,11 +157,11 @@ isc_hash_init(void);
 /*@{*/
 unsigned int
 isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key,
-                unsigned int keylen, isc_boolean_t case_sensitive)
+                unsigned int keylen, bool case_sensitive)
        ISC_DEPRECATED;
 unsigned int
 isc_hash_calc(const unsigned char *key, unsigned int keylen,
-             isc_boolean_t case_sensitive)
+             bool case_sensitive)
        ISC_DEPRECATED;
 /*!<
  * \brief Calculate a hash value.
@@ -176,7 +178,7 @@ isc_hash_calc(const unsigned char *key, unsigned int keylen,
  * specified for the corresponding hash object.
  *
  * 'case_sensitive' specifies whether the hash key should be treated as
- * case_sensitive values.  It should typically be ISC_FALSE if the hash key
+ * case_sensitive values.  It should typically be false if the hash key
  * is a DNS name.
  */
 /*@}*/
@@ -206,11 +208,11 @@ isc_hash_set_initializer(const void *initializer);
 
 uint32_t
 isc_hash_function(const void *data, size_t length,
-                 isc_boolean_t case_sensitive,
+                 bool case_sensitive,
                  const uint32_t *previous_hashp);
 uint32_t
 isc_hash_function_reverse(const void *data, size_t length,
-                         isc_boolean_t case_sensitive,
+                         bool case_sensitive,
                          const uint32_t *previous_hashp);
 /*!<
  * \brief Calculate a hash over data.
@@ -235,7 +237,7 @@ isc_hash_function_reverse(const void *data, size_t length,
  * 'length' is the size of the data to be hashed.
  *
  * 'case_sensitive' specifies whether the hash key should be treated as
- * case_sensitive values.  It should typically be ISC_FALSE if the hash key
+ * case_sensitive values.  It should typically be false if the hash key
  * is a DNS name.
  *
  * 'previous_hashp' is a pointer to a previous hash value returned by
index 77b3d36ea82c916722066fcfa6fea2b257a279b3..747287b3160c24a0e5313367282de16a11de10c6 100644 (file)
 
 /*! \file isc/heap.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/types.h>
 
 ISC_LANG_BEGINDECLS
 
 /*%
- * The comparison function returns ISC_TRUE if the first argument has
- * higher priority than the second argument, and ISC_FALSE otherwise.
+ * The comparison function returns true if the first argument has
+ * higher priority than the second argument, and false otherwise.
  */
-typedef isc_boolean_t (*isc_heapcompare_t)(void *, void *);
+typedef bool (*isc_heapcompare_t)(void *, void *);
 
 /*%
  * The index function allows the client of the heap to receive a callback
@@ -58,8 +60,8 @@ isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
  * Requires:
  *\li  "mctx" is valid.
  *\li  "compare" is a function which takes two void * arguments and
- *     returns ISC_TRUE if the first argument has a higher priority than
- *     the second, and ISC_FALSE otherwise.
+ *     returns true if the first argument has a higher priority than
+ *     the second, and false otherwise.
  *\li  "index" is a function which takes a void *, and an unsigned int
  *     argument.  This function will be called whenever an element's
  *     index value changes, so it may continue to delete itself from the
index 35207e4c3026a8492d4cbc6e5e739f53e61b9439..ca2ec5649ca47fe79dbd22a05646691093d2e4b5 100644 (file)
@@ -22,6 +22,8 @@
 
 #ifndef PK11_MD5_DISABLE
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/md5.h>
 #include <isc/platform.h>
@@ -69,13 +71,13 @@ isc_hmacmd5_update(isc_hmacmd5_t *ctx, const unsigned char *buf,
 void
 isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest);
 
-isc_boolean_t
+bool
 isc_hmacmd5_verify(isc_hmacmd5_t *ctx, unsigned char *digest);
 
-isc_boolean_t
+bool
 isc_hmacmd5_verify2(isc_hmacmd5_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacmd5_check(int testing);
 
 ISC_LANG_ENDDECLS
index d5746130d8abb24ea133649e93fcc04e0d7ca341..3c80fbab3be68481da3c4b2d9ad5a2f6ec2a3717 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef ISC_HMACSHA_H
 #define ISC_HMACSHA_H 1
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/platform.h>
 #include <isc/sha1.h>
@@ -100,10 +102,10 @@ isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
 void
 isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacsha1_check(int testing);
 
 
@@ -121,7 +123,7 @@ isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
 void
 isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
 
 
@@ -139,7 +141,7 @@ isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
 void
 isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
 
 
@@ -157,7 +159,7 @@ isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
 void
 isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
 
 
@@ -175,7 +177,7 @@ isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
 void
 isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
 
-isc_boolean_t
+bool
 isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
 
 ISC_LANG_ENDDECLS
index f87260853749d9d35baf3c2bbb7cb6bde23fb50b..b02b33e83d65c4783d903ded8ad010b42c07a3c8 100644 (file)
@@ -15,6 +15,8 @@
 
 /*! \file */
 
+#include <stdbool.h>
+
 #include <isc/event.h>
 #include <isc/eventclass.h>
 #include <isc/types.h>
@@ -33,7 +35,7 @@ struct isc_httpdurl {
        char                           *url;
        isc_httpdaction_t              *action;
        void                           *action_arg;
-       isc_boolean_t                   isstatic;
+       bool                    isstatic;
        isc_time_t                      loadtime;
        ISC_LINK(isc_httpdurl_t)        link;
 };
@@ -62,7 +64,7 @@ isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
 
 isc_result_t
 isc_httpdmgr_addurl2(isc_httpdmgr_t *httpdmgr, const char *url,
-                    isc_boolean_t isstatic,
+                    bool isstatic,
                     isc_httpdaction_t *func, void *arg);
 
 isc_result_t
index e09258047369614b1a9c3e42fc4bb1e152a4fe27..d63ecf9654187c712fda49113376f927379fbaf7 100644 (file)
@@ -44,6 +44,7 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/lang.h>
@@ -300,7 +301,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp);
 
 isc_result_t
 isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token,
-                      isc_tokentype_t expect, isc_boolean_t eol);
+                      isc_tokentype_t expect, bool eol);
 /*%<
  * Get the next token from a DNS master file type stream.  This is a
  * convenience function that sets appropriate options and handles quoted
@@ -318,7 +319,7 @@ isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token,
  */
 
 isc_result_t
-isc_lex_getoctaltoken(isc_lex_t *lex, isc_token_t *token, isc_boolean_t eol);
+isc_lex_getoctaltoken(isc_lex_t *lex, isc_token_t *token, bool eol);
 /*%<
  * Get the next token from a DNS master file type stream.  This is a
  * convenience function that sets appropriate options and handles end
@@ -422,7 +423,7 @@ isc_lex_setsourceline(isc_lex_t *lex, unsigned long line);
  * \li #ISC_R_NOTFOUND - there are no sources.
  */
 
-isc_boolean_t
+bool
 isc_lex_isfile(isc_lex_t *lex);
 /*%<
  * Return whether the current input source is a file.
@@ -431,8 +432,8 @@ isc_lex_isfile(isc_lex_t *lex);
  *\li  'lex' is a valid lexer.
  *
  * Returns:
- * \li #ISC_TRUE if the current input is a file,
- *\li  #ISC_FALSE otherwise.
+ * \li #true if the current input is a file,
+ *\li  #false otherwise.
  */
 
 
index 8cc5b2eb4b7a82a34bcd277a469d9e73c7ad6af5..6c77957ebd995be1be29f622018408d67039e2f2 100644 (file)
@@ -16,8 +16,8 @@
  * Performance
  */
 #ifdef HAVE_BUILTIN_EXPECT
-#define ISC_LIKELY(x)            __builtin_expect(!!(x), 1)
-#define ISC_UNLIKELY(x)          __builtin_expect(!!(x), 0)
+#define ISC_LIKELY(x)            __builtin_expect((x), 1)
+#define ISC_UNLIKELY(x)          __builtin_expect((x), 0)
 #else
 #define ISC_LIKELY(x)            (x)
 #define ISC_UNLIKELY(x)          (x)
index 955a175d7f9246e2e504e61287a0ffcea3857281..ab476caf7745eac9606a079eb58e4aba8446c420 100644 (file)
@@ -12,7 +12,6 @@
 
 #ifndef ISC_LIST_H
 #define ISC_LIST_H 1
-#include <isc/boolean.h>
 #include <isc/assertions.h>
 
 #ifdef ISC_LIST_CHECKINIT
@@ -37,7 +36,7 @@
 
 #define ISC_LIST_HEAD(list) ((list).head)
 #define ISC_LIST_TAIL(list) ((list).tail)
-#define ISC_LIST_EMPTY(list) ISC_TF((list).head == NULL)
+#define ISC_LIST_EMPTY(list) ((list).head == NULL)
 
 #define __ISC_LIST_PREPENDUNSAFE(list, elt, link) \
        do { \
index 3998c34585a9a3f539e035f520c01f6575945cd9..fd0443f6b5983ac79b18257afa66106e0994616c 100644 (file)
@@ -15,6 +15,7 @@
 
 /*! \file isc/log.h */
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <syslog.h> /* XXXDCL NT */
@@ -123,7 +124,7 @@ typedef struct isc_logfile {
         * to a size large enough for the largest possible file on a system.
         */
        isc_offset_t maximum_size;
-       isc_boolean_t maximum_reached; /*%< Private. */
+       bool maximum_reached; /*%< Private. */
 } isc_logfile_t;
 
 /*%
@@ -707,13 +708,13 @@ isc_log_getdebuglevel(isc_log_t *lctx);
  *\li  The current logging debugging level is returned.
  */
 
-isc_boolean_t
+bool
 isc_log_wouldlog(isc_log_t *lctx, int level);
 /*%<
  * Determine whether logging something to 'lctx' at 'level' would
  * actually cause something to be logged somewhere.
  *
- * If #ISC_FALSE is returned, it is guaranteed that nothing would
+ * If #false is returned, it is guaranteed that nothing would
  * be logged, allowing the caller to omit unnecessary
  * isc_log_write() calls and possible message preformatting.
  */
index 38e6d18c54c0f8c98473ec7387bef3a01f94c365..4d293983a78cb1aa489ffb77b0b285b56749daf1 100644 (file)
@@ -40,6 +40,8 @@
 
 #ifndef PK11_MD5_DISABLE
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/platform.h>
 #include <isc/types.h>
@@ -86,8 +88,8 @@ isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len);
 void
 isc_md5_final(isc_md5_t *ctx, unsigned char *digest);
 
-isc_boolean_t
-isc_md5_check(isc_boolean_t testing);
+bool
+isc_md5_check(bool testing);
 
 ISC_LANG_ENDDECLS
 
index c673adfe3935a30c04ca156d77a1d7c7fefb13d5..8f018563c0fde513128e408e802ba06f0b73f8fd 100644 (file)
@@ -14,6 +14,7 @@
 
 /*! \file isc/mem.h */
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/json.h>
@@ -209,14 +210,14 @@ typedef struct isc_memmethods {
                               size_t size _ISC_MEM_FLARG);
        char *(*memstrdup)(isc_mem_t *mctx, const char *s _ISC_MEM_FLARG);
        void (*memfree)(isc_mem_t *mctx, void *ptr _ISC_MEM_FLARG);
-       void (*setdestroycheck)(isc_mem_t *mctx, isc_boolean_t flag);
+       void (*setdestroycheck)(isc_mem_t *mctx, bool flag);
        void (*setwater)(isc_mem_t *ctx, isc_mem_water_t water,
                         void *water_arg, size_t hiwater, size_t lowater);
        void (*waterack)(isc_mem_t *ctx, int flag);
        size_t (*inuse)(isc_mem_t *mctx);
        size_t (*maxinuse)(isc_mem_t *mctx);
        size_t (*total)(isc_mem_t *mctx);
-       isc_boolean_t (*isovermem)(isc_mem_t *mctx);
+       bool (*isovermem)(isc_mem_t *mctx);
        isc_result_t (*mpcreate)(isc_mem_t *mctx, size_t size,
                                 isc_mempool_t **mpctxp);
 } isc_memmethods_t;
@@ -379,9 +380,9 @@ isc_mem_stats(isc_mem_t *mctx, FILE *out);
 
 void
 isc_mem_setdestroycheck(isc_mem_t *mctx,
-                       isc_boolean_t on);
+                       bool on);
 /*%<
- * If 'on' is ISC_TRUE, 'mctx' will check for memory leaks when
+ * If 'on' is true, 'mctx' will check for memory leaks when
  * destroyed and abort the program if any are present.
  */
 
@@ -419,7 +420,7 @@ isc_mem_total(isc_mem_t *mctx);
  * not yet used.
  */
 
-isc_boolean_t
+bool
 isc_mem_isovermem(isc_mem_t *mctx);
 /*%<
  * Return true iff the memory context is in "over memory" state, i.e.,
index 6f8ee0606af153f586c3a7a48b7a14e36746a80f..2d6b12b7cd4901b628573c0b593860e9b1a31583 100644 (file)
@@ -16,6 +16,7 @@
 /*! \file isc/netaddr.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/net.h>
@@ -40,21 +41,21 @@ struct isc_netaddr {
        uint32_t zone;
 };
 
-isc_boolean_t
+bool
 isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b);
 
 /*%<
- * Compare network addresses 'a' and 'b'.  Return #ISC_TRUE if
- * they are equal, #ISC_FALSE if not.
+ * Compare network addresses 'a' and 'b'.  Return #true if
+ * they are equal, #false if not.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
                     unsigned int prefixlen);
 /*%<
  * Compare the 'prefixlen' most significant bits of the network
  * addresses 'a' and 'b'.  If 'b''s scope is zero then 'a''s scope is
- * ignored.  Return #ISC_TRUE if they are equal, #ISC_FALSE if not.
+ * ignored.  Return #true if they are equal, #false if not.
  */
 
 isc_result_t
@@ -126,34 +127,34 @@ isc_netaddr_any6(isc_netaddr_t *netaddr);
  * Return the IPv6 wildcard address.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_ismulticast(isc_netaddr_t *na);
 /*%<
- * Returns ISC_TRUE if the address is a multicast address.
+ * Returns true if the address is a multicast address.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_isexperimental(isc_netaddr_t *na);
 /*%<
- * Returns ISC_TRUE if the address is a experimental (CLASS E) address.
+ * Returns true if the address is a experimental (CLASS E) address.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_islinklocal(isc_netaddr_t *na);
 /*%<
- * Returns #ISC_TRUE if the address is a link local address.
+ * Returns #true if the address is a link local address.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_issitelocal(isc_netaddr_t *na);
 /*%<
- * Returns #ISC_TRUE if the address is a site local address.
+ * Returns #true if the address is a site local address.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_isnetzero(isc_netaddr_t *na);
 /*%<
- * Returns #ISC_TRUE if the address is in net zero.
+ * Returns #true if the address is in net zero.
  */
 
 void
@@ -176,7 +177,7 @@ isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen);
  *     ISC_R_FAILURE           extra bits.
  */
 
-isc_boolean_t
+bool
 isc_netaddr_isloopback(const isc_netaddr_t *na);
 /*
  * Test whether the netaddr 'na' is a loopback IPv4 or IPv6 address (in
index 8a9002d9f215bc9d1b1773c786a19e87a65bbbf2..1f0d928ccac1cb8c92626af743b80a2d0cd796cb 100644 (file)
@@ -29,6 +29,8 @@
  ***   Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/net.h>
 
 /***
@@ -62,7 +64,7 @@ isc_portset_destroy(isc_mem_t *mctx, isc_portset_t **portsetp);
  *\li  '*portsetp' to be a valid set.
  */
 
-isc_boolean_t
+bool
 isc_portset_isset(isc_portset_t *portset, in_port_t port);
 /*%<
  * Test whether the given port is stored in the portset.
@@ -71,7 +73,7 @@ isc_portset_isset(isc_portset_t *portset, in_port_t port);
  *\li  'portset' to be a valid set.
  *
  * Returns
- * \li #ISC_TRUE if the port is found, ISC_FALSE otherwise.
+ * \li #true if the port is found, false otherwise.
  */
 
 unsigned int
index 9cf07f0088bdb0cfeb384dcba6e43901cd64a8da..210f302c84b61137579df43aa1db8dde4ad389fc 100644 (file)
 
 #ifndef ISC_QUEUE_H
 #define ISC_QUEUE_H 1
+
+#include <stdbool.h>
+
 #include <isc/assertions.h>
-#include <isc/boolean.h>
 #include <isc/mutex.h>
 
 #ifdef ISC_QUEUE_CHECKINIT
@@ -52,7 +54,7 @@
                (queue).tail = (queue).head = NULL; \
        } while (0)
 
-#define ISC_QUEUE_EMPTY(queue) ISC_TF((queue).head == NULL)
+#define ISC_QUEUE_EMPTY(queue) ((queue).head == NULL)
 
 #define ISC_QUEUE_DESTROY(queue) \
        do { \
  */
 #define ISC_QUEUE_PUSH(queue, elt, link) \
        do { \
-               isc_boolean_t headlocked = ISC_FALSE; \
+               bool headlocked = false; \
                ISC_QLINK_INSIST(!ISC_QLINK_LINKED(elt, link)); \
                if ((queue).head == NULL) { \
                        LOCK(&(queue).headlock); \
-                       headlocked = ISC_TRUE; \
+                       headlocked = true; \
                } \
                LOCK(&(queue).taillock); \
                if ((queue).tail == NULL && !headlocked) { \
                        UNLOCK(&(queue).taillock); \
                        LOCK(&(queue).headlock); \
                        LOCK(&(queue).taillock); \
-                       headlocked = ISC_TRUE; \
+                       headlocked = true; \
                } \
                (elt)->link.prev = (queue).tail; \
                (elt)->link.next = NULL; \
index bb744375c92eba95a1eb9b73b6a8de63775be360..135552a62759f981731c34793925a5b9626ae4a9 100644 (file)
@@ -9,6 +9,8 @@
  * information regarding copyright ownership.
  */
 
+#include <stdbool.h>
+
 #include <isc/magic.h>
 #include <isc/types.h>
 #include <isc/mutex.h>
@@ -45,7 +47,7 @@ typedef struct isc_prefix {
        isc_mem_t *mctx;
        unsigned int family;    /* AF_INET | AF_INET6, or AF_UNSPEC for "any" */
        unsigned int bitlen;    /* 0 for "any" */
-       isc_boolean_t ecs;      /* ISC_TRUE for an EDNS client subnet address */
+       bool ecs;       /* true for an EDNS client subnet address */
        isc_refcount_t refcount;
        union {
                struct in_addr sin;
index 39560c9ee546200e33016c69ce9851d721d44426..f6320b205a58c1ee840c9d49661a1178a278aff8 100644 (file)
@@ -28,6 +28,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/types.h>
@@ -63,7 +64,7 @@ isc_ratelimiter_setpertic(isc_ratelimiter_t *rl, uint32_t perint);
  */
 
 void
-isc_ratelimiter_setpushpop(isc_ratelimiter_t *rl, isc_boolean_t pushpop);
+isc_ratelimiter_setpushpop(isc_ratelimiter_t *rl, bool pushpop);
 /*%<
  * Set / clear the ratelimiter to from push pop mode rather
  * first in - first out mode (default).
index f29f00bac6d1ca7b7966f76c80d5edc9c179d231..66ed08b6d316a68365284f82b59fd83b7f1a4264 100644 (file)
 
 /*! \file isc/safe.h */
 
+#include <stdbool.h>
+
 #include <isc/types.h>
 #include <stdlib.h>
 
 ISC_LANG_BEGINDECLS
 
-isc_boolean_t
+bool
 isc_safe_memequal(const void *s1, const void *s2, size_t n);
 /*%<
- * Returns ISC_TRUE iff. two blocks of memory are equal, otherwise
- * ISC_FALSE.
+ * Returns true iff. two blocks of memory are equal, otherwise
+ * false.
  *
  */
 
index 640a939418559f78a3e0bed93826fec4819a8bb7..2c6923fba0e98b11182bb0dba7c1d41031064803 100644 (file)
 #define ISC_SERIAL_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/types.h>
 
 /*! \file isc/serial.h
  *     \brief Implement 32 bit serial space arithmetic comparison functions.
- *     Note: Undefined results are returned as ISC_FALSE.
+ *     Note: Undefined results are returned as false.
  */
 
 /***
 
 ISC_LANG_BEGINDECLS
 
-isc_boolean_t
+bool
 isc_serial_lt(uint32_t a, uint32_t b);
 /*%<
  *     Return true if 'a' < 'b' otherwise false.
  */
 
-isc_boolean_t
+bool
 isc_serial_gt(uint32_t a, uint32_t b);
 /*%<
  *     Return true if 'a' > 'b' otherwise false.
  */
 
-isc_boolean_t
+bool
 isc_serial_le(uint32_t a, uint32_t b);
 /*%<
  *     Return true if 'a' <= 'b' otherwise false.
  */
 
-isc_boolean_t
+bool
 isc_serial_ge(uint32_t a, uint32_t b);
 /*%<
  *     Return true if 'a' >= 'b' otherwise false.
  */
 
-isc_boolean_t
+bool
 isc_serial_eq(uint32_t a, uint32_t b);
 /*%<
  *     Return true if 'a' == 'b' otherwise false.
  */
 
-isc_boolean_t
+bool
 isc_serial_ne(uint32_t a, uint32_t b);
 /*%<
  *     Return true if 'a' != 'b' otherwise false.
index 100d4eb84d00fbeabcb2a5adf659ec0d2808120a..02bca12563e5dc2bc6d682cf1c220b5106dfcc21 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef ISC_SHA1_H
 #define ISC_SHA1_H 1
 
-
 /*     $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */
 
 /*! \file isc/sha1.h
@@ -21,6 +20,8 @@
  * \note 100% Public Domain
  */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/platform.h>
 #include <isc/types.h>
@@ -67,8 +68,8 @@ isc_sha1_update(isc_sha1_t *ctx, const unsigned char *data, unsigned int len);
 void
 isc_sha1_final(isc_sha1_t *ctx, unsigned char *digest);
 
-isc_boolean_t
-isc_sha1_check(isc_boolean_t testing);
+bool
+isc_sha1_check(bool testing);
 
 ISC_LANG_ENDDECLS
 
index 3815ea158f002a305cb3b7c2b9d1e6d77317b2e1..478e77c727841018923da76b6e8eecdc74d41636 100644 (file)
@@ -15,6 +15,8 @@
 
 /*! \file isc/sockaddr.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/net.h>
 #include <isc/types.h>
@@ -47,7 +49,7 @@ struct isc_sockaddr {
 
 ISC_LANG_BEGINDECLS
 
-isc_boolean_t
+bool
 isc_sockaddr_compare(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
                     unsigned int flags);
 /*%<
@@ -57,33 +59,33 @@ isc_sockaddr_compare(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
  * 'flags' is set from ISC_SOCKADDR_CMP*.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_equal(const isc_sockaddr_t *a, const isc_sockaddr_t *b);
 /*%<
- * Return ISC_TRUE iff the socket addresses 'a' and 'b' are equal.
+ * Return true iff the socket addresses 'a' and 'b' are equal.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_eqaddr(const isc_sockaddr_t *a, const isc_sockaddr_t *b);
 /*%<
- * Return ISC_TRUE iff the address parts of the socket addresses
+ * Return true iff the address parts of the socket addresses
  * 'a' and 'b' are equal, ignoring the ports.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_eqaddrprefix(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
                          unsigned int prefixlen);
 /*%<
- * Return ISC_TRUE iff the most significant 'prefixlen' bits of the
+ * Return true iff the most significant 'prefixlen' bits of the
  * socket addresses 'a' and 'b' are equal, ignoring the ports.
  * If 'b''s scope is zero then 'a''s scope will be ignored.
  */
 
 unsigned int
-isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only);
+isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, bool address_only);
 /*%<
  * Return a hash value for the socket address 'sockaddr'.  If 'address_only'
- * is ISC_TRUE, the hash value will not depend on the port.
+ * is true, the hash value will not depend on the port.
  *
  * IPv6 addresses containing mapped IPv4 addresses generate the same hash
  * value as the equivalent IPv4 address.
@@ -187,34 +189,34 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size);
  * The resulting string is guaranteed to be null-terminated.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_ismulticast(const isc_sockaddr_t *sa);
 /*%<
- * Returns #ISC_TRUE if the address is a multicast address.
+ * Returns #true if the address is a multicast address.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_isexperimental(const isc_sockaddr_t *sa);
 /*
- * Returns ISC_TRUE if the address is a experimental (CLASS E) address.
+ * Returns true if the address is a experimental (CLASS E) address.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_islinklocal(const isc_sockaddr_t *sa);
 /*%<
- * Returns ISC_TRUE if the address is a link local address.
+ * Returns true if the address is a link local address.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_issitelocal(const isc_sockaddr_t *sa);
 /*%<
- * Returns ISC_TRUE if the address is a sitelocal address.
+ * Returns true if the address is a sitelocal address.
  */
 
-isc_boolean_t
+bool
 isc_sockaddr_isnetzero(const isc_sockaddr_t *sa);
 /*%<
- * Returns ISC_TRUE if the address is in net zero.
+ * Returns true if the address is in net zero.
  */
 
 isc_result_t
index 66b86a850eae18c2f186202934d5b1b7af33e5c7..6ace9b4882945d3b511b00d704cbb13b0d8075cb 100644 (file)
@@ -52,6 +52,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/event.h>
 #include <isc/eventclass.h>
@@ -366,7 +367,7 @@ typedef struct isc_socketmethods {
        isc_result_t    (*getsockname)(isc_socket_t *sock,
                                       isc_sockaddr_t *addressp);
        isc_sockettype_t (*gettype)(isc_socket_t *sock);
-       void            (*ipv6only)(isc_socket_t *sock, isc_boolean_t yes);
+       void            (*ipv6only)(isc_socket_t *sock, bool yes);
        isc_result_t    (*fdwatchpoke)(isc_socket_t *sock, int flags);
        isc_result_t            (*dup)(isc_socket_t *socket,
                                  isc_socket_t **socketp);
@@ -1124,14 +1125,14 @@ isc_socket_gettype(isc_socket_t *sock);
  */
 
 /*@{*/
-isc_boolean_t
+bool
 isc__socket_isbound(isc_socket_t *sock);
 /*%
  * Intended for internal use in BIND9 only
  */
 
 void
-isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes);
+isc_socket_ipv6only(isc_socket_t *sock, bool yes);
 /*%<
  * If the socket is an IPv6 socket set/clear the IPV6_IPV6ONLY socket
  * option if the host OS supports this option.
@@ -1160,7 +1161,7 @@ isc_socket_socketevent(isc_mem_t *mctx, void *sender,
  */
 
 void
-isc_socket_cleanunix(isc_sockaddr_t *addr, isc_boolean_t active);
+isc_socket_cleanunix(isc_sockaddr_t *addr, bool active);
 
 /*%<
  * Cleanup UNIX domain sockets in the file-system.  If 'active' is true
index c71c103fd91c7e53c279eff5c1fdfec5685a1060..0f53b5e2062c186b002938876bb5710e1a04f716 100644 (file)
@@ -78,6 +78,8 @@
  *** Imports.
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/types.h>
 
@@ -107,7 +109,7 @@ ISC_LANG_BEGINDECLS
 isc_result_t
 isc_symtab_create(isc_mem_t *mctx, unsigned int size,
                  isc_symtabaction_t undefine_action, void *undefine_arg,
-                 isc_boolean_t case_sensitive, isc_symtab_t **symtabp);
+                 bool case_sensitive, isc_symtab_t **symtabp);
 
 /*% Destroy a symbol table. */
 void
index 12732141f19f06d942e82cdbb879c87fc96bce81..69203956e3903e81bc81741e3e3348aabcd117a6 100644 (file)
@@ -73,6 +73,8 @@
  *** Imports.
  ***/
 
+#include <stdbool.h>
+
 #include <isc/eventclass.h>
 #include <isc/json.h>
 #include <isc/lang.h>
@@ -132,8 +134,8 @@ typedef struct isc_taskmethods {
                                   void *tag);
        isc_result_t (*beginexclusive)(isc_task_t *task);
        void (*endexclusive)(isc_task_t *task);
-    void (*setprivilege)(isc_task_t *task, isc_boolean_t priv);
-    isc_boolean_t (*privilege)(isc_task_t *task);
+    void (*setprivilege)(isc_task_t *task, bool priv);
+    bool (*privilege)(isc_task_t *task);
 } isc_taskmethods_t;
 
 /*%
@@ -342,7 +344,7 @@ isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
  *\li  The number of events purged.
  */
 
-isc_boolean_t
+bool
 isc_task_purgeevent(isc_task_t *task, isc_event_t *event);
 /*%<
  * Purge 'event' from a task's event queue.
@@ -369,8 +371,8 @@ isc_task_purgeevent(isc_task_t *task, isc_event_t *event);
  *
  * Returns:
  *
- *\li  #ISC_TRUE                       The event was purged.
- *\li  #ISC_FALSE                      The event was not in the event queue,
+ *\li  #true                   The event was purged.
+ *\li  #false                  The event was not in the event queue,
  *                                     or was marked unpurgeable.
  */
 
@@ -613,18 +615,18 @@ isc_task_getcurrenttimex(isc_task_t *task, isc_time_t *t);
  *\li  '*t' has the "current time".
  */
 
-isc_boolean_t
+bool
 isc_task_exiting(isc_task_t *t);
 /*%<
- * Returns ISC_TRUE if the task is in the process of shutting down,
- * ISC_FALSE otherwise.
+ * Returns true if the task is in the process of shutting down,
+ * false otherwise.
  *
  * Requires:
  *\li  'task' is a valid task.
  */
 
 void
-isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv);
+isc_task_setprivilege(isc_task_t *task, bool priv);
 /*%<
  * Set or unset the task's "privileged" flag depending on the value of
  * 'priv'.
@@ -640,7 +642,7 @@ isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv);
  *\li  'task' is a valid task.
  */
 
-isc_boolean_t
+bool
 isc_task_privilege(isc_task_t *task);
 /*%<
  * Returns the current value of the task's privilege flag.
index b0b406b0caa97e4df990ee0bb3bce1f47f448c97..32ca594bfe41e05121e3fc1effcde6c855d12f4c 100644 (file)
@@ -34,6 +34,8 @@
  *** Imports.
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/task.h>
 
@@ -133,7 +135,7 @@ isc_taskpool_destroy(isc_taskpool_t **poolp);
  */
 
 void
-isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv);
+isc_taskpool_setprivilege(isc_taskpool_t *pool, bool priv);
 /*%<
  * Set the privilege flag on all tasks in 'pool' to 'priv'.  If 'priv' is
  * true, then when the task manager is set into privileged mode, only
index 6c7990b5cc7c184cfd494b17f3c1c764430fa380..40aa5a678c428deabe7ef49156d3028cd2e52a35 100644 (file)
@@ -65,6 +65,8 @@
  *** Imports
  ***/
 
+#include <stdbool.h>
+
 #include <isc/types.h>
 #include <isc/event.h>
 #include <isc/eventclass.h>
@@ -116,7 +118,7 @@ typedef struct {
        isc_result_t    (*reset)(isc_timer_t *timer, isc_timertype_t type,
                                 const isc_time_t *expires,
                                 const isc_interval_t *interval,
-                                isc_boolean_t purge);
+                                bool purge);
        isc_result_t    (*touch)(isc_timer_t *timer);
 } isc_timermethods_t;
 
@@ -229,7 +231,7 @@ isc_timer_reset(isc_timer_t *timer,
                isc_timertype_t type,
                const isc_time_t *expires,
                const isc_interval_t *interval,
-               isc_boolean_t purge);
+               bool purge);
 /*%<
  * Change the timer's type, expires, and interval values to the given
  * values.  If 'purge' is TRUE, any pending events from this timer
index 5456c3d37481c44779573b3b771100143d40f7a8..42ff7e091534168779901c4b73197e7901260ea2 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef ISC_TYPES_H
 #define ISC_TYPES_H 1
 
+#include <stdbool.h>
+
 #include <isc/bind9.h>
 
 /*! \file isc/types.h
 #include <isc/offset.h>
 
 /*
- * XXXDCL should isc_boolean_t be moved here, requiring an explicit include
- * of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
+ * XXXDCL should bool be moved here, requiring an explicit include
  */
-#include <isc/boolean.h>
 /*
  * XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
  * list macros too.
@@ -108,7 +108,7 @@ typedef isc_result_t (isc_httpdaction_t)(const char *url,
                                         isc_buffer_t *body,
                                         isc_httpdfree_t **freecb,
                                         void **freecb_args);
-typedef isc_boolean_t (isc_httpdclientok_t)(const isc_sockaddr_t *, void *);
+typedef bool (isc_httpdclientok_t)(const isc_sockaddr_t *, void *);
 
 /*% Resource */
 typedef enum {
index b72633985885dec72c9798740104bfcdd306076d..2ff21fba17660d0953b18080864b88e93369d02b 100644 (file)
@@ -14,6 +14,8 @@
 
 /*! \file pk11/pk11.h */
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/magic.h>
 #include <isc/types.h>
@@ -74,7 +76,7 @@ typedef enum {
 /*%
  * Global flag to make choose_slots() verbose
  */
-LIBISC_EXTERNAL_DATA extern isc_boolean_t pk11_verbose_init;
+LIBISC_EXTERNAL_DATA extern bool pk11_verbose_init;
 
 /*%
  * Function prototypes
@@ -103,22 +105,22 @@ isc_result_t pk11_initialize(isc_mem_t *mctx, const char *engine);
 
 isc_result_t pk11_get_session(pk11_context_t *ctx,
                              pk11_optype_t optype,
-                             isc_boolean_t need_services,
-                             isc_boolean_t rw,
-                             isc_boolean_t logon,
+                             bool need_services,
+                             bool rw,
+                             bool logon,
                              const char *pin,
                              CK_SLOT_ID slot);
 /*%<
  * Initialize PKCS#11 device and acquire a session.
  *
  * need_services:
- *       if ISC_TRUE, this session requires full PKCS#11 API
+ *       if true, this session requires full PKCS#11 API
  *       support including random and digest services, and
  *       the lack of these services will cause the session not
- *       to be initialized.  If ISC_FALSE, the function will return
+ *       to be initialized.  If false, the function will return
  *       an error code indicating the missing service, but the
  *       session will be usable for other purposes.
- * rw:    if ISC_TRUE, session will be read/write (useful for
+ * rw:    if true, session will be read/write (useful for
  *        generating or destroying keys); otherwise read-only.
  * login: indicates whether to log in to the device
  * pin:   optional PIN, overriding any PIN currently associated
index e9552f762281e77f5acbb35ec744f78074045b83..a8955bc78d53f5a86bd663d9eeedca16d0359864 100644 (file)
@@ -17,6 +17,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
 
 typedef struct inputsource {
        isc_result_t                    result;
-       isc_boolean_t                   is_file;
-       isc_boolean_t                   need_close;
-       isc_boolean_t                   at_eof;
-       isc_boolean_t                   last_was_eol;
+       bool                    is_file;
+       bool                    need_close;
+       bool                    at_eof;
+       bool                    last_was_eol;
        isc_buffer_t *                  pushback;
        unsigned int                    ignored;
        void *                          input;
@@ -55,8 +56,8 @@ struct isc_lex {
        size_t                          max_token;
        char *                          data;
        unsigned int                    comments;
-       isc_boolean_t                   comment_ok;
-       isc_boolean_t                   last_was_eol;
+       bool                    comment_ok;
+       bool                    last_was_eol;
        unsigned int                    brace_count;
        unsigned int                    paren_count;
        unsigned int                    saved_paren_count;
@@ -105,8 +106,8 @@ isc_lex_create(isc_mem_t *mctx, size_t max_token, isc_lex_t **lexp) {
        lex->mctx = mctx;
        lex->max_token = max_token;
        lex->comments = 0;
-       lex->comment_ok = ISC_TRUE;
-       lex->last_was_eol = ISC_TRUE;
+       lex->comment_ok = true;
+       lex->last_was_eol = true;
        lex->brace_count = 0;
        lex->paren_count = 0;
        lex->saved_paren_count = 0;
@@ -187,7 +188,7 @@ isc_lex_setspecials(isc_lex_t *lex, isc_lexspecials_t specials) {
 }
 
 static inline isc_result_t
-new_source(isc_lex_t *lex, isc_boolean_t is_file, isc_boolean_t need_close,
+new_source(isc_lex_t *lex, bool is_file, bool need_close,
           void *input, const char *name)
 {
        inputsource *source;
@@ -199,7 +200,7 @@ new_source(isc_lex_t *lex, isc_boolean_t is_file, isc_boolean_t need_close,
        source->result = ISC_R_SUCCESS;
        source->is_file = is_file;
        source->need_close = need_close;
-       source->at_eof = ISC_FALSE;
+       source->at_eof = false;
        source->last_was_eol = lex->last_was_eol;
        source->input = input;
        source->name = isc_mem_strdup(lex->mctx, name);
@@ -237,7 +238,7 @@ isc_lex_openfile(isc_lex_t *lex, const char *filename) {
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       result = new_source(lex, ISC_TRUE, ISC_TRUE, stream, filename);
+       result = new_source(lex, true, true, stream, filename);
        if (result != ISC_R_SUCCESS)
                (void)fclose(stream);
        return (result);
@@ -255,7 +256,7 @@ isc_lex_openstream(isc_lex_t *lex, FILE *stream) {
 
        snprintf(name, sizeof(name), "stream-%p", stream);
 
-       return (new_source(lex, ISC_TRUE, ISC_FALSE, stream, name));
+       return (new_source(lex, true, false, stream, name));
 }
 
 isc_result_t
@@ -270,7 +271,7 @@ isc_lex_openbuffer(isc_lex_t *lex, isc_buffer_t *buffer) {
 
        snprintf(name, sizeof(name), "buffer-%p", buffer);
 
-       return (new_source(lex, ISC_FALSE, ISC_FALSE, buffer, name));
+       return (new_source(lex, false, false, buffer, name));
 }
 
 isc_result_t
@@ -319,7 +320,7 @@ static void
 pushback(inputsource *source, int c) {
        REQUIRE(source->pushback->current > 0);
        if (c == EOF) {
-               source->at_eof = ISC_FALSE;
+               source->at_eof = false;
                return;
        }
        source->pushback->current--;
@@ -354,9 +355,9 @@ isc_result_t
 isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
        inputsource *source;
        int c;
-       isc_boolean_t done = ISC_FALSE;
-       isc_boolean_t no_comments = ISC_FALSE;
-       isc_boolean_t escaped = ISC_FALSE;
+       bool done = false;
+       bool no_comments = false;
+       bool escaped = false;
        lexstate state = lexstate_start;
        lexstate saved_state = lexstate_start;
        isc_buffer_t *buffer;
@@ -444,14 +445,14 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                                result = source->result;
                                                goto done;
                                        }
-                                       source->at_eof = ISC_TRUE;
+                                       source->at_eof = true;
                                }
                        } else {
                                buffer = source->input;
 
                                if (buffer->current == buffer->used) {
                                        c = EOF;
-                                       source->at_eof = ISC_TRUE;
+                                       source->at_eof = true;
                                } else {
                                        c = *((unsigned char *)buffer->base +
                                              buffer->current);
@@ -486,7 +487,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                             != 0)) {
                                saved_state = state;
                                state = lexstate_eatline;
-                               no_comments = ISC_TRUE;
+                               no_comments = true;
                                continue;
                        } else if (c == '/' &&
                                   (lex->comments &
@@ -494,14 +495,14 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                     ISC_LEXCOMMENT_CPLUSPLUS)) != 0) {
                                saved_state = state;
                                state = lexstate_maybecomment;
-                               no_comments = ISC_TRUE;
+                               no_comments = true;
                                continue;
                        } else if (c == '#' &&
                                   ((lex->comments & ISC_LEXCOMMENT_SHELL)
                                    != 0)) {
                                saved_state = state;
                                state = lexstate_eatline;
-                               no_comments = ISC_TRUE;
+                               no_comments = true;
                                continue;
                        }
                }
@@ -511,7 +512,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                switch (state) {
                case lexstate_start:
                        if (c == EOF) {
-                               lex->last_was_eol = ISC_FALSE;
+                               lex->last_was_eol = false;
                                if ((options & ISC_LEXOPT_DNSMULTILINE) != 0 &&
                                    lex->paren_count != 0) {
                                        lex->paren_count = 0;
@@ -529,32 +530,32 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                        goto done;
                                }
                                tokenp->type = isc_tokentype_eof;
-                               done = ISC_TRUE;
+                               done = true;
                        } else if (c == ' ' || c == '\t') {
                                if (lex->last_was_eol &&
                                    (options & ISC_LEXOPT_INITIALWS)
                                    != 0) {
-                                       lex->last_was_eol = ISC_FALSE;
+                                       lex->last_was_eol = false;
                                        tokenp->type = isc_tokentype_initialws;
                                        tokenp->value.as_char = c;
-                                       done = ISC_TRUE;
+                                       done = true;
                                }
                        } else if (c == '\n') {
                                if ((options & ISC_LEXOPT_EOL) != 0) {
                                        tokenp->type = isc_tokentype_eol;
-                                       done = ISC_TRUE;
+                                       done = true;
                                }
-                               lex->last_was_eol = ISC_TRUE;
+                               lex->last_was_eol = true;
                        } else if (c == '\r') {
                                if ((options & ISC_LEXOPT_EOL) != 0)
                                        state = lexstate_crlf;
                        } else if (c == '"' &&
                                   (options & ISC_LEXOPT_QSTRING) != 0) {
-                               lex->last_was_eol = ISC_FALSE;
-                               no_comments = ISC_TRUE;
+                               lex->last_was_eol = false;
+                               no_comments = true;
                                state = lexstate_qstring;
                        } else if (lex->specials[c]) {
-                               lex->last_was_eol = ISC_FALSE;
+                               lex->last_was_eol = false;
                                if ((c == '(' || c == ')') &&
                                    (options & ISC_LEXOPT_DNSMULTILINE) != 0)
                                {
@@ -583,15 +584,15 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                        lex->brace_count++;
                                        options &= ~IWSEOL;
                                        state = lexstate_btext;
-                                       no_comments = ISC_TRUE;
+                                       no_comments = true;
                                        continue;
                                }
                                tokenp->type = isc_tokentype_special;
                                tokenp->value.as_char = c;
-                               done = ISC_TRUE;
+                               done = true;
                        } else if (isdigit((unsigned char)c) &&
                                   (options & ISC_LEXOPT_NUMBER) != 0) {
-                               lex->last_was_eol = ISC_FALSE;
+                               lex->last_was_eol = false;
                                if ((options & ISC_LEXOPT_OCTAL) != 0 &&
                                    (c == '8' || c == '9'))
                                        state = lexstate_string;
@@ -599,7 +600,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                        state = lexstate_number;
                                goto no_read;
                        } else {
-                               lex->last_was_eol = ISC_FALSE;
+                               lex->last_was_eol = false;
                                state = lexstate_string;
                                goto no_read;
                        }
@@ -608,8 +609,8 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        if (c != '\n')
                                pushback(source, c);
                        tokenp->type = isc_tokentype_eol;
-                       done = ISC_TRUE;
-                       lex->last_was_eol = ISC_TRUE;
+                       done = true;
+                       lex->last_was_eol = true;
                        break;
                case lexstate_number:
                        if (c == EOF || !isdigit((unsigned char)c)) {
@@ -647,7 +648,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                                         remaining);
                                        } else
                                                goto done;
-                                       done = ISC_TRUE;
+                                       done = true;
                                        continue;
                                } else if (!(options & ISC_LEXOPT_CNUMBER) ||
                                           ((c != 'x' && c != 'X') ||
@@ -689,12 +690,12 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                tokenp->value.as_textregion.length =
                                        (unsigned int)
                                        (lex->max_token - remaining);
-                               done = ISC_TRUE;
+                               done = true;
                                continue;
                        }
                        if ((options & ISC_LEXOPT_ESCAPE) != 0)
                                escaped = (!escaped && c == '\\') ?
-                                               ISC_TRUE : ISC_FALSE;
+                                               true : false;
                        if (remaining == 0U) {
                                result = grow_data(lex, &remaining,
                                                   &curr, &prev);
@@ -718,7 +719,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        }
                        pushback(source, c);
                        c = '/';
-                       no_comments = ISC_FALSE;
+                       no_comments = false;
                        state = saved_state;
                        goto no_read;
                case lexstate_ccomment:
@@ -742,7 +743,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                 * numbers.
                                 */
                                c = ' ';
-                               no_comments = ISC_FALSE;
+                               no_comments = false;
                                state = saved_state;
                                goto no_read;
                        } else if (c != '*')
@@ -750,7 +751,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        break;
                case lexstate_eatline:
                        if ((c == '\n') || (c == EOF)) {
-                               no_comments = ISC_FALSE;
+                               no_comments = false;
                                state = saved_state;
                                goto no_read;
                        }
@@ -762,7 +763,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        }
                        if (c == '"') {
                                if (escaped) {
-                                       escaped = ISC_FALSE;
+                                       escaped = false;
                                        /*
                                         * Overwrite the preceding backslash.
                                         */
@@ -775,8 +776,8 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                        tokenp->value.as_textregion.length =
                                                (unsigned int)
                                                (lex->max_token - remaining);
-                                       no_comments = ISC_FALSE;
-                                       done = ISC_TRUE;
+                                       no_comments = false;
+                                       done = true;
                                }
                        } else {
                                if (c == '\n' && !escaped &&
@@ -786,9 +787,9 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                        goto done;
                                }
                                if (c == '\\' && !escaped)
-                                       escaped = ISC_TRUE;
+                                       escaped = true;
                                else
-                                       escaped = ISC_FALSE;
+                                       escaped = false;
                                if (remaining == 0U) {
                                        result = grow_data(lex, &remaining,
                                                           &curr, &prev);
@@ -809,13 +810,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                        }
                        if (c == '{') {
                                if (escaped) {
-                                       escaped = ISC_FALSE;
+                                       escaped = false;
                                } else {
                                        lex->brace_count++;
                                }
                        } else if (c == '}') {
                                if (escaped) {
-                                       escaped = ISC_FALSE;
+                                       escaped = false;
                                } else {
                                        INSIST(lex->brace_count > 0);
                                        lex->brace_count--;
@@ -828,16 +829,16 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
                                        tokenp->value.as_textregion.length =
                                                (unsigned int) (lex->max_token -
                                                                remaining);
-                                       no_comments = ISC_FALSE;
-                                       done = ISC_TRUE;
+                                       no_comments = false;
+                                       done = true;
                                        break;
                                }
                        }
 
                        if (c == '\\' && !escaped)
-                               escaped = ISC_TRUE;
+                               escaped = true;
                        else
-                               escaped = ISC_FALSE;
+                               escaped = false;
 
                        if (remaining == 0U) {
                                result = grow_data(lex, &remaining,
@@ -873,7 +874,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
 
 isc_result_t
 isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token,
-                      isc_tokentype_t expect, isc_boolean_t eol)
+                      isc_tokentype_t expect, bool eol)
 {
        unsigned int options = ISC_LEXOPT_EOL | ISC_LEXOPT_EOF |
                               ISC_LEXOPT_DNSMULTILINE | ISC_LEXOPT_ESCAPE;
@@ -908,7 +909,7 @@ isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token,
 }
 
 isc_result_t
-isc_lex_getoctaltoken(isc_lex_t *lex, isc_token_t *token, isc_boolean_t eol)
+isc_lex_getoctaltoken(isc_lex_t *lex, isc_token_t *token, bool eol)
 {
        unsigned int options = ISC_LEXOPT_EOL | ISC_LEXOPT_EOF |
                               ISC_LEXOPT_DNSMULTILINE | ISC_LEXOPT_ESCAPE|
@@ -953,7 +954,7 @@ isc_lex_ungettoken(isc_lex_t *lex, isc_token_t *tokenp) {
        isc_buffer_first(source->pushback);
        lex->paren_count = lex->saved_paren_count;
        source->line = source->saved_line;
-       source->at_eof = ISC_FALSE;
+       source->at_eof = false;
 }
 
 void
@@ -1035,7 +1036,7 @@ isc_lex_setsourceline(isc_lex_t *lex, unsigned long line) {
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 isc_lex_isfile(isc_lex_t *lex) {
        inputsource *source;
 
@@ -1044,7 +1045,7 @@ isc_lex_isfile(isc_lex_t *lex) {
        source = HEAD(lex->sources);
 
        if (source == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        return (source->is_file);
 }
index 559ae1359b2c9718a90814d0b1b090207a1e66a0..018cc3e8aa03b17a03ffd8b98ffdc0162d7adab0 100644 (file)
@@ -81,7 +81,7 @@ static isc_once_t             register_once = ISC_ONCE_INIT;
 
 static void
 do_register(void) {
-       isc_bind9 = ISC_FALSE;
+       isc_bind9 = false;
 
        RUNTIME_CHECK(isc__mem_register() == ISC_R_SUCCESS);
        RUNTIME_CHECK(isc__app_register() == ISC_R_SUCCESS);
index 8f808645dc001c89147f6701387826cdbe493da1..33875330a2fe330ba11f3f85d1c3cce0caf73269 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <errno.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <time.h>
@@ -113,7 +114,7 @@ struct isc_logconfig {
        unsigned int                    duplicate_interval;
        int                             highest_level;
        char *                          tag;
-       isc_boolean_t                   dynamic;
+       bool                    dynamic;
 };
 
 /*!
@@ -228,7 +229,7 @@ greatest_version(isc_logfile_t *file, int versions, int *greatest);
 
 static void
 isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
-            isc_logmodule_t *module, int level, isc_boolean_t write_once,
+            isc_logmodule_t *module, int level, bool write_once,
             isc_msgcat_t *msgcat, int msgset, int msg,
             const char *format, va_list args)
      ISC_FORMAT_PRINTF(9, 0);
@@ -336,7 +337,7 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp) {
                lcfg->duplicate_interval = 0;
                lcfg->highest_level = level;
                lcfg->tag = NULL;
-               lcfg->dynamic = ISC_FALSE;
+               lcfg->dynamic = false;
 
                ISC_LIST_INIT(lcfg->channels);
 
@@ -542,7 +543,7 @@ isc_logconfig_destroy(isc_logconfig_t **lcfgp) {
                            lcfg->channellist_count *
                            sizeof(ISC_LIST(isc_logchannellist_t)));
 
-       lcfg->dynamic = ISC_FALSE;
+       lcfg->dynamic = false;
        if (lcfg->tag != NULL)
                isc_mem_free(lcfg->lctx->mctx, lcfg->tag);
        lcfg->tag = NULL;
@@ -743,7 +744,7 @@ isc_log_createchannel(isc_logconfig_t *lcfg, const char *name,
                FILE_STREAM(channel) = NULL;
                FILE_VERSIONS(channel) = destination->file.versions;
                FILE_MAXSIZE(channel) = destination->file.maximum_size;
-               FILE_MAXREACHED(channel) = ISC_FALSE;
+               FILE_MAXREACHED(channel) = false;
                break;
 
        case ISC_LOG_TOFILEDESC:
@@ -829,7 +830,7 @@ isc_log_write(isc_log_t *lctx, isc_logcategory_t *category,
         */
 
        va_start(args, format);
-       isc_log_doit(lctx, category, module, level, ISC_FALSE,
+       isc_log_doit(lctx, category, module, level, false,
                     NULL, 0, 0, format, args);
        va_end(args);
 }
@@ -842,7 +843,7 @@ isc_log_vwrite(isc_log_t *lctx, isc_logcategory_t *category,
        /*
         * Contract checking is done in isc_log_doit().
         */
-       isc_log_doit(lctx, category, module, level, ISC_FALSE,
+       isc_log_doit(lctx, category, module, level, false,
                     NULL, 0, 0, format, args);
 }
 
@@ -857,7 +858,7 @@ isc_log_write1(isc_log_t *lctx, isc_logcategory_t *category,
         */
 
        va_start(args, format);
-       isc_log_doit(lctx, category, module, level, ISC_TRUE,
+       isc_log_doit(lctx, category, module, level, true,
                     NULL, 0, 0, format, args);
        va_end(args);
 }
@@ -870,7 +871,7 @@ isc_log_vwrite1(isc_log_t *lctx, isc_logcategory_t *category,
        /*
         * Contract checking is done in isc_log_doit().
         */
-       isc_log_doit(lctx, category, module, level, ISC_TRUE,
+       isc_log_doit(lctx, category, module, level, true,
                     NULL, 0, 0, format, args);
 }
 
@@ -887,7 +888,7 @@ isc_log_iwrite(isc_log_t *lctx, isc_logcategory_t *category,
         */
 
        va_start(args, format);
-       isc_log_doit(lctx, category, module, level, ISC_FALSE,
+       isc_log_doit(lctx, category, module, level, false,
                     msgcat, msgset, msg, format, args);
        va_end(args);
 }
@@ -901,7 +902,7 @@ isc_log_ivwrite(isc_log_t *lctx, isc_logcategory_t *category,
        /*
         * Contract checking is done in isc_log_doit().
         */
-       isc_log_doit(lctx, category, module, level, ISC_FALSE,
+       isc_log_doit(lctx, category, module, level, false,
                     msgcat, msgset, msg, format, args);
 }
 
@@ -918,7 +919,7 @@ isc_log_iwrite1(isc_log_t *lctx, isc_logcategory_t *category,
         */
 
        va_start(args, format);
-       isc_log_doit(lctx, category, module, level, ISC_TRUE,
+       isc_log_doit(lctx, category, module, level, true,
                     msgcat, msgset, msg, format, args);
        va_end(args);
 }
@@ -932,7 +933,7 @@ isc_log_ivwrite1(isc_log_t *lctx, isc_logcategory_t *category,
        /*
         * Contract checking is done in isc_log_doit().
         */
-       isc_log_doit(lctx, category, module, level, ISC_TRUE,
+       isc_log_doit(lctx, category, module, level, true,
                     msgcat, msgset, msg, format, args);
 }
 
@@ -1084,7 +1085,7 @@ assignchannel(isc_logconfig_t *lcfg, unsigned int category_id,
                if (lcfg->highest_level < channel->level)
                        lcfg->highest_level = channel->level;
                if (channel->level == ISC_LOG_DYNAMIC)
-                       lcfg->dynamic = ISC_TRUE;
+                       lcfg->dynamic = true;
        }
 
        return (ISC_R_SUCCESS);
@@ -1306,8 +1307,8 @@ isc_logfile_roll(isc_logfile_t *file) {
 static isc_result_t
 isc_log_open(isc_logchannel_t *channel) {
        struct stat statbuf;
-       isc_boolean_t regular_file;
-       isc_boolean_t roll = ISC_FALSE;
+       bool regular_file;
+       bool roll = false;
        isc_result_t result = ISC_R_SUCCESS;
        const char *path;
 
@@ -1324,7 +1325,7 @@ isc_log_open(isc_logchannel_t *channel) {
         * and either has no size limit or has reached its size limit.
         */
        if (stat(path, &statbuf) == 0) {
-               regular_file = S_ISREG(statbuf.st_mode) ? ISC_TRUE : ISC_FALSE;
+               regular_file = S_ISREG(statbuf.st_mode) ? true : false;
                /* XXXDCL if not regular_file complain? */
                if ((FILE_MAXSIZE(channel) == 0 &&
                     FILE_VERSIONS(channel) != ISC_LOG_ROLLNEVER) ||
@@ -1332,7 +1333,7 @@ isc_log_open(isc_logchannel_t *channel) {
                     statbuf.st_size >= FILE_MAXSIZE(channel)))
                        roll = regular_file;
        } else if (errno == ENOENT) {
-               regular_file = ISC_TRUE;
+               regular_file = true;
                POST(regular_file);
        } else
                result = ISC_R_INVALIDFILE;
@@ -1362,7 +1363,7 @@ isc_log_open(isc_logchannel_t *channel) {
        return (result);
 }
 
-isc_boolean_t
+bool
 isc_log_wouldlog(isc_log_t *lctx, int level) {
        /*
         * Try to avoid locking the mutex for messages which can't
@@ -1382,16 +1383,16 @@ isc_log_wouldlog(isc_log_t *lctx, int level) {
         */
 
        if (lctx == NULL || lctx->logconfig == NULL)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TF(level <= lctx->logconfig->highest_level ||
-                      (lctx->logconfig->dynamic &&
-                       level <= lctx->debug_level)));
+       return (level <= lctx->logconfig->highest_level ||
+               (lctx->logconfig->dynamic &&
+                level <= lctx->debug_level));
 }
 
 static void
 isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
-            isc_logmodule_t *module, int level, isc_boolean_t write_once,
+            isc_logmodule_t *module, int level, bool write_once,
             isc_msgcat_t *msgcat, int msgset, int msg,
             const char *format, va_list args)
 {
@@ -1400,9 +1401,9 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
        char level_string[24];
        const char *iformat;
        struct stat statbuf;
-       isc_boolean_t matched = ISC_FALSE;
-       isc_boolean_t printtime, printtag, printcolon;
-       isc_boolean_t printcategory, printmodule, printlevel, buffered;
+       bool matched = false;
+       bool printtime, printtag, printcolon;
+       bool printcategory, printmodule, printlevel, buffered;
        isc_logconfig_t *lcfg;
        isc_logchannel_t *channel;
        isc_logchannellist_t *category_channels;
@@ -1480,7 +1481,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
                        continue;
                }
 
-               matched = ISC_TRUE;
+               matched = true;
 
                channel = category_channels->channel;
                category_channels = ISC_LIST_NEXT(category_channels, link);
@@ -1632,21 +1633,16 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
                        }
                }
 
-               printtime     = ISC_TF((channel->flags & ISC_LOG_PRINTTIME)
-                                      != 0);
-               printtag      = ISC_TF((channel->flags &
-                                       (ISC_LOG_PRINTTAG|ISC_LOG_PRINTPREFIX))
-                                      != 0 && lcfg->tag != NULL);
-               printcolon    = ISC_TF((channel->flags & ISC_LOG_PRINTTAG)
-                                      != 0 && lcfg->tag != NULL);
-               printcategory = ISC_TF((channel->flags & ISC_LOG_PRINTCATEGORY)
-                                      != 0);
-               printmodule   = ISC_TF((channel->flags & ISC_LOG_PRINTMODULE)
-                                      != 0);
-               printlevel    = ISC_TF((channel->flags & ISC_LOG_PRINTLEVEL)
-                                      != 0);
-               buffered      = ISC_TF((channel->flags & ISC_LOG_BUFFERED)
-                                      != 0);
+               printtime     = (channel->flags & ISC_LOG_PRINTTIME);
+               printtag      = ((channel->flags &
+                                 (ISC_LOG_PRINTTAG|ISC_LOG_PRINTPREFIX))
+                                && lcfg->tag != NULL);
+               printcolon    = ((channel->flags & ISC_LOG_PRINTTAG)
+                                && lcfg->tag != NULL);
+               printcategory = (channel->flags & ISC_LOG_PRINTCATEGORY);
+               printmodule   = (channel->flags & ISC_LOG_PRINTMODULE);
+               printlevel    = (channel->flags & ISC_LOG_PRINTLEVEL);
+               buffered      = (channel->flags & ISC_LOG_BUFFERED);
 
                switch (channel->type) {
                case ISC_LOG_TOFILE:
@@ -1667,7 +1663,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
                                    statbuf.st_size < FILE_MAXSIZE(channel)) {
                                        (void)fclose(FILE_STREAM(channel));
                                        FILE_STREAM(channel) = NULL;
-                                       FILE_MAXREACHED(channel) = ISC_FALSE;
+                                       FILE_MAXREACHED(channel) = false;
                                } else
                                        /*
                                         * Eh, skip it.
@@ -1724,7 +1720,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
                                if (fstat(fileno(FILE_STREAM(channel)),
                                          &statbuf) >= 0 &&
                                    statbuf.st_size > FILE_MAXSIZE(channel))
-                                       FILE_MAXREACHED(channel) = ISC_TRUE;
+                                       FILE_MAXREACHED(channel) = true;
                        }
 
                        break;
index 37462b7bbabb79f779cf928a236a268039e1259f..25c71a207a38c60175efc0067d33b501c05eb738 100644 (file)
@@ -33,6 +33,8 @@
 
 #ifndef PK11_MD5_DISABLE
 
+#include <stdbool.h>
+
 #include <isc/assertions.h>
 #include <isc/md5.h>
 #include <isc/platform.h>
@@ -91,8 +93,8 @@ isc_md5_init(isc_md5_t *ctx) {
        CK_RV rv;
        CK_MECHANISM mech = { CKM_MD5, NULL, 0 };
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        PK11_FATALCHECK(pkcs_C_DigestInit, (ctx->session, &mech));
 }
 
@@ -347,8 +349,8 @@ isc_md5_final(isc_md5_t *ctx, unsigned char *digest) {
  * Standard use is testing false and result true.
  * Testing use is testing true and result false;
  */
-isc_boolean_t
-isc_md5_check(isc_boolean_t testing) {
+bool
+isc_md5_check(bool testing) {
        isc_md5_t ctx;
        unsigned char input = 'a';
        unsigned char digest[ISC_MD5_DIGESTLENGTH];
@@ -376,7 +378,7 @@ isc_md5_check(isc_boolean_t testing) {
        /*
         * Must return true in standard case, should return false for testing.
         */
-       return (ISC_TF(memcmp(digest, expected, ISC_MD5_DIGESTLENGTH) == 0));
+       return (memcmp(digest, expected, ISC_MD5_DIGESTLENGTH) == 0);
 }
 
 #else /* !PK11_MD5_DISABLE */
index d8444007af43412ea56289b736fe211448986f21..abb476cb94fd3a1568a72f87292ca0a3e1847fd6 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
@@ -129,7 +130,7 @@ struct isc__mem {
        isc_memfree_t           memfree;
        void *                  arg;
        size_t                  max_size;
-       isc_boolean_t           checkfree;
+       bool            checkfree;
        struct stats *          stats;
        unsigned int            references;
        char                    name[16];
@@ -140,8 +141,8 @@ struct isc__mem {
        size_t                  maxinuse;
        size_t                  hi_water;
        size_t                  lo_water;
-       isc_boolean_t           hi_called;
-       isc_boolean_t           is_overmem;
+       bool            hi_called;
+       bool            is_overmem;
        isc_mem_water_t         water;
        void *                  water_arg;
        ISC_LIST(isc__mempool_t) pools;
@@ -254,7 +255,7 @@ isc___mem_free(isc_mem_t *ctx, void *ptr FLARG);
 char *
 isc___mem_strdup(isc_mem_t *mctx, const char *s FLARG);
 void
-isc__mem_setdestroycheck(isc_mem_t *ctx, isc_boolean_t flag);
+isc__mem_setdestroycheck(isc_mem_t *ctx, bool flag);
 void
 isc__mem_setquota(isc_mem_t *ctx, size_t quota);
 size_t
@@ -265,7 +266,7 @@ size_t
 isc__mem_maxinuse(isc_mem_t *ctx);
 size_t
 isc__mem_total(isc_mem_t *ctx);
-isc_boolean_t
+bool
 isc__mem_isovermem(isc_mem_t *ctx);
 void
 isc__mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
@@ -512,7 +513,7 @@ quantize(size_t size) {
        return ((size + ALIGNMENT_SIZE - 1) & (~(ALIGNMENT_SIZE - 1)));
 }
 
-static inline isc_boolean_t
+static inline bool
 more_basic_blocks(isc__mem_t *ctx) {
        void *tmp;
        unsigned char *curr, *next;
@@ -529,7 +530,7 @@ more_basic_blocks(isc__mem_t *ctx) {
         */
        increment = NUM_BASIC_BLOCKS * ctx->mem_target;
        if (ctx->quota != 0U && ctx->total + increment > ctx->quota)
-               return (ISC_FALSE);
+               return (false);
 
        INSIST(ctx->basic_table_count <= ctx->basic_table_size);
        if (ctx->basic_table_count == ctx->basic_table_size) {
@@ -538,7 +539,7 @@ more_basic_blocks(isc__mem_t *ctx) {
                                        table_size * sizeof(unsigned char *));
                if (table == NULL) {
                        ctx->memalloc_failures++;
-                       return (ISC_FALSE);
+                       return (false);
                }
                if (ctx->basic_table_size != 0) {
                        memmove(table, ctx->basic_table,
@@ -553,7 +554,7 @@ more_basic_blocks(isc__mem_t *ctx) {
        tmp = (ctx->memalloc)(ctx->arg, NUM_BASIC_BLOCKS * ctx->mem_target);
        if (tmp == NULL) {
                ctx->memalloc_failures++;
-               return (ISC_FALSE);
+               return (false);
        }
        ctx->total += increment;
        ctx->basic_table[ctx->basic_table_count] = tmp;
@@ -579,10 +580,10 @@ more_basic_blocks(isc__mem_t *ctx) {
                ctx->highest = last;
        ctx->basic_blocks = tmp;
 
-       return (ISC_TRUE);
+       return (true);
 }
 
-static inline isc_boolean_t
+static inline bool
 more_frags(isc__mem_t *ctx, size_t new_size) {
        int i, frags;
        size_t total_size;
@@ -602,7 +603,7 @@ more_frags(isc__mem_t *ctx, size_t new_size) {
                        /*
                         * XXXRTH  "At quota" notification here.
                         */
-                       return (ISC_FALSE);
+                       return (false);
                }
        }
 
@@ -641,7 +642,7 @@ more_frags(isc__mem_t *ctx, size_t new_size) {
        ((element *)curr)->next = NULL;
        ctx->freelists[new_size] = tmp;
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static inline void *
@@ -934,8 +935,8 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
        ctx->maxinuse = 0;
        ctx->hi_water = 0;
        ctx->lo_water = 0;
-       ctx->hi_called = ISC_FALSE;
-       ctx->is_overmem = ISC_FALSE;
+       ctx->hi_called = false;
+       ctx->is_overmem = false;
        ctx->water = NULL;
        ctx->water_arg = NULL;
        ctx->common.impmagic = MEM_MAGIC;
@@ -946,7 +947,7 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
        ctx->memfree = memfree;
        ctx->arg = arg;
        ctx->stats = NULL;
-       ctx->checkfree = ISC_TRUE;
+       ctx->checkfree = true;
 #if ISC_MEM_TRACKLINES
        ctx->debuglist = NULL;
        ctx->debuglistcnt = 0;
@@ -1118,7 +1119,7 @@ isc__mem_attach(isc_mem_t *source0, isc_mem_t **targetp) {
 void
 isc__mem_detach(isc_mem_t **ctxp) {
        isc__mem_t *ctx;
-       isc_boolean_t want_destroy = ISC_FALSE;
+       bool want_destroy = false;
 
        REQUIRE(ctxp != NULL);
        ctx = (isc__mem_t *)*ctxp;
@@ -1128,7 +1129,7 @@ isc__mem_detach(isc_mem_t **ctxp) {
        INSIST(ctx->references > 0);
        ctx->references--;
        if (ctx->references == 0)
-               want_destroy = ISC_TRUE;
+               want_destroy = true;
        MCTXUNLOCK(ctx, &ctx->lock);
 
        if (want_destroy)
@@ -1150,7 +1151,7 @@ isc__mem_detach(isc_mem_t **ctxp) {
 void
 isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
        isc__mem_t *ctx;
-       isc_boolean_t want_destroy = ISC_FALSE;
+       bool want_destroy = false;
        size_info *si;
        size_t oldsize;
 
@@ -1178,7 +1179,7 @@ isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
                MCTXLOCK(ctx, &ctx->lock);
                ctx->references--;
                if (ctx->references == 0)
-                       want_destroy = ISC_TRUE;
+                       want_destroy = true;
                MCTXUNLOCK(ctx, &ctx->lock);
                if (want_destroy)
                        destroy(ctx);
@@ -1200,7 +1201,7 @@ isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
        INSIST(ctx->references > 0);
        ctx->references--;
        if (ctx->references == 0)
-               want_destroy = ISC_TRUE;
+               want_destroy = true;
 
        MCTXUNLOCK(ctx, &ctx->lock);
 
@@ -1251,7 +1252,7 @@ void *
 isc___mem_get(isc_mem_t *ctx0, size_t size FLARG) {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
        void *ptr;
-       isc_boolean_t call_water = ISC_FALSE;
+       bool call_water = false;
 
        REQUIRE(VALID_CONTEXT(ctx));
 
@@ -1270,9 +1271,9 @@ isc___mem_get(isc_mem_t *ctx0, size_t size FLARG) {
 
        ADD_TRACE(ctx, ptr, size, file, line);
        if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water) {
-               ctx->is_overmem = ISC_TRUE;
+               ctx->is_overmem = true;
                if (!ctx->hi_called)
-                       call_water = ISC_TRUE;
+                       call_water = true;
        }
        if (ctx->inuse > ctx->maxinuse) {
                ctx->maxinuse = ctx->inuse;
@@ -1292,7 +1293,7 @@ isc___mem_get(isc_mem_t *ctx0, size_t size FLARG) {
 void
 isc___mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
-       isc_boolean_t call_water = ISC_FALSE;
+       bool call_water = false;
        size_info *si;
        size_t oldsize;
 
@@ -1328,9 +1329,9 @@ isc___mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
         * isc_mem_setwater() called with 0 for hi_water and lo_water.
         */
        if ((ctx->inuse < ctx->lo_water) || (ctx->lo_water == 0U)) {
-               ctx->is_overmem = ISC_FALSE;
+               ctx->is_overmem = false;
                if (ctx->hi_called)
-                       call_water = ISC_TRUE;
+                       call_water = true;
        }
 
        MCTXUNLOCK(ctx, &ctx->lock);
@@ -1347,9 +1348,9 @@ isc__mem_waterack(isc_mem_t *ctx0, int flag) {
 
        MCTXLOCK(ctx, &ctx->lock);
        if (flag == ISC_MEM_LOWATER)
-               ctx->hi_called = ISC_FALSE;
+               ctx->hi_called = false;
        else if (flag == ISC_MEM_HIWATER)
-               ctx->hi_called = ISC_TRUE;
+               ctx->hi_called = true;
        MCTXUNLOCK(ctx, &ctx->lock);
 }
 
@@ -1360,13 +1361,13 @@ print_active(isc__mem_t *mctx, FILE *out) {
                debuglink_t *dl;
                unsigned int i, j;
                const char *format;
-               isc_boolean_t found;
+               bool found;
 
                fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
                                            ISC_MSG_DUMPALLOC,
                                            "Dump of all outstanding "
                                            "memory allocations:\n"));
-               found = ISC_FALSE;
+               found = false;
                format = isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
                                        ISC_MSG_PTRFILELINE,
                                        "\tptr %p size %u file %s line %u\n");
@@ -1374,7 +1375,7 @@ print_active(isc__mem_t *mctx, FILE *out) {
                        dl = ISC_LIST_HEAD(mctx->debuglist[i]);
 
                        if (dl != NULL)
-                               found = ISC_TRUE;
+                               found = true;
 
                        while (dl != NULL) {
                                for (j = 0; j < DEBUGLIST_COUNT; j++)
@@ -1507,7 +1508,7 @@ void *
 isc___mem_allocate(isc_mem_t *ctx0, size_t size FLARG) {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
        size_info *si;
-       isc_boolean_t call_water = ISC_FALSE;
+       bool call_water = false;
 
        REQUIRE(VALID_CONTEXT(ctx));
 
@@ -1519,13 +1520,13 @@ isc___mem_allocate(isc_mem_t *ctx0, size_t size FLARG) {
        ADD_TRACE(ctx, si, si[-1].u.size, file, line);
        if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
            !ctx->is_overmem) {
-               ctx->is_overmem = ISC_TRUE;
+               ctx->is_overmem = true;
        }
 
        if (ctx->hi_water != 0U && !ctx->hi_called &&
            ctx->inuse > ctx->hi_water) {
-               ctx->hi_called = ISC_TRUE;
-               call_water = ISC_TRUE;
+               ctx->hi_called = true;
+               call_water = true;
        }
        if (ctx->inuse > ctx->maxinuse) {
                ctx->maxinuse = ctx->inuse;
@@ -1586,7 +1587,7 @@ isc___mem_free(isc_mem_t *ctx0, void *ptr FLARG) {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
        size_info *si;
        size_t size;
-       isc_boolean_t call_water= ISC_FALSE;
+       bool call_water= false;
 
        REQUIRE(VALID_CONTEXT(ctx));
        REQUIRE(ptr != NULL);
@@ -1618,15 +1619,15 @@ isc___mem_free(isc_mem_t *ctx0, void *ptr FLARG) {
         */
        if (ctx->is_overmem &&
            (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
-               ctx->is_overmem = ISC_FALSE;
+               ctx->is_overmem = false;
        }
 
        if (ctx->hi_called &&
            (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
-               ctx->hi_called = ISC_FALSE;
+               ctx->hi_called = false;
 
                if (ctx->water != NULL)
-                       call_water = ISC_TRUE;
+                       call_water = true;
        }
        MCTXUNLOCK(ctx, &ctx->lock);
 
@@ -1659,7 +1660,7 @@ isc___mem_strdup(isc_mem_t *mctx0, const char *s FLARG) {
 }
 
 void
-isc__mem_setdestroycheck(isc_mem_t *ctx0, isc_boolean_t flag) {
+isc__mem_setdestroycheck(isc_mem_t *ctx0, bool flag) {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
 
        REQUIRE(VALID_CONTEXT(ctx));
@@ -1751,7 +1752,7 @@ isc__mem_setwater(isc_mem_t *ctx0, isc_mem_water_t water, void *water_arg,
                  size_t hiwater, size_t lowater)
 {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
-       isc_boolean_t callwater = ISC_FALSE;
+       bool callwater = false;
        isc_mem_water_t oldwater;
        void *oldwater_arg;
 
@@ -1771,7 +1772,7 @@ isc__mem_setwater(isc_mem_t *ctx0, isc_mem_water_t water, void *water_arg,
                if (ctx->hi_called &&
                    (ctx->water != water || ctx->water_arg != water_arg ||
                     ctx->inuse < lowater || lowater == 0U))
-                       callwater = ISC_TRUE;
+                       callwater = true;
                ctx->water = water;
                ctx->water_arg = water_arg;
                ctx->hi_water = hiwater;
@@ -1783,7 +1784,7 @@ isc__mem_setwater(isc_mem_t *ctx0, isc_mem_water_t water, void *water_arg,
                (oldwater)(oldwater_arg, ISC_MEM_LOWATER);
 }
 
-isc_boolean_t
+bool
 isc__mem_isovermem(isc_mem_t *ctx0) {
        isc__mem_t *ctx = (isc__mem_t *)ctx0;
 
@@ -2763,7 +2764,7 @@ isc_mem_destroy(isc_mem_t **mctxp) {
 }
 
 void
-isc_mem_setdestroycheck(isc_mem_t *mctx, isc_boolean_t flag) {
+isc_mem_setdestroycheck(isc_mem_t *mctx, bool flag) {
        REQUIRE(ISCAPI_MCTX_VALID(mctx));
 
        mctx->methods->setdestroycheck(mctx, flag);
@@ -2821,7 +2822,7 @@ isc_mem_total(isc_mem_t *mctx) {
        return (mctx->methods->total(mctx));
 }
 
-isc_boolean_t
+bool
 isc_mem_isovermem(isc_mem_t *mctx) {
        REQUIRE(ISCAPI_MCTX_VALID(mctx));
 
index 845aa5c01320e404eccd117d6d2683fb3eab2107..81851a015bb711dc120c8760eaa2a58fc6c594fb 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <inttypes.h>
 
 #include <isc/string.h>
 #include <isc/util.h>
 
-isc_boolean_t
+bool
 isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) {
        REQUIRE(a != NULL && b != NULL);
 
        if (a->family != b->family)
-               return (ISC_FALSE);
+               return (false);
 
        if (a->zone != b->zone)
-               return (ISC_FALSE);
+               return (false);
 
        switch (a->family) {
        case AF_INET:
                if (a->type.in.s_addr != b->type.in.s_addr)
-                       return (ISC_FALSE);
+                       return (false);
                break;
        case AF_INET6:
                if (memcmp(&a->type.in6, &b->type.in6,
                           sizeof(a->type.in6)) != 0 ||
                    a->zone != b->zone)
-                       return (ISC_FALSE);
+                       return (false);
                break;
 #ifdef ISC_PLATFORM_HAVESYSUNH
        case AF_UNIX:
                if (strcmp(a->type.un, b->type.un) != 0)
-                       return (ISC_FALSE);
+                       return (false);
                break;
 #endif
        default:
-               return (ISC_FALSE);
+               return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
                     unsigned int prefixlen)
 {
@@ -71,10 +72,10 @@ isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
        REQUIRE(a != NULL && b != NULL);
 
        if (a->family != b->family)
-               return (ISC_FALSE);
+               return (false);
 
        if (a->zone != b->zone && b->zone != 0)
-               return (ISC_FALSE);
+               return (false);
 
        switch (a->family) {
        case AF_INET:
@@ -88,7 +89,7 @@ isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
                ipabytes = 16;
                break;
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -102,7 +103,7 @@ isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
 
        if (nbytes > 0) {
                if (memcmp(pa, pb, nbytes) != 0)
-                       return (ISC_FALSE);
+                       return (false);
        }
        if (nbits > 0) {
                unsigned int bytea, byteb, mask;
@@ -112,9 +113,9 @@ isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
                byteb = pb[nbytes];
                mask = (0xFF << (8-nbits)) & 0xFF;
                if ((bytea & mask) != (byteb & mask))
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
 isc_result_t
@@ -366,49 +367,49 @@ isc_netaddr_any6(isc_netaddr_t *netaddr) {
        netaddr->type.in6 = in6addr_any;
 }
 
-isc_boolean_t
+bool
 isc_netaddr_ismulticast(isc_netaddr_t *na) {
        switch (na->family) {
        case AF_INET:
-               return (ISC_TF(ISC_IPADDR_ISMULTICAST(na->type.in.s_addr)));
+               return (ISC_IPADDR_ISMULTICAST(na->type.in.s_addr));
        case AF_INET6:
-               return (ISC_TF(IN6_IS_ADDR_MULTICAST(&na->type.in6)));
+               return (IN6_IS_ADDR_MULTICAST(&na->type.in6));
        default:
-               return (ISC_FALSE);  /* XXXMLG ? */
+               return (false);  /* XXXMLG ? */
        }
 }
 
-isc_boolean_t
+bool
 isc_netaddr_isexperimental(isc_netaddr_t *na) {
        switch (na->family) {
        case AF_INET:
-               return (ISC_TF(ISC_IPADDR_ISEXPERIMENTAL(na->type.in.s_addr)));
+               return (ISC_IPADDR_ISEXPERIMENTAL(na->type.in.s_addr));
        default:
-               return (ISC_FALSE);  /* XXXMLG ? */
+               return (false);  /* XXXMLG ? */
        }
 }
 
-isc_boolean_t
+bool
 isc_netaddr_islinklocal(isc_netaddr_t *na) {
        switch (na->family) {
        case AF_INET:
-               return (ISC_FALSE);
+               return (false);
        case AF_INET6:
-               return (ISC_TF(IN6_IS_ADDR_LINKLOCAL(&na->type.in6)));
+               return (IN6_IS_ADDR_LINKLOCAL(&na->type.in6));
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
-isc_boolean_t
+bool
 isc_netaddr_issitelocal(isc_netaddr_t *na) {
        switch (na->family) {
        case AF_INET:
-               return (ISC_FALSE);
+               return (false);
        case AF_INET6:
-               return (ISC_TF(IN6_IS_ADDR_SITELOCAL(&na->type.in6)));
+               return (IN6_IS_ADDR_SITELOCAL(&na->type.in6));
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -416,15 +417,15 @@ isc_netaddr_issitelocal(isc_netaddr_t *na) {
               (((uint32_t)(i) & ISC__IPADDR(0xff000000)) \
                == ISC__IPADDR(0x00000000))
 
-isc_boolean_t
+bool
 isc_netaddr_isnetzero(isc_netaddr_t *na) {
        switch (na->family) {
        case AF_INET:
-               return (ISC_TF(ISC_IPADDR_ISNETZERO(na->type.in.s_addr)));
+               return (ISC_IPADDR_ISNETZERO(na->type.in.s_addr));
        case AF_INET6:
-               return (ISC_FALSE);
+               return (false);
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
 
@@ -443,15 +444,15 @@ isc_netaddr_fromv4mapped(isc_netaddr_t *t, const isc_netaddr_t *s) {
        return;
 }
 
-isc_boolean_t
+bool
 isc_netaddr_isloopback(const isc_netaddr_t *na) {
        switch (na->family) {
        case AF_INET:
-               return (ISC_TF((ntohl(na->type.in.s_addr) & 0xff000000U) ==
-                              0x7f000000U));
+               return ((ntohl(na->type.in.s_addr) & 0xff000000U) ==
+                       0x7f000000U);
        case AF_INET6:
                return (IN6_IS_ADDR_LOOPBACK(&na->type.in6));
        default:
-               return (ISC_FALSE);
+               return (false);
        }
 }
index c82530e750f23d870d37fd42b4eb24e0d6c1fd0a..c29181416d6440a0605e4984a83178713cf22cc1 100644 (file)
 #ifndef ISC_ONCE_H
 #define ISC_ONCE_H 1
 
+#include <stdbool.h>
+
 #include <isc/result.h>
 
-typedef isc_boolean_t isc_once_t;
+typedef bool isc_once_t;
 
-#define ISC_ONCE_INIT ISC_FALSE
+#define ISC_ONCE_INIT false
 
 #define isc_once_do(op, f) \
-       (!*(op) ? (f(), *(op) = ISC_TRUE, ISC_R_SUCCESS) : ISC_R_SUCCESS)
+       (!*(op) ? (f(), *(op) = true, ISC_R_SUCCESS) : ISC_R_SUCCESS)
 
 #endif /* ISC_ONCE_H */
index 7ac53bd89a18445ca6df695f38dab0591f90d6d8..371e168e48016eea5066fc31c05e714d6a17d061 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <stdio.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
 #define PK11_NO_LOGERR 1
 #endif
 
-LIBISC_EXTERNAL_DATA isc_boolean_t pk11_verbose_init = ISC_FALSE;
+LIBISC_EXTERNAL_DATA bool pk11_verbose_init = false;
 
 static isc_once_t once = ISC_ONCE_INIT;
 static isc_mem_t *pk11_mctx = NULL;
 static int32_t allocsize = 0;
-static isc_boolean_t initialized = ISC_FALSE;
+static bool initialized = false;
 
 typedef struct pk11_session pk11_session_t;
 typedef struct pk11_token pk11_token_t;
@@ -70,7 +71,7 @@ struct pk11_token {
        ISC_LINK(pk11_token_t)  link;
        CK_SLOT_ID              slotid;
        pk11_sessionlist_t      sessions;
-       isc_boolean_t           logged;
+       bool            logged;
        char                    name[32];
        char                    manuf[32];
        char                    model[16];
@@ -92,11 +93,11 @@ static isc_result_t free_all_sessions(void);
 static isc_result_t free_session_list(pk11_sessionlist_t *slist);
 static isc_result_t setup_session(pk11_session_t *sp,
                                  pk11_token_t *token,
-                                 isc_boolean_t rw);
+                                 bool rw);
 static void scan_slots(void);
 static isc_result_t token_login(pk11_session_t *sp);
 static char *percent_decode(char *x, size_t *len);
-static isc_boolean_t pk11strcmp(const char *x, size_t lenx,
+static bool pk11strcmp(const char *x, size_t lenx,
                                const char *y, size_t leny);
 static CK_ATTRIBUTE *push_attribute(pk11_object_t *obj,
                                    isc_mem_t *mctx,
@@ -197,7 +198,7 @@ pk11_initialize(isc_mem_t *mctx, const char *engine) {
                return (ISC_R_SUCCESS);
        } else {
                LOCK(&sessionlock);
-               initialized = ISC_TRUE;
+               initialized = true;
                UNLOCK(&alloclock);
        }
 
@@ -276,7 +277,7 @@ pk11_finalize(void) {
        }
        if (pk11_mctx != NULL)
                isc_mem_detach(&pk11_mctx);
-       initialized = ISC_FALSE;
+       initialized = false;
        return (ret);
 }
 
@@ -286,8 +287,8 @@ pk11_rand_bytes(unsigned char *buf, int num) {
        CK_RV rv;
        pk11_context_t ctx;
 
-       ret = pk11_get_session(&ctx, OP_RAND, ISC_FALSE, ISC_FALSE,
-                              ISC_FALSE, NULL, 0);
+       ret = pk11_get_session(&ctx, OP_RAND, false, false,
+                              false, NULL, 0);
        if ((ret != ISC_R_SUCCESS) &&
            (ret != PK11_R_NODIGESTSERVICE) &&
            (ret != PK11_R_NOAESSERVICE))
@@ -313,8 +314,8 @@ pk11_rand_seed_fromfile(const char *randomfile) {
        size_t cc = 0;
        isc_result_t ret;
 
-       ret = pk11_get_session(&ctx, OP_RAND, ISC_FALSE, ISC_FALSE,
-                              ISC_FALSE, NULL, 0);
+       ret = pk11_get_session(&ctx, OP_RAND, false, false,
+                              false, NULL, 0);
        if ((ret != ISC_R_SUCCESS) &&
            (ret != PK11_R_NODIGESTSERVICE) &&
            (ret != PK11_R_NOAESSERVICE))
@@ -340,8 +341,8 @@ pk11_rand_seed_fromfile(const char *randomfile) {
 
 isc_result_t
 pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype,
-                isc_boolean_t need_services, isc_boolean_t rw,
-                isc_boolean_t logon, const char *pin, CK_SLOT_ID slot)
+                bool need_services, bool rw,
+                bool logon, const char *pin, CK_SLOT_ID slot)
 {
        pk11_token_t *token = NULL;
        pk11_sessionlist_t *freelist;
@@ -531,7 +532,7 @@ free_session_list(pk11_sessionlist_t *slist) {
 
 static isc_result_t
 setup_session(pk11_session_t *sp, pk11_token_t *token,
-             isc_boolean_t rw)
+             bool rw)
 {
        CK_RV rv;
        CK_FLAGS flags = CKF_SERIAL_SESSION;
@@ -564,7 +565,7 @@ token_login(pk11_session_t *sp) {
                                              "pkcs_C_Login", rv);
 #endif
                } else
-                       token->logged = ISC_TRUE;
+                       token->logged = true;
        }
        UNLOCK(&sessionlock);
        return (ret);
@@ -589,7 +590,7 @@ scan_slots(void) {
        CK_ULONG slotCount;
        pk11_token_t *token;
        unsigned int i;
-       isc_boolean_t bad;
+       bool bad;
 
        slotCount = 0;
        PK11_FATALCHECK(pkcs_C_GetSlotList, (CK_FALSE, NULL_PTR, &slotCount));
@@ -628,12 +629,12 @@ scan_slots(void) {
                        rand_token = token;
 
        try_rsa:
-               bad = ISC_FALSE;
+               bad = false;
                rv = pkcs_C_GetMechanismInfo(slot, CKM_RSA_PKCS_KEY_PAIR_GEN,
                                             &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_GENERATE_KEY_PAIR) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_RSA_PKCS_KEY_PAIR_GEN);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_MD5_RSA_PKCS,
@@ -642,7 +643,7 @@ scan_slots(void) {
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
 #if !defined(PK11_MD5_DISABLE) && !defined(PK11_RSA_PKCS_REPLACE)
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_MD5_RSA_PKCS);
                }
@@ -652,7 +653,7 @@ scan_slots(void) {
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
 #ifndef PK11_RSA_PKCS_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA1_RSA_PKCS);
                }
@@ -662,7 +663,7 @@ scan_slots(void) {
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
 #ifndef PK11_RSA_PKCS_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA256_RSA_PKCS);
                }
@@ -672,7 +673,7 @@ scan_slots(void) {
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
 #ifndef PK11_RSA_PKCS_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA512_RSA_PKCS);
                }
@@ -681,7 +682,7 @@ scan_slots(void) {
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
 #ifdef PK11_RSA_PKCS_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_RSA_PKCS);
                }
@@ -692,12 +693,12 @@ scan_slots(void) {
                        best_rsa_token = token;
 
        try_dsa:
-               bad = ISC_FALSE;
+               bad = false;
                rv = pkcs_C_GetMechanismInfo(slot, CKM_DSA_PARAMETER_GEN,
                                             &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_GENERATE) == 0)) {
 #ifndef PK11_DSA_PARAMETER_GEN_SKIP
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_DSA_PARAMETER_GEN);
                }
@@ -705,14 +706,14 @@ scan_slots(void) {
                                             &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_GENERATE_KEY_PAIR) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_DSA_PARAMETER_GEN);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_DSA_SHA1, &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_DSA_SHA1);
                }
                if (bad)
@@ -724,7 +725,7 @@ scan_slots(void) {
 #endif
 
        try_dh:
-               bad = ISC_FALSE;
+               bad = false;
                rv = pkcs_C_GetMechanismInfo(slot, CKM_DH_PKCS_PARAMETER_GEN,
                                             &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_GENERATE) == 0)) {
@@ -735,14 +736,14 @@ scan_slots(void) {
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_GENERATE_KEY_PAIR) == 0)) {
 #ifndef PK11_DH_PKCS_PARAMETER_GEN_SKIP
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_DH_PKCS_KEY_PAIR_GEN);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_DH_PKCS_DERIVE,
                                             &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DERIVE) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_DH_PKCS_DERIVE);
                }
                if (bad)
@@ -754,78 +755,78 @@ scan_slots(void) {
 #endif
 
        try_digest:
-               bad = ISC_FALSE;
+               bad = false;
                rv = pkcs_C_GetMechanismInfo(slot, CKM_MD5, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
 #ifndef PK11_MD5_DISABLE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_MD5);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA_1, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_SHA_1);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA224, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_SHA224);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA256, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_SHA256);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA384, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_SHA384);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA512, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_SHA512);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_MD5_HMAC, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_SIGN) == 0)) {
 #if !defined(PK11_MD5_DISABLE) && !defined(PK11_MD5_HMAC_REPLACE)
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_MD5_HMAC);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA_1_HMAC, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_SIGN) == 0)) {
 #ifndef PK11_SHA_1_HMAC_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA_1_HMAC);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA224_HMAC, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_SIGN) == 0)) {
 #ifndef PK11_SHA224_HMAC_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA224_HMAC);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA256_HMAC, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_SIGN) == 0)) {
 #ifndef PK11_SHA256_HMAC_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA256_HMAC);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA384_HMAC, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_SIGN) == 0)) {
 #ifndef PK11_SHA384_HMAC_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA384_HMAC);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_SHA512_HMAC, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_SIGN) == 0)) {
 #ifndef PK11_SHA512_HMAC_REPLACE
-                       bad = ISC_TRUE;
+                       bad = true;
 #endif
                        PK11_TRACEM(CKM_SHA512_HMAC);
                }
@@ -840,14 +841,14 @@ scan_slots(void) {
                                             &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_GENERATE_KEY_PAIR) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_EC_KEY_PAIR_GEN);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_ECDSA, &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_ECDSA);
                }
                if (bad)
@@ -857,18 +858,18 @@ scan_slots(void) {
                        best_ec_token = token;
 
        try_gost:
-               bad = ISC_FALSE;
+               bad = false;
                /* does GOST require digest too? */
                rv = pkcs_C_GetMechanismInfo(slot, CKM_GOSTR3411, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_DIGEST) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_GOSTR3411);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_GOSTR3410_KEY_PAIR_GEN,
                                             &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_GENERATE_KEY_PAIR) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_GOSTR3410_KEY_PAIR_GEN);
                }
                rv = pkcs_C_GetMechanismInfo(slot,
@@ -877,7 +878,7 @@ scan_slots(void) {
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_GOSTR3410_WITH_GOSTR3411);
                }
                if (bad)
@@ -888,19 +889,19 @@ scan_slots(void) {
 
        try_eddsa:
 #if defined(CKM_EDDSA_KEY_PAIR_GEN) && defined(CKM_EDDSA) && defined(CKK_EDDSA)
-               bad = ISC_FALSE;
+               bad = false;
                rv = pkcs_C_GetMechanismInfo(slot, CKM_EDDSA_KEY_PAIR_GEN,
                                             &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_GENERATE_KEY_PAIR) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_EDDSA_KEY_PAIR_GEN);
                }
                rv = pkcs_C_GetMechanismInfo(slot, CKM_EDDSA, &mechInfo);
                if ((rv != CKR_OK) ||
                    ((mechInfo.flags & CKF_SIGN) == 0) ||
                    ((mechInfo.flags & CKF_VERIFY) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_EDDSA);
                }
                if (bad)
@@ -908,10 +909,10 @@ scan_slots(void) {
 
        try_aes:
 #endif
-               bad = ISC_FALSE;
+               bad = false;
                rv = pkcs_C_GetMechanismInfo(slot, CKM_AES_ECB, &mechInfo);
                if ((rv != CKR_OK) || ((mechInfo.flags & CKF_ENCRYPT) == 0)) {
-                       bad = ISC_TRUE;
+                       bad = true;
                        PK11_TRACEM(CKM_AES_ECB);
                }
                if (bad)
@@ -1111,7 +1112,7 @@ percent_decode(char *x, size_t *len) {
        return (x);
 }
 
-static isc_boolean_t
+static bool
 pk11strcmp(const char *x, size_t lenx, const char *y, size_t leny) {
        char buf[32];
 
@@ -1121,7 +1122,7 @@ pk11strcmp(const char *x, size_t lenx, const char *y, size_t leny) {
        if (lenx > leny)
                lenx = leny;
        memmove(buf, x, lenx);
-       return (ISC_TF(memcmp(buf, y, leny) == 0));
+       return (memcmp(buf, y, leny) == 0);
 }
 
 static CK_ATTRIBUTE *
@@ -1167,7 +1168,7 @@ pk11_parse_uri(pk11_object_t *obj, const char *label,
        size_t len, l;
        FILE *stream = NULL;
        char pin[PINLEN + 1];
-       isc_boolean_t gotpin = ISC_FALSE;
+       bool gotpin = false;
        isc_result_t ret;
 
        /* get values to work on */
@@ -1284,7 +1285,7 @@ pk11_parse_uri(pk11_object_t *obj, const char *label,
                        stream = NULL;
                        if (ret != ISC_R_SUCCESS)
                                goto err;
-                       gotpin = ISC_TRUE;
+                       gotpin = true;
                } else
                        DST_RET(PK11_R_NOPROVIDER);
        }
@@ -1308,7 +1309,7 @@ pk11_parse_uri(pk11_object_t *obj, const char *label,
        obj->slot = token->slotid;
        if (gotpin) {
                memmove(token->pin, pin, PINLEN + 1);
-               obj->reqlogon = ISC_TRUE;
+               obj->reqlogon = true;
        }
 
        ret = ISC_R_SUCCESS;
@@ -1330,7 +1331,7 @@ pk11_error_fatalcheck(const char *file, int line,
 void
 pk11_dump_tokens(void) {
        pk11_token_t *token;
-       isc_boolean_t first;
+       bool first;
 
        printf("DEFAULTS\n");
        printf("\trand_token=%p\n", rand_token);
@@ -1353,45 +1354,45 @@ pk11_dump_tokens(void) {
                printf("\tmodel=%.16s\n", token->model);
                printf("\tserialNumber=%.16s\n", token->serial);
                printf("\tsupported operations=0x%x (", token->operations);
-               first = ISC_TRUE;
+               first = true;
                if (token->operations & (1 << OP_RAND)) {
                        if (!first)
                                printf(",");
-                       first = ISC_FALSE;
+                       first = false;
                        printf("RAND");
                }
                if (token->operations & (1 << OP_RSA)) {
-                       first = ISC_FALSE;
+                       first = false;
                        printf("RSA");
                }
                if (token->operations & (1 << OP_DSA)) {
                        if (!first)
                                printf(",");
-                       first = ISC_FALSE;
+                       first = false;
                        printf("DSA");
                }
                if (token->operations & (1 << OP_DH)) {
                        if (!first)
                                printf(",");
-                       first = ISC_FALSE;
+                       first = false;
                        printf("DH");
                }
                if (token->operations & (1 << OP_DIGEST)) {
                        if (!first)
                                printf(",");
-                       first = ISC_FALSE;
+                       first = false;
                        printf("DIGEST");
                }
                if (token->operations & (1 << OP_EC)) {
                        if (!first)
                                printf(",");
-                       first = ISC_FALSE;
+                       first = false;
                        printf("EC");
                }
                if (token->operations & (1 << OP_AES)) {
                        if (!first)
                                printf(",");
-                       first = ISC_FALSE;
+                       first = false;
                        printf("AES");
                }
                printf(")\n");
index fe6656587f0e2ac347b9dbc18fdae6ccc8eeea88..b3af46da7113019e5d5e88db5ec13f2c40bc4878 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/portset.h>
@@ -34,9 +35,9 @@ struct isc_portset {
        uint32_t buf[ISC_PORTSET_BUFSIZE];
 };
 
-static inline isc_boolean_t
+static inline bool
 portset_isset(isc_portset_t *portset, in_port_t port) {
-       return (ISC_TF((portset->buf[port >> 5] & ((uint32_t)1 << (port & 31))) != 0));
+       return (portset->buf[port >> 5] & ((uint32_t)1 << (port & 31)));
 }
 
 static inline void
@@ -82,7 +83,7 @@ isc_portset_destroy(isc_mem_t *mctx, isc_portset_t **portsetp) {
        isc_mem_put(mctx, portset, sizeof(*portset));
 }
 
-isc_boolean_t
+bool
 isc_portset_isset(isc_portset_t *portset, in_port_t port) {
        REQUIRE(portset != NULL);
 
index 447638bc32c7e9da81406f90539f9f075ff21303..d4d48809c30e7a5783aecc5c4ba8a90c2a270843 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <ctype.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdio.h>             /* for sprintf() */
 #include <string.h>            /* for strlen() */
 #include <assert.h>            /* for assert() */
@@ -178,7 +179,7 @@ isc__print_printf(void (*emit)(char, void *), void *arg,
        int zeropad;
        int dot;
        double dbl;
-       isc_boolean_t precision_set;
+       bool precision_set;
 #ifdef HAVE_LONG_DOUBLE
        long double ldbl;
 #endif
@@ -203,7 +204,7 @@ isc__print_printf(void (*emit)(char, void *), void *arg,
                width = precision = 0;
                head = "";
                pad = zeropad = 0;
-               precision_set = ISC_FALSE;
+               precision_set = false;
 
                do {
                        if (*format == '#') {
@@ -249,12 +250,12 @@ isc__print_printf(void (*emit)(char, void *), void *arg,
                        dot = 1;
                        if (*format == '*') {
                                precision = va_arg(ap, int);
-                               precision_set = ISC_TRUE;
+                               precision_set = true;
                                format++;
                        } else if (isdigit((unsigned char)*format)) {
                                char *e;
                                precision = strtoul(format, &e, 10);
-                               precision_set = ISC_TRUE;
+                               precision_set = true;
                                format = e;
                        }
                }
index 076004fa5c30a78a01465e95e996f1e3979b0c85..cd45e6b1f59ef8cbb98d633b431f860eaf6aabee 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <time.h>
 #include <sys/time.h>
@@ -77,7 +78,7 @@ struct isc_mutexstats {
 #endif
 static isc_mutexstats_t stats[ISC_MUTEX_PROFTABLESIZE];
 static int stats_next = 0;
-static isc_boolean_t stats_init = ISC_FALSE;
+static bool stats_init = false;
 static pthread_mutex_t statslock = PTHREAD_MUTEX_INITIALIZER;
 
 
@@ -93,8 +94,8 @@ isc_mutex_init_profile(isc_mutex_t *mp, const char *file, int line) {
 
        RUNTIME_CHECK(pthread_mutex_lock(&statslock) == 0);
 
-       if (stats_init == ISC_FALSE)
-               stats_init = ISC_TRUE;
+       if (stats_init == false)
+               stats_init = true;
 
        /*
         * If all statistics entries have been used, give up and trigger an
@@ -221,7 +222,7 @@ isc_mutex_statsprofile(FILE *fp) {
 
 #if ISC_MUTEX_DEBUG && defined(PTHREAD_MUTEX_ERRORCHECK)
 
-static isc_boolean_t errcheck_initialized = ISC_FALSE;
+static bool errcheck_initialized = false;
 static pthread_mutexattr_t errcheck;
 static isc_once_t once_errcheck = ISC_ONCE_INIT;
 
@@ -230,7 +231,7 @@ initialize_errcheck(void) {
        RUNTIME_CHECK(pthread_mutexattr_init(&errcheck) == 0);
        RUNTIME_CHECK(pthread_mutexattr_settype
                      (&errcheck, PTHREAD_MUTEX_ERRORCHECK) == 0);
-       errcheck_initialized = ISC_TRUE;
+       errcheck_initialized = true;
 }
 
 isc_result_t
@@ -258,7 +259,7 @@ pthread_mutexattr_t isc__mutex_attrs = {
 #if !(ISC_MUTEX_DEBUG && defined(PTHREAD_MUTEX_ERRORCHECK)) && !ISC_MUTEX_PROFILE
 
 #ifdef HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
-static isc_boolean_t attr_initialized = ISC_FALSE;
+static bool attr_initialized = false;
 static pthread_mutexattr_t attr;
 static isc_once_t once_attr = ISC_ONCE_INIT;
 #endif /* HAVE_PTHREAD_MUTEX_ADAPTIVE_NP */
@@ -269,7 +270,7 @@ initialize_attr(void) {
        RUNTIME_CHECK(pthread_mutexattr_init(&attr) == 0);
        RUNTIME_CHECK(pthread_mutexattr_settype
                      (&attr, PTHREAD_MUTEX_ADAPTIVE_NP) == 0);
-       attr_initialized = ISC_TRUE;
+       attr_initialized = true;
 }
 #endif /* HAVE_PTHREAD_MUTEX_ADAPTIVE_NP */
 
index 0e7273f23030b5b08c9ddc667ee03ef50d457ba7..6299dfef41c1990ea9893d8b710043a20e86a9d8 100644 (file)
@@ -66,7 +66,7 @@ _new_prefix(isc_mem_t *mctx, isc_prefix_t **target, int family, void *dest,
        }
 
        prefix->family = family;
-       prefix->ecs = ISC_FALSE;
+       prefix->ecs = false;
        prefix->mctx = NULL;
        isc_mem_attach(mctx, &prefix->mctx);
 
index 4ebefc5ab130b5b64b85f7a73cddaa8a065b2ee0..b79b6891ab06a54fe3b2ec54a71a856e2bdd8bcd 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>              /* Required for time(). */
 #ifdef HAVE_SYS_TYPES_H
@@ -256,7 +257,7 @@ destroy(isc_rng_t *rng) {
 void
 isc_rng_detach(isc_rng_t **rngp) {
        isc_rng_t *rng;
-       isc_boolean_t dest = ISC_FALSE;
+       bool dest = false;
 
        REQUIRE(rngp != NULL && VALID_RNG(*rngp));
 
@@ -268,7 +269,7 @@ isc_rng_detach(isc_rng_t **rngp) {
        INSIST(rng->references > 0);
        rng->references--;
        if (rng->references == 0)
-               dest = ISC_TRUE;
+               dest = true;
        UNLOCK(&rng->lock);
 
        if (dest)
index 8f868a293f385a2fb138c067282036f7caf6aad0..b9502988b63e3623eebd51666e64e1d69605c1bb 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/ratelimiter.h>
@@ -37,7 +38,7 @@ struct isc_ratelimiter {
        isc_timer_t *           timer;
        isc_interval_t          interval;
        uint32_t                pertic;
-       isc_boolean_t           pushpop;
+       bool            pushpop;
        isc_ratelimiter_state_t state;
        isc_event_t             shutdownevent;
        ISC_LIST(isc_event_t)   pending;
@@ -68,7 +69,7 @@ isc_ratelimiter_create(isc_mem_t *mctx, isc_timermgr_t *timermgr,
        isc_interval_set(&rl->interval, 0, 0);
        rl->timer = NULL;
        rl->pertic = 1;
-       rl->pushpop = ISC_FALSE;
+       rl->pushpop = false;
        rl->state = isc_ratelimiter_idle;
        ISC_LIST_INIT(rl->pending);
 
@@ -117,7 +118,7 @@ isc_ratelimiter_setinterval(isc_ratelimiter_t *rl, isc_interval_t *interval) {
         */
        if (rl->state == isc_ratelimiter_ratelimited) {
                result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
-                                        &rl->interval, ISC_FALSE);
+                                        &rl->interval, false);
        }
        UNLOCK(&rl->lock);
        return (result);
@@ -134,7 +135,7 @@ isc_ratelimiter_setpertic(isc_ratelimiter_t *rl, uint32_t pertic) {
 }
 
 void
-isc_ratelimiter_setpushpop(isc_ratelimiter_t *rl, isc_boolean_t pushpop) {
+isc_ratelimiter_setpushpop(isc_ratelimiter_t *rl, bool pushpop) {
 
        REQUIRE(rl != NULL);
 
@@ -165,7 +166,7 @@ isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
                        ISC_LIST_APPEND(rl->pending, ev, ev_ratelink);
        } else if (rl->state == isc_ratelimiter_idle) {
                result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
-                                        &rl->interval, ISC_FALSE);
+                                        &rl->interval, false);
                if (result == ISC_R_SUCCESS) {
                        ev->ev_sender = task;
                        rl->state = isc_ratelimiter_ratelimited;
@@ -225,7 +226,7 @@ ratelimiter_tick(isc_task_t *task, isc_event_t *event) {
                         */
                        result = isc_timer_reset(rl->timer,
                                                 isc_timertype_inactive,
-                                                NULL, NULL, ISC_FALSE);
+                                                NULL, NULL, false);
                        RUNTIME_CHECK(result == ISC_R_SUCCESS);
                        rl->state = isc_ratelimiter_idle;
                        pertic = 0;     /* Force the loop to exit. */
@@ -249,7 +250,7 @@ isc_ratelimiter_shutdown(isc_ratelimiter_t *rl) {
        LOCK(&rl->lock);
        rl->state = isc_ratelimiter_shuttingdown;
        (void)isc_timer_reset(rl->timer, isc_timertype_inactive,
-                             NULL, NULL, ISC_FALSE);
+                             NULL, NULL, false);
        while ((ev = ISC_LIST_HEAD(rl->pending)) != NULL) {
                ISC_LIST_UNLINK(rl->pending, ev, ev_ratelink);
                ev->ev_attributes |= ISC_EVENTATTR_CANCELED;
@@ -300,7 +301,7 @@ isc_ratelimiter_attach(isc_ratelimiter_t *source, isc_ratelimiter_t **target) {
 void
 isc_ratelimiter_detach(isc_ratelimiter_t **rlp) {
        isc_ratelimiter_t *rl;
-       isc_boolean_t free_now = ISC_FALSE;
+       bool free_now = false;
 
        REQUIRE(rlp != NULL && *rlp != NULL);
 
@@ -310,7 +311,7 @@ isc_ratelimiter_detach(isc_ratelimiter_t **rlp) {
        REQUIRE(rl->refs > 0);
        rl->refs--;
        if (rl->refs == 0)
-               free_now = ISC_TRUE;
+               free_now = true;
        UNLOCK(&rl->lock);
 
        if (free_now)
@@ -332,7 +333,7 @@ isc_ratelimiter_stall(isc_ratelimiter_t *rl) {
                break;
        case isc_ratelimiter_ratelimited:
                result = isc_timer_reset(rl->timer, isc_timertype_inactive,
-                                        NULL, NULL, ISC_FALSE);
+                                        NULL, NULL, false);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                /* FALLTHROUGH */
        case isc_ratelimiter_idle:
@@ -359,7 +360,7 @@ isc_ratelimiter_release(isc_ratelimiter_t *rl) {
                if (!ISC_LIST_EMPTY(rl->pending)) {
                        result = isc_timer_reset(rl->timer,
                                                 isc_timertype_ticker, NULL,
-                                                &rl->interval, ISC_FALSE);
+                                                &rl->interval, false);
                        if (result == ISC_R_SUCCESS)
                                rl->state = isc_ratelimiter_ratelimited;
                } else
index bbe6ed40870dde758a6d1e45b49b473c80e67fe1..63261bbb3e38f9d4af16c85eb256455232126752 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/file.h>
 #include <isc/print.h>
 #include <isc/regex.h>
@@ -37,18 +39,18 @@ isc_regex_validate(const char *c) {
                ":space:", ":blank:", ":lower:", ":upper:", ":cntrl:",
                ":print:", ":xdigit:"
        };
-       isc_boolean_t seen_comma = ISC_FALSE;
-       isc_boolean_t seen_high = ISC_FALSE;
-       isc_boolean_t seen_char = ISC_FALSE;
-       isc_boolean_t seen_ec = ISC_FALSE;
-       isc_boolean_t seen_ce = ISC_FALSE;
-       isc_boolean_t have_atom = ISC_FALSE;
+       bool seen_comma = false;
+       bool seen_high = false;
+       bool seen_char = false;
+       bool seen_ec = false;
+       bool seen_ce = false;
+       bool have_atom = false;
        int group = 0;
        int range = 0;
        int sub = 0;
-       isc_boolean_t empty_ok = ISC_FALSE;
-       isc_boolean_t neg = ISC_FALSE;
-       isc_boolean_t was_multiple = ISC_FALSE;
+       bool empty_ok = false;
+       bool neg = false;
+       bool was_multiple = false;
        unsigned int low = 0;
        unsigned int high = 0;
        const char *ccname = NULL;
@@ -72,8 +74,8 @@ isc_regex_validate(const char *c) {
                                case '7': case '8': case '9':
                                        if ((*c - '0') > sub)
                                                FAIL("bad back reference");
-                                       have_atom = ISC_TRUE;
-                                       was_multiple = ISC_FALSE;
+                                       have_atom = true;
+                                       was_multiple = false;
                                        break;
                                case 0:
                                        FAIL("escaped end-of-string");
@@ -84,9 +86,9 @@ isc_regex_validate(const char *c) {
                                break;
                        case '[':       /* bracket start */
                                ++c;
-                               neg = ISC_FALSE;
-                               was_multiple = ISC_FALSE;
-                               seen_char = ISC_FALSE;
+                               neg = false;
+                               was_multiple = false;
+                               seen_char = false;
                                state = parse_bracket;
                                break;
                        case '{':       /* bound start */
@@ -98,8 +100,8 @@ isc_regex_validate(const char *c) {
                                                FAIL("no atom");
                                        if (was_multiple)
                                                FAIL("was multiple");
-                                       seen_comma = ISC_FALSE;
-                                       seen_high = ISC_FALSE;
+                                       seen_comma = false;
+                                       seen_high = false;
                                        low = high = 0;
                                        state = parse_bound;
                                        break;
@@ -107,15 +109,15 @@ isc_regex_validate(const char *c) {
                                        goto literal;
                                }
                                ++c;
-                               have_atom = ISC_TRUE;
-                               was_multiple = ISC_TRUE;
+                               have_atom = true;
+                               was_multiple = true;
                                break;
                        case '}':
                                goto literal;
                        case '(':       /* group start */
-                               have_atom = ISC_FALSE;
-                               was_multiple = ISC_FALSE;
-                               empty_ok = ISC_TRUE;
+                               have_atom = false;
+                               was_multiple = false;
+                               empty_ok = true;
                                ++group;
                                ++sub;
                                ++c;
@@ -123,8 +125,8 @@ isc_regex_validate(const char *c) {
                        case ')':       /* group end */
                                if (group && !have_atom && !empty_ok)
                                        FAIL("empty alternative");
-                               have_atom = ISC_TRUE;
-                               was_multiple = ISC_FALSE;
+                               have_atom = true;
+                               was_multiple = false;
                                if (group != 0)
                                        --group;
                                ++c;
@@ -132,15 +134,15 @@ isc_regex_validate(const char *c) {
                        case '|':       /* alternative seperator */
                                if (!have_atom)
                                        FAIL("no atom");
-                               have_atom = ISC_FALSE;
-                               empty_ok = ISC_FALSE;
-                               was_multiple = ISC_FALSE;
+                               have_atom = false;
+                               empty_ok = false;
+                               was_multiple = false;
                                ++c;
                                break;
                        case '^':
                        case '$':
-                               have_atom = ISC_TRUE;
-                               was_multiple = ISC_TRUE;
+                               have_atom = true;
+                               was_multiple = true;
                                ++c;
                                break;
                        case '+':
@@ -150,15 +152,15 @@ isc_regex_validate(const char *c) {
                                        FAIL("was multiple");
                                if (!have_atom)
                                        FAIL("no atom");
-                               have_atom = ISC_TRUE;
-                               was_multiple = ISC_TRUE;
+                               have_atom = true;
+                               was_multiple = true;
                                ++c;
                                break;
                        case '.':
                        default:
                        literal:
-                               have_atom = ISC_TRUE;
-                               was_multiple = ISC_FALSE;
+                               have_atom = true;
+                               was_multiple = false;
                                ++c;
                                break;
                        }
@@ -172,7 +174,7 @@ isc_regex_validate(const char *c) {
                                        if (low > 255)
                                                FAIL("lower bound too big");
                                } else {
-                                       seen_high = ISC_TRUE;
+                                       seen_high = true;
                                        high = high * 10 + *c - '0';
                                        if (high > 255)
                                                FAIL("upper bound too big");
@@ -182,7 +184,7 @@ isc_regex_validate(const char *c) {
                        case ',':
                                if (seen_comma)
                                        FAIL("multiple commas");
-                               seen_comma = ISC_TRUE;
+                               seen_comma = true;
                                ++c;
                                break;
                        default:
@@ -191,7 +193,7 @@ isc_regex_validate(const char *c) {
                        case '}':
                                if (seen_high && low > high)
                                        FAIL("bad parse bound");
-                               seen_comma = ISC_FALSE;
+                               seen_comma = false;
                                state = none;
                                ++c;
                                break;
@@ -201,7 +203,7 @@ isc_regex_validate(const char *c) {
                        switch (*c) {
                        case '^':
                                if (seen_char || neg) goto inside;
-                               neg = ISC_TRUE;
+                               neg = true;
                                ++c;
                                break;
                        case '-':
@@ -219,14 +221,14 @@ isc_regex_validate(const char *c) {
                                        if (range != 0) --range;
                                        ++c;
                                        state = parse_ce;
-                                       seen_ce = ISC_FALSE;
+                                       seen_ce = false;
                                        break;
                                case '=':       /* equivalence class */
                                        if (range == 2)
                                            FAIL("equivalence class in range");
                                        ++c;
                                        state = parse_ec;
-                                       seen_ec = ISC_FALSE;
+                                       seen_ec = false;
                                        break;
                                case ':':       /* character class */
                                        if (range == 2)
@@ -236,7 +238,7 @@ isc_regex_validate(const char *c) {
                                        state = parse_cc;
                                        break;
                                }
-                               seen_char = ISC_TRUE;
+                               seen_char = true;
                                break;
                        case ']':
                                if (!c[1] && !seen_char)
@@ -245,12 +247,12 @@ isc_regex_validate(const char *c) {
                                        goto inside;
                                ++c;
                                range = 0;
-                               have_atom = ISC_TRUE;
+                               have_atom = true;
                                state = none;
                                break;
                        default:
                        inside:
-                               seen_char = ISC_TRUE;
+                               seen_char = true;
                                if (range == 2 && (*c & 0xff) < range_start)
                                        FAIL("out of order range");
                                if (range != 0)
@@ -276,7 +278,7 @@ isc_regex_validate(const char *c) {
                                                range_start = 256;
                                        else
                                                range_start = '.';
-                                       seen_ce = ISC_TRUE;
+                                       seen_ce = true;
                                        break;
                                }
                                break;
@@ -285,7 +287,7 @@ isc_regex_validate(const char *c) {
                                        range_start = 256;
                                else
                                        range_start = *c;
-                               seen_ce = ISC_TRUE;
+                               seen_ce = true;
                                ++c;
                                break;
                        }
@@ -302,12 +304,12 @@ isc_regex_validate(const char *c) {
                                        state = parse_bracket;
                                        break;
                                default:
-                                       seen_ec = ISC_TRUE;
+                                       seen_ec = true;
                                        break;
                                }
                                break;
                        default:
-                               seen_ec = ISC_TRUE;
+                               seen_ec = true;
                                ++c;
                                break;
                        }
@@ -319,7 +321,7 @@ isc_regex_validate(const char *c) {
                                switch (*c) {
                                case ']': {
                                        unsigned int i;
-                                       isc_boolean_t found = ISC_FALSE;
+                                       bool found = false;
                                        for (i = 0;
                                             i < sizeof(cc)/sizeof(*cc);
                                             i++)
@@ -331,7 +333,7 @@ isc_regex_validate(const char *c) {
                                                        continue;
                                                if (strncmp(cc[i], ccname, len))
                                                        continue;
-                                               found = ISC_TRUE;
+                                               found = true;
                                        }
                                        if (!found)
                                                FAIL("unknown cc");
index 1b6c1ecf4cd006db7c3e92d753b68de6e4e555c2..9533c0f828ffe7c369043314a7d23261472dee75 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stddef.h>
 #include <inttypes.h>
 
@@ -632,7 +633,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
                        UNLOCK(&rwl->lock);
                }
        } else {
-               isc_boolean_t wakeup_writers = ISC_TRUE;
+               bool wakeup_writers = true;
 
                /*
                 * Reset the flag, and (implicitly) tell other writers
@@ -661,7 +662,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
                         */
                        LOCK(&rwl->lock);
                        if (rwl->readers_waiting > 0) {
-                               wakeup_writers = ISC_FALSE;
+                               wakeup_writers = false;
                                BROADCAST(&rwl->readable);
                        }
                        UNLOCK(&rwl->lock);
@@ -687,9 +688,9 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
 #else /* ISC_RWLOCK_USEATOMIC */
 
 static isc_result_t
-doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, isc_boolean_t nonblock) {
-       isc_boolean_t skip = ISC_FALSE;
-       isc_boolean_t done = ISC_FALSE;
+doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, bool nonblock) {
+       bool skip = false;
+       bool done = false;
        isc_result_t result = ISC_R_SUCCESS;
 
        REQUIRE(VALID_RWLOCK(rwl));
@@ -703,7 +704,7 @@ doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, isc_boolean_t nonblock) {
 
        if (type == isc_rwlocktype_read) {
                if (rwl->readers_waiting != 0)
-                       skip = ISC_TRUE;
+                       skip = true;
                while (!done) {
                        if (!skip &&
                            ((rwl->active == 0 ||
@@ -714,12 +715,12 @@ doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, isc_boolean_t nonblock) {
                                rwl->type = isc_rwlocktype_read;
                                rwl->active++;
                                rwl->granted++;
-                               done = ISC_TRUE;
+                               done = true;
                        } else if (nonblock) {
                                result = ISC_R_LOCKBUSY;
-                               done = ISC_TRUE;
+                               done = true;
                        } else {
-                               skip = ISC_FALSE;
+                               skip = false;
                                rwl->readers_waiting++;
                                WAIT(&rwl->readable, &rwl->lock);
                                rwl->readers_waiting--;
@@ -727,18 +728,18 @@ doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, isc_boolean_t nonblock) {
                }
        } else {
                if (rwl->writers_waiting != 0)
-                       skip = ISC_TRUE;
+                       skip = true;
                while (!done) {
                        if (!skip && rwl->active == 0) {
                                rwl->type = isc_rwlocktype_write;
                                rwl->active = 1;
                                rwl->granted++;
-                               done = ISC_TRUE;
+                               done = true;
                        } else if (nonblock) {
                                result = ISC_R_LOCKBUSY;
-                               done = ISC_TRUE;
+                               done = true;
                        } else {
-                               skip = ISC_FALSE;
+                               skip = false;
                                rwl->writers_waiting++;
                                WAIT(&rwl->writeable, &rwl->lock);
                                rwl->writers_waiting--;
@@ -767,13 +768,13 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
 
        do {
                if (cnt++ >= max_cnt) {
-                       result = doit(rwl, type, ISC_FALSE);
+                       result = doit(rwl, type, false);
                        break;
                }
 #ifdef ISC_PLATFORM_BUSYWAITNOP
                ISC_PLATFORM_BUSYWAITNOP;
 #endif
-       } while (doit(rwl, type, ISC_TRUE) != ISC_R_SUCCESS);
+       } while (doit(rwl, type, true) != ISC_R_SUCCESS);
 
        rwl->spins += (cnt - rwl->spins) / 8;
 
@@ -782,7 +783,7 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
 
 isc_result_t
 isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
-       return (doit(rwl, type, ISC_TRUE));
+       return (doit(rwl, type, true));
 }
 
 isc_result_t
index 1003e798433dae21384400bf1fb0584b20ca7b9d..7a464b611636e7a4e50ec69e74702817376ba2bf 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/safe.h>
 #include <isc/string.h>
 #include <isc/util.h>
@@ -25,7 +27,7 @@
 #pragma optimize("", off)
 #endif
 
-isc_boolean_t
+bool
 isc_safe_memequal(const void *s1, const void *s2, size_t n) {
        uint8_t acc = 0;
 
@@ -36,7 +38,7 @@ isc_safe_memequal(const void *s1, const void *s2, size_t n) {
                        acc |= *p1++ ^ *p2++;
                } while (--n != 0U);
        }
-       return (ISC_TF(acc == 0));
+       return (acc == 0);
 }
 
 
index 662e8646374f5455b0337bc08182d5d55365fadf..860a0c6f5f0c4feef9e1cce05476f14ddeed4704 100644 (file)
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/serial.h>
 
-isc_boolean_t
+bool
 isc_serial_lt(uint32_t a, uint32_t b) {
        /*
-        * Undefined => ISC_FALSE
+        * Undefined => false
         */
        if (a == (b ^ 0x80000000U))
-               return (ISC_FALSE);
-       return (((int32_t)(a - b) < 0) ? ISC_TRUE : ISC_FALSE);
+               return (false);
+       return (((int32_t)(a - b) < 0) ? true : false);
 }
 
-isc_boolean_t
+bool
 isc_serial_gt(uint32_t a, uint32_t b) {
-       return (((int32_t)(a - b) > 0) ? ISC_TRUE : ISC_FALSE);
+       return (((int32_t)(a - b) > 0) ? true : false);
 }
 
-isc_boolean_t
+bool
 isc_serial_le(uint32_t a, uint32_t b) {
-       return ((a == b) ? ISC_TRUE : isc_serial_lt(a, b));
+       return ((a == b) ? true : isc_serial_lt(a, b));
 }
 
-isc_boolean_t
+bool
 isc_serial_ge(uint32_t a, uint32_t b) {
-       return ((a == b) ? ISC_TRUE : isc_serial_gt(a, b));
+       return ((a == b) ? true : isc_serial_gt(a, b));
 }
 
-isc_boolean_t
+bool
 isc_serial_eq(uint32_t a, uint32_t b) {
-       return ((a == b) ? ISC_TRUE : ISC_FALSE);
+       return ((a == b) ? true : false);
 }
 
-isc_boolean_t
+bool
 isc_serial_ne(uint32_t a, uint32_t b) {
-       return ((a != b) ? ISC_TRUE : ISC_FALSE);
+       return ((a != b) ? true : false);
 }
index 3d8267a1506268ec7be5ce2acef288f8c9245c9c..c0c89b4c99a7b02361a245d141a228b208e08240 100644 (file)
@@ -31,6 +31,8 @@
 
 #include "config.h"
 
+#include <stdbool.h>
+
 #include <isc/assertions.h>
 #include <isc/platform.h>
 #include <isc/safe.h>
@@ -99,8 +101,8 @@ isc_sha1_init(isc_sha1_t *ctx) {
        CK_RV rv;
        CK_MECHANISM mech = { CKM_SHA_1, NULL, 0 };
 
-       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(ctx, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        PK11_FATALCHECK(pkcs_C_DigestInit, (ctx->session, &mech));
 }
 
@@ -420,8 +422,8 @@ isc_sha1_final(isc_sha1_t *context, unsigned char *digest) {
  * Standard use is testing false and result true.
  * Testing use is testing true and result false;
  */
-isc_boolean_t
-isc_sha1_check(isc_boolean_t testing) {
+bool
+isc_sha1_check(bool testing) {
        isc_sha1_t ctx;
        unsigned char input = 'a';
        unsigned char digest[ISC_SHA1_DIGESTLENGTH];
@@ -450,5 +452,5 @@ isc_sha1_check(isc_boolean_t testing) {
        /*
         * Must return true in standard case, should return false for testing.
         */
-       return (ISC_TF(memcmp(digest, expected, ISC_SHA1_DIGESTLENGTH) == 0));
+       return (memcmp(digest, expected, ISC_SHA1_DIGESTLENGTH) == 0);
 }
index f4f16473ff7cd54930ec9fb87b4bb26928569f99..8e502bfec2b2c15dea17d4507acaad1ecaeb614c 100644 (file)
@@ -273,8 +273,8 @@ isc_sha224_init(isc_sha224_t *context) {
        if (context == (isc_sha224_t *)0) {
                return;
        }
-       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        PK11_FATALCHECK(pkcs_C_DigestInit, (context->session, &mech));
 }
 
@@ -339,8 +339,8 @@ isc_sha256_init(isc_sha256_t *context) {
        if (context == (isc_sha256_t *)0) {
                return;
        }
-       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        PK11_FATALCHECK(pkcs_C_DigestInit, (context->session, &mech));
 }
 
@@ -405,8 +405,8 @@ isc_sha512_init(isc_sha512_t *context) {
        if (context == (isc_sha512_t *)0) {
                return;
        }
-       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        PK11_FATALCHECK(pkcs_C_DigestInit, (context->session, &mech));
 }
 
@@ -471,8 +471,8 @@ isc_sha384_init(isc_sha384_t *context) {
        if (context == (isc_sha384_t *)0) {
                return;
        }
-       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, ISC_TRUE, ISC_FALSE,
-                                      ISC_FALSE, NULL, 0) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(pk11_get_session(context, OP_DIGEST, true, false,
+                                      false, NULL, 0) == ISC_R_SUCCESS);
        PK11_FATALCHECK(pkcs_C_DigestInit, (context->session, &mech));
 }
 
index 005a74dbe2303a17a0f827857bbc5761fd97b2b6..6a97e69c46e90d750babb07679de54df94bd2d8d 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/buffer.h>
 #include <isc/string.h>
 #include <isc/util.h>
 
-isc_boolean_t
+bool
 isc_sockaddr_equal(const isc_sockaddr_t *a, const isc_sockaddr_t *b) {
        return (isc_sockaddr_compare(a, b, ISC_SOCKADDR_CMPADDR|
                                           ISC_SOCKADDR_CMPPORT|
                                           ISC_SOCKADDR_CMPSCOPE));
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_eqaddr(const isc_sockaddr_t *a, const isc_sockaddr_t *b) {
        return (isc_sockaddr_compare(a, b, ISC_SOCKADDR_CMPADDR|
                                           ISC_SOCKADDR_CMPSCOPE));
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_compare(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
                     unsigned int flags)
 {
        REQUIRE(a != NULL && b != NULL);
 
        if (a->length != b->length)
-               return (ISC_FALSE);
+               return (false);
 
        /*
         * We don't just memcmp because the sin_zero field isn't always
@@ -54,46 +55,46 @@ isc_sockaddr_compare(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
         */
 
        if (a->type.sa.sa_family != b->type.sa.sa_family)
-               return (ISC_FALSE);
+               return (false);
        switch (a->type.sa.sa_family) {
        case AF_INET:
                if ((flags & ISC_SOCKADDR_CMPADDR) != 0 &&
                    memcmp(&a->type.sin.sin_addr, &b->type.sin.sin_addr,
                           sizeof(a->type.sin.sin_addr)) != 0)
-                       return (ISC_FALSE);
+                       return (false);
                if ((flags & ISC_SOCKADDR_CMPPORT) != 0 &&
                    a->type.sin.sin_port != b->type.sin.sin_port)
-                       return (ISC_FALSE);
+                       return (false);
                break;
        case AF_INET6:
                if ((flags & ISC_SOCKADDR_CMPADDR) != 0 &&
                    memcmp(&a->type.sin6.sin6_addr, &b->type.sin6.sin6_addr,
                           sizeof(a->type.sin6.sin6_addr)) != 0)
-                       return (ISC_FALSE);
+                       return (false);
 #ifdef ISC_PLATFORM_HAVESCOPEID
                /*
                 * If ISC_SOCKADDR_CMPSCOPEZERO is set then don't return
-                * ISC_FALSE if one of the scopes in zero.
+                * false if one of the scopes in zero.
                 */
                if ((flags & ISC_SOCKADDR_CMPSCOPE) != 0 &&
                    a->type.sin6.sin6_scope_id != b->type.sin6.sin6_scope_id &&
                    ((flags & ISC_SOCKADDR_CMPSCOPEZERO) == 0 ||
                      (a->type.sin6.sin6_scope_id != 0 &&
                       b->type.sin6.sin6_scope_id != 0)))
-                       return (ISC_FALSE);
+                       return (false);
 #endif
                if ((flags & ISC_SOCKADDR_CMPPORT) != 0 &&
                    a->type.sin6.sin6_port != b->type.sin6.sin6_port)
-                       return (ISC_FALSE);
+                       return (false);
                break;
        default:
                if (memcmp(&a->type, &b->type, a->length) != 0)
-                       return (ISC_FALSE);
+                       return (false);
        }
-       return (ISC_TRUE);
+       return (true);
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_eqaddrprefix(const isc_sockaddr_t *a, const isc_sockaddr_t *b,
                          unsigned int prefixlen)
 {
@@ -194,7 +195,7 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size) {
 }
 
 unsigned int
-isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) {
+isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, bool address_only) {
        unsigned int length = 0;
        const unsigned char *s = NULL;
        unsigned int h = 0;
@@ -231,9 +232,9 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) {
                p = 0;
        }
 
-       h = isc_hash_function(s, length, ISC_TRUE, NULL);
+       h = isc_hash_function(s, length, true, NULL);
        if (!address_only)
-               h = isc_hash_function(&p, sizeof(p), ISC_TRUE, &h);
+               h = isc_hash_function(&p, sizeof(p), true, &h);
 
        return (h);
 }
@@ -427,7 +428,7 @@ isc_sockaddr_getport(const isc_sockaddr_t *sockaddr) {
        return (port);
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_ismulticast(const isc_sockaddr_t *sockaddr) {
        isc_netaddr_t netaddr;
 
@@ -436,10 +437,10 @@ isc_sockaddr_ismulticast(const isc_sockaddr_t *sockaddr) {
                isc_netaddr_fromsockaddr(&netaddr, sockaddr);
                return (isc_netaddr_ismulticast(&netaddr));
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_isexperimental(const isc_sockaddr_t *sockaddr) {
        isc_netaddr_t netaddr;
 
@@ -447,10 +448,10 @@ isc_sockaddr_isexperimental(const isc_sockaddr_t *sockaddr) {
                isc_netaddr_fromsockaddr(&netaddr, sockaddr);
                return (isc_netaddr_isexperimental(&netaddr));
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_issitelocal(const isc_sockaddr_t *sockaddr) {
        isc_netaddr_t netaddr;
 
@@ -458,10 +459,10 @@ isc_sockaddr_issitelocal(const isc_sockaddr_t *sockaddr) {
                isc_netaddr_fromsockaddr(&netaddr, sockaddr);
                return (isc_netaddr_issitelocal(&netaddr));
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_islinklocal(const isc_sockaddr_t *sockaddr) {
        isc_netaddr_t netaddr;
 
@@ -469,10 +470,10 @@ isc_sockaddr_islinklocal(const isc_sockaddr_t *sockaddr) {
                isc_netaddr_fromsockaddr(&netaddr, sockaddr);
                return (isc_netaddr_islinklocal(&netaddr));
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) {
        isc_netaddr_t netaddr;
 
@@ -480,7 +481,7 @@ isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) {
                isc_netaddr_fromsockaddr(&netaddr, sockaddr);
                return (isc_netaddr_isnetzero(&netaddr));
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
index 771c418b852431c07bf99c10bd68a1ae80bdc28b..5de98a9a0915337a7f6b8e0beffb285edb24bc22 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/app.h>
 #include <isc/magic.h>
@@ -204,7 +205,7 @@ isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
 }
 
 void
-isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
+isc_socket_ipv6only(isc_socket_t *sock, bool yes) {
        REQUIRE(ISCAPI_SOCKET_VALID(sock));
 
        if (isc_bind9)
@@ -365,7 +366,7 @@ isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region,
 }
 
 void
-isc_socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) {
+isc_socket_cleanunix(isc_sockaddr_t *sockaddr, bool active) {
        isc__socket_cleanunix(sockaddr, active);
 }
 
index 62839e43712d70dcd5580cd4fb0ccca14c09ef46..b6466d3ebeec70c14ad4d2b3be4bf8cf3df861ec 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include <stdbool.h>
 
 #include <isc/magic.h>
 #include <isc/mem.h>
@@ -44,14 +45,14 @@ struct isc_symtab {
        eltlist_t *                     table;
        isc_symtabaction_t              undefine_action;
        void *                          undefine_arg;
-       isc_boolean_t                   case_sensitive;
+       bool                    case_sensitive;
 };
 
 isc_result_t
 isc_symtab_create(isc_mem_t *mctx, unsigned int size,
                  isc_symtabaction_t undefine_action,
                  void *undefine_arg,
-                 isc_boolean_t case_sensitive,
+                 bool case_sensitive,
                  isc_symtab_t **symtabp)
 {
        isc_symtab_t *symtab;
@@ -118,7 +119,7 @@ isc_symtab_destroy(isc_symtab_t **symtabp) {
 }
 
 static inline unsigned int
-hash(const char *key, isc_boolean_t case_sensitive) {
+hash(const char *key, bool case_sensitive) {
        const char *s;
        unsigned int h = 0;
        int c;
index 139ff225f5f7d1899b7c0dbb3116f76f3bca2a51..f9f1eed64fb2217c9d92421cd0149c38539e14e0 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/app.h>
 #include <isc/condition.h>
 #include <isc/event.h>
@@ -149,9 +151,9 @@ struct isc__taskmgr {
 #endif /* ISC_PLATFORM_USETHREADS */
        unsigned int                    tasks_running;
        unsigned int                    tasks_ready;
-       isc_boolean_t                   pause_requested;
-       isc_boolean_t                   exclusive_requested;
-       isc_boolean_t                   exiting;
+       bool                    pause_requested;
+       bool                    exclusive_requested;
+       bool                    exiting;
 
        /*
         * Multiple threads can read/write 'excl' at the same time, so we need
@@ -196,7 +198,7 @@ isc__task_purgerange(isc_task_t *task0, void *sender, isc_eventtype_t first,
 unsigned int
 isc__task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
                void *tag);
-isc_boolean_t
+bool
 isc_task_purgeevent(isc_task_t *task0, isc_event_t *event);
 unsigned int
 isc__task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
@@ -236,15 +238,15 @@ isc__task_beginexclusive(isc_task_t *task);
 void
 isc__task_endexclusive(isc_task_t *task0);
 void
-isc__task_setprivilege(isc_task_t *task0, isc_boolean_t priv);
-isc_boolean_t
+isc__task_setprivilege(isc_task_t *task0, bool priv);
+bool
 isc__task_privilege(isc_task_t *task0);
 void
 isc__taskmgr_setmode(isc_taskmgr_t *manager0, isc_taskmgrmode_t mode);
 isc_taskmgrmode_t
 isc__taskmgr_mode(isc_taskmgr_t *manager0);
 
-static inline isc_boolean_t
+static inline bool
 empty_readyq(isc__taskmgr_t *manager);
 
 static inline isc__task_t *
@@ -339,7 +341,7 @@ isc__task_create(isc_taskmgr_t *manager0, unsigned int quantum,
 {
        isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
        isc__task_t *task;
-       isc_boolean_t exiting;
+       bool exiting;
        isc_result_t result;
 
        REQUIRE(VALID_MANAGER(manager));
@@ -370,14 +372,14 @@ isc__task_create(isc_taskmgr_t *manager0, unsigned int quantum,
        INIT_LINK(task, ready_link);
        INIT_LINK(task, ready_priority_link);
 
-       exiting = ISC_FALSE;
+       exiting = false;
        LOCK(&manager->lock);
        if (!manager->exiting) {
                if (task->quantum == 0)
                        task->quantum = manager->default_quantum;
                APPEND(manager->tasks, task, link);
        } else
-               exiting = ISC_TRUE;
+               exiting = true;
        UNLOCK(&manager->lock);
 
        if (exiting) {
@@ -414,9 +416,9 @@ isc__task_attach(isc_task_t *source0, isc_task_t **targetp) {
        *targetp = (isc_task_t *)source;
 }
 
-static inline isc_boolean_t
+static inline bool
 task_shutdown(isc__task_t *task) {
-       isc_boolean_t was_idle = ISC_FALSE;
+       bool was_idle = false;
        isc_event_t *event, *prev;
 
        /*
@@ -432,7 +434,7 @@ task_shutdown(isc__task_t *task) {
                if (task->state == task_state_idle) {
                        INSIST(EMPTY(task->events));
                        task->state = task_state_ready;
-                       was_idle = ISC_TRUE;
+                       was_idle = true;
                }
                INSIST(task->state == task_state_ready ||
                       task->state == task_state_running);
@@ -462,7 +464,7 @@ static inline void
 task_ready(isc__task_t *task) {
        isc__taskmgr_t *manager = task->manager;
 #ifdef USE_WORKER_THREADS
-       isc_boolean_t has_privilege = isc__task_privilege((isc_task_t *) task);
+       bool has_privilege = isc__task_privilege((isc_task_t *) task);
 #endif /* USE_WORKER_THREADS */
 
        REQUIRE(VALID_MANAGER(manager));
@@ -479,7 +481,7 @@ task_ready(isc__task_t *task) {
        UNLOCK(&manager->lock);
 }
 
-static inline isc_boolean_t
+static inline bool
 task_detach(isc__task_t *task) {
 
        /*
@@ -502,16 +504,16 @@ task_detach(isc__task_t *task) {
                 * loop to deal with shutting down and termination.
                 */
                task->state = task_state_ready;
-               return (ISC_TRUE);
+               return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 void
 isc__task_detach(isc_task_t **taskp) {
        isc__task_t *task;
-       isc_boolean_t was_idle;
+       bool was_idle;
 
        /*
         * Detach *taskp from its task.
@@ -533,9 +535,9 @@ isc__task_detach(isc_task_t **taskp) {
        *taskp = NULL;
 }
 
-static inline isc_boolean_t
+static inline bool
 task_send(isc__task_t *task, isc_event_t **eventp) {
-       isc_boolean_t was_idle = ISC_FALSE;
+       bool was_idle = false;
        isc_event_t *event;
 
        /*
@@ -552,7 +554,7 @@ task_send(isc__task_t *task, isc_event_t **eventp) {
        XTRACE("task_send");
 
        if (task->state == task_state_idle) {
-               was_idle = ISC_TRUE;
+               was_idle = true;
                INSIST(EMPTY(task->events));
                task->state = task_state_ready;
        }
@@ -568,7 +570,7 @@ task_send(isc__task_t *task, isc_event_t **eventp) {
 void
 isc__task_send(isc_task_t *task0, isc_event_t **eventp) {
        isc__task_t *task = (isc__task_t *)task0;
-       isc_boolean_t was_idle;
+       bool was_idle;
 
        /*
         * Send '*event' to 'task'.
@@ -609,7 +611,7 @@ isc__task_send(isc_task_t *task0, isc_event_t **eventp) {
 
 void
 isc__task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
-       isc_boolean_t idle1, idle2;
+       bool idle1, idle2;
        isc__task_t *task;
 
        /*
@@ -646,7 +648,7 @@ isc__task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
 static unsigned int
 dequeue_events(isc__task_t *task, void *sender, isc_eventtype_t first,
               isc_eventtype_t last, void *tag,
-              isc_eventlist_t *events, isc_boolean_t purging)
+              isc_eventlist_t *events, bool purging)
 {
        isc_event_t *event, *next_event;
        unsigned int count = 0;
@@ -702,7 +704,7 @@ isc__task_purgerange(isc_task_t *task0, void *sender, isc_eventtype_t first,
        ISC_LIST_INIT(events);
 
        count = dequeue_events(task, sender, first, last, tag, &events,
-                              ISC_TRUE);
+                              true);
 
        for (event = HEAD(events); event != NULL; event = next_event) {
                next_event = NEXT(event, ev_link);
@@ -730,7 +732,7 @@ isc__task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
        return (isc__task_purgerange(task, sender, type, type, tag));
 }
 
-isc_boolean_t
+bool
 isc_task_purgeevent(isc_task_t *task0, isc_event_t *event) {
        isc__task_t *task = (isc__task_t *)task0;
        isc_event_t *curr_event, *next_event;
@@ -767,11 +769,11 @@ isc_task_purgeevent(isc_task_t *task0, isc_event_t *event) {
        UNLOCK(&task->lock);
 
        if (curr_event == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        isc_event_free(&curr_event);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 unsigned int
@@ -786,7 +788,7 @@ isc__task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
        XTRACE("isc_task_unsendrange");
 
        return (dequeue_events((isc__task_t *)task, sender, first,
-                              last, tag, events, ISC_FALSE));
+                              last, tag, events, false));
 }
 
 unsigned int
@@ -800,7 +802,7 @@ isc__task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
        XTRACE("isc_task_unsend");
 
        return (dequeue_events((isc__task_t *)task, sender, type,
-                              type, tag, events, ISC_FALSE));
+                              type, tag, events, false));
 }
 
 isc_result_t
@@ -808,7 +810,7 @@ isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action,
                     void *arg)
 {
        isc__task_t *task = (isc__task_t *)task0;
-       isc_boolean_t disallowed = ISC_FALSE;
+       bool disallowed = false;
        isc_result_t result = ISC_R_SUCCESS;
        isc_event_t *event;
 
@@ -831,7 +833,7 @@ isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action,
 
        LOCK(&task->lock);
        if (TASK_SHUTTINGDOWN(task)) {
-               disallowed = ISC_TRUE;
+               disallowed = true;
                result = ISC_R_SHUTTINGDOWN;
        } else
                ENQUEUE(task->on_shutdown, event, ev_link);
@@ -846,7 +848,7 @@ isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action,
 void
 isc__task_shutdown(isc_task_t *task0) {
        isc__task_t *task = (isc__task_t *)task0;
-       isc_boolean_t was_idle;
+       bool was_idle;
 
        /*
         * Shutdown 'task'.
@@ -938,13 +940,13 @@ isc__task_getcurrenttimex(isc_task_t *task0, isc_time_t *t) {
  ***/
 
 /*
- * Return ISC_TRUE if the current ready list for the manager, which is
+ * Return true if the current ready list for the manager, which is
  * either ready_tasks or the ready_priority_tasks, depending on whether
  * the manager is currently in normal or privileged execution mode.
  *
  * Caller must hold the task manager lock.
  */
-static inline isc_boolean_t
+static inline bool
 empty_readyq(isc__taskmgr_t *manager) {
        isc__tasklist_t queue;
 
@@ -953,7 +955,7 @@ empty_readyq(isc__taskmgr_t *manager) {
        else
                queue = manager->ready_priority_tasks;
 
-       return (ISC_TF(EMPTY(queue)));
+       return (EMPTY(queue));
 }
 
 /*
@@ -1100,9 +1102,9 @@ dispatch(isc__taskmgr_t *manager) {
                task = pop_readyq(manager);
                if (task != NULL) {
                        unsigned int dispatch_count = 0;
-                       isc_boolean_t done = ISC_FALSE;
-                       isc_boolean_t requeue = ISC_FALSE;
-                       isc_boolean_t finished = ISC_FALSE;
+                       bool done = false;
+                       bool requeue = false;
+                       bool finished = false;
                        isc_event_t *event;
 
                        INSIST(VALID_TASK(task));
@@ -1152,7 +1154,7 @@ dispatch(isc__taskmgr_t *manager) {
                                if (task->references == 0 &&
                                    EMPTY(task->events) &&
                                    !TASK_SHUTTINGDOWN(task)) {
-                                       isc_boolean_t was_idle;
+                                       bool was_idle;
 
                                        /*
                                         * There are no references and no
@@ -1199,11 +1201,11 @@ dispatch(isc__taskmgr_t *manager) {
                                                               ISC_MSGSET_TASK,
                                                               ISC_MSG_DONE,
                                                               "done"));
-                                               finished = ISC_TRUE;
+                                               finished = true;
                                                task->state = task_state_done;
                                        } else
                                                task->state = task_state_idle;
-                                       done = ISC_TRUE;
+                                       done = true;
                                } else if (dispatch_count >= task->quantum) {
                                        /*
                                         * Our quantum has expired, but
@@ -1220,8 +1222,8 @@ dispatch(isc__taskmgr_t *manager) {
                                                              ISC_MSG_QUANTUM,
                                                              "quantum"));
                                        task->state = task_state_ready;
-                                       requeue = ISC_TRUE;
-                                       done = ISC_TRUE;
+                                       requeue = true;
+                                       done = true;
                                }
                        } while (!done);
                        UNLOCK(&task->lock);
@@ -1434,9 +1436,9 @@ isc__taskmgr_create(isc_mem_t *mctx, unsigned int workers,
        INIT_LIST(manager->ready_priority_tasks);
        manager->tasks_running = 0;
        manager->tasks_ready = 0;
-       manager->exclusive_requested = ISC_FALSE;
-       manager->pause_requested = ISC_FALSE;
-       manager->exiting = ISC_FALSE;
+       manager->exclusive_requested = false;
+       manager->pause_requested = false;
+       manager->exiting = false;
        manager->excl = NULL;
 
        isc_mem_attach(mctx, &manager->mctx);
@@ -1548,7 +1550,7 @@ isc__taskmgr_destroy(isc_taskmgr_t **managerp) {
         * Make sure we only get called once.
         */
        INSIST(!manager->exiting);
-       manager->exiting = ISC_TRUE;
+       manager->exiting = true;
 
        /*
         * If privileged mode was on, turn it off.
@@ -1621,17 +1623,17 @@ isc__taskmgr_mode(isc_taskmgr_t *manager0) {
 }
 
 #ifndef USE_WORKER_THREADS
-isc_boolean_t
+bool
 isc__taskmgr_ready(isc_taskmgr_t *manager0) {
        isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
-       isc_boolean_t is_ready;
+       bool is_ready;
 
 #ifdef USE_SHARED_MANAGER
        if (manager == NULL)
                manager = taskmgr;
 #endif
        if (manager == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        LOCK(&manager->lock);
        is_ready = !empty_readyq(manager);
@@ -1660,7 +1662,7 @@ isc__taskmgr_dispatch(isc_taskmgr_t *manager0) {
 void
 isc__taskmgr_pause(isc_taskmgr_t *manager0) {
        isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
-       manager->pause_requested = ISC_TRUE;
+       manager->pause_requested = true;
        LOCK(&manager->lock);
        while (manager->tasks_running > 0) {
                WAIT(&manager->paused, &manager->lock);
@@ -1674,7 +1676,7 @@ isc__taskmgr_resume(isc_taskmgr_t *manager0) {
 
        LOCK(&manager->lock);
        if (manager->pause_requested) {
-               manager->pause_requested = ISC_FALSE;
+               manager->pause_requested = false;
                BROADCAST(&manager->work_available);
        }
        UNLOCK(&manager->lock);
@@ -1730,7 +1732,7 @@ isc__task_beginexclusive(isc_task_t *task0) {
                UNLOCK(&manager->lock);
                return (ISC_R_LOCKBUSY);
        }
-       manager->exclusive_requested = ISC_TRUE;
+       manager->exclusive_requested = true;
        while (manager->tasks_running > 1) {
                WAIT(&manager->exclusive_granted, &manager->lock);
        }
@@ -1750,7 +1752,7 @@ isc__task_endexclusive(isc_task_t *task0) {
        REQUIRE(task->state == task_state_running);
        LOCK(&manager->lock);
        REQUIRE(manager->exclusive_requested);
-       manager->exclusive_requested = ISC_FALSE;
+       manager->exclusive_requested = false;
        BROADCAST(&manager->work_available);
        UNLOCK(&manager->lock);
 #else
@@ -1759,13 +1761,13 @@ isc__task_endexclusive(isc_task_t *task0) {
 }
 
 void
-isc__task_setprivilege(isc_task_t *task0, isc_boolean_t priv) {
+isc__task_setprivilege(isc_task_t *task0, bool priv) {
        isc__task_t *task = (isc__task_t *)task0;
        isc__taskmgr_t *manager = task->manager;
-       isc_boolean_t oldpriv;
+       bool oldpriv;
 
        LOCK(&task->lock);
-       oldpriv = ISC_TF((task->flags & TASK_F_PRIVILEGED) != 0);
+       oldpriv = (task->flags & TASK_F_PRIVILEGED);
        if (priv)
                task->flags |= TASK_F_PRIVILEGED;
        else
@@ -1785,13 +1787,13 @@ isc__task_setprivilege(isc_task_t *task0, isc_boolean_t priv) {
        UNLOCK(&manager->lock);
 }
 
-isc_boolean_t
+bool
 isc__task_privilege(isc_task_t *task0) {
        isc__task_t *task = (isc__task_t *)task0;
-       isc_boolean_t priv;
+       bool priv;
 
        LOCK(&task->lock);
-       priv = ISC_TF((task->flags & TASK_F_PRIVILEGED) != 0);
+       priv = (task->flags & TASK_F_PRIVILEGED);
        UNLOCK(&task->lock);
        return (priv);
 }
@@ -1801,7 +1803,7 @@ isc__task_register(void) {
        return (isc_task_register(isc__taskmgr_create));
 }
 
-isc_boolean_t
+bool
 isc_task_exiting(isc_task_t *t) {
        isc__task_t *task = (isc__task_t *)t;
 
@@ -2273,7 +2275,7 @@ isc_task_endexclusive(isc_task_t *task) {
 }
 
 void
-isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv) {
+isc_task_setprivilege(isc_task_t *task, bool priv) {
        REQUIRE(ISCAPI_TASK_VALID(task));
 
        if (isc_bind9)
@@ -2282,7 +2284,7 @@ isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv) {
                task->methods->setprivilege(task, priv);
 }
 
-isc_boolean_t
+bool
 isc_task_privilege(isc_task_t *task) {
        REQUIRE(ISCAPI_TASK_VALID(task));
 
index a559ec233a46846a172884b69e01a85a5617b2cf..1fa3bb10bc0442a324156422bcff8d65b6c573fd 100644 (file)
@@ -23,7 +23,7 @@ isc__taskmgr_pause(isc_taskmgr_t *taskmgr);
 void
 isc__taskmgr_resume(isc_taskmgr_t *taskmgr);
 #else
-isc_boolean_t
+bool
 isc__taskmgr_ready(isc_taskmgr_t *taskmgr);
 
 isc_result_t
index d391a49771b1acbef47112a08f36171259b1ae85..5dfc1d1fa7e445479c653d7d2b62043107494c0a 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/mem.h>
 #include <isc/random.h>
 #include <isc/taskpool.h>
@@ -168,7 +170,7 @@ isc_taskpool_destroy(isc_taskpool_t **poolp) {
 }
 
 void
-isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv) {
+isc_taskpool_setprivilege(isc_taskpool_t *pool, bool priv) {
        unsigned int i;
 
        REQUIRE(pool != NULL);
index 8ed5c9daa6adc6cdb59fb52ba98bdcb97f441295..801301049d426c8f0b17ccd1570845ae3e61dfd2 100644 (file)
@@ -67,7 +67,7 @@ ATF_TC_BODY(atomic_xadd, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        memset(counters, 0, sizeof(counters));
@@ -129,7 +129,7 @@ ATF_TC_BODY(atomic_xaddq, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        memset(counters, 0, sizeof(counters));
@@ -199,7 +199,7 @@ ATF_TC_BODY(atomic_store, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        memset(counters, 0, sizeof(counters));
@@ -276,7 +276,7 @@ ATF_TC_BODY(atomic_storeq, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        memset(counters, 0, sizeof(counters));
index a799924b2d26ec2624a3cc8da6a2144bbbcfc719..a2d76ccc7cd9ab14652bb641ebe35e6af5e7bd20 100644 (file)
@@ -30,7 +30,7 @@ ATF_TC_BODY(isc_buffer_reserve, tc) {
        isc_result_t result;
        isc_buffer_t *b;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        b = NULL;
@@ -104,7 +104,7 @@ ATF_TC_BODY(isc_buffer_reallocate, tc) {
        isc_result_t result;
        isc_buffer_t *b;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        b = NULL;
@@ -141,7 +141,7 @@ ATF_TC_BODY(isc_buffer_dynamic, tc) {
        size_t last_length = 10;
        int i;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        b = NULL;
@@ -150,7 +150,7 @@ ATF_TC_BODY(isc_buffer_dynamic, tc) {
        ATF_REQUIRE(b != NULL);
        ATF_CHECK_EQ(b->length, last_length);
 
-       isc_buffer_setautorealloc(b, ISC_TRUE);
+       isc_buffer_setautorealloc(b, true);
 
        isc_buffer_putuint8(b, 1);
 
index f2a5bcd03182a8fb6b54a8f9fe7e1e4fc4468798..ddcdae3595117088c1c2a29475810f92b32321e8 100644 (file)
@@ -28,7 +28,7 @@ ATF_TC_BODY(isc_counter, tc) {
        isc_counter_t *counter = NULL;
        int i;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_counter_create(mctx, 0, &counter);
index b7b712326e7d930e18cadb377392695c23f066ce..8f12342ecfc6d47bb8cdb76b330338ff91ffadd2 100644 (file)
@@ -1859,37 +1859,37 @@ ATF_TC_BODY(isc_hash_function, tc) {
 
        /* Incremental hashing */
 
-       h1 = isc_hash_function(NULL, 0, ISC_TRUE, NULL);
-       h1 = isc_hash_function("This ", 5, ISC_TRUE, &h1);
-       h1 = isc_hash_function("is ", 3, ISC_TRUE, &h1);
-       h1 = isc_hash_function("a long test", 12, ISC_TRUE, &h1);
+       h1 = isc_hash_function(NULL, 0, true, NULL);
+       h1 = isc_hash_function("This ", 5, true, &h1);
+       h1 = isc_hash_function("is ", 3, true, &h1);
+       h1 = isc_hash_function("a long test", 12, true, &h1);
 
        h2 = isc_hash_function("This is a long test", 20,
-                              ISC_TRUE, NULL);
+                              true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Immutability of hash function */
-       h1 = isc_hash_function(NULL, 0, ISC_TRUE, NULL);
-       h2 = isc_hash_function(NULL, 0, ISC_TRUE, NULL);
+       h1 = isc_hash_function(NULL, 0, true, NULL);
+       h2 = isc_hash_function(NULL, 0, true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Hash function characteristics */
-       h1 = isc_hash_function("Hello world", 12, ISC_TRUE, NULL);
-       h2 = isc_hash_function("Hello world", 12, ISC_TRUE, NULL);
+       h1 = isc_hash_function("Hello world", 12, true, NULL);
+       h2 = isc_hash_function("Hello world", 12, true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Case */
-       h1 = isc_hash_function("Hello world", 12, ISC_FALSE, NULL);
-       h2 = isc_hash_function("heLLo WorLd", 12, ISC_FALSE, NULL);
+       h1 = isc_hash_function("Hello world", 12, false, NULL);
+       h2 = isc_hash_function("heLLo WorLd", 12, false, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Unequal */
-       h1 = isc_hash_function("Hello world", 12, ISC_TRUE, NULL);
-       h2 = isc_hash_function("heLLo WorLd", 12, ISC_TRUE, NULL);
+       h1 = isc_hash_function("Hello world", 12, true, NULL);
+       h2 = isc_hash_function("heLLo WorLd", 12, true, NULL);
 
        ATF_CHECK(h1 != h2);
 }
@@ -1906,37 +1906,37 @@ ATF_TC_BODY(isc_hash_function_reverse, tc) {
 
        /* Incremental hashing */
 
-       h1 = isc_hash_function_reverse(NULL, 0, ISC_TRUE, NULL);
-       h1 = isc_hash_function_reverse("\000", 1, ISC_TRUE, &h1);
-       h1 = isc_hash_function_reverse("\003org", 4, ISC_TRUE, &h1);
-       h1 = isc_hash_function_reverse("\007example", 8, ISC_TRUE, &h1);
+       h1 = isc_hash_function_reverse(NULL, 0, true, NULL);
+       h1 = isc_hash_function_reverse("\000", 1, true, &h1);
+       h1 = isc_hash_function_reverse("\003org", 4, true, &h1);
+       h1 = isc_hash_function_reverse("\007example", 8, true, &h1);
 
        h2 = isc_hash_function_reverse("\007example\003org\000", 13,
-                                      ISC_TRUE, NULL);
+                                      true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Immutability of hash function */
-       h1 = isc_hash_function_reverse(NULL, 0, ISC_TRUE, NULL);
-       h2 = isc_hash_function_reverse(NULL, 0, ISC_TRUE, NULL);
+       h1 = isc_hash_function_reverse(NULL, 0, true, NULL);
+       h2 = isc_hash_function_reverse(NULL, 0, true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Hash function characteristics */
-       h1 = isc_hash_function_reverse("Hello world", 12, ISC_TRUE, NULL);
-       h2 = isc_hash_function_reverse("Hello world", 12, ISC_TRUE, NULL);
+       h1 = isc_hash_function_reverse("Hello world", 12, true, NULL);
+       h2 = isc_hash_function_reverse("Hello world", 12, true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Case */
-       h1 = isc_hash_function_reverse("Hello world", 12, ISC_FALSE, NULL);
-       h2 = isc_hash_function_reverse("heLLo WorLd", 12, ISC_FALSE, NULL);
+       h1 = isc_hash_function_reverse("Hello world", 12, false, NULL);
+       h2 = isc_hash_function_reverse("heLLo WorLd", 12, false, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        /* Unequal */
-       h1 = isc_hash_function_reverse("Hello world", 12, ISC_TRUE, NULL);
-       h2 = isc_hash_function_reverse("heLLo WorLd", 12, ISC_TRUE, NULL);
+       h1 = isc_hash_function_reverse("Hello world", 12, true, NULL);
+       h2 = isc_hash_function_reverse("heLLo WorLd", 12, true, NULL);
 
        ATF_CHECK(h1 != h2);
 }
@@ -1951,15 +1951,15 @@ ATF_TC_BODY(isc_hash_initializer, tc) {
 
        UNUSED(tc);
 
-       h1 = isc_hash_function("Hello world", 12, ISC_TRUE, NULL);
-       h2 = isc_hash_function("Hello world", 12, ISC_TRUE, NULL);
+       h1 = isc_hash_function("Hello world", 12, true, NULL);
+       h2 = isc_hash_function("Hello world", 12, true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 
        isc_hash_set_initializer(isc_hash_get_initializer());
 
        /* Hash value must not change */
-       h2 = isc_hash_function("Hello world", 12, ISC_TRUE, NULL);
+       h2 = isc_hash_function("Hello world", 12, true, NULL);
 
        ATF_CHECK_EQ(h1, h2);
 }
@@ -1972,8 +1972,8 @@ ATF_TC_HEAD(md5_check, tc) {
 ATF_TC_BODY(md5_check, tc) {
        UNUSED(tc);
 
-       ATF_REQUIRE(isc_md5_check(ISC_FALSE));
-       ATF_CHECK(!isc_md5_check(ISC_TRUE));
+       ATF_REQUIRE(isc_md5_check(false));
+       ATF_CHECK(!isc_md5_check(true));
 
        ATF_REQUIRE(isc_hmacmd5_check(0));
        ATF_CHECK(!isc_hmacmd5_check(1));
@@ -1990,8 +1990,8 @@ ATF_TC_HEAD(sha1_check, tc) {
 ATF_TC_BODY(sha1_check, tc) {
        UNUSED(tc);
 
-       ATF_REQUIRE(isc_sha1_check(ISC_FALSE));
-       ATF_CHECK(!isc_sha1_check(ISC_TRUE));
+       ATF_REQUIRE(isc_sha1_check(false));
+       ATF_CHECK(!isc_sha1_check(true));
 
        ATF_REQUIRE(isc_hmacsha1_check(0));
        ATF_CHECK(!isc_hmacsha1_check(1));
index d6490aad333b33784e637c1b073773a8dc387868..c030573aacb82117360f8a222e54906c40916e45 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <atf-c.h>
 
 #include <stdio.h>
@@ -28,12 +29,12 @@ struct e {
        unsigned int index;
 };
 
-static isc_boolean_t
+static bool
 compare(void *p1, void *p2) {
        struct e *e1 = p1;
        struct e *e2 = p2;
 
-       return (ISC_TF(e1->value < e2->value));
+       return (e1->value < e2->value);
 }
 
 static void
index 7fd1b034f211dc06a85b9149b67b567deabdd93f..cf4ae97efcc7f19820f150638a59f7017021602a 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>
 
@@ -40,7 +41,7 @@ isc_socketmgr_t *socketmgr = NULL;
 isc_task_t *maintask = NULL;
 int ncpus;
 
-static isc_boolean_t hash_active = ISC_FALSE;
+static bool hash_active = false;
 
 /*
  * Logging categories: this needs to match the list in bin/named/log.c.
@@ -101,7 +102,7 @@ create_managers(unsigned int workers) {
 }
 
 isc_result_t
-isc_test_begin(FILE *logfile, isc_boolean_t start_managers,
+isc_test_begin(FILE *logfile, bool start_managers,
               unsigned int workers)
 {
        isc_result_t result;
@@ -111,7 +112,7 @@ isc_test_begin(FILE *logfile, isc_boolean_t start_managers,
        CHECK(isc_entropy_create(mctx, &ectx));
 
        CHECK(isc_hash_create(mctx, ectx, 255));
-       hash_active = ISC_TRUE;
+       hash_active = true;
 
        if (logfile != NULL) {
                isc_logdestination_t destination;
@@ -157,7 +158,7 @@ isc_test_end(void) {
                isc_taskmgr_destroy(&taskmgr);
        if (hash_active) {
                isc_hash_destroy();
-               hash_active = ISC_FALSE;
+               hash_active = false;
        }
        if (ectx != NULL)
                isc_entropy_detach(&ectx);
index 94be35fa72f01653943d73426bb900bb80ab0a26..e553b8a9106b5638097fe01200777eec6202bf8b 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/buffer.h>
 #include <isc/entropy.h>
@@ -43,7 +44,7 @@ extern isc_socketmgr_t *socketmgr;
 extern int ncpus;
 
 isc_result_t
-isc_test_begin(FILE *logfile, isc_boolean_t start_managers,
+isc_test_begin(FILE *logfile, bool start_managers,
               unsigned int workers);
 /*%<
  * Begin test, logging to 'logfile' or default if not specified.
index ed4b83863d9d1863281cc0ac0fcb05e7fde237b8..95c7ce36916f0982a8325ea170d37393abc39f7a 100644 (file)
@@ -58,7 +58,7 @@ ATF_TC_BODY(isc_mem, tc) {
        unsigned int i, j;
        int rval;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_mem_create(0, 0, &localmctx);
@@ -150,7 +150,7 @@ ATF_TC_BODY(isc_mem_total, tc) {
        ssize_t diff;
        int i;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        /* Local alloc, free */
@@ -217,7 +217,7 @@ ATF_TC_BODY(isc_mem_inuse, tc) {
        ssize_t diff;
        void *ptr;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        mctx2 = NULL;
index adfb48cfaa6f876e73f996b47d25095c1157fdf3..aa41b96bd9b907891e817f0b0c8437edf4834ba1 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -31,20 +32,20 @@ ATF_TC_BODY(netaddr_isnetzero, tc) {
        struct in_addr ina;
        struct {
                const char *address;
-               isc_boolean_t expect;
+               bool expect;
        } tests[] = {
-               { "0.0.0.0", ISC_TRUE },
-               { "0.0.0.1", ISC_TRUE },
-               { "0.0.1.2", ISC_TRUE },
-               { "0.1.2.3", ISC_TRUE },
-               { "10.0.0.0", ISC_FALSE },
-               { "10.9.0.0", ISC_FALSE },
-               { "10.9.8.0", ISC_FALSE },
-               { "10.9.8.7", ISC_FALSE },
-               { "127.0.0.0", ISC_FALSE },
-               { "127.0.0.1", ISC_FALSE }
+               { "0.0.0.0", true },
+               { "0.0.0.1", true },
+               { "0.0.1.2", true },
+               { "0.1.2.3", true },
+               { "10.0.0.0", false },
+               { "10.9.0.0", false },
+               { "10.9.8.0", false },
+               { "10.9.8.7", false },
+               { "127.0.0.0", false },
+               { "127.0.0.1", false }
        };
-       isc_boolean_t result;
+       bool result;
        isc_netaddr_t netaddr;
 
        for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
@@ -112,14 +113,14 @@ ATF_TC_BODY(netaddr_multicast, tc) {
        struct {
                int family;
                const char *addr;
-               isc_boolean_t is_multicast;
+               bool is_multicast;
        } tests[] = {
-               { AF_INET, "1.2.3.4", ISC_FALSE },
-               { AF_INET, "4.3.2.1", ISC_FALSE },
-               { AF_INET, "224.1.1.1", ISC_TRUE },
-               { AF_INET, "1.1.1.244", ISC_FALSE },
-               { AF_INET6, "::1", ISC_FALSE },
-               { AF_INET6, "ff02::1", ISC_TRUE }
+               { AF_INET, "1.2.3.4", false },
+               { AF_INET, "4.3.2.1", false },
+               { AF_INET, "224.1.1.1", true },
+               { AF_INET, "1.1.1.244", false },
+               { AF_INET6, "::1", false },
+               { AF_INET6, "ff02::1", true }
        };
 
        for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
index 3947c09feb602eaf24ce08ef38ce4cab18818906..edc81395cfa9d758d4c13176bb2aaf7eaf47644c 100644 (file)
@@ -37,7 +37,7 @@ ATF_TC_BODY(parse_overflow, tc) {
        uint32_t output;
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_parse_uint32(&output, "1234567890", 10);
index 0d24779920aa2abc1053656a28b16da8dd5790ca..fb9197eb06c3711f6b4243e4555e6fbd5920387b 100644 (file)
@@ -58,7 +58,7 @@ ATF_TC_BODY(create_pool, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_pool_create(mctx, 8, poolfree, poolinit, taskmgr, &pool);
@@ -82,7 +82,7 @@ ATF_TC_BODY(expand_pool, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_pool_create(mctx, 10, poolfree, poolinit, taskmgr, &pool1);
@@ -136,7 +136,7 @@ ATF_TC_BODY(get_objects, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_pool_create(mctx, 2, poolfree, poolinit, taskmgr, &pool);
index 36bdb9fa5044c6756f5fa729d384d7bf7aeb88d0..843e6411eb28d084733f0493e351d704a9a2cbd2 100644 (file)
@@ -61,7 +61,7 @@ ATF_TC_BODY(queue_valid, tc) {
        item_init(&four, 4);
        item_init(&five, 5);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        ATF_CHECK(ISC_QUEUE_EMPTY(queue));
index 5c40f54fad00f2dfd6446f9202fe52815885a0f2..0a0b5349efba945de10cb9d0e9acd5c316dc7e6c 100644 (file)
@@ -37,7 +37,7 @@ ATF_TC_BODY(isc_radix_search, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_radix_create(mctx, &radix, 32);
@@ -45,7 +45,7 @@ ATF_TC_BODY(isc_radix_search, tc) {
 
        in_addr.s_addr = inet_addr("3.3.3.0");
        isc_netaddr_fromin(&netaddr, &in_addr);
-       NETADDR_TO_PREFIX_T(&netaddr, prefix, 24, ISC_FALSE);
+       NETADDR_TO_PREFIX_T(&netaddr, prefix, 24, false);
 
        node = NULL;
        result = isc_radix_insert(radix, &node, NULL, &prefix);
@@ -55,7 +55,7 @@ ATF_TC_BODY(isc_radix_search, tc) {
 
        in_addr.s_addr = inet_addr("3.3.0.0");
        isc_netaddr_fromin(&netaddr, &in_addr);
-       NETADDR_TO_PREFIX_T(&netaddr, prefix, 16, ISC_FALSE);
+       NETADDR_TO_PREFIX_T(&netaddr, prefix, 16, false);
 
        node = NULL;
        result = isc_radix_insert(radix, &node, NULL, &prefix);
@@ -65,7 +65,7 @@ ATF_TC_BODY(isc_radix_search, tc) {
 
        in_addr.s_addr = inet_addr("3.3.3.3");
        isc_netaddr_fromin(&netaddr, &in_addr);
-       NETADDR_TO_PREFIX_T(&netaddr, prefix, 22, ISC_FALSE);
+       NETADDR_TO_PREFIX_T(&netaddr, prefix, 22, false);
 
        node = NULL;
        result = isc_radix_search(radix, &node, &prefix);
index 3c2c5c95856f664f6648978a70638cbcf9dee49b..56371396df747e92f201243a5a541a19d4b8bbd4 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/random.h>
 #include <isc/result.h>
 #include <isc/mem.h>
index 59b7275211b20957e80f9d8284f56741e0a44af4..fd6494f8317ccba21b7392bd2a75dc329c576b3a 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 
 #include <isc/netaddr.h>
@@ -41,20 +42,20 @@ ATF_TC_BODY(sockaddr_hash, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        in.s_addr = inet_addr("127.0.0.1");
        isc_sockaddr_fromin(&addr, &in, 1);
-       h1 = isc_sockaddr_hash(&addr, ISC_TRUE);
-       h2 = isc_sockaddr_hash(&addr, ISC_FALSE);
+       h1 = isc_sockaddr_hash(&addr, true);
+       h2 = isc_sockaddr_hash(&addr, false);
        ATF_CHECK(h1 != h2);
 
        ret = inet_pton(AF_INET6, "::ffff:127.0.0.1", &in6);
        ATF_CHECK(ret == 1);
        isc_sockaddr_fromin6(&addr, &in6, 1);
-       h3 = isc_sockaddr_hash(&addr, ISC_TRUE);
-       h4 = isc_sockaddr_hash(&addr, ISC_FALSE);
+       h3 = isc_sockaddr_hash(&addr, true);
+       h4 = isc_sockaddr_hash(&addr, false);
        ATF_CHECK(h1 == h3);
        ATF_CHECK(h2 == h4);
 
@@ -69,36 +70,36 @@ ATF_TC_BODY(sockaddr_isnetzero, tc) {
        isc_sockaddr_t addr;
        struct in_addr in;
        struct in6_addr in6;
-       isc_boolean_t r;
+       bool r;
        int ret;
        size_t i;
        struct {
                const char *string;
-               isc_boolean_t expect;
+               bool expect;
        } data4[] = {
-               { "0.0.0.0", ISC_TRUE },
-               { "0.0.0.1", ISC_TRUE },
-               { "0.0.1.0", ISC_TRUE },
-               { "0.1.0.0", ISC_TRUE },
-               { "1.0.0.0", ISC_FALSE },
-               { "0.0.0.127", ISC_TRUE },
-               { "0.0.0.255", ISC_TRUE },
-               { "127.0.0.1", ISC_FALSE },
-               { "255.255.255.255", ISC_FALSE },
+               { "0.0.0.0", true },
+               { "0.0.0.1", true },
+               { "0.0.1.0", true },
+               { "0.1.0.0", true },
+               { "1.0.0.0", false },
+               { "0.0.0.127", true },
+               { "0.0.0.255", true },
+               { "127.0.0.1", false },
+               { "255.255.255.255", false },
        };
        /*
         * Mapped addresses are currently not netzero.
         */
        struct {
                const char *string;
-               isc_boolean_t expect;
+               bool expect;
        } data6[] = {
-               { "::ffff:0.0.0.0", ISC_FALSE },
-               { "::ffff:0.0.0.1", ISC_FALSE },
-               { "::ffff:0.0.0.127", ISC_FALSE },
-               { "::ffff:0.0.0.255", ISC_FALSE },
-               { "::ffff:127.0.0.1", ISC_FALSE },
-               { "::ffff:255.255.255.255", ISC_FALSE },
+               { "::ffff:0.0.0.0", false },
+               { "::ffff:0.0.0.1", false },
+               { "::ffff:0.0.0.127", false },
+               { "::ffff:0.0.0.255", false },
+               { "::ffff:127.0.0.1", false },
+               { "::ffff:255.255.255.255", false },
        };
 
        UNUSED(tc);
@@ -122,8 +123,8 @@ ATF_TC_BODY(sockaddr_isnetzero, tc) {
 ATF_TC(sockaddr_eqaddrprefix);
 ATF_TC_HEAD(sockaddr_eqaddrprefix, tc) {
        atf_tc_set_md_var(tc, "descr",
-                         "isc_sockaddr_eqaddrprefix() returns ISC_TRUE when "
-                         "prefixes of a and b are equal, and ISC_FALSE when "
+                         "isc_sockaddr_eqaddrprefix() returns true when "
+                         "prefixes of a and b are equal, and false when "
                          "they are not equal");
 }
 ATF_TC_BODY(sockaddr_eqaddrprefix, tc) {
@@ -163,4 +164,3 @@ ATF_TP_ADD_TCS(tp) {
 
        return (atf_no_error());
 }
-
index c9a15719733f2a304a0bb5cd7ca6fb90a9c0c767..3f3f2497e6913e817c31c531ceeea38727b6b1ff 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <unistd.h>
 #include <time.h>
 
 #include "../unix/socket_p.h"
 #include "isctest.h"
 
-static isc_boolean_t recv_dscp;
+static bool recv_dscp;
 static unsigned int recv_dscp_value;
-static isc_boolean_t recv_trunc;
+static bool recv_trunc;
 
 /*
  * Helper functions
  */
 
 typedef struct {
-       isc_boolean_t done;
+       bool done;
        isc_result_t result;
        isc_socket_t *socket;
 } completion_t;
 
 static void
 completion_init(completion_t *completion) {
-       completion->done = ISC_FALSE;
+       completion->done = false;
        completion->socket = NULL;
 }
 
@@ -54,7 +55,7 @@ accept_done(isc_task_t *task, isc_event_t *event) {
        UNUSED(task);
 
        completion->result = nevent->result;
-       completion->done = ISC_TRUE;
+       completion->done = true;
        if (completion->result == ISC_R_SUCCESS)
                completion->socket = nevent->newsocket;
 
@@ -70,14 +71,14 @@ event_done(isc_task_t *task, isc_event_t *event) {
 
        dev = (isc_socketevent_t *) event;
        completion->result = dev->result;
-       completion->done = ISC_TRUE;
+       completion->done = true;
        if ((dev->attributes & ISC_SOCKEVENTATTR_DSCP) != 0) {
-               recv_dscp = ISC_TRUE;
+               recv_dscp = true;
                recv_dscp_value = dev->dscp;;
        } else {
-               recv_dscp = ISC_FALSE;
+               recv_dscp = false;
        }
-       recv_trunc = ISC_TF((dev->attributes & ISC_SOCKEVENTATTR_TRUNC) != 0);
+       recv_trunc = (dev->attributes & ISC_SOCKEVENTATTR_TRUNC);
        isc_event_free(&event);
 }
 
@@ -160,7 +161,7 @@ ATF_TC_BODY(udp_sendto, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        in.s_addr = inet_addr("127.0.0.1");
@@ -235,7 +236,7 @@ ATF_TC_BODY(udp_dup, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        in.s_addr = inet_addr("127.0.0.1");
@@ -337,7 +338,7 @@ ATF_TC_BODY(udp_dscp_v4, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        in.s_addr = inet_addr("127.0.0.1");
@@ -389,7 +390,7 @@ ATF_TC_BODY(udp_dscp_v4, tc) {
                socketevent->attributes &= ~ISC_SOCKEVENTATTR_DSCP;
        }
 
-       recv_dscp = ISC_FALSE;
+       recv_dscp = false;
        recv_dscp_value = 0;
 
        result = isc_socket_sendto2(s1, &r, task, &addr2, NULL, socketevent, 0);
@@ -442,7 +443,7 @@ ATF_TC_BODY(udp_dscp_v6, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        n = inet_pton(AF_INET6, "::1", &in6.s6_addr);
@@ -494,7 +495,7 @@ ATF_TC_BODY(udp_dscp_v6, tc) {
        } else if ((isc_net_probedscp() & ISC_NET_DSCPSETV6) != 0)
                isc_socket_dscp(s1, 056);  /* EF */
 
-       recv_dscp = ISC_FALSE;
+       recv_dscp = false;
        recv_dscp_value = 0;
 
        result = isc_socket_sendto2(s1, &r, task, &addr2, NULL, socketevent, 0);
@@ -547,7 +548,7 @@ ATF_TC_BODY(tcp_dscp_v4, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        in.s_addr = inet_addr("127.0.0.1");
@@ -592,7 +593,7 @@ ATF_TC_BODY(tcp_dscp_v4, tc) {
        r.base = (void *) sendbuf;
        r.length = strlen(sendbuf) + 1;
 
-       recv_dscp = ISC_FALSE;
+       recv_dscp = false;
        recv_dscp_value = 0;
 
        completion_init(&completion);
@@ -647,7 +648,7 @@ ATF_TC_BODY(tcp_dscp_v6, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        n = inet_pton(AF_INET6, "::1", &in6.s6_addr);
@@ -695,7 +696,7 @@ ATF_TC_BODY(tcp_dscp_v6, tc) {
        r.base = (void *) sendbuf;
        r.length = strlen(sendbuf) + 1;
 
-       recv_dscp = ISC_FALSE;
+       recv_dscp = false;
        recv_dscp_value = 0;
 
        completion_init(&completion);
@@ -798,7 +799,7 @@ ATF_TC_BODY(udp_trunc, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        in.s_addr = inet_addr("127.0.0.1");
@@ -855,14 +856,14 @@ ATF_TC_BODY(udp_trunc, tc) {
        r.base = (void *) recvbuf;
        r.length = BUFSIZ;
        completion_init(&completion);
-       recv_trunc = ISC_FALSE;
+       recv_trunc = false;
        result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        waitfor(&completion);
        ATF_CHECK(completion.done);
        ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
        ATF_CHECK_STREQ(recvbuf, "Hello");
-       ATF_CHECK_EQ(recv_trunc, ISC_FALSE);
+       ATF_CHECK_EQ(recv_trunc, false);
 
        /*
         * Send a message that will be truncated.
@@ -888,14 +889,14 @@ ATF_TC_BODY(udp_trunc, tc) {
        r.base = (void *) recvbuf;
        r.length = BUFSIZ;
        completion_init(&completion);
-       recv_trunc = ISC_FALSE;
+       recv_trunc = false;
        result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
        ATF_CHECK_EQ(result, ISC_R_SUCCESS);
        waitfor(&completion);
        ATF_CHECK(completion.done);
        ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
        ATF_CHECK_STREQ(recvbuf, "Hello");
-       ATF_CHECK_EQ(recv_trunc, ISC_TRUE);
+       ATF_CHECK_EQ(recv_trunc, true);
 
        isc_task_detach(&task);
 
index 41b7bd6308ae1d7daf0a54837c463f5c1b9b2256..a50553b20f7fcfc149709faf70a57c731d5c495b 100644 (file)
@@ -48,10 +48,10 @@ ATF_TC_BODY(symtab_grow, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = isc_symtab_create(mctx, 3, undefine, NULL, ISC_FALSE, &st);
+       result = isc_symtab_create(mctx, 3, undefine, NULL, false, &st);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        ATF_REQUIRE(st != NULL);
 
index 09abc1798972b60adac177ee1edfdb3521be55fd..c9912720a390837b589a905fc7b8d8c7953819b4 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <atf-c.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <inttypes.h>
@@ -38,7 +39,7 @@
 static isc_mutex_t lock;
 int counter = 0;
 static int active[10];
-static isc_boolean_t done = ISC_FALSE;
+static bool done = false;
 
 #ifdef ISC_PLATFORM_USETHREADS
 static isc_condition_t cv;
@@ -85,7 +86,7 @@ ATF_TC_BODY(create_task, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_task_create(taskmgr, 0, &task);
@@ -116,7 +117,7 @@ ATF_TC_BODY(all_events, tc) {
        result = isc_mutex_init(&lock);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_task_create(taskmgr, 0, &task);
@@ -172,7 +173,7 @@ ATF_TC_BODY(privileged_events, tc) {
        result = isc_mutex_init(&lock);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
 #ifdef ISC_PLATFORM_USETHREADS
@@ -187,7 +188,7 @@ ATF_TC_BODY(privileged_events, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        isc_task_setname(task1, "privileged", NULL);
        ATF_CHECK(!isc_task_privilege(task1));
-       isc_task_setprivilege(task1, ISC_TRUE);
+       isc_task_setprivilege(task1, true);
        ATF_CHECK(isc_task_privilege(task1));
 
        result = isc_task_create(taskmgr, 0, &task2);
@@ -267,7 +268,7 @@ ATF_TC_BODY(privileged_events, tc) {
 
        ATF_CHECK_EQ(counter, 6);
 
-       isc_task_setprivilege(task1, ISC_FALSE);
+       isc_task_setprivilege(task1, false);
        ATF_CHECK(!isc_task_privilege(task1));
 
        ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
@@ -301,7 +302,7 @@ ATF_TC_BODY(privilege_drop, tc) {
        result = isc_mutex_init(&lock);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
 #ifdef ISC_PLATFORM_USETHREADS
@@ -316,7 +317,7 @@ ATF_TC_BODY(privilege_drop, tc) {
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        isc_task_setname(task1, "privileged", NULL);
        ATF_CHECK(!isc_task_privilege(task1));
-       isc_task_setprivilege(task1, ISC_TRUE);
+       isc_task_setprivilege(task1, true);
        ATF_CHECK(isc_task_privilege(task1));
 
        result = isc_task_create(taskmgr, 0, &task2);
@@ -475,7 +476,7 @@ ATF_TC_BODY(basic, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_task_create(taskmgr, 0, &task1);
@@ -587,7 +588,7 @@ exclusive_cb(isc_task_t *task, isc_event_t *event) {
                }
 
                isc_task_endexclusive(task);
-               done = ISC_TRUE;
+               done = true;
        } else {
                active[taskno]++;
                (void) spin(10000000);
@@ -615,7 +616,7 @@ ATF_TC_BODY(task_exclusive, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 4);
+       result = isc_test_begin(NULL, true, 4);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        for (i = 0; i < 10; i++) {
@@ -661,7 +662,7 @@ maxtask_shutdown(isc_task_t *task, isc_event_t *event) {
                isc_task_destroy((isc_task_t**) &event->ev_arg);
        } else {
                LOCK(&lock);
-               done = ISC_TRUE;
+               done = true;
                SIGNAL(&cv);
                UNLOCK(&lock);
 
@@ -807,11 +808,11 @@ ATF_TC_BODY(shutdown, tc) {
        int i;
 
        nevents = nsdevents = 0;
-       done = ISC_FALSE;
+       done = false;
 
        event_type = 3;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 4);
+       result = isc_test_begin(NULL, true, 4);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_mutex_init(&lock);
@@ -858,7 +859,7 @@ ATF_TC_BODY(shutdown, tc) {
        /*
         * Now we free the task by signaling cv.
         */
-       done = ISC_TRUE;
+       done = true;
        SIGNAL(&cv);
        UNLOCK(&lock);
 
@@ -906,7 +907,7 @@ ATF_TC_BODY(post_shutdown, tc) {
        isc_event_t *event;
        isc_task_t *task;
 
-       done = ISC_FALSE;
+       done = false;
        event_type = 4;
 
        result = isc_mutex_init(&lock);
@@ -915,7 +916,7 @@ ATF_TC_BODY(post_shutdown, tc) {
        result = isc_condition_init(&cv);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        LOCK(&lock);
@@ -940,7 +941,7 @@ ATF_TC_BODY(post_shutdown, tc) {
        /*
         * Release the task.
         */
-       done = ISC_TRUE;
+       done = true;
 
        SIGNAL(&cv);
        UNLOCK(&lock);
@@ -961,14 +962,14 @@ ATF_TC_BODY(post_shutdown, tc) {
 #define        TAGCNT 5
 #define        NEVENTS (SENDERCNT * TYPECNT * TAGCNT)
 
-static isc_boolean_t testrange;
+static bool testrange;
 static void *purge_sender;
 static isc_eventtype_t purge_type_first;
 static isc_eventtype_t purge_type_last;
 static void *purge_tag;
 static int eventcnt;
 
-isc_boolean_t started = ISC_FALSE;
+bool started = false;
 
 static void
 pg_event1(isc_task_t *task, isc_event_t *event) {
@@ -985,30 +986,30 @@ pg_event1(isc_task_t *task, isc_event_t *event) {
 
 static void
 pg_event2(isc_task_t *task, isc_event_t *event) {
-       isc_boolean_t sender_match = ISC_FALSE;
-       isc_boolean_t type_match = ISC_FALSE;
-       isc_boolean_t tag_match = ISC_FALSE;
+       bool sender_match = false;
+       bool type_match = false;
+       bool tag_match = false;
 
        UNUSED(task);
 
        if ((purge_sender == NULL) || (purge_sender == event->ev_sender)) {
-               sender_match = ISC_TRUE;
+               sender_match = true;
        }
 
        if (testrange) {
                if ((purge_type_first <= event->ev_type) &&
                    (event->ev_type <= purge_type_last))
                {
-                       type_match = ISC_TRUE;
+                       type_match = true;
                }
        } else {
                if (purge_type_first == event->ev_type) {
-                       type_match = ISC_TRUE;
+                       type_match = true;
                }
        }
 
        if ((purge_tag == NULL) || (purge_tag == event->ev_tag)) {
-               tag_match = ISC_TRUE;
+               tag_match = true;
        }
 
        if (sender_match && type_match && tag_match) {
@@ -1034,7 +1035,7 @@ pg_sde(isc_task_t *task, isc_event_t *event) {
        UNUSED(task);
 
        LOCK(&lock);
-       done = ISC_TRUE;
+       done = true;
        SIGNAL(&cv);
        UNLOCK(&lock);
 
@@ -1052,11 +1053,11 @@ test_purge(int sender, int type, int tag, int exp_purged) {
        int sender_cnt, type_cnt, tag_cnt, event_cnt, i;
        int purged = 0;
 
-       started = ISC_FALSE;
-       done = ISC_FALSE;
+       started = false;
+       done = false;
        eventcnt = 0;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_mutex_init(&lock);
@@ -1147,7 +1148,7 @@ test_purge(int sender, int type, int tag, int exp_purged) {
         * Unblock the task, allowing event processing.
         */
        LOCK(&lock);
-       started = ISC_TRUE;
+       started = true;
        SIGNAL(&cv);
 
        isc_task_shutdown(task);
@@ -1192,7 +1193,7 @@ ATF_TC_BODY(purge, tc) {
        purge_type_first = 4;
        purge_type_last = 4;
        purge_tag = (void *)8;
-       testrange = ISC_FALSE;
+       testrange = false;
        test_purge(1, 4, 7, 1);
 
        /* Try purging on all senders. */
@@ -1201,7 +1202,7 @@ ATF_TC_BODY(purge, tc) {
        purge_type_first = 4;
        purge_type_last = 4;
        purge_tag = (void *)8;
-       testrange = ISC_FALSE;
+       testrange = false;
        test_purge(1, 4, 7, 3);
 
        /* Try purging on all senders, specified type, all tags. */
@@ -1210,7 +1211,7 @@ ATF_TC_BODY(purge, tc) {
        purge_type_first = 4;
        purge_type_last = 4;
        purge_tag = NULL;
-       testrange = ISC_FALSE;
+       testrange = false;
        test_purge(1, 4, 7, 15);
 
        /* Try purging on a specified tag, no such type. */
@@ -1219,7 +1220,7 @@ ATF_TC_BODY(purge, tc) {
        purge_type_first = 99;
        purge_type_last = 99;
        purge_tag = (void *)8;
-       testrange = ISC_FALSE;
+       testrange = false;
        test_purge(1, 4, 7, 0);
 
        /*
@@ -1230,7 +1231,7 @@ ATF_TC_BODY(purge, tc) {
        purge_type_first = 5;
        purge_type_last = 5;
        purge_tag = NULL;
-       testrange = ISC_FALSE;
+       testrange = false;
        test_purge(1, 4, 7, 5);
 }
 
@@ -1253,7 +1254,7 @@ ATF_TC_BODY(purgerange, tc) {
        purge_type_first = 4;
        purge_type_last = 5;
        purge_tag = (void *)8;
-       testrange = ISC_TRUE;
+       testrange = true;
        test_purge(1, 4, 7, 1);
 
        /* Try purging on all senders. */
@@ -1262,7 +1263,7 @@ ATF_TC_BODY(purgerange, tc) {
        purge_type_first = 4;
        purge_type_last = 5;
        purge_tag = (void *)8;
-       testrange = ISC_TRUE;
+       testrange = true;
        test_purge(1, 4, 7, 5);
 
        /* Try purging on all senders, specified type, all tags. */
@@ -1271,7 +1272,7 @@ ATF_TC_BODY(purgerange, tc) {
        purge_type_first = 5;
        purge_type_last = 6;
        purge_tag = NULL;
-       testrange = ISC_TRUE;
+       testrange = true;
        test_purge(1, 4, 7, 28);
 
        /* Try purging on a specified tag, no such type. */
@@ -1280,7 +1281,7 @@ ATF_TC_BODY(purgerange, tc) {
        purge_type_first = 99;
        purge_type_last = 101;
        purge_tag = (void *)8;
-       testrange = ISC_TRUE;
+       testrange = true;
        test_purge(1, 4, 7, 0);
 
        /* Try purging on specified sender, type, all tags. */
@@ -1289,7 +1290,7 @@ ATF_TC_BODY(purgerange, tc) {
        purge_type_first = 5;
        purge_type_last = 6;
        purge_tag = NULL;
-       testrange = ISC_TRUE;
+       testrange = true;
        test_purge(1, 4, 7, 10);
 }
 
@@ -1323,7 +1324,7 @@ pge_sde(isc_task_t *task, isc_event_t *event) {
        UNUSED(task);
 
        LOCK(&lock);
-       done = ISC_TRUE;
+       done = true;
        SIGNAL(&cv);
        UNLOCK(&lock);
 
@@ -1331,18 +1332,18 @@ pge_sde(isc_task_t *task, isc_event_t *event) {
 }
 
 static void
-try_purgeevent(isc_boolean_t purgeable) {
+try_purgeevent(bool purgeable) {
        isc_result_t    result;
        isc_task_t *task = NULL;
-       isc_boolean_t purged;
+       bool purged;
        isc_event_t *event1 = NULL;
        isc_event_t *event2 = NULL;
        isc_event_t *event2_clone = NULL;;
        isc_time_t now;
        isc_interval_t interval;
 
-       started = ISC_FALSE;
-       done = ISC_FALSE;
+       started = false;
+       done = false;
        eventcnt = 0;
 
        result = isc_mutex_init(&lock);
@@ -1351,7 +1352,7 @@ try_purgeevent(isc_boolean_t purgeable) {
        result = isc_condition_init(&cv);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_task_create(taskmgr, 0, &task);
@@ -1389,7 +1390,7 @@ try_purgeevent(isc_boolean_t purgeable) {
         * Unblock the task, allowing event processing.
         */
        LOCK(&lock);
-       started = ISC_TRUE;
+       started = true;
        SIGNAL(&cv);
 
        isc_task_shutdown(task);
@@ -1421,7 +1422,7 @@ try_purgeevent(isc_boolean_t purgeable) {
  * Purge event test:
  * When the event is marked as purgeable, a call to
  * isc_task_purgeevent(task, event) purges the event 'event' from the
- * task's queue and returns ISC_TRUE.
+ * task's queue and returns true.
  */
 
 ATF_TC(purgeevent);
@@ -1429,14 +1430,14 @@ ATF_TC_HEAD(purgeevent, tc) {
        atf_tc_set_md_var(tc, "descr", "purge-event");
 }
 ATF_TC_BODY(purgeevent, tc) {
-       try_purgeevent(ISC_TRUE);
+       try_purgeevent(true);
 }
 
 /*
  * Purge event not purgeable test:
  * When the event is not marked as purgable, a call to
  * isc_task_purgeevent(task, event) does not purge the event
- * 'event' from the task's queue and returns ISC_FALSE.
+ * 'event' from the task's queue and returns false.
  */
 
 ATF_TC(purgeevent_notpurge);
@@ -1444,7 +1445,7 @@ ATF_TC_HEAD(purgeevent_notpurge, tc) {
        atf_tc_set_md_var(tc, "descr", "purge-event");
 }
 ATF_TC_BODY(purgeevent_notpurge, tc) {
-       try_purgeevent(ISC_FALSE);
+       try_purgeevent(false);
 }
 #endif
 
@@ -1471,4 +1472,3 @@ ATF_TP_ADD_TCS(tp) {
 
        return (atf_no_error());
 }
-
index e89da377f56aa29b388bd5d71cb817559d4ce1b0..ff2de9ea76d5f068370dbfc5b3b6e30dcc8ff36b 100644 (file)
@@ -37,7 +37,7 @@ ATF_TC_BODY(create_pool, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_taskpool_create(taskmgr, mctx, 8, 2, &pool);
@@ -61,7 +61,7 @@ ATF_TC_BODY(expand_pool, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_taskpool_create(taskmgr, mctx, 10, 2, &pool1);
@@ -114,7 +114,7 @@ ATF_TC_BODY(get_tasks, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_taskpool_create(taskmgr, mctx, 2, 2, &pool);
@@ -153,14 +153,14 @@ ATF_TC_BODY(set_privilege, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 0);
+       result = isc_test_begin(NULL, true, 0);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = isc_taskpool_create(taskmgr, mctx, 2, 2, &pool);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
        ATF_REQUIRE_EQ(isc_taskpool_size(pool), 2);
 
-       isc_taskpool_setprivilege(pool, ISC_TRUE);
+       isc_taskpool_setprivilege(pool, true);
 
        isc_taskpool_gettask(pool, &task1);
        isc_taskpool_gettask(pool, &task2);
@@ -174,7 +174,7 @@ ATF_TC_BODY(set_privilege, tc) {
        ATF_CHECK(isc_task_privilege(task2));
        ATF_CHECK(isc_task_privilege(task3));
 
-       isc_taskpool_setprivilege(pool, ISC_FALSE);
+       isc_taskpool_setprivilege(pool, false);
 
        ATF_CHECK(!isc_task_privilege(task1));
        ATF_CHECK(!isc_task_privilege(task2));
index 986cc110a89610f1d993739c7c80dd2c1eb0b287..7a32f1dd0d1abd1aaa5f9b814066612a922090ee 100644 (file)
@@ -189,7 +189,7 @@ ATF_TC_BODY(ticker, tc) {
        seconds = 0;
        nanoseconds = 500000000;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_interval_set(&interval, seconds, nanoseconds);
@@ -215,7 +215,7 @@ ATF_TC_BODY(once_life, tc) {
        seconds = 1;
        nanoseconds = 100000000;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_interval_set(&interval, seconds, nanoseconds);
@@ -283,7 +283,7 @@ ATF_TC_BODY(once_idle, tc) {
        seconds = 1;
        nanoseconds = 200000000;
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        isc_interval_set(&interval, seconds + 1, nanoseconds);
@@ -344,7 +344,7 @@ test_reset(isc_task_t *task, isc_event_t *event) {
                        isc_interval_set(&interval, 0, 0);
                        result = isc_timer_reset(timer, isc_timertype_once,
                                                 &expires, &interval,
-                                                ISC_FALSE);
+                                                false);
                        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
                }
        } else {
@@ -368,7 +368,7 @@ ATF_TC_BODY(reset, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        nevents = 3;
@@ -429,7 +429,7 @@ tick_event(isc_task_t *task, isc_event_t *event) {
                isc_time_settoepoch(&expires);
                isc_interval_set(&interval, seconds, 0);
                result = isc_timer_reset(tickertimer, isc_timertype_ticker,
-                                        &expires, &interval, ISC_TRUE);
+                                        &expires, &interval, true);
                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
                isc_task_shutdown(task);
@@ -492,7 +492,7 @@ ATF_TC_BODY(purge, tc) {
 
        UNUSED(tc);
 
-       result = isc_test_begin(NULL, ISC_TRUE, 2);
+       result = isc_test_begin(NULL, true, 2);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        startflag = 0;
index e979b044b8c71e8eab5f07f34de082229a747b47..714ae591ac0c2ae34a2703184142913b825115c8 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/app.h>
 #include <isc/condition.h>
 #include <isc/heap.h>
@@ -97,7 +99,7 @@ struct isc__timermgr {
        isc_mem_t *                     mctx;
        isc_mutex_t                     lock;
        /* Locked by manager lock. */
-       isc_boolean_t                   done;
+       bool                    done;
        LIST(isc__timer_t)              timers;
        unsigned int                    nscheduled;
        isc_time_t                      due;
@@ -125,7 +127,7 @@ isc__timer_create(isc_timermgr_t *manager, isc_timertype_t type,
 isc_result_t
 isc__timer_reset(isc_timer_t *timer, isc_timertype_t type,
                 const isc_time_t *expires, const isc_interval_t *interval,
-                isc_boolean_t purge);
+                bool purge);
 isc_timertype_t
 isc_timer_gettype(isc_timer_t *timer);
 isc_result_t
@@ -177,13 +179,13 @@ static isc__timermgr_t *timermgr = NULL;
 #endif /* USE_SHARED_MANAGER */
 
 static inline isc_result_t
-schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
+schedule(isc__timer_t *timer, isc_time_t *now, bool signal_ok) {
        isc_result_t result;
        isc__timermgr_t *manager;
        isc_time_t due;
        int cmp;
 #ifdef USE_TIMER_THREAD
-       isc_boolean_t timedwait;
+       bool timedwait;
 #endif
 
        /*!
@@ -203,8 +205,8 @@ schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
         * If the manager was timed wait, we may need to signal the
         * manager to force a wakeup.
         */
-       timedwait = ISC_TF(manager->nscheduled > 0 &&
-                          isc_time_seconds(&manager->due) != 0);
+       timedwait = (manager->nscheduled > 0 &&
+                    isc_time_seconds(&manager->due) != 0);
 #endif
 
        /*
@@ -288,7 +290,7 @@ schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
                if (result == ISC_R_SUCCESS &&
                    isc_time_compare(&then, now) < 0) {
                        SIGNAL(&manager->wakeup);
-                       signal_ok = ISC_FALSE;
+                       signal_ok = false;
                        isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_TIMER, ISC_LOG_WARNING,
                                      "*** POKED TIMER ***");
@@ -313,7 +315,7 @@ schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
 static inline void
 deschedule(isc__timer_t *timer) {
 #ifdef USE_TIMER_THREAD
-       isc_boolean_t need_wakeup = ISC_FALSE;
+       bool need_wakeup = false;
 #endif
        isc__timermgr_t *manager;
 
@@ -325,7 +327,7 @@ deschedule(isc__timer_t *timer) {
        if (timer->index > 0) {
 #ifdef USE_TIMER_THREAD
                if (timer->index == 1)
-                       need_wakeup = ISC_TRUE;
+                       need_wakeup = true;
 #endif
                isc_heap_delete(manager->heap, timer->index);
                timer->index = 0;
@@ -469,7 +471,7 @@ isc__timer_create(isc_timermgr_t *manager0, isc_timertype_t type,
         */
 
        if (type != isc_timertype_inactive)
-               result = schedule(timer, &now, ISC_TRUE);
+               result = schedule(timer, &now, true);
        else
                result = ISC_R_SUCCESS;
        if (result == ISC_R_SUCCESS)
@@ -494,7 +496,7 @@ isc__timer_create(isc_timermgr_t *manager0, isc_timertype_t type,
 isc_result_t
 isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
                 const isc_time_t *expires, const isc_interval_t *interval,
-                isc_boolean_t purge)
+                bool purge)
 {
        isc__timer_t *timer = (isc__timer_t *)timer0;
        isc_time_t now;
@@ -503,7 +505,7 @@ isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
 
        /*
         * Change the timer's type, expires, and interval values to the given
-        * values.  If 'purge' is ISC_TRUE, any pending events from this timer
+        * values.  If 'purge' is true, any pending events from this timer
         * are purged from its task's event queue.
         */
 
@@ -558,7 +560,7 @@ isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
                        deschedule(timer);
                        result = ISC_R_SUCCESS;
                } else
-                       result = schedule(timer, &now, ISC_TRUE);
+                       result = schedule(timer, &now, true);
        }
 
        UNLOCK(&timer->lock);
@@ -633,7 +635,7 @@ isc__timer_attach(isc_timer_t *timer0, isc_timer_t **timerp) {
 void
 isc__timer_detach(isc_timer_t **timerp) {
        isc__timer_t *timer;
-       isc_boolean_t free_timer = ISC_FALSE;
+       bool free_timer = false;
 
        /*
         * Detach *timerp from its timer.
@@ -647,7 +649,7 @@ isc__timer_detach(isc_timer_t **timerp) {
        REQUIRE(timer->references > 0);
        timer->references--;
        if (timer->references == 0)
-               free_timer = ISC_TRUE;
+               free_timer = true;
        UNLOCK(&timer->lock);
 
        if (free_timer)
@@ -658,12 +660,12 @@ isc__timer_detach(isc_timer_t **timerp) {
 
 static void
 dispatch(isc__timermgr_t *manager, isc_time_t *now) {
-       isc_boolean_t done = ISC_FALSE, post_event, need_schedule;
+       bool done = false, post_event, need_schedule;
        isc_timerevent_t *event;
        isc_eventtype_t type = 0;
        isc__timer_t *timer;
        isc_result_t result;
-       isc_boolean_t idle;
+       bool idle;
 
        /*!
         * The caller must be holding the manager lock.
@@ -675,40 +677,40 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                if (isc_time_compare(now, &timer->due) >= 0) {
                        if (timer->type == isc_timertype_ticker) {
                                type = ISC_TIMEREVENT_TICK;
-                               post_event = ISC_TRUE;
-                               need_schedule = ISC_TRUE;
+                               post_event = true;
+                               need_schedule = true;
                        } else if (timer->type == isc_timertype_limited) {
                                int cmp;
                                cmp = isc_time_compare(now, &timer->expires);
                                if (cmp >= 0) {
                                        type = ISC_TIMEREVENT_LIFE;
-                                       post_event = ISC_TRUE;
-                                       need_schedule = ISC_FALSE;
+                                       post_event = true;
+                                       need_schedule = false;
                                } else {
                                        type = ISC_TIMEREVENT_TICK;
-                                       post_event = ISC_TRUE;
-                                       need_schedule = ISC_TRUE;
+                                       post_event = true;
+                                       need_schedule = true;
                                }
                        } else if (!isc_time_isepoch(&timer->expires) &&
                                   isc_time_compare(now,
                                                    &timer->expires) >= 0) {
                                type = ISC_TIMEREVENT_LIFE;
-                               post_event = ISC_TRUE;
-                               need_schedule = ISC_FALSE;
+                               post_event = true;
+                               need_schedule = false;
                        } else {
-                               idle = ISC_FALSE;
+                               idle = false;
 
                                LOCK(&timer->lock);
                                if (!isc_time_isepoch(&timer->idle) &&
                                    isc_time_compare(now,
                                                     &timer->idle) >= 0) {
-                                       idle = ISC_TRUE;
+                                       idle = true;
                                }
                                UNLOCK(&timer->lock);
                                if (idle) {
                                        type = ISC_TIMEREVENT_IDLE;
-                                       post_event = ISC_TRUE;
-                                       need_schedule = ISC_FALSE;
+                                       post_event = true;
+                                       need_schedule = false;
                                } else {
                                        /*
                                         * Idle timer has been touched;
@@ -719,8 +721,8 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                                                                ISC_MSG_IDLERESCHED,
                                                                "idle reschedule"),
                                                 timer);
-                                       post_event = ISC_FALSE;
-                                       need_schedule = ISC_TRUE;
+                                       post_event = false;
+                                       need_schedule = true;
                                }
                        }
 
@@ -757,7 +759,7 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                        manager->nscheduled--;
 
                        if (need_schedule) {
-                               result = schedule(timer, now, ISC_FALSE);
+                               result = schedule(timer, now, false);
                                if (result != ISC_R_SUCCESS)
                                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                                         "%s: %u",
@@ -770,7 +772,7 @@ dispatch(isc__timermgr_t *manager, isc_time_t *now) {
                        }
                } else {
                        manager->due = timer->due;
-                       done = ISC_TRUE;
+                       done = true;
                }
        }
 }
@@ -822,7 +824,7 @@ run(void *uap) {
 }
 #endif /* USE_TIMER_THREAD */
 
-static isc_boolean_t
+static bool
 sooner(void *v1, void *v2) {
        isc__timer_t *t1, *t2;
 
@@ -832,8 +834,8 @@ sooner(void *v1, void *v2) {
        REQUIRE(VALID_TIMER(t2));
 
        if (isc_time_compare(&t1->due, &t2->due) < 0)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 static void
@@ -873,7 +875,7 @@ isc__timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
        manager->common.magic = ISCAPI_TIMERMGR_MAGIC;
        manager->common.methods = (isc_timermgrmethods_t *)&timermgrmethods;
        manager->mctx = NULL;
-       manager->done = ISC_FALSE;
+       manager->done = false;
        INIT_LIST(manager->timers);
        manager->nscheduled = 0;
        isc_time_settoepoch(&manager->due);
@@ -971,7 +973,7 @@ isc__timermgr_destroy(isc_timermgr_t **managerp) {
 #endif
 
        REQUIRE(EMPTY(manager->timers));
-       manager->done = ISC_TRUE;
+       manager->done = true;
 
 #ifdef USE_TIMER_THREAD
        XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
@@ -1167,7 +1169,7 @@ isc_timer_detach(isc_timer_t **timerp) {
 isc_result_t
 isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
                const isc_time_t *expires, const isc_interval_t *interval,
-               isc_boolean_t purge)
+               bool purge)
 {
        REQUIRE(ISCAPI_TIMER_VALID(timer));
 
index 3e126f4befa61071e26d9392a092b1f6b6eba8f6..7e5a0ee0a239d0fcbb47bc753ef6cad1fdccf47b 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <stddef.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
@@ -28,7 +29,6 @@
 #endif
 
 #include <isc/app.h>
-#include <isc/boolean.h>
 #include <isc/condition.h>
 #include <isc/mem.h>
 #include <isc/msgs.h>
@@ -101,19 +101,19 @@ typedef struct isc__appctx {
        isc_mem_t               *mctx;
        isc_mutex_t             lock;
        isc_eventlist_t         on_run;
-       isc_boolean_t           shutdown_requested;
-       isc_boolean_t           running;
+       bool            shutdown_requested;
+       bool            running;
 
        /*!
         * We assume that 'want_shutdown' can be read and written atomically.
         */
-       isc_boolean_t           want_shutdown;
+       bool            want_shutdown;
        /*
         * We assume that 'want_reload' can be read and written atomically.
         */
-       isc_boolean_t           want_reload;
+       bool            want_reload;
 
-       isc_boolean_t           blocked;
+       bool            blocked;
 
        isc_taskmgr_t           *taskmgr;
        isc_socketmgr_t         *socketmgr;
@@ -173,13 +173,13 @@ static pthread_t          main_thread;
 static void
 exit_action(int arg) {
        UNUSED(arg);
-       isc_g_appctx.want_shutdown = ISC_TRUE;
+       isc_g_appctx.want_shutdown = true;
 }
 
 static void
 reload_action(int arg) {
        UNUSED(arg);
-       isc_g_appctx.want_reload = ISC_TRUE;
+       isc_g_appctx.want_reload = true;
 }
 #endif
 
@@ -256,11 +256,11 @@ isc__app_ctxstart(isc_appctx_t *ctx0) {
 
        ISC_LIST_INIT(ctx->on_run);
 
-       ctx->shutdown_requested = ISC_FALSE;
-       ctx->running = ISC_FALSE;
-       ctx->want_shutdown = ISC_FALSE;
-       ctx->want_reload = ISC_FALSE;
-       ctx->blocked = ISC_FALSE;
+       ctx->shutdown_requested = false;
+       ctx->running = false;
+       ctx->want_shutdown = false;
+       ctx->want_reload = false;
+       ctx->blocked = false;
 
 #ifndef HAVE_SIGWAIT
        /*
@@ -448,8 +448,8 @@ evloop(isc__appctx_t *ctx) {
                isc_time_t when, now;
                struct timeval tv, *tvp;
                isc_socketwait_t *swait;
-               isc_boolean_t readytasks;
-               isc_boolean_t call_timer_dispatch = ISC_FALSE;
+               bool readytasks;
+               bool call_timer_dispatch = false;
 
                /*
                 * Check the reload (or suspend) case first for exiting the
@@ -460,7 +460,7 @@ evloop(isc__appctx_t *ctx) {
                 *   - there is a timer event
                 */
                if (ctx->want_reload) {
-                       ctx->want_reload = ISC_FALSE;
+                       ctx->want_reload = false;
                        return (ISC_R_RELOAD);
                }
 
@@ -469,7 +469,7 @@ evloop(isc__appctx_t *ctx) {
                        tv.tv_sec = 0;
                        tv.tv_usec = 0;
                        tvp = &tv;
-                       call_timer_dispatch = ISC_TRUE;
+                       call_timer_dispatch = true;
                } else {
                        result = isc__timermgr_nextevent(ctx->timermgr, &when);
                        if (result != ISC_R_SUCCESS)
@@ -480,7 +480,7 @@ evloop(isc__appctx_t *ctx) {
                                TIME_NOW(&now);
                                us = isc_time_microdiff(&when, &now);
                                if (us == 0)
-                                       call_timer_dispatch = ISC_TRUE;
+                                       call_timer_dispatch = true;
                                tv.tv_sec = us / 1000000;
                                tv.tv_usec = us % 1000000;
                                tvp = &tv;
@@ -527,14 +527,14 @@ evloop(isc__appctx_t *ctx) {
  * \brief True if we are currently executing in the recursive
  * event loop.
  */
-static isc_boolean_t in_recursive_evloop = ISC_FALSE;
+static bool in_recursive_evloop = false;
 
 /*!
  * \brief True if we are exiting the event loop as the result of
  * a call to isc_condition_signal() rather than a shutdown
  * or reload.
  */
-static isc_boolean_t signalled = ISC_FALSE;
+static bool signalled = false;
 
 isc_result_t
 isc__nothread_wait_hack(isc_condition_t *cp, isc_mutex_t *mp) {
@@ -544,21 +544,21 @@ isc__nothread_wait_hack(isc_condition_t *cp, isc_mutex_t *mp) {
        UNUSED(mp);
 
        INSIST(!in_recursive_evloop);
-       in_recursive_evloop = ISC_TRUE;
+       in_recursive_evloop = true;
 
        INSIST(*mp == 1); /* Mutex must be locked on entry. */
        --*mp;
 
        result = evloop(&isc_g_appctx);
        if (result == ISC_R_RELOAD)
-               isc_g_appctx.want_reload = ISC_TRUE;
+               isc_g_appctx.want_reload = true;
        if (signalled) {
-               isc_g_appctx.want_shutdown = ISC_FALSE;
-               signalled = ISC_FALSE;
+               isc_g_appctx.want_shutdown = false;
+               signalled = false;
        }
 
        ++*mp;
-       in_recursive_evloop = ISC_FALSE;
+       in_recursive_evloop = false;
        return (ISC_R_SUCCESS);
 }
 
@@ -569,8 +569,8 @@ isc__nothread_signal_hack(isc_condition_t *cp) {
 
        INSIST(in_recursive_evloop);
 
-       isc_g_appctx.want_shutdown = ISC_TRUE;
-       signalled = ISC_TRUE;
+       isc_g_appctx.want_shutdown = true;
+       signalled = true;
        return (ISC_R_SUCCESS);
 }
 #endif /* ISC_PLATFORM_USETHREADS */
@@ -598,7 +598,7 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
        LOCK(&ctx->lock);
 
        if (!ctx->running) {
-               ctx->running = ISC_TRUE;
+               ctx->running = true;
 
                /*
                 * Post any on-run events (in FIFO order).
@@ -663,18 +663,18 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
                        result = sigwait(&sset, &sig);
                        if (result == 0) {
                                if (sig == SIGINT || sig == SIGTERM)
-                                       ctx->want_shutdown = ISC_TRUE;
+                                       ctx->want_shutdown = true;
                                else if (sig == SIGHUP)
-                                       ctx->want_reload = ISC_TRUE;
+                                       ctx->want_reload = true;
                        }
 
 #else /* Using UnixWare sigwait semantics. */
                        sig = sigwait(&sset);
                        if (sig >= 0) {
                                if (sig == SIGINT || sig == SIGTERM)
-                                       ctx->want_shutdown = ISC_TRUE;
+                                       ctx->want_shutdown = true;
                                else if (sig == SIGHUP)
-                                       ctx->want_reload = ISC_TRUE;
+                                       ctx->want_reload = true;
                        }
 #endif /* HAVE_UNIXWARE_SIGWAIT */
                } else {
@@ -738,7 +738,7 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
 #endif /* HAVE_SIGWAIT */
 
                if (ctx->want_reload) {
-                       ctx->want_reload = ISC_FALSE;
+                       ctx->want_reload = false;
                        return (ISC_R_RELOAD);
                }
 
@@ -758,7 +758,7 @@ isc__app_run(void) {
 isc_result_t
 isc__app_ctxshutdown(isc_appctx_t *ctx0) {
        isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-       isc_boolean_t want_kill = ISC_TRUE;
+       bool want_kill = true;
 #ifdef ISC_PLATFORM_USETHREADS
        char strbuf[ISC_STRERRORSIZE];
 #endif /* ISC_PLATFORM_USETHREADS */
@@ -770,19 +770,19 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) {
        REQUIRE(ctx->running);
 
        if (ctx->shutdown_requested)
-               want_kill = ISC_FALSE;
+               want_kill = false;
        else
-               ctx->shutdown_requested = ISC_TRUE;
+               ctx->shutdown_requested = true;
 
        UNLOCK(&ctx->lock);
 
        if (want_kill) {
                if (isc_bind9 && ctx != &isc_g_appctx)
                        /* BIND9 internal, but using multiple contexts */
-                       ctx->want_shutdown = ISC_TRUE;
+                       ctx->want_shutdown = true;
                else {
 #ifndef ISC_PLATFORM_USETHREADS
-                       ctx->want_shutdown = ISC_TRUE;
+                       ctx->want_shutdown = true;
 #else /* ISC_PLATFORM_USETHREADS */
 #ifdef HAVE_LINUXTHREADS
                        if (isc_bind9) {
@@ -816,7 +816,7 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) {
                        else {
                                /* External, multiple contexts */
                                LOCK(&ctx->readylock);
-                               ctx->want_shutdown = ISC_TRUE;
+                               ctx->want_shutdown = true;
                                UNLOCK(&ctx->readylock);
                                SIGNAL(&ctx->ready);
                        }
@@ -835,7 +835,7 @@ isc__app_shutdown(void) {
 isc_result_t
 isc__app_ctxsuspend(isc_appctx_t *ctx0) {
        isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-       isc_boolean_t want_kill = ISC_TRUE;
+       bool want_kill = true;
 #ifdef ISC_PLATFORM_USETHREADS
        char strbuf[ISC_STRERRORSIZE];
 #endif
@@ -850,17 +850,17 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) {
         * Don't send the reload signal if we're shutting down.
         */
        if (ctx->shutdown_requested)
-               want_kill = ISC_FALSE;
+               want_kill = false;
 
        UNLOCK(&ctx->lock);
 
        if (want_kill) {
                if (isc_bind9 && ctx != &isc_g_appctx)
                        /* BIND9 internal, but using multiple contexts */
-                       ctx->want_reload = ISC_TRUE;
+                       ctx->want_reload = true;
                else {
 #ifndef ISC_PLATFORM_USETHREADS
-                       ctx->want_reload = ISC_TRUE;
+                       ctx->want_reload = true;
 #else /* ISC_PLATFORM_USETHREADS */
 #ifdef HAVE_LINUXTHREADS
                        if (isc_bind9) {
@@ -894,7 +894,7 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) {
                        else {
                                /* External, multiple contexts */
                                LOCK(&ctx->readylock);
-                               ctx->want_reload = ISC_TRUE;
+                               ctx->want_reload = true;
                                UNLOCK(&ctx->readylock);
                                SIGNAL(&ctx->ready);
                        }
@@ -932,7 +932,7 @@ isc__app_block(void) {
        REQUIRE(isc_g_appctx.running);
        REQUIRE(!isc_g_appctx.blocked);
 
-       isc_g_appctx.blocked = ISC_TRUE;
+       isc_g_appctx.blocked = true;
 #ifdef ISC_PLATFORM_USETHREADS
        blockedthread = pthread_self();
        RUNTIME_CHECK(sigemptyset(&sset) == 0 &&
@@ -951,7 +951,7 @@ isc__app_unblock(void) {
        REQUIRE(isc_g_appctx.running);
        REQUIRE(isc_g_appctx.blocked);
 
-       isc_g_appctx.blocked = ISC_FALSE;
+       isc_g_appctx.blocked = false;
 
 #ifdef ISC_PLATFORM_USETHREADS
        REQUIRE(blockedthread == pthread_self());
index 006cb4b63967d4e086842b4c94222bac557c507a..18eb9388859e44c9e42aa4e86a78bf48b926604c 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <sys/param.h> /* Openserver 5.0.6A and FD_SETSIZE */
 #include <sys/types.h>
 #include <sys/time.h>
@@ -97,7 +99,7 @@ get_from_filesource(isc_entropysource_t *source, uint32_t desired) {
  err:
        (void)close(fd);
        source->sources.file.handle = -1;
-       source->bad = ISC_TRUE;
+       source->bad = true;
 
  out:
        return (added);
@@ -228,7 +230,7 @@ get_from_usocketsource(isc_entropysource_t *source, uint32_t desired) {
 
  err:
        close(fd);
-       source->bad = ISC_TRUE;
+       source->bad = true;
        source->sources.usocket.status = isc_usocketsource_disconnected;
        source->sources.usocket.handle = -1;
 
@@ -241,7 +243,7 @@ get_from_usocketsource(isc_entropysource_t *source, uint32_t desired) {
  * pool.
  */
 static void
-fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
+fillpool(isc_entropy_t *ent, unsigned int desired, bool blocking) {
        unsigned int added;
        unsigned int remaining;
        unsigned int needed;
@@ -485,8 +487,8 @@ isc_result_t
 isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
        int fd;
        struct stat _stat;
-       isc_boolean_t is_usocket = ISC_FALSE;
-       isc_boolean_t is_connected = ISC_FALSE;
+       bool is_usocket = false;
+       bool is_connected = false;
        isc_result_t ret;
        isc_entropysource_t *source;
 
@@ -508,11 +510,11 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
         */
 #if defined(S_ISSOCK)
        if (S_ISSOCK(_stat.st_mode))
-               is_usocket = ISC_TRUE;
+               is_usocket = true;
 #endif
 #if defined(S_ISFIFO) && defined(sun)
        if (S_ISFIFO(_stat.st_mode))
-               is_usocket = ISC_TRUE;
+               is_usocket = true;
 #endif
        if (is_usocket)
                fd = socket(PF_UNIX, SOCK_STREAM, 0);
@@ -549,7 +551,7 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
                                goto closefd;
                        }
                } else
-                       is_connected = ISC_TRUE;
+                       is_connected = true;
        }
 
        source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
@@ -564,7 +566,7 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
        source->magic = SOURCE_MAGIC;
        source->ent = ent;
        source->total = 0;
-       source->bad = ISC_FALSE;
+       source->bad = false;
        memset(source->name, 0, sizeof(source->name));
        ISC_LINK_INIT(source, link);
        if (is_usocket) {
index 7104c26515dcb1529b2036c8b55e83c03e031171..a2445f3e70b598f7ba921bb27145f584581b5d1a 100644 (file)
@@ -20,5 +20,5 @@
 
 isc_result_t
 isc_errno_toresult(int err) {
-       return (isc___errno2result(err, ISC_FALSE, 0, 0));
+       return (isc___errno2result(err, false, 0, 0));
 }
index b0c87886abf8ae1a3ab180c7398d1efd7f2736b5..2f12bcc8bc0f0326ae25202f7e604cf60f616436 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <isc/result.h>
 #include <isc/strerror.h>
 #include <isc/util.h>
@@ -27,7 +29,7 @@
  * not already there.
  */
 isc_result_t
-isc___errno2result(int posixerrno, isc_boolean_t dolog,
+isc___errno2result(int posixerrno, bool dolog,
                   const char *file, unsigned int line)
 {
        char strbuf[ISC_STRERRORSIZE];
index 2fff9f292556a346107b1d6a95c50fb268a4675a..7733ab33e2625f54e2443e6c307e339e23b6081f 100644 (file)
 /* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
 
 #include <errno.h>             /* Provides errno. */
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/types.h>
 
 ISC_LANG_BEGINDECLS
 
-#define isc__errno2result(x) isc___errno2result(x, ISC_TRUE, __FILE__, __LINE__)
+#define isc__errno2result(x) isc___errno2result(x, true, __FILE__, __LINE__)
 
 isc_result_t
-isc___errno2result(int posixerrno, isc_boolean_t dolog,
+isc___errno2result(int posixerrno, bool dolog,
                   const char *file, unsigned int line);
 
 ISC_LANG_ENDDECLS
index 27f27f5a578867a5520ef6ca3eab90936868f5ed..64d9596471a7464f00941d56236cafd36a9c7917 100644 (file)
@@ -47,6 +47,7 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <time.h>              /* Required for utimes on some platforms. */
 #include <unistd.h>            /* Required for mkstemp on NetBSD. */
@@ -415,13 +416,13 @@ isc_file_rename(const char *oldname, const char *newname) {
                return (isc__errno2result(errno));
 }
 
-isc_boolean_t
+bool
 isc_file_exists(const char *pathname) {
        struct stat stats;
 
        REQUIRE(pathname != NULL);
 
-       return (ISC_TF(file_stats(pathname, &stats) == ISC_R_SUCCESS));
+       return (file_stats(pathname, &stats) == ISC_R_SUCCESS);
 }
 
 isc_result_t
@@ -477,26 +478,26 @@ isc_file_isdirectory(const char *filename) {
 }
 
 
-isc_boolean_t
+bool
 isc_file_isabsolute(const char *filename) {
        REQUIRE(filename != NULL);
-       return (ISC_TF(filename[0] == '/'));
+       return (filename[0] == '/');
 }
 
-isc_boolean_t
+bool
 isc_file_iscurrentdir(const char *filename) {
        REQUIRE(filename != NULL);
-       return (ISC_TF(filename[0] == '.' && filename[1] == '\0'));
+       return (filename[0] == '.' && filename[1] == '\0');
 }
 
-isc_boolean_t
+bool
 isc_file_ischdiridempotent(const char *filename) {
        REQUIRE(filename != NULL);
        if (isc_file_isabsolute(filename))
-               return (ISC_TRUE);
+               return (true);
        if (isc_file_iscurrentdir(filename))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 const char *
@@ -774,7 +775,7 @@ isc_file_sanitize(const char *dir, const char *base, const char *ext,
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 isc_file_isdirwritable(const char *path) {
-       return (ISC_TF(access(path, W_OK|X_OK) == 0));
+       return (access(path, W_OK|X_OK) == 0);
 }
index f33932e14d2b055ed1ce9384c70af165a6e6a8d9..e3cd0bf7138dad37113d6466fdc4e893b3a90d62 100644 (file)
@@ -15,6 +15,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include <stdbool.h>
 #include <errno.h>
 
 #include "errno2result.h"
@@ -29,7 +30,7 @@ isc_result_t
 isc_fsaccess_set(const char *path, isc_fsaccess_t access) {
        struct stat statb;
        mode_t mode;
-       isc_boolean_t is_dir = ISC_FALSE;
+       bool is_dir = false;
        isc_fsaccess_t bits;
        isc_result_t result;
 
@@ -37,7 +38,7 @@ isc_fsaccess_set(const char *path, isc_fsaccess_t access) {
                return (isc__errno2result(errno));
 
        if ((statb.st_mode & S_IFDIR) != 0)
-               is_dir = ISC_TRUE;
+               is_dir = true;
        else if ((statb.st_mode & S_IFREG) == 0)
                return (ISC_R_INVALIDFILE);
 
index e75ec0a11c69994c6349df3f096019c3b2bd6924..de6f060d6a93a1b0ef4c1c97a646667b80dc7204 100644 (file)
@@ -15,6 +15,7 @@
  * Obtain the list of network interfaces using the getifaddrs(3) library.
  */
 
+#include <stdbool.h>
 #include <ifaddrs.h>
 
 /*% Iterator Magic */
@@ -23,7 +24,7 @@
 #define VALID_IFITER(t)                ISC_MAGIC_VALID(t, IFITER_MAGIC)
 
 #ifdef __linux
-static isc_boolean_t seenv6 = ISC_FALSE;
+static bool seenv6 = false;
 #endif
 
 /*% Iterator structure */
@@ -142,7 +143,7 @@ internal_current(isc_interfaceiter_t *iter) {
 
 #ifdef __linux
        if (family == AF_INET6)
-               seenv6 = ISC_TRUE;
+               seenv6 = true;
 #endif
 
        memset(&iter->current, 0, sizeof(iter->current));
index b8a1fa3cdd1a3d7909297c5355e57080725fc518..0af0f26e7e55812b4038efe71570d39a5e730d4f 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <stdbool.h>
 
 #include <isc/print.h>
 
@@ -63,11 +64,11 @@ struct isc_interfaceiter {
        unsigned int            pos6;           /* Current offset in
                                                   SIOCGLIFCONF data */
        isc_result_t            result6;        /* Last result code. */
-       isc_boolean_t           first6;
+       bool            first6;
 #endif
 #ifdef HAVE_TRUCLUSTER
        int                     clua_context;   /* Cluster alias context */
-       isc_boolean_t           clua_done;
+       bool            clua_done;
        struct sockaddr         clua_sa;
 #endif
 #ifdef __linux
@@ -303,7 +304,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
        iter->pos6 = (unsigned int) -1;
        iter->result6 = ISC_R_NOMORE;
        iter->socket6 = -1;
-       iter->first6 = ISC_FALSE;
+       iter->first6 = false;
 #endif
 
        /*
@@ -358,7 +359,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
         */
 #ifdef HAVE_TRUCLUSTER
        iter->clua_context = -1;
-       iter->clua_done = ISC_TRUE;
+       iter->clua_done = true;
 #endif
 #ifdef __linux
        iter->proc = fopen("/proc/net/if_inet6", "r");
@@ -871,7 +872,7 @@ internal_next(isc_interfaceiter_t *iter) {
                if (iter->result6 != ISC_R_NOMORE)
                        return (iter->result6);
                if (iter->first6) {
-                       iter->first6 = ISC_FALSE;
+                       iter->first6 = false;
                        return (ISC_R_SUCCESS);
                }
        }
@@ -881,7 +882,7 @@ internal_next(isc_interfaceiter_t *iter) {
                clua_result = clua_getaliasaddress(&iter->clua_sa,
                                                   &iter->clua_context);
                if (clua_result != CLUA_SUCCESS)
-                       iter->clua_done = ISC_TRUE;
+                       iter->clua_done = true;
                return (ISC_R_SUCCESS);
        }
 #endif
@@ -914,13 +915,13 @@ void internal_first(isc_interfaceiter_t *iter) {
        iter->pos6 = 0;
        if (iter->result6 == ISC_R_NOMORE)
                iter->result6 = ISC_R_SUCCESS;
-       iter->first6 = ISC_TRUE;
+       iter->first6 = true;
 #endif
 #ifdef HAVE_TRUCLUSTER
        iter->clua_context = 0;
        clua_result = clua_getaliasaddress(&iter->clua_sa,
                                           &iter->clua_context);
-       iter->clua_done = ISC_TF(clua_result != CLUA_SUCCESS);
+       iter->clua_done = (clua_result != CLUA_SUCCESS);
 #endif
 #ifdef __linux
        linux_if_inet6_first(iter);
index b60bdf27eb0b23e5cb23ef8ca7aaec1a88d65898..4dc8745f8418e0f8773ff299288eaa4128b3324e 100644 (file)
@@ -15,6 +15,7 @@
 
 /*! \file */
 
+#include <stdbool.h>
 #include <termios.h>
 
 #include <isc/lang.h>
@@ -37,7 +38,7 @@ isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleepseconds);
 isc_result_t
 isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp);
 
-isc_boolean_t
+bool
 isc_keyboard_canceled(isc_keyboard_t *keyboard);
 
 ISC_LANG_ENDDECLS
index 59b376ec2ef8a3981a8faefdce8214b0274d9d6e..b864c29a48f91014bd272621d628601bb37ec3b2 100644 (file)
@@ -16,6 +16,7 @@
 /*! \file */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/types.h>
@@ -61,10 +62,10 @@ isc_interval_set(isc_interval_t *i,
  *\li  nanoseconds < 1000000000.
  */
 
-isc_boolean_t
+bool
 isc_interval_iszero(const isc_interval_t *i);
 /*%<
- * Returns ISC_TRUE iff. 'i' is the zero interval.
+ * Returns true iff. 'i' is the zero interval.
  *
  * Requires:
  *
@@ -121,10 +122,10 @@ isc_time_settoepoch(isc_time_t *t);
  *\li  't' is a valid pointer.
  */
 
-isc_boolean_t
+bool
 isc_time_isepoch(const isc_time_t *t);
 /*%<
- * Returns ISC_TRUE iff. 't' is the epoch ("time zero").
+ * Returns true iff. 't' is the epoch ("time zero").
  *
  * Requires:
  *
index 8114d9edbcf13063f130b4584ff81a64c0ea2cbd..cb5f11630e25c312a76e0a207bba96b6e9964a33 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/time.h>
@@ -113,7 +115,7 @@ isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 isc_keyboard_canceled(isc_keyboard_t *keyboard) {
-       return (ISC_TF(keyboard->result == ISC_R_CANCELED));
+       return (keyboard->result == ISC_R_CANCELED);
 }
index 63b0910921dffae40c58764472502de39e5c6f3b..efe17bd23a748982b836f0ea750e17aab118428e 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/uio.h>
 
 #include <errno.h>
+#include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
 
@@ -494,7 +495,7 @@ make_nonblock(int fd) {
        return (ISC_R_SUCCESS);
 }
 
-static isc_boolean_t
+static bool
 cmsgsend(int s, int level, int type, struct addrinfo *res) {
        char strbuf[ISC_STRERRORSIZE];
        struct sockaddr_storage ss;
@@ -515,7 +516,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
                              "bind: %s", strbuf);
-               return (ISC_FALSE);
+               return (false);
        }
 
        if (getsockname(s, (struct sockaddr *)&ss, &len) < 0) {
@@ -523,7 +524,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
                              ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(10),
                              "getsockname: %s", strbuf);
-               return (ISC_FALSE);
+               return (false);
        }
 
        iovec.iov_base = buf;
@@ -595,7 +596,7 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
                                         "sendmsg() with %s=%02x %s: %s",
                                         typestr, dscp, msgstr, strbuf);
                }
-               return (ISC_FALSE);
+               return (false);
        }
 
        /*
@@ -617,9 +618,9 @@ cmsgsend(int s, int level, int type, struct addrinfo *res) {
        msg.msg_flags = 0;
 
        if (recvmsg(s, &msg, 0) < 0)
-               return (ISC_FALSE);
+               return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 #endif
 #endif
index 3c1d4c80ff4fdda6b4ce8f881f4ea82d84dfbb22..6d5c5aae2458c1308f36b7beaba995d05d72fcee 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <sys/types.h>
 #include <sys/time.h>  /* Required on some systems for <sys/resource.h>. */
@@ -120,8 +121,8 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
                 * ISC_PLATFORM_RLIMITTYPE is not overflowed.
                 */
                isc_resourcevalue_t rlim_max;
-               isc_boolean_t rlim_t_is_signed =
-                       ISC_TF(((double)(ISC_PLATFORM_RLIMITTYPE)-1) < 0);
+               bool rlim_t_is_signed =
+                       (((double)(ISC_PLATFORM_RLIMITTYPE)-1) < 0);
 
                if (rlim_t_is_signed)
                        rlim_max = ~((ISC_PLATFORM_RLIMITTYPE)1 <<
index c169bcbb7ce96acc89b09a1ad0bf8c9852d8ca91..20d13c765ed6fd47e5dea27408bb158c6b19355a 100644 (file)
@@ -517,7 +517,7 @@ static void build_msghdr_send(isc__socket_t *, char *, isc_socketevent_t *,
 static void build_msghdr_recv(isc__socket_t *, char *, isc_socketevent_t *,
                              struct msghdr *, struct iovec *, size_t *);
 #ifdef USE_WATCHER_THREAD
-static isc_boolean_t process_ctlfd(isc__socketmgr_t *manager);
+static bool process_ctlfd(isc__socketmgr_t *manager);
 #endif
 static void setdscp(isc__socket_t *sock, isc_dscp_t dscp);
 
@@ -580,7 +580,7 @@ isc_socket_socketevent(isc_mem_t *mctx, void *sender,
                       void *arg);
 
 void
-isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active);
+isc__socket_cleanunix(isc_sockaddr_t *sockaddr, bool active);
 isc_result_t
 isc__socket_permunix(isc_sockaddr_t *sockaddr, uint32_t perm,
                     uint32_t owner, uint32_t group);
@@ -606,10 +606,10 @@ void
 isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how);
 isc_sockettype_t
 isc__socket_gettype(isc_socket_t *sock);
-isc_boolean_t
+bool
 isc__socket_isbound(isc_socket_t *sock);
 void
-isc__socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes);
+isc__socket_ipv6only(isc_socket_t *sock, bool yes);
 void
 isc__socket_dscp(isc_socket_t *sock, isc_dscp_t dscp);
 isc_result_t
@@ -2491,7 +2491,7 @@ set_rcvbuf(void) {
  */
 
 static isc_once_t         bsdcompat_once = ISC_ONCE_INIT;
-isc_boolean_t bsdcompat = ISC_TRUE;
+bool bsdcompat = true;
 
 static void
 clear_bsdcompat(void) {
@@ -2508,7 +2508,7 @@ clear_bsdcompat(void) {
         if (*endp == '.') {
                minor = strtol(endp+1, &endp, 10);
                if ((major > 2) || ((major == 2) && (minor >= 4))) {
-                       bsdcompat = ISC_FALSE;
+                       bsdcompat = false;
                }
         }
 #endif /* __linux __ */
@@ -3217,7 +3217,7 @@ isc__socket_attach(isc_socket_t *sock0, isc_socket_t **socketp) {
 void
 isc__socket_detach(isc_socket_t **socketp) {
        isc__socket_t *sock;
-       isc_boolean_t kill_socket = ISC_FALSE;
+       bool kill_socket = false;
 
        REQUIRE(socketp != NULL);
        sock = (isc__socket_t *)*socketp;
@@ -3227,7 +3227,7 @@ isc__socket_detach(isc_socket_t **socketp) {
        REQUIRE(sock->references > 0);
        sock->references--;
        if (sock->references == 0)
-               kill_socket = ISC_TRUE;
+               kill_socket = true;
        UNLOCK(&sock->lock);
 
        if (kill_socket)
@@ -3956,12 +3956,12 @@ internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) {
  * and unlocking twice if both reads and writes are possible.
  */
 static void
-process_fd(isc__socketmgr_t *manager, int fd, isc_boolean_t readable,
-          isc_boolean_t writeable)
+process_fd(isc__socketmgr_t *manager, int fd, bool readable,
+          bool writeable)
 {
        isc__socket_t *sock;
-       isc_boolean_t unlock_sock;
-       isc_boolean_t unwatch_read = ISC_FALSE, unwatch_write = ISC_FALSE;
+       bool unlock_sock;
+       bool unwatch_read = false, unwatch_write = false;
        int lockid = FDLOCK_ID(fd);
 
        /*
@@ -3977,13 +3977,13 @@ process_fd(isc__socketmgr_t *manager, int fd, isc_boolean_t readable,
        }
 
        sock = manager->fds[fd];
-       unlock_sock = ISC_FALSE;
+       unlock_sock = false;
        if (readable) {
                if (sock == NULL) {
-                       unwatch_read = ISC_TRUE;
+                       unwatch_read = true;
                        goto check_write;
                }
-               unlock_sock = ISC_TRUE;
+               unlock_sock = true;
                LOCK(&sock->lock);
                if (!SOCK_DEAD(sock)) {
                        if (sock->listener)
@@ -3991,16 +3991,16 @@ process_fd(isc__socketmgr_t *manager, int fd, isc_boolean_t readable,
                        else
                                dispatch_recv(sock);
                }
-               unwatch_read = ISC_TRUE;
+               unwatch_read = true;
        }
 check_write:
        if (writeable) {
                if (sock == NULL) {
-                       unwatch_write = ISC_TRUE;
+                       unwatch_write = true;
                        goto unlock_fd;
                }
                if (!unlock_sock) {
-                       unlock_sock = ISC_TRUE;
+                       unlock_sock = true;
                        LOCK(&sock->lock);
                }
                if (!SOCK_DEAD(sock)) {
@@ -4009,7 +4009,7 @@ check_write:
                        else
                                dispatch_send(sock);
                }
-               unwatch_write = ISC_TRUE;
+               unwatch_write = true;
        }
        if (unlock_sock)
                UNLOCK(&sock->lock);
@@ -4024,13 +4024,13 @@ check_write:
 }
 
 #ifdef USE_KQUEUE
-static isc_boolean_t
+static bool
 process_fds(isc__socketmgr_t *manager, struct kevent *events, int nevents) {
        int i;
-       isc_boolean_t readable, writable;
-       isc_boolean_t done = ISC_FALSE;
+       bool readable, writable;
+       bool done = false;
 #ifdef USE_WATCHER_THREAD
-       isc_boolean_t have_ctlevent = ISC_FALSE;
+       bool have_ctlevent = false;
 #endif
 
        if (nevents == manager->nevents) {
@@ -4049,12 +4049,12 @@ process_fds(isc__socketmgr_t *manager, struct kevent *events, int nevents) {
                REQUIRE(events[i].ident < manager->maxsocks);
 #ifdef USE_WATCHER_THREAD
                if (events[i].ident == (uintptr_t)manager->pipe_fds[0]) {
-                       have_ctlevent = ISC_TRUE;
+                       have_ctlevent = true;
                        continue;
                }
 #endif
-               readable = ISC_TF(events[i].filter == EVFILT_READ);
-               writable = ISC_TF(events[i].filter == EVFILT_WRITE);
+               readable = (events[i].filter == EVFILT_READ);
+               writable = (events[i].filter == EVFILT_WRITE);
                process_fd(manager, events[i].ident, readable, writable);
        }
 
@@ -4066,13 +4066,13 @@ process_fds(isc__socketmgr_t *manager, struct kevent *events, int nevents) {
        return (done);
 }
 #elif defined(USE_EPOLL)
-static isc_boolean_t
+static bool
 process_fds(isc__socketmgr_t *manager, struct epoll_event *events, int nevents)
 {
        int i;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 #ifdef USE_WATCHER_THREAD
-       isc_boolean_t have_ctlevent = ISC_FALSE;
+       bool have_ctlevent = false;
 #endif
 
        if (nevents == manager->nevents) {
@@ -4086,7 +4086,7 @@ process_fds(isc__socketmgr_t *manager, struct epoll_event *events, int nevents)
                REQUIRE(events[i].data.fd < (int)manager->maxsocks);
 #ifdef USE_WATCHER_THREAD
                if (events[i].data.fd == manager->pipe_fds[0]) {
-                       have_ctlevent = ISC_TRUE;
+                       have_ctlevent = true;
                        continue;
                }
 #endif
@@ -4115,12 +4115,12 @@ process_fds(isc__socketmgr_t *manager, struct epoll_event *events, int nevents)
        return (done);
 }
 #elif defined(USE_DEVPOLL)
-static isc_boolean_t
+static bool
 process_fds(isc__socketmgr_t *manager, struct pollfd *events, int nevents) {
        int i;
-       isc_boolean_t done = ISC_FALSE;
+       bool done = false;
 #ifdef USE_WATCHER_THREAD
-       isc_boolean_t have_ctlevent = ISC_FALSE;
+       bool have_ctlevent = false;
 #endif
 
        if (nevents == manager->nevents) {
@@ -4134,7 +4134,7 @@ process_fds(isc__socketmgr_t *manager, struct pollfd *events, int nevents) {
                REQUIRE(events[i].fd < (int)manager->maxsocks);
 #ifdef USE_WATCHER_THREAD
                if (events[i].fd == manager->pipe_fds[0]) {
-                       have_ctlevent = ISC_TRUE;
+                       have_ctlevent = true;
                        continue;
                }
 #endif
@@ -4171,7 +4171,7 @@ process_fds(isc__socketmgr_t *manager, int maxfd, fd_set *readfds,
 #endif
 
 #ifdef USE_WATCHER_THREAD
-static isc_boolean_t
+static bool
 process_ctlfd(isc__socketmgr_t *manager) {
        int msg, fd;
 
@@ -4197,7 +4197,7 @@ process_ctlfd(isc__socketmgr_t *manager) {
                 * more work first.
                 */
                if (msg == SELECT_POKE_SHUTDOWN)
-                       return (ISC_TRUE);
+                       return (true);
 
                /*
                 * This is a wakeup on a socket.  Look
@@ -4208,7 +4208,7 @@ process_ctlfd(isc__socketmgr_t *manager) {
                wakeup_socket(manager, fd, msg);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 /*
@@ -4221,7 +4221,7 @@ process_ctlfd(isc__socketmgr_t *manager) {
 static isc_threadresult_t
 watcher(void *uap) {
        isc__socketmgr_t *manager = uap;
-       isc_boolean_t done;
+       bool done;
        int cc;
 #ifdef USE_KQUEUE
        const char *fnname = "kevent()";
@@ -4248,7 +4248,7 @@ watcher(void *uap) {
         */
        ctlfd = manager->pipe_fds[0];
 #endif
-       done = ISC_FALSE;
+       done = false;
        while (!done) {
                do {
 #ifdef USE_KQUEUE
@@ -4942,7 +4942,7 @@ socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
            unsigned int flags)
 {
        int io_state;
-       isc_boolean_t have_lock = ISC_FALSE;
+       bool have_lock = false;
        isc_task_t *ntask = NULL;
        isc_result_t result = ISC_R_SUCCESS;
 
@@ -4952,7 +4952,7 @@ socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
                io_state = doio_recv(sock, dev);
        } else {
                LOCK(&sock->lock);
-               have_lock = ISC_TRUE;
+               have_lock = true;
 
                if (ISC_LIST_EMPTY(sock->recv_list))
                        io_state = doio_recv(sock, dev);
@@ -4973,7 +4973,7 @@ socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
 
                if (!have_lock) {
                        LOCK(&sock->lock);
-                       have_lock = ISC_TRUE;
+                       have_lock = true;
                }
 
                /*
@@ -5125,7 +5125,7 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
            unsigned int flags)
 {
        int io_state;
-       isc_boolean_t have_lock = ISC_FALSE;
+       bool have_lock = false;
        isc_task_t *ntask = NULL;
        isc_result_t result = ISC_R_SUCCESS;
 
@@ -5155,7 +5155,7 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
                io_state = doio_send(sock, dev);
        else {
                LOCK(&sock->lock);
-               have_lock = ISC_TRUE;
+               have_lock = true;
 
                if (ISC_LIST_EMPTY(sock->send_list))
                        io_state = doio_send(sock, dev);
@@ -5175,7 +5175,7 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
 
                        if (!have_lock) {
                                LOCK(&sock->lock);
-                               have_lock = ISC_TRUE;
+                               have_lock = true;
                        }
 
                        /*
@@ -5336,7 +5336,7 @@ isc__socket_sendto2(isc_socket_t *sock0, isc_region_t *region,
 }
 
 void
-isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) {
+isc__socket_cleanunix(isc_sockaddr_t *sockaddr, bool active) {
 #ifdef ISC_PLATFORM_HAVESYSUNH
        int s;
        struct stat sb;
@@ -5645,7 +5645,7 @@ set_tcp_fastopen(isc__socket_t *sock, unsigned int backlog) {
 #define SYSCTL_TFO "net.inet.tcp.fastopen.enabled"
        unsigned int enabled;
        size_t enabledlen = sizeof(enabled);
-       static isc_boolean_t tfo_notice_logged = ISC_FALSE;
+       static bool tfo_notice_logged = false;
 
        if (sysctlbyname(SYSCTL_TFO, &enabled, &enabledlen, NULL, 0) < 0) {
                /*
@@ -5663,7 +5663,7 @@ set_tcp_fastopen(isc__socket_t *sock, unsigned int backlog) {
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_NOTICE,
                                      "TCP_FASTOPEN support is disabled by "
                                      "sysctl (" SYSCTL_TFO " = 0)");
-                       tfo_notice_logged = ISC_TRUE;
+                       tfo_notice_logged = true;
                }
                return;
        }
@@ -5747,7 +5747,7 @@ isc__socket_accept(isc_socket_t *sock0,
        isc_task_t *ntask = NULL;
        isc__socket_t *nsock;
        isc_result_t result;
-       isc_boolean_t do_poke = ISC_FALSE;
+       bool do_poke = false;
 
        REQUIRE(VALID_SOCKET(sock));
        manager = sock->manager;
@@ -5801,7 +5801,7 @@ isc__socket_accept(isc_socket_t *sock0,
         * bit of time waking it up now or later won't matter all that much.
         */
        if (ISC_LIST_EMPTY(sock->accept_list))
-               do_poke = ISC_TRUE;
+               do_poke = true;
 
        ISC_LIST_ENQUEUE(sock->accept_list, dev, ev_link);
 
@@ -6277,22 +6277,22 @@ isc__socket_gettype(isc_socket_t *sock0) {
        return (sock->type);
 }
 
-isc_boolean_t
+bool
 isc__socket_isbound(isc_socket_t *sock0) {
        isc__socket_t *sock = (isc__socket_t *)sock0;
-       isc_boolean_t val;
+       bool val;
 
        REQUIRE(VALID_SOCKET(sock));
 
        LOCK(&sock->lock);
-       val = ((sock->bound) ? ISC_TRUE : ISC_FALSE);
+       val = ((sock->bound) ? true : false);
        UNLOCK(&sock->lock);
 
        return (val);
 }
 
 void
-isc__socket_ipv6only(isc_socket_t *sock0, isc_boolean_t yes) {
+isc__socket_ipv6only(isc_socket_t *sock0, bool yes) {
        isc__socket_t *sock = (isc__socket_t *)sock0;
 #if defined(IPV6_V6ONLY)
        int onoff = yes ? 1 : 0;
index 09cc51c7b45fc61d9f5fa11b6289935e71bb4152..989bde4620884fa001e708c692592a0ba8d28012 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stddef.h>    /* NULL */
 #include <stdlib.h>    /* NULL */
 #include <syslog.h>
 #if ISC_FIX_TV_USEC
 static inline void
 fix_tv_usec(struct timeval *tv) {
-       isc_boolean_t fixed = ISC_FALSE;
+       bool fixed = false;
 
        if (tv->tv_usec < 0) {
-               fixed = ISC_TRUE;
+               fixed = true;
                do {
                        tv->tv_sec -= 1;
                        tv->tv_usec += US_PER_S;
                } while (tv->tv_usec < 0);
        } else if (tv->tv_usec >= US_PER_S) {
-               fixed = ISC_TRUE;
+               fixed = true;
                do {
                        tv->tv_sec += 1;
                        tv->tv_usec -= US_PER_S;
index aff45c59692b9376ac43a193be7c68333673b3ec..8edc9df7fadd18018e6435e0c3e96f3059a3e244 100644 (file)
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <syslog.h>
 #include <time.h>
@@ -58,16 +59,16 @@ const isc_interval_t * const isc_interval_zero = &zero_interval;
 #if ISC_FIX_TV_USEC
 static inline void
 fix_tv_usec(struct timeval *tv) {
-       isc_boolean_t fixed = ISC_FALSE;
+       bool fixed = false;
 
        if (tv->tv_usec < 0) {
-               fixed = ISC_TRUE;
+               fixed = true;
                do {
                        tv->tv_sec -= 1;
                        tv->tv_usec += US_PER_S;
                } while (tv->tv_usec < 0);
        } else if (tv->tv_usec >= US_PER_S) {
-               fixed = ISC_TRUE;
+               fixed = true;
                do {
                        tv->tv_sec += 1;
                        tv->tv_usec -= US_PER_S;
@@ -92,15 +93,15 @@ isc_interval_set(isc_interval_t *i,
        i->nanoseconds = nanoseconds;
 }
 
-isc_boolean_t
+bool
 isc_interval_iszero(const isc_interval_t *i) {
        REQUIRE(i != NULL);
        INSIST(i->nanoseconds < NS_PER_S);
 
        if (i->seconds == 0 && i->nanoseconds == 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 
@@ -128,15 +129,15 @@ isc_time_settoepoch(isc_time_t *t) {
        t->nanoseconds = 0;
 }
 
-isc_boolean_t
+bool
 isc_time_isepoch(const isc_time_t *t) {
        REQUIRE(t != NULL);
        INSIST(t->nanoseconds < NS_PER_S);
 
        if (t->seconds == 0 && t->nanoseconds == 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 
index fffa454b619f19fe53de90afab145aea8c1c3d4f..35274a271510570eb77d583f6f80ca1091be5e87 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <sys/types.h>
 
+#include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -21,7 +22,6 @@
 #include <process.h>
 
 #include <isc/app.h>
-#include <isc/boolean.h>
 #include <isc/condition.h>
 #include <isc/mem.h>
 #include <isc/msgs.h>
@@ -90,18 +90,18 @@ typedef struct isc__appctx {
        isc_mem_t               *mctx;
        isc_eventlist_t         on_run;
        isc_mutex_t             lock;
-       isc_boolean_t           shutdown_requested;
-       isc_boolean_t           running;
+       bool            shutdown_requested;
+       bool            running;
        /*
         * We assume that 'want_shutdown' can be read and written atomically.
         */
-       isc_boolean_t           want_shutdown;
+       bool            want_shutdown;
        /*
         * We assume that 'want_reload' can be read and written atomically.
         */
-       isc_boolean_t           want_reload;
+       bool            want_reload;
 
-       isc_boolean_t           blocked;
+       bool            blocked;
 
        HANDLE                  hEvents[NUM_EVENTS];
 
@@ -163,11 +163,11 @@ isc__app_ctxstart(isc_appctx_t *ctx0) {
        if (result != ISC_R_SUCCESS)
                return (result);
 
-       ctx->shutdown_requested = ISC_FALSE;
-       ctx->running = ISC_FALSE;
-       ctx->want_shutdown = ISC_FALSE;
-       ctx->want_reload = ISC_FALSE;
-       ctx->blocked  = ISC_FALSE;
+       ctx->shutdown_requested = false;
+       ctx->running = false;
+       ctx->want_shutdown = false;
+       ctx->want_reload = false;
+       ctx->blocked  = false;
 
        /* Create the reload event in a non-signaled state */
        ctx->hEvents[RELOAD_EVENT] = CreateEvent(NULL, FALSE, FALSE, NULL);
@@ -252,7 +252,7 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
        LOCK(&ctx->lock);
 
        if (!ctx->running) {
-               ctx->running = ISC_TRUE;
+               ctx->running = true;
 
                /*
                 * Post any on-run events (in FIFO order).
@@ -289,17 +289,17 @@ isc__app_ctxrun(isc_appctx_t *ctx0) {
                         */
                        switch (WaitSucceededIndex(dwWaitResult)) {
                        case RELOAD_EVENT:
-                               ctx->want_reload = ISC_TRUE;
+                               ctx->want_reload = true;
                                break;
 
                        case SHUTDOWN_EVENT:
-                               ctx->want_shutdown = ISC_TRUE;
+                               ctx->want_shutdown = true;
                                break;
                        }
                }
 
                if (ctx->want_reload) {
-                       ctx->want_reload = ISC_FALSE;
+                       ctx->want_reload = false;
                        return (ISC_R_RELOAD);
                }
 
@@ -318,7 +318,7 @@ isc__app_run(void) {
 isc_result_t
 isc__app_ctxshutdown(isc_appctx_t *ctx0) {
        isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-       isc_boolean_t want_kill = ISC_TRUE;
+       bool want_kill = true;
 
        REQUIRE(VALID_APPCTX(ctx));
 
@@ -327,9 +327,9 @@ isc__app_ctxshutdown(isc_appctx_t *ctx0) {
        REQUIRE(ctx->running);
 
        if (ctx->shutdown_requested)
-               want_kill = ISC_FALSE;          /* We're only signaling once */
+               want_kill = false;              /* We're only signaling once */
        else
-               ctx->shutdown_requested = ISC_TRUE;
+               ctx->shutdown_requested = true;
 
        UNLOCK(&ctx->lock);
 
@@ -347,7 +347,7 @@ isc__app_shutdown(void) {
 isc_result_t
 isc__app_ctxsuspend(isc_appctx_t *ctx0) {
        isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-       isc_boolean_t want_kill = ISC_TRUE;
+       bool want_kill = true;
 
        REQUIRE(VALID_APPCTX(ctx));
 
@@ -359,7 +359,7 @@ isc__app_ctxsuspend(isc_appctx_t *ctx0) {
         * Don't send the reload signal if we're shutting down.
         */
        if (ctx->shutdown_requested)
-               want_kill = ISC_FALSE;
+               want_kill = false;
 
        UNLOCK(&ctx->lock);
 
@@ -393,7 +393,7 @@ isc__app_block(void) {
        REQUIRE(isc_g_appctx.running);
        REQUIRE(!isc_g_appctx.blocked);
 
-       isc_g_appctx.blocked = ISC_TRUE;
+       isc_g_appctx.blocked = true;
        blockedthread = GetCurrentThread();
 }
 
@@ -402,7 +402,7 @@ isc__app_unblock(void) {
        REQUIRE(isc_g_appctx.running);
        REQUIRE(isc_g_appctx.blocked);
 
-       isc_g_appctx.blocked = ISC_FALSE;
+       isc_g_appctx.blocked = false;
        REQUIRE(blockedthread == GetCurrentThread());
 }
 
index 394034ad58f22b27c9564e9a709c559238d71f89..78875081cb98255e9cbe1d4dc49a385ca05cf8a3 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/condition.h>
 #include <isc/assertions.h>
@@ -138,7 +139,7 @@ isc_result_t
 isc_condition_broadcast(isc_condition_t *cond) {
 
        isc_condition_thread_t *threadcond;
-       isc_boolean_t failed = ISC_FALSE;
+       bool failed = false;
 
        /*
         * Unlike pthreads, the caller MUST hold the lock associated with
@@ -154,7 +155,7 @@ isc_condition_broadcast(isc_condition_t *cond) {
             threadcond = ISC_LIST_NEXT(threadcond, link)) {
 
                if (!SetEvent(threadcond->handle[LBROADCAST]))
-                       failed = ISC_TRUE;
+                       failed = true;
        }
 
        if (failed)
index 16a424ee0f7a846beb38bd20732ee8a369e1b4b0..5db2c235512f4e6d255f494aaaf171275c8c4865 100644 (file)
@@ -43,7 +43,7 @@ isc_dir_init(isc_dir_t *dir) {
        dir->entry.length = 0;
        memset(&(dir->entry.find_data), 0, sizeof(dir->entry.find_data));
 
-       dir->entry_filled = ISC_FALSE;
+       dir->entry_filled = false;
        dir->search_handle = INVALID_HANDLE_VALUE;
 
        dir->magic = ISC_DIR_MAGIC;
@@ -100,7 +100,7 @@ isc_dir_read(isc_dir_t *dir) {
                /*
                 * start_directory() already filled in the first entry.
                 */
-               dir->entry_filled = ISC_FALSE;
+               dir->entry_filled = false;
 
        else {
                /*
@@ -176,7 +176,7 @@ start_directory(isc_dir_t *dir)
        REQUIRE(VALID_DIR(dir));
        REQUIRE(dir->search_handle == INVALID_HANDLE_VALUE);
 
-       dir->entry_filled = ISC_FALSE;
+       dir->entry_filled = false;
 
        /*
         * Open stream and retrieve first file.
@@ -210,7 +210,7 @@ start_directory(isc_dir_t *dir)
                sizeof(dir->entry.name));
        dir->entry.length = strlen(dir->entry.name);
 
-       dir->entry_filled = ISC_TRUE;
+       dir->entry_filled = true;
 
        return (ISC_R_SUCCESS);
 }
index 7f36a6c2c31793bdae162d442dd02e3a95854c19..2480c025926c3cb22a931dfbcd9c2a1be961dfae 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <windows.h>
 #include <wincrypt.h>
 
@@ -56,7 +58,7 @@ get_from_filesource(isc_entropysource_t *source, uint32_t desired) {
                ndesired = ISC_MIN(desired, sizeof(buf));
                if (!CryptGenRandom(hcryptprov, (DWORD)ndesired, buf)) {
                        CryptReleaseContext(hcryptprov, 0);
-                       source->bad = ISC_TRUE;
+                       source->bad = true;
                        goto out;
                }
 
@@ -76,7 +78,7 @@ get_from_filesource(isc_entropysource_t *source, uint32_t desired) {
  * pool.
  */
 static void
-fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
+fillpool(isc_entropy_t *ent, unsigned int desired, bool blocking) {
        unsigned int added;
        unsigned int remaining;
        unsigned int needed;
@@ -270,7 +272,7 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
        source->type = ENTROPY_SOURCETYPE_FILE;
        source->ent = ent;
        source->total = 0;
-       source->bad = ISC_FALSE;
+       source->bad = false;
        memset(source->name, 0, sizeof(source->name));
        ISC_LINK_INIT(source, link);
        source->sources.file.handle = hcryptprov;
@@ -295,7 +297,3 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
 
        return (ret);
 }
-
-
-
-
index 864be74764f2d5515563b2ffdf4e401ea17af5fe..74ebf0c5f8792a0cda45cc9da663a75dcced7291 100644 (file)
@@ -17,5 +17,5 @@
 
 isc_result_t
 isc_errno_toresult(int err) {
-       return (isc__errno2resultx(err, ISC_FALSE, 0, 0));
+       return (isc__errno2resultx(err, false, 0, 0));
 }
index 800e5819df5642366e2bde0db47772fc424539e6..83dbb4e4e397f8d0a73fb8327fe2084eef58a0af 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <config.h>
 
+#include <stdbool.h>
+
 #include <winsock2.h>
 #include "errno2result.h"
 #include <isc/result.h>
@@ -25,7 +27,7 @@
  * not already there.
  */
 isc_result_t
-isc__errno2resultx(int posixerrno, isc_boolean_t dolog,
+isc__errno2resultx(int posixerrno, bool dolog,
                   const char *file, int line)
 {
        char strbuf[ISC_STRERRORSIZE];
index 26ed3e9b104d0c39b2b7edc367795766edcaf21c..99752ae5d5bea3ec183bc4056663dd869fe310c3 100644 (file)
@@ -16,6 +16,7 @@
 /* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
 
 #include <errno.h>             /* Provides errno. */
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/types.h>
 ISC_LANG_BEGINDECLS
 
 #define isc__errno2result(posixerrno) \
-       isc__errno2resultx(posixerrno, ISC_TRUE, __FILE__, __LINE__)
+       isc__errno2resultx(posixerrno, true, __FILE__, __LINE__)
 
 isc_result_t
-isc__errno2resultx(int posixerrno, isc_boolean_t dolog,
+isc__errno2resultx(int posixerrno, bool dolog,
                   const char *file, int line);
 
 ISC_LANG_ENDDECLS
index 70b6a4dd91dd67846f6b584f4e94d413659c011b..d281ba1b69cbea7503d3e087619b310de0818a62 100644 (file)
@@ -15,6 +15,7 @@
 #undef rename
 #include <errno.h>
 #include <limits.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <io.h>
 #include <process.h>
@@ -44,7 +45,7 @@ static const char alphnum[] =
  *
  */
 static int
-gettemp(char *path, isc_boolean_t binary, int *doopen) {
+gettemp(char *path, bool binary, int *doopen) {
        char *start, *trv;
        struct stat sbuf;
        int flags = O_CREAT|O_EXCL|O_RDWR;
@@ -110,7 +111,7 @@ gettemp(char *path, isc_boolean_t binary, int *doopen) {
 }
 
 static int
-mkstemp(char *path, isc_boolean_t binary) {
+mkstemp(char *path, bool binary) {
        int fd;
 
        return (gettemp(path, binary, &fd) ? fd : -1);
@@ -206,7 +207,7 @@ isc_file_safemovefile(const char *oldname, const char *newname) {
                exists = TRUE;
                strlcpy(buf, newname, sizeof(buf));
                strlcat(buf, ".XXXXX", sizeof(buf));
-               tmpfd = mkstemp(buf, ISC_TRUE);
+               tmpfd = mkstemp(buf, true);
                if (tmpfd > 0)
                        _close(tmpfd);
                (void)DeleteFile(buf);
@@ -361,7 +362,7 @@ isc_file_renameunique(const char *file, char *templet) {
        REQUIRE(file != NULL);
        REQUIRE(templet != NULL);
 
-       fd = mkstemp(templet, ISC_TRUE);
+       fd = mkstemp(templet, true);
        if (fd == -1)
                result = isc__errno2result(errno);
        else
@@ -378,7 +379,7 @@ isc_file_renameunique(const char *file, char *templet) {
 }
 
 static isc_result_t
-openuniquemode(char *templet, int mode, isc_boolean_t binary, FILE **fp) {
+openuniquemode(char *templet, int mode, bool binary, FILE **fp) {
        int fd;
        FILE *f;
        isc_result_t result = ISC_R_SUCCESS;
@@ -414,35 +415,35 @@ openuniquemode(char *templet, int mode, isc_boolean_t binary, FILE **fp) {
 isc_result_t
 isc_file_openuniqueprivate(char *templet, FILE **fp) {
        int mode = _S_IREAD | _S_IWRITE;
-       return (openuniquemode(templet, mode, ISC_FALSE, fp));
+       return (openuniquemode(templet, mode, false, fp));
 }
 
 isc_result_t
 isc_file_openunique(char *templet, FILE **fp) {
        int mode = _S_IREAD | _S_IWRITE;
-       return (openuniquemode(templet, mode, ISC_FALSE, fp));
+       return (openuniquemode(templet, mode, false, fp));
 }
 
 isc_result_t
 isc_file_openuniquemode(char *templet, int mode, FILE **fp) {
-       return (openuniquemode(templet, mode, ISC_FALSE, fp));
+       return (openuniquemode(templet, mode, false, fp));
 }
 
 isc_result_t
 isc_file_bopenuniqueprivate(char *templet, FILE **fp) {
        int mode = _S_IREAD | _S_IWRITE;
-       return (openuniquemode(templet, mode, ISC_TRUE, fp));
+       return (openuniquemode(templet, mode, true, fp));
 }
 
 isc_result_t
 isc_file_bopenunique(char *templet, FILE **fp) {
        int mode = _S_IREAD | _S_IWRITE;
-       return (openuniquemode(templet, mode, ISC_TRUE, fp));
+       return (openuniquemode(templet, mode, true, fp));
 }
 
 isc_result_t
 isc_file_bopenuniquemode(char *templet, int mode, FILE **fp) {
-       return (openuniquemode(templet, mode, ISC_TRUE, fp));
+       return (openuniquemode(templet, mode, true, fp));
 }
 
 isc_result_t
@@ -472,13 +473,13 @@ isc_file_rename(const char *oldname, const char *newname) {
                return (isc__errno2result(errno));
 }
 
-isc_boolean_t
+bool
 isc_file_exists(const char *pathname) {
        struct stat stats;
 
        REQUIRE(pathname != NULL);
 
-       return (ISC_TF(file_stats(pathname, &stats) == ISC_R_SUCCESS));
+       return (file_stats(pathname, &stats) == ISC_R_SUCCESS);
 }
 
 isc_result_t
@@ -533,7 +534,7 @@ isc_file_isdirectory(const char *filename) {
 }
 
 
-isc_boolean_t
+bool
 isc_file_isabsolute(const char *filename) {
        REQUIRE(filename != NULL);
        /*
@@ -541,33 +542,33 @@ isc_file_isabsolute(const char *filename) {
         * the UNC style file specs
         */
        if ((filename[0] == '\\') && (filename[1] == '\\'))
-               return (ISC_TRUE);
+               return (true);
        if (isalpha(filename[0]) && filename[1] == ':' && filename[2] == '\\')
-               return (ISC_TRUE);
+               return (true);
        if (isalpha(filename[0]) && filename[1] == ':' && filename[2] == '/')
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isc_file_iscurrentdir(const char *filename) {
        REQUIRE(filename != NULL);
-       return (ISC_TF(filename[0] == '.' && filename[1] == '\0'));
+       return (filename[0] == '.' && filename[1] == '\0');
 }
 
-isc_boolean_t
+bool
 isc_file_ischdiridempotent(const char *filename) {
        REQUIRE(filename != NULL);
 
        if (isc_file_isabsolute(filename))
-               return (ISC_TRUE);
+               return (true);
        if (filename[0] == '\\')
-               return (ISC_TRUE);
+               return (true);
        if (filename[0] == '/')
-               return (ISC_TRUE);
+               return (true);
        if (isc_file_iscurrentdir(filename))
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 const char *
@@ -847,12 +848,12 @@ isc_file_sanitize(const char *dir, const char *base, const char *ext,
 /*
  * Based on http://blog.aaronballman.com/2011/08/how-to-check-access-rights/
  */
-isc_boolean_t
+bool
 isc_file_isdirwritable(const char *path) {
        DWORD length = 0;
        HANDLE hToken = NULL;
        PSECURITY_DESCRIPTOR security = NULL;
-       isc_boolean_t answer = ISC_FALSE;
+       bool answer = false;
 
        if (isc_file_isdirectory(path) != ISC_R_SUCCESS) {
                return (answer);
@@ -916,7 +917,7 @@ isc_file_isdirwritable(const char *path) {
                                        &privileges, &privilegesLength,
                                        &grantedAccess, &result))
                        {
-                               answer = ISC_TF(result);
+                               answer = result;
                        }
                        CloseHandle(hImpersonatedToken);
                }
index caec737225b192ea19edebd9f0e2528a09ab5864..164985da7b087405414dad49e202b439ce50f664 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/stat.h>
 #include <io.h>
 #include <errno.h>
+#include <stdbool.h>
 
 #include <isc/file.h>
 #include <isc/stat.h>
@@ -143,7 +144,7 @@ FAT_fsaccess_set(const char *path, isc_fsaccess_t access) {
 
 isc_result_t
 NTFS_Access_Control(const char *filename, const char *user, int access,
-                   isc_boolean_t isdir) {
+                   bool isdir) {
        SECURITY_DESCRIPTOR sd;
        BYTE aclBuffer[1024];
        PACL pacl=(PACL)&aclBuffer;
@@ -196,7 +197,7 @@ NTFS_Access_Control(const char *filename, const char *user, int access,
                NTFSbits |= FILE_GENERIC_EXECUTE;
 
        /* For directories check the directory-specific bits */
-       if (isdir == ISC_TRUE) {
+       if (isdir == true) {
                if (caccess & ISC_FSACCESS_CREATECHILD)
                        NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE;
                if (caccess & ISC_FSACCESS_DELETECHILD)
@@ -271,7 +272,7 @@ NTFS_Access_Control(const char *filename, const char *user, int access,
 
 isc_result_t
 NTFS_fsaccess_set(const char *path, isc_fsaccess_t access,
-                 isc_boolean_t isdir){
+                 bool isdir){
 
        /*
         * For NTFS we first need to get the name of the account under
@@ -288,14 +289,14 @@ NTFS_fsaccess_set(const char *path, isc_fsaccess_t access,
 isc_result_t
 isc_fsaccess_set(const char *path, isc_fsaccess_t access) {
        struct stat statb;
-       isc_boolean_t is_dir = ISC_FALSE;
+       bool is_dir = false;
        isc_result_t result;
 
        if (stat(path, &statb) != 0)
                return (isc__errno2result(errno));
 
        if ((statb.st_mode & S_IFDIR) != 0)
-               is_dir = ISC_TRUE;
+               is_dir = true;
        else if ((statb.st_mode & S_IFREG) == 0)
                return (ISC_R_INVALIDFILE);
 
@@ -362,4 +363,3 @@ isc_fsaccess_changeowner(const char *filename, const char *user) {
 
        return (ISC_R_SUCCESS);
 }
-
index 8b4d5492fdc385dc0d520a4176976f5b01aaeb2f..7370fa6e180960b02e73e239fe532251662eba83 100644 (file)
 #define ISC_DIR_H 1
 
 #include <windows.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/lang.h>
-#include <isc/boolean.h>
 #include <isc/result.h>
 
 #define ISC_DIR_NAMEMAX _MAX_FNAME
@@ -32,7 +32,7 @@ typedef struct {
        unsigned int    magic;
        char            dirname[ISC_DIR_PATHMAX];
        isc_direntry_t  entry;
-       isc_boolean_t   entry_filled;
+       bool    entry_filled;
        HANDLE          search_handle;
 } isc_dir_t;
 
index 1e12189875227c0915204fed44a23be3a596e9a8..009523a48bf5ef1545646ebf46eb5427319192a3 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef ISC_KEYBOARD_H
 #define ISC_KEYBOARD_H 1
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isc/result.h>
 
@@ -32,7 +34,7 @@ isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleepseconds);
 isc_result_t
 isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp);
 
-isc_boolean_t
+bool
 isc_keyboard_canceled(isc_keyboard_t *keyboard);
 
 ISC_LANG_ENDDECLS
index 0752dfb709355aa21386c92794668693cdda1675..486f527c6050c6c81bd000ad50a18248d278ee64 100644 (file)
@@ -14,6 +14,7 @@
 #define ISC_TIME_H 1
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <windows.h>
 
 #include <isc/lang.h>
@@ -58,10 +59,10 @@ isc_interval_set(isc_interval_t *i,
  *     nanoseconds < 1000000000.
  */
 
-isc_boolean_t
+bool
 isc_interval_iszero(const isc_interval_t *i);
 /*
- * Returns ISC_TRUE iff. 'i' is the zero interval.
+ * Returns true iff. 'i' is the zero interval.
  *
  * Requires:
  *
@@ -109,10 +110,10 @@ isc_time_settoepoch(isc_time_t *t);
  *     't' is a valid pointer.
  */
 
-isc_boolean_t
+bool
 isc_time_isepoch(const isc_time_t *t);
 /*
- * Returns ISC_TRUE iff. 't' is the epoch ("time zero").
+ * Returns true iff. 't' is the epoch ("time zero").
  *
  * Requires:
  *
index 9d4e8b959303be21683839722291879f196a0795..1bbd0f89fedce1269a0381877d579309665f5326 100644 (file)
@@ -20,6 +20,7 @@
 #include <ws2tcpip.h>
 #include <sys/types.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -63,8 +64,8 @@ struct isc_interfaceiter {
        SOCKET_ADDRESS_LIST     *buf6;          /* Buffer for WSAIoctl data. */
        unsigned int            buf6size;       /* Bytes allocated. */
        unsigned int            pos6;           /* Which entry to process. */
-       isc_boolean_t           v6loop;         /* See IPv6 loop address. */
-       isc_boolean_t           pos6zero;       /* Done pos6 == 0. */
+       bool            v6loop;         /* See IPv6 loop address. */
+       bool            pos6zero;       /* Done pos6 == 0. */
        isc_interface_t         current;        /* Current interface data. */
        isc_result_t            result;         /* Last result code. */
 };
@@ -123,8 +124,8 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
        iter->buf6 = NULL;
        iter->pos4 = NULL;
        iter->pos6 = 0;
-       iter->v6loop = ISC_TRUE;
-       iter->pos6zero = ISC_TRUE;
+       iter->v6loop = true;
+       iter->pos6zero = true;
        iter->buf6size = 0;
        iter->buf4size = 0;
        iter->result = ISC_R_FAILURE;
@@ -379,7 +380,7 @@ internal_current6(isc_interfaceiter_t *iter) {
 
        if (!iter->pos6zero) {
                if (iter->pos6 == 0U)
-                       iter->pos6zero = ISC_TRUE;
+                       iter->pos6zero = true;
                get_addr(AF_INET6, &iter->current.address,
                         iter->buf6->Address[iter->pos6].lpSockaddr);
 
@@ -396,14 +397,14 @@ internal_current6(isc_interfaceiter_t *iter) {
                        iter->current.netmask.type.in6.s6_addr[i] = 0xff;
                iter->current.netmask.family = AF_INET6;
                if (IN6_IS_ADDR_LOOPBACK(&iter->current.address.type.in6))
-                          iter->v6loop = ISC_TRUE;
+                          iter->v6loop = true;
        } else {
                /*
                 * See if we can bind to the ::1 and if so return ::1.
                 */
                struct sockaddr_in6 sin6;
 
-               iter->v6loop = ISC_TRUE;        /* So we don't loop forever. */
+               iter->v6loop = true;    /* So we don't loop forever. */
 
                fd = socket(AF_INET6, SOCK_DGRAM, 0);
                if (fd == INVALID_SOCKET)
@@ -490,8 +491,8 @@ isc_interfaceiter_first(isc_interfaceiter_t *iter) {
 
        if (iter->buf6 != NULL) {
                iter->pos6 = iter->buf6->iAddressCount;
-               iter->v6loop = ISC_FALSE;
-               iter->pos6zero = ISC_TF(iter->pos6 == 0U);
+               iter->v6loop = false;
+               iter->pos6zero = (iter->pos6 == 0U);
        }
        iter->result = ISC_R_SUCCESS;
        return (isc_interfaceiter_next(iter));
index 1566d3fd8f9e992ff718b6caf14bbe1a551dd212..6e6f800b8125d8469684e019057e080cac547e5c 100644 (file)
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -75,8 +76,7 @@ isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
        return (ISC_R_SUCCESS);
 }
 
-isc_boolean_t
+bool
 isc_keyboard_canceled(isc_keyboard_t *keyboard) {
-       return (ISC_TF(keyboard->result == ISC_R_CANCELED));
+       return (keyboard->result == ISC_R_CANCELED);
 }
-
index 6d1014fb6a6f1a9abc6b50fe93dd3be25982f8c4..b402a1b783d2d65d0b83d4f1193ca0b56dfb8486 100644 (file)
@@ -49,9 +49,6 @@
     <ClInclude Include="..\include\isc\bind9.h">
       <Filter>Library Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\include\isc\boolean.h">
-      <Filter>Library Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\include\isc\buffer.h">
       <Filter>Library Header Files</Filter>
     </ClInclude>
index 799ec1dfb3027e973fd53e22d56c742d1616b2a1..ef9c350b95fd0f88cd07de7193ec2e4efcb97aa3 100644 (file)
@@ -306,7 +306,6 @@ copy InstallFiles ..\Build\Release\
     <ClInclude Include="..\include\isc\base32.h" />
     <ClInclude Include="..\include\isc\base64.h" />
     <ClInclude Include="..\include\isc\bind9.h" />
-    <ClInclude Include="..\include\isc\boolean.h" />
     <ClInclude Include="..\include\isc\buffer.h" />
     <ClInclude Include="..\include\isc\bufferlist.h" />
     <ClInclude Include="..\include\isc\commandline.h" />
index b3792262d43aa73c23e8ec8bf4c434d74f5477ea..225e8474eec8e1a89871e307a2cc8e9e61e2e189 100644 (file)
@@ -34,6 +34,7 @@
 #endif
 
 #include <errno.h>
+#include <stdbool.h>
 #include <stddef.h>
 #include <inttypes.h>
 #include <stdlib.h>
@@ -326,7 +327,7 @@ struct isc_socketmgr {
 
        /* Locked by manager lock. */
        ISC_LIST(isc_socket_t)          socklist;
-       isc_boolean_t                   bShutdown;
+       bool                    bShutdown;
        isc_condition_t                 shutdown_ok;
        HANDLE                          hIoCompletionPort;
        int                             maxIOCPThreads;
@@ -361,9 +362,9 @@ static isc_result_t socket_create(isc_socketmgr_t *manager0, int pf,
 static isc_threadresult_t WINAPI SocketIoThread(LPVOID ThreadContext);
 static void maybe_free_socket(isc_socket_t **, int);
 static void free_socket(isc_socket_t **, int);
-static isc_boolean_t senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev);
-static isc_boolean_t acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev);
-static isc_boolean_t connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev);
+static bool senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev);
+static bool acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev);
+static bool connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev);
 static void send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev);
 static void send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev);
 static void send_acceptdone_event(isc_socket_t *sock, isc_socket_newconnev_t **adev);
@@ -612,7 +613,7 @@ socket_close(isc_socket_t *sock) {
 }
 
 static isc_once_t initialise_once = ISC_ONCE_INIT;
-static isc_boolean_t initialised = ISC_FALSE;
+static bool initialised = false;
 
 static void
 initialise(void) {
@@ -665,7 +666,7 @@ initialise(void) {
 
        closesocket(sock);
 
-       initialised = ISC_TRUE;
+       initialised = true;
 }
 
 /*
@@ -737,7 +738,7 @@ queue_receive_request(isc_socket_t *sock) {
        isc_result_t isc_result;
 
  retry:
-       need_retry = ISC_FALSE;
+       need_retry = false;
 
        /*
         * If we already have a receive pending, do nothing.
@@ -797,7 +798,7 @@ queue_receive_request(isc_socket_t *sock) {
                case WSAECONNRESET:
                        if (!sock->connected) {
                                /* soft error */
-                               need_retry = ISC_TRUE;
+                               need_retry = true;
                                break;
                        }
                        /* FALLTHROUGH */
@@ -1523,7 +1524,7 @@ consistent(isc_socket_t *sock) {
        isc_socket_newconnev_t *nev;
        unsigned int count;
        char *crash_reason;
-       isc_boolean_t crash = ISC_FALSE;
+       bool crash = false;
 
        REQUIRE(sock->pending_iocp == sock->pending_recv + sock->pending_send
                + sock->pending_accept + sock->pending_connect);
@@ -1535,7 +1536,7 @@ consistent(isc_socket_t *sock) {
                dev = ISC_LIST_NEXT(dev, ev_link);
        }
        if (count > sock->pending_send) {
-               crash = ISC_TRUE;
+               crash = true;
                crash_reason = "send_list > sock->pending_send";
        }
 
@@ -1546,7 +1547,7 @@ consistent(isc_socket_t *sock) {
                nev = ISC_LIST_NEXT(nev, ev_link);
        }
        if (count > sock->pending_accept) {
-               crash = ISC_TRUE;
+               crash = true;
                crash_reason = "accept_list > sock->pending_accept";
        }
 
@@ -1555,7 +1556,7 @@ consistent(isc_socket_t *sock) {
                           ISC_MSG_DESTROYING, "SOCKET INCONSISTENT: %s",
                           crash_reason);
                sock_dump(sock);
-               INSIST(crash == ISC_FALSE);
+               INSIST(crash == false);
        }
 }
 
@@ -1809,7 +1810,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
 
        if (dup_socket) {
 #ifndef ISC_ALLOW_MAPPED
-               isc__socket_ipv6only(sock, ISC_TRUE);
+               isc__socket_ipv6only(sock, true);
 #endif
 
                if (dup_socket->bound) {
@@ -2367,7 +2368,7 @@ internal_send(isc_socket_t *sock, isc_socketevent_t *dev,
  * These return if the done event passed in is on the list.
  * Using these ensures we will not double-send an event.
  */
-static isc_boolean_t
+static bool
 senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev)
 {
        isc_socketevent_t *ldev;
@@ -2376,10 +2377,10 @@ senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev)
        while (ldev != NULL && ldev != dev)
                ldev = ISC_LIST_NEXT(ldev, ev_link);
 
-       return (ldev == NULL ? ISC_FALSE : ISC_TRUE);
+       return (ldev == NULL ? false : true);
 }
 
-static isc_boolean_t
+static bool
 acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev)
 {
        isc_socket_newconnev_t *ldev;
@@ -2388,10 +2389,10 @@ acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev)
        while (ldev != NULL && ldev != dev)
                ldev = ISC_LIST_NEXT(ldev, ev_link);
 
-       return (ldev == NULL ? ISC_FALSE : ISC_TRUE);
+       return (ldev == NULL ? false : true);
 }
 
-static isc_boolean_t
+static bool
 connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev)
 {
        isc_socket_connev_t *cdev;
@@ -2400,7 +2401,7 @@ connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev)
        while (cdev != NULL && cdev != dev)
                cdev = ISC_LIST_NEXT(cdev, ev_link);
 
-       return (cdev == NULL ? ISC_FALSE : ISC_TRUE);
+       return (cdev == NULL ? false : true);
 }
 
 //
@@ -2694,7 +2695,7 @@ isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
 
        iocompletionport_init(manager); /* Create the Completion Ports */
 
-       manager->bShutdown = ISC_FALSE;
+       manager->bShutdown = false;
        manager->totalSockets = 0;
        manager->iocp_total = 0;
 
@@ -2755,7 +2756,7 @@ isc__socketmgr_destroy(isc_socketmgr_t **managerp) {
         * thread.
         */
        signal_iocompletionport_exit(manager);
-       manager->bShutdown = ISC_TRUE;
+       manager->bShutdown = true;
 
        /*
         * Wait for threads to exit.
@@ -3849,9 +3850,9 @@ isc__socket_gettype(isc_socket_t *sock) {
        return (type);
 }
 
-isc_boolean_t
+bool
 isc__socket_isbound(isc_socket_t *sock) {
-       isc_boolean_t val;
+       bool val;
 
        REQUIRE(VALID_SOCKET(sock));
 
@@ -3863,17 +3864,17 @@ isc__socket_isbound(isc_socket_t *sock) {
         */
        if (sock->fd == INVALID_SOCKET) {
                UNLOCK(&sock->lock);
-               return (ISC_FALSE);
+               return (false);
        }
 
-       val = ((sock->bound) ? ISC_TRUE : ISC_FALSE);
+       val = ((sock->bound) ? true : false);
        UNLOCK(&sock->lock);
 
        return (val);
 }
 
 void
-isc__socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
+isc__socket_ipv6only(isc_socket_t *sock, bool yes) {
 #if defined(IPV6_V6ONLY)
        int onoff = yes ? 1 : 0;
 #else
@@ -3919,7 +3920,7 @@ isc__socket_dscp(isc_socket_t *sock, isc_dscp_t dscp) {
 }
 
 void
-isc__socket_cleanunix(isc_sockaddr_t *addr, isc_boolean_t active) {
+isc__socket_cleanunix(isc_sockaddr_t *addr, bool active) {
        UNUSED(addr);
        UNUSED(active);
 }
index 9df418a54129de398925e53acdce8e7be93ac9f2..a1c8a840e85a8cde33d9c6a2a7d780a4aac31a95 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <errno.h>
 #include <limits.h>
+#include <stdbool.h>
 #include <stddef.h>
 #include <inttypes.h>
 #include <stdlib.h>
@@ -66,13 +67,13 @@ isc_interval_set(isc_interval_t *i, unsigned int seconds,
                + (nanoseconds + NS_INTERVAL - 1) / NS_INTERVAL;
 }
 
-isc_boolean_t
+bool
 isc_interval_iszero(const isc_interval_t *i) {
        REQUIRE(i != NULL);
        if (i->interval == 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 void
@@ -104,15 +105,15 @@ isc_time_settoepoch(isc_time_t *t) {
        t->absolute.dwHighDateTime = 0;
 }
 
-isc_boolean_t
+bool
 isc_time_isepoch(const isc_time_t *t) {
        REQUIRE(t != NULL);
 
        if (t->absolute.dwLowDateTime == 0 &&
            t->absolute.dwHighDateTime == 0)
-               return (ISC_TRUE);
+               return (true);
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
index 063fcee7a6dd906cf1e5149f32267012fedc9607..22992d69848761731c23c9e4f3cdc48e72e5c6d8 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -64,29 +65,29 @@ isccc_alist_create(void)
        return (alist);
 }
 
-isc_boolean_t
+bool
 isccc_alist_alistp(isccc_sexpr_t *alist)
 {
        isccc_sexpr_t *car;
 
        if (alist == NULL || alist->type != ISCCC_SEXPRTYPE_DOTTEDPAIR)
-               return (ISC_FALSE);
+               return (false);
        car = CAR(alist);
        if (car == NULL || car->type != ISCCC_SEXPRTYPE_STRING)
-               return (ISC_FALSE);
+               return (false);
        if (strcmp(car->value.as_string, ALIST_TAG) != 0)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
-isc_boolean_t
+bool
 isccc_alist_emptyp(isccc_sexpr_t *alist)
 {
        REQUIRE(isccc_alist_alistp(alist));
 
        if (CDR(alist) == NULL)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 isccc_sexpr_t *
index 71278ce4adcce8f708bc155cea750ffe2246504a..c2740cbcd2a19985db731cf675ba7c10ed9ab1ee 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <config.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <inttypes.h>
 #include <string.h>
@@ -607,13 +608,13 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
        uint32_t len;
        isc_result_t result;
        isccc_sexpr_t *alist, *value;
-       isc_boolean_t first_tag;
+       bool first_tag;
        unsigned char *checksum_rstart;
 
        REQUIRE(alistp != NULL && *alistp == NULL);
 
        checksum_rstart = NULL;
-       first_tag = ISC_TRUE;
+       first_tag = true;
        alist = isccc_alist_create();
        if (alist == NULL)
                return (ISC_R_NOMEMORY);
@@ -636,7 +637,7 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
                }
                if (first_tag && secret != NULL && strcmp(key, "_auth") == 0)
                        checksum_rstart = source->rstart;
-               first_tag = ISC_FALSE;
+               first_tag = false;
        }
 
        if (secret != NULL) {
@@ -705,7 +706,7 @@ static isc_result_t
 createmessage(uint32_t version, const char *from, const char *to,
              uint32_t serial, isccc_time_t now,
              isccc_time_t expires, isccc_sexpr_t **alistp,
-             isc_boolean_t want_expires)
+             bool want_expires)
 {
        isccc_sexpr_t *alist, *_ctrl, *_data;
        isc_result_t result;
@@ -765,11 +766,11 @@ isccc_cc_createmessage(uint32_t version, const char *from, const char *to,
                       isccc_time_t expires, isccc_sexpr_t **alistp)
 {
        return (createmessage(version, from, to, serial, now, expires,
-                             alistp, ISC_TRUE));
+                             alistp, true));
 }
 
 isc_result_t
-isccc_cc_createack(isccc_sexpr_t *message, isc_boolean_t ok,
+isccc_cc_createack(isccc_sexpr_t *message, bool ok,
                   isccc_sexpr_t **ackp)
 {
        char *_frm, *_to;
@@ -796,7 +797,7 @@ isccc_cc_createack(isccc_sexpr_t *message, isc_boolean_t ok,
         * Create the ack.
         */
        ack = NULL;
-       result = createmessage(1, _to, _frm, serial, t, 0, &ack, ISC_FALSE);
+       result = createmessage(1, _to, _frm, serial, t, 0, &ack, false);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -820,28 +821,28 @@ isccc_cc_createack(isccc_sexpr_t *message, isc_boolean_t ok,
        return (result);
 }
 
-isc_boolean_t
+bool
 isccc_cc_isack(isccc_sexpr_t *message) {
        isccc_sexpr_t *_ctrl;
 
        _ctrl = isccc_alist_lookup(message, "_ctrl");
        if (!isccc_alist_alistp(_ctrl))
-               return (ISC_FALSE);
+               return (false);
        if (isccc_cc_lookupstring(_ctrl, "_ack", NULL) == ISC_R_SUCCESS)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isccc_cc_isreply(isccc_sexpr_t *message) {
        isccc_sexpr_t *_ctrl;
 
        _ctrl = isccc_alist_lookup(message, "_ctrl");
        if (!isccc_alist_alistp(_ctrl))
-               return (ISC_FALSE);
+               return (false);
        if (isccc_cc_lookupstring(_ctrl, "_rpl", NULL) == ISC_R_SUCCESS)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 isc_result_t
@@ -984,7 +985,7 @@ symtab_undefine(char *key, unsigned int type, isccc_symvalue_t value,
        free(key);
 }
 
-static isc_boolean_t
+static bool
 symtab_clean(char *key, unsigned int type, isccc_symvalue_t value, void *arg) {
        isccc_time_t *now;
 
@@ -994,15 +995,15 @@ symtab_clean(char *key, unsigned int type, isccc_symvalue_t value, void *arg) {
        now = arg;
 
        if (*now < value.as_uinteger)
-               return (ISC_FALSE);
+               return (false);
        if ((*now - value.as_uinteger) < DUP_LIFETIME)
-               return (ISC_FALSE);
-       return (ISC_TRUE);
+               return (false);
+       return (true);
 }
 
 isc_result_t
 isccc_cc_createsymtab(isccc_symtab_t **symtabp) {
-       return (isccc_symtab_create(11897, symtab_undefine, NULL, ISC_FALSE,
+       return (isccc_symtab_create(11897, symtab_undefine, NULL, false,
                                  symtabp));
 }
 
@@ -1011,17 +1012,17 @@ isccc_cc_cleansymtab(isccc_symtab_t *symtab, isccc_time_t now) {
        isccc_symtab_foreach(symtab, symtab_clean, &now);
 }
 
-static isc_boolean_t
+static bool
 has_whitespace(const char *str) {
        char c;
 
        if (str == NULL)
-               return (ISC_FALSE);
+               return (false);
        while ((c = *str++) != '\0') {
                if (c == ' ' || c == '\t' || c == '\n')
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 isc_result_t
index b3b2abba1dfe51498ad12d9123c5a543151fb937..ea50a44339012a2e65a076cd3d5b497877759c89 100644 (file)
@@ -29,6 +29,7 @@
 
 /*! \file isccc/alist.h */
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/lang.h>
@@ -39,10 +40,10 @@ ISC_LANG_BEGINDECLS
 isccc_sexpr_t *
 isccc_alist_create(void);
 
-isc_boolean_t
+bool
 isccc_alist_alistp(isccc_sexpr_t *alist);
 
-isc_boolean_t
+bool
 isccc_alist_emptyp(isccc_sexpr_t *alist);
 
 isccc_sexpr_t *
index 98ef9d65adbeb7939ea957fb6ee38bce4065c409..5da2a72946b54afba58c36da2eea99e5d59d23e4 100644 (file)
@@ -30,6 +30,7 @@
 /*! \file isccc/cc.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lang.h>
 #include <isc/buffer.h>
@@ -77,15 +78,15 @@ isccc_cc_createmessage(uint32_t version, const char *from, const char *to,
 
 /*% Create Acknowledgment */
 isc_result_t
-isccc_cc_createack(isccc_sexpr_t *message, isc_boolean_t ok,
+isccc_cc_createack(isccc_sexpr_t *message, bool ok,
                   isccc_sexpr_t **ackp);
 
 /*% Is Ack? */
-isc_boolean_t
+bool
 isccc_cc_isack(isccc_sexpr_t *message);
 
 /*% Is Reply? */
-isc_boolean_t
+bool
 isccc_cc_isreply(isccc_sexpr_t *message);
 
 /*% Create Response */
index 237cc526de99d139276d78f8795793340c4b8b6b..10f215c85d2aa9b6029d6c66084fbd266d327ac6 100644 (file)
@@ -29,6 +29,7 @@
 
 /*! \file isccc/sexpr.h */
 
+#include <stdbool.h>
 #include <stdio.h>
 
 #include <isc/lang.h>
@@ -94,16 +95,16 @@ isccc_sexpr_setcdr(isccc_sexpr_t *pair, isccc_sexpr_t *cdr);
 isccc_sexpr_t *
 isccc_sexpr_addtolist(isccc_sexpr_t **l1p, isccc_sexpr_t *l2);
 
-isc_boolean_t
+bool
 isccc_sexpr_listp(isccc_sexpr_t *sexpr);
 
-isc_boolean_t
+bool
 isccc_sexpr_emptyp(isccc_sexpr_t *sexpr);
 
-isc_boolean_t
+bool
 isccc_sexpr_stringp(isccc_sexpr_t *sexpr);
 
-isc_boolean_t
+bool
 isccc_sexpr_binaryp(isccc_sexpr_t *sexpr);
 
 char *
index 5042fd5577ebaa92c40e6d1bfd17f44907f9590b..cd595a11537bd14648781f9e89216ed7bbaa7be0 100644 (file)
@@ -71,6 +71,8 @@
  *** Imports.
  ***/
 
+#include <stdbool.h>
+
 #include <isc/lang.h>
 #include <isccc/types.h>
 
@@ -87,7 +89,7 @@ typedef union isccc_symvalue {
 typedef void (*isccc_symtabundefaction_t)(char *key, unsigned int type,
                                        isccc_symvalue_t value, void *userarg);
 
-typedef isc_boolean_t (*isccc_symtabforeachaction_t)(char *key,
+typedef bool (*isccc_symtabforeachaction_t)(char *key,
                                                   unsigned int type,
                                                   isccc_symvalue_t value,
                                                   void *userarg);
@@ -103,7 +105,7 @@ ISC_LANG_BEGINDECLS
 isc_result_t
 isccc_symtab_create(unsigned int size,
                  isccc_symtabundefaction_t undefine_action, void *undefine_arg,
-                 isc_boolean_t case_sensitive, isccc_symtab_t **symtabp);
+                 bool case_sensitive, isccc_symtab_t **symtabp);
 
 void
 isccc_symtab_destroy(isccc_symtab_t **symtabp);
index 3c1dc04a0ff4a99bdd004194e888cac1c3862160..bea22c97c23641ea1ae3ec54acb02a747ca4c227 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <inttypes.h>
 
-#include <isc/boolean.h>
 #include <isc/result.h>
 
 /*% isccc_time_t typedef */
index 062fbcdd9a29dc585ade91b3defb912b3a557d75..68dbe446c7b3a839d46fb09a6e5dba2f29c3b262 100644 (file)
@@ -28,6 +28,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -139,18 +140,18 @@ isccc_sexpr_free(isccc_sexpr_t **sexprp) {
        *sexprp = NULL;
 }
 
-static isc_boolean_t
+static bool
 printable(isccc_region_t *r) {
        unsigned char *curr;
 
        curr = r->rstart;
        while (curr != r->rend) {
                if (!isprint(*curr))
-                       return (ISC_FALSE);
+                       return (false);
                curr++;
        }
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 void
@@ -254,32 +255,32 @@ isccc_sexpr_addtolist(isccc_sexpr_t **l1p, isccc_sexpr_t *l2) {
        return (elt);
 }
 
-isc_boolean_t
+bool
 isccc_sexpr_listp(isccc_sexpr_t *sexpr) {
        if (sexpr == NULL || sexpr->type == ISCCC_SEXPRTYPE_DOTTEDPAIR)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isccc_sexpr_emptyp(isccc_sexpr_t *sexpr) {
        if (sexpr == NULL)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isccc_sexpr_stringp(isccc_sexpr_t *sexpr) {
        if (sexpr != NULL && sexpr->type == ISCCC_SEXPRTYPE_STRING)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
-isc_boolean_t
+bool
 isccc_sexpr_binaryp(isccc_sexpr_t *sexpr) {
        if (sexpr != NULL && sexpr->type == ISCCC_SEXPRTYPE_BINARY)
-               return (ISC_TRUE);
-       return (ISC_FALSE);
+               return (true);
+       return (false);
 }
 
 char *
index 6179e8fc0766a01674c1365c8454ff432933525c..da59a78632715e3ad9f56c14c8b63552f24eaa02 100644 (file)
@@ -29,6 +29,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/assertions.h>
@@ -57,14 +58,14 @@ struct isccc_symtab {
        eltlist_t *                     table;
        isccc_symtabundefaction_t               undefine_action;
        void *                          undefine_arg;
-       isc_boolean_t                   case_sensitive;
+       bool                    case_sensitive;
 };
 
 isc_result_t
 isccc_symtab_create(unsigned int size,
                  isccc_symtabundefaction_t undefine_action,
                  void *undefine_arg,
-                 isc_boolean_t case_sensitive,
+                 bool case_sensitive,
                  isccc_symtab_t **symtabp)
 {
        isccc_symtab_t *symtab;
@@ -129,7 +130,7 @@ isccc_symtab_destroy(isccc_symtab_t **symtabp) {
 }
 
 static inline unsigned int
-hash(const char *key, isc_boolean_t case_sensitive) {
+hash(const char *key, bool case_sensitive) {
        const char *s;
        unsigned int h = 0;
        unsigned int g;
index 617c2106b8e45c6979bd9069c61942d617a15171..3fa813eb93dbff66f352a0d6842ba825ee912c3e 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/mem.h>
 #include <isc/print.h>
@@ -220,7 +221,7 @@ convert_keyname(const cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
 static isc_result_t
 count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                   isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
-                  uint32_t *count, isc_boolean_t *has_negative)
+                  uint32_t *count, bool *has_negative)
 {
        const cfg_listelt_t *elt;
        isc_result_t result;
@@ -229,7 +230,7 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
        REQUIRE(count != NULL);
 
        if (has_negative != NULL)
-               *has_negative = ISC_FALSE;
+               *has_negative = false;
 
        for (elt = cfg_list_first(caml);
             elt != NULL;
@@ -243,14 +244,14 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                        if (! cfg_obj_isvoid(negated)) {
                                ce = negated;
                                if (has_negative != NULL)
-                                       *has_negative = ISC_TRUE;
+                                       *has_negative = true;
                        }
                }
 
                if (cfg_obj_istype(ce, &cfg_type_keyref)) {
                        n++;
                } else if (cfg_obj_islist(ce)) {
-                       isc_boolean_t negative;
+                       bool negative;
                        uint32_t sub;
                        result = count_acl_elements(ce, cctx, lctx, ctx, mctx,
                                                    &sub, &negative);
@@ -403,10 +404,10 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx,
        }
 }
 
-static isc_boolean_t
+static bool
 geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) {
        if (ctx->geoip == NULL)
-               return (ISC_TRUE);
+               return (true);
 
        switch (elt->geoip_elem.subtype) {
        case dns_geoip_countrycode:
@@ -417,27 +418,27 @@ geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) {
                    ctx->geoip->country_v4 != NULL ||
                    ctx->geoip->country_v6 != NULL ||
                    ctx->geoip->region != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_region:
        case dns_geoip_regionname:
                if (ctx->geoip->city_v4 != NULL ||
                    ctx->geoip->city_v6 != NULL ||
                    ctx->geoip->region != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_country_code:
        case dns_geoip_country_code3:
        case dns_geoip_country_name:
                if (ctx->geoip->country_v4 != NULL ||
                    ctx->geoip->country_v6 != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_region_countrycode:
        case dns_geoip_region_code:
        case dns_geoip_region_name:
                if (ctx->geoip->region != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_city_countrycode:
        case dns_geoip_city_countrycode3:
@@ -452,30 +453,30 @@ geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) {
        case dns_geoip_city_timezonecode:
                if (ctx->geoip->city_v4 != NULL ||
                    ctx->geoip->city_v6 != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_isp_name:
                if (ctx->geoip->isp != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_org_name:
                if (ctx->geoip->org != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_as_asnum:
                if (ctx->geoip->as != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_domain_name:
                if (ctx->geoip->domain != NULL)
-                       return (ISC_TRUE);
+                       return (true);
                /* FALLTHROUGH */
        case dns_geoip_netspeed_id:
                if (ctx->geoip->netspeed != NULL)
-                       return (ISC_TRUE);
+                       return (true);
        }
 
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -665,7 +666,7 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                        if (result != ISC_R_SUCCESS)
                                return (result);
                } else
-                       nelem = cfg_list_length(caml, ISC_FALSE);
+                       nelem = cfg_list_length(caml, false);
 
                result = dns_acl_create(mctx, nelem, &dacl);
                if (result != ISC_R_SUCCESS)
@@ -677,7 +678,7 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
             elt != NULL;
             elt = cfg_list_next(elt)) {
                const cfg_obj_t *ce = cfg_listelt_value(elt);
-               isc_boolean_t neg = ISC_FALSE;
+               bool neg = false;
 
                INSIST(dacl->length <= dacl->alloc);
 
@@ -686,8 +687,8 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                        const cfg_obj_t *negated =
                                cfg_tuple_get(ce, "negated");
                        if (! cfg_obj_isvoid(negated)) {
-                               neg = ISC_TRUE;
-                               dacl->has_negatives = ISC_TRUE;
+                               neg = true;
+                               dacl->has_negatives = true;
                                ce = negated;
                        }
                }
@@ -701,7 +702,7 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
 
                if (nest_level != 0) {
                        result = dns_acl_create(mctx,
-                                               cfg_list_length(ce, ISC_FALSE),
+                                               cfg_list_length(ce, false),
                                                &de->nestedacl);
                        if (result != ISC_R_SUCCESS)
                                goto cleanup;
@@ -712,7 +713,7 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                        /* Network prefix */
                        isc_netaddr_t   addr;
                        unsigned int    bitlen;
-                       isc_boolean_t   setpos, setecs;
+                       bool    setpos, setecs;
 
                        cfg_obj_asnetprefix(ce, &addr, &bitlen);
                        if (family != 0 && family != addr.family) {
@@ -738,7 +739,7 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                         * If nesting ACLs (nest_level != 0), we negate
                         * the nestedacl element, not the iptable entry.
                         */
-                       setpos = ISC_TF(nest_level != 0 || !neg);
+                       setpos = (nest_level != 0 || !neg);
                        setecs = cfg_obj_istype(ce, &cfg_type_ecsprefix);
                        result = dns_iptable_addprefix2(iptab, &addr, bitlen,
                                                        setpos, setecs);
@@ -781,7 +782,7 @@ nested_acl:
                                INSIST(dacl->length + inneracl->length
                                       <= dacl->alloc);
                                dns_acl_merge(dacl, inneracl,
-                                             ISC_TF(!neg));
+                                             !neg);
                                de += inneracl->length;  /* elements added */
                                dns_acl_detach(&inneracl);
                                INSIST(dacl->length <= dacl->alloc);
@@ -814,7 +815,7 @@ nested_acl:
                        if (strcasecmp(name, "any") == 0) {
                                /* Iptable entry with zero bit length. */
                                result = dns_iptable_addprefix(iptab, NULL, 0,
-                                             ISC_TF(nest_level != 0 || !neg));
+                                             (nest_level != 0 || !neg));
                                if (result != ISC_R_SUCCESS)
                                        goto cleanup;
 
@@ -833,7 +834,7 @@ nested_acl:
                                 * "!none;".
                                 */
                                result = dns_iptable_addprefix(iptab, NULL, 0,
-                                             ISC_TF(nest_level != 0 || neg));
+                                             (nest_level != 0 || neg));
                                if (result != ISC_R_SUCCESS)
                                        goto cleanup;
 
index d02b40e00bdf36eabc7d3c81f24fe69033492fb5..8f8ca55e439ab20fbe1f0fecbd26ed61c6f8c59a 100644 (file)
@@ -26,6 +26,7 @@
  ***/
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/formatcheck.h>
 #include <isc/lang.h>
@@ -186,26 +187,26 @@ cfg_parser_destroy(cfg_parser_t **pctxp);
  * more references.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isvoid(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of void type (e.g., an optional
  * value not specified).
  */
 
-isc_boolean_t
+bool
 cfg_obj_ismap(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of a map type.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isfixedpoint(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of a fixedpoint type.
  */
 
-isc_boolean_t
+bool
 cfg_obj_ispercentage(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of a percentage type.
@@ -252,7 +253,7 @@ cfg_map_count(const cfg_obj_t *mapobj);
  * \li     The number of elements in the map object.
  */
 
-isc_boolean_t
+bool
 cfg_obj_istuple(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of a map type.
@@ -270,7 +271,7 @@ cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name);
  *\li  fields of said tuple type.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isuint32(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of integer type.
@@ -288,7 +289,7 @@ cfg_obj_asuint32(const cfg_obj_t *obj);
  * \li     A 32-bit unsigned integer.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isuint64(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of integer type.
@@ -330,7 +331,7 @@ cfg_obj_aspercentage(const cfg_obj_t *obj);
  * \li     A 32-bit unsigned integer.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isstring(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of string type.
@@ -349,13 +350,13 @@ cfg_obj_asstring(const cfg_obj_t *obj);
  * \li     A pointer to a null terminated string.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isboolean(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of a boolean type.
  */
 
-isc_boolean_t
+bool
 cfg_obj_asboolean(const cfg_obj_t *obj);
 /*%<
  * Returns the value of a configuration object of a boolean type.
@@ -367,7 +368,7 @@ cfg_obj_asboolean(const cfg_obj_t *obj);
  * \li     A boolean value.
  */
 
-isc_boolean_t
+bool
 cfg_obj_issockaddr(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is a socket address.
@@ -400,7 +401,7 @@ cfg_obj_getdscp(const cfg_obj_t *obj);
  * \li     DSCP value associated with a sockaddr, or -1.
  */
 
-isc_boolean_t
+bool
 cfg_obj_isnetprefix(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is a network prefix.
@@ -419,7 +420,7 @@ cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
  *\li  'netaddr' and 'prefixlen' are non-NULL.
  */
 
-isc_boolean_t
+bool
 cfg_obj_islist(const cfg_obj_t *obj);
 /*%<
  * Return true iff 'obj' is of list type.
@@ -453,7 +454,7 @@ cfg_list_next(const cfg_listelt_t *elt);
  */
 
 unsigned int
-cfg_list_length(const cfg_obj_t *obj, isc_boolean_t recurse);
+cfg_list_length(const cfg_obj_t *obj, bool recurse);
 /*%<
  * Returns the length of a list of configure objects.  If obj is
  * not a list, returns 0.  If recurse is true, add in the length of
@@ -502,7 +503,7 @@ cfg_print_grammar(const cfg_type_t *type,
  * Print a summary of the grammar of the configuration type 'type'.
  */
 
-isc_boolean_t
+bool
 cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type);
 /*%<
  * Return true iff 'obj' is of type 'type'.
index 1ceda8cbb9070f7b68b652a650980dea16c683c8..a066cd13e966539ce5f86e23e820dd302629d765 100644 (file)
@@ -15,6 +15,7 @@
 /*! \file isccfg/grammar.h */
 
 #include <inttypes.h>
+#include <stdbool.h>
 
 #include <isc/lex.h>
 #include <isc/netaddr.h>
@@ -169,7 +170,7 @@ struct cfg_obj {
                uint32_t        uint32;
                uint64_t        uint64;
                isc_textregion_t string; /*%< null terminated, too */
-               isc_boolean_t   boolean;
+               bool    boolean;
                cfg_map_t       map;
                cfg_list_t      list;
                cfg_obj_t **    tuple;
@@ -203,10 +204,10 @@ struct cfg_parser {
        isc_token_t     token;
 
        /*% We are at the end of all input. */
-       isc_boolean_t   seen_eof;
+       bool    seen_eof;
 
        /*% The current token has been pushed back. */
-       isc_boolean_t   ungotten;
+       bool    ungotten;
 
        /*%
         * The stack of currently active files, represented
@@ -359,7 +360,7 @@ cfg_parse_rawaddr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na);
 void
 cfg_print_rawaddr(cfg_printer_t *pctx, const isc_netaddr_t *na);
 
-isc_boolean_t
+bool
 cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags);
 
 isc_result_t
@@ -524,11 +525,11 @@ void
 cfg_parser_warning(cfg_parser_t *pctx, unsigned int flags,
                   const char *fmt, ...) ISC_FORMAT_PRINTF(3, 4);
 
-isc_boolean_t
+bool
 cfg_is_enum(const char *s, const char *const *enums);
 /*%< Return true iff the string 's' is one of the strings in 'enums' */
 
-isc_boolean_t
+bool
 cfg_clause_validforzone(const char *name, unsigned int ztype);
 /*%<
  * Check whether an option is legal for the specified zone type.
index 559bdcbc2727d21b47e81517ab01a12071fce4c6..0a658c942b9bf75caf3f053050a2f63ea1705338 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -808,7 +809,7 @@ parse_serverid(cfg_parser_t *pctx, const cfg_type_t *type,
            strcasecmp(TOKEN_STRING(pctx), "hostname") == 0) {
                result = cfg_create_obj(pctx, &cfg_type_hostname, ret);
                if (result == ISC_R_SUCCESS)
-                       (*ret)->value.boolean = ISC_TRUE;
+                       (*ret)->value.boolean = true;
                return (result);
        }
        cfg_ungettoken(pctx);
@@ -2566,7 +2567,7 @@ static cfg_type_t cfg_type_sizeorpercent = {
  */
 static isc_result_t
 parse_maybe_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type,
-                             isc_boolean_t optional, cfg_obj_t **ret)
+                             bool optional, cfg_obj_t **ret)
 {
        isc_result_t result;
        cfg_obj_t *obj = NULL;
@@ -2614,7 +2615,7 @@ doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *enumtype,
                  const cfg_type_t *othertype)
 {
        const char * const *p;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
 
        /*
         * If othertype is cfg_type_void, it means that enumtype is
@@ -2627,7 +2628,7 @@ doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *enumtype,
        for (p = enumtype->of; *p != NULL; p++) {
                if (!first)
                        cfg_print_cstr(pctx, " | ");
-               first = ISC_FALSE;
+               first = false;
                cfg_print_cstr(pctx, *p);
        }
        if (othertype == &cfg_type_sizeval_percent) {
@@ -2648,14 +2649,14 @@ doc_enum_or_other(cfg_printer_t *pctx, const cfg_type_t *enumtype,
 
 static isc_result_t
 parse_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
-       return (parse_maybe_optional_keyvalue(pctx, type, ISC_FALSE, ret));
+       return (parse_maybe_optional_keyvalue(pctx, type, false, ret));
 }
 
 static isc_result_t
 parse_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type,
                        cfg_obj_t **ret)
 {
-       return (parse_maybe_optional_keyvalue(pctx, type, ISC_TRUE, ret));
+       return (parse_maybe_optional_keyvalue(pctx, type, true, ret));
 }
 
 static void
@@ -3321,7 +3322,7 @@ parse_server_key_kludge(cfg_parser_t *pctx, const cfg_type_t *type,
                        cfg_obj_t **ret)
 {
        isc_result_t result;
-       isc_boolean_t braces = ISC_FALSE;
+       bool braces = false;
        UNUSED(type);
 
        /* Allow opening brace. */
@@ -3329,7 +3330,7 @@ parse_server_key_kludge(cfg_parser_t *pctx, const cfg_type_t *type,
        if (pctx->token.type == isc_tokentype_special &&
            pctx->token.value.as_char == '{') {
                CHECK(cfg_gettoken(pctx, 0));
-               braces = ISC_TRUE;
+               braces = true;
        }
 
        CHECK(cfg_parse_obj(pctx, &cfg_type_astring, ret));
@@ -3901,10 +3902,10 @@ static int cmp_clause(const void *ap, const void *bp) {
        return (strcmp(a->name, b->name));
 }
 
-isc_boolean_t
+bool
 cfg_clause_validforzone(const char *name, unsigned int ztype) {
        const cfg_clausedef_t *clause;
-       isc_boolean_t valid = ISC_FALSE;
+       bool valid = false;
 
        for (clause = zone_clauses; clause->name != NULL; clause++) {
                if ((clause->flags & ztype) == 0 ||
@@ -3912,7 +3913,7 @@ cfg_clause_validforzone(const char *name, unsigned int ztype) {
                {
                        continue;
                }
-               valid = ISC_TRUE;
+               valid = true;
        }
        for (clause = zone_only_clauses; clause->name != NULL; clause++) {
                if ((clause->flags & ztype) == 0 ||
@@ -3920,7 +3921,7 @@ cfg_clause_validforzone(const char *name, unsigned int ztype) {
                {
                        continue;
                }
-               valid = ISC_TRUE;
+               valid = true;
        }
 
        return (valid);
index e6bb719549c40746483262ffb1b3d2f70786a796..aa3563b7cd8898acd4a539d45339bc414916963e 100644 (file)
@@ -14,6 +14,7 @@
 #include <config.h>
 
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 
 #include <isc/buffer.h>
@@ -89,7 +90,7 @@ free_map(cfg_parser_t *pctx, cfg_obj_t *obj);
 static isc_result_t
 parse_symtab_elt(cfg_parser_t *pctx, const char *name,
                 cfg_type_t *elttype, isc_symtab_t *symtab,
-                isc_boolean_t callback);
+                bool callback);
 
 static void
 free_noop(cfg_parser_t *pctx, cfg_obj_t *obj);
@@ -98,7 +99,7 @@ static isc_result_t
 cfg_getstringtoken(cfg_parser_t *pctx);
 
 static void
-parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
+parser_complain(cfg_parser_t *pctx, bool is_warning,
                unsigned int flags, const char *format, va_list args);
 
 /*
@@ -292,7 +293,7 @@ cfg_print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj) {
        unsigned int i;
        const cfg_tuplefielddef_t *fields;
        const cfg_tuplefielddef_t *f;
-       isc_boolean_t need_space = ISC_FALSE;
+       bool need_space = false;
 
        REQUIRE(pctx != NULL);
        REQUIRE(obj != NULL);
@@ -304,8 +305,8 @@ cfg_print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj) {
                if (need_space && fieldobj->type->rep != &cfg_rep_void)
                        cfg_print_cstr(pctx, " ");
                cfg_print_obj(pctx, fieldobj);
-               need_space = ISC_TF(need_space ||
-                                   fieldobj->type->print != cfg_print_void);
+               need_space = (need_space ||
+                             fieldobj->type->print != cfg_print_void);
        }
 }
 
@@ -313,7 +314,7 @@ void
 cfg_doc_tuple(cfg_printer_t *pctx, const cfg_type_t *type) {
        const cfg_tuplefielddef_t *fields;
        const cfg_tuplefielddef_t *f;
-       isc_boolean_t need_space = ISC_FALSE;
+       bool need_space = false;
 
        REQUIRE(pctx != NULL);
        REQUIRE(type != NULL);
@@ -324,7 +325,7 @@ cfg_doc_tuple(cfg_printer_t *pctx, const cfg_type_t *type) {
                if (need_space)
                        cfg_print_cstr(pctx, " ");
                cfg_doc_obj(pctx, f->type);
-               need_space = ISC_TF(f->type->print != cfg_print_void);
+               need_space = (f->type->print != cfg_print_void);
        }
 }
 
@@ -346,10 +347,10 @@ free_tuple(cfg_parser_t *pctx, cfg_obj_t *obj) {
                    nfields * sizeof(cfg_obj_t *));
 }
 
-isc_boolean_t
+bool
 cfg_obj_istuple(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_tuple));
+       return (obj->type->rep == &cfg_rep_tuple);
 }
 
 const cfg_obj_t *
@@ -458,8 +459,8 @@ cfg_parser_create(isc_mem_t *mctx, isc_log_t *lctx, cfg_parser_t **ret) {
 
        pctx->lctx = lctx;
        pctx->lexer = NULL;
-       pctx->seen_eof = ISC_FALSE;
-       pctx->ungotten = ISC_FALSE;
+       pctx->seen_eof = false;
+       pctx->ungotten = false;
        pctx->errors = 0;
        pctx->warnings = 0;
        pctx->open_files = NULL;
@@ -543,8 +544,8 @@ cfg_parser_reset(cfg_parser_t *pctx) {
        if (pctx->lexer != NULL)
                isc_lex_close(pctx->lexer);
 
-       pctx->seen_eof = ISC_FALSE;
-       pctx->ungotten = ISC_FALSE;
+       pctx->seen_eof = false;
+       pctx->ungotten = false;
        pctx->errors = 0;
        pctx->warnings = 0;
        pctx->line = 0;
@@ -730,10 +731,10 @@ cfg_doc_void(cfg_printer_t *pctx, const cfg_type_t *type) {
        UNUSED(type);
 }
 
-isc_boolean_t
+bool
 cfg_obj_isvoid(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_void));
+       return (obj->type->rep == &cfg_rep_void);
 }
 
 LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_void = {
@@ -803,10 +804,10 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_percentage = {
        cfg_doc_terminal, &cfg_rep_percentage, NULL
 };
 
-isc_boolean_t
+bool
 cfg_obj_ispercentage(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_percentage));
+       return (obj->type->rep == &cfg_rep_percentage);
 }
 
 /*
@@ -889,10 +890,10 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_fixedpoint = {
        cfg_doc_terminal, &cfg_rep_fixedpoint, NULL
 };
 
-isc_boolean_t
+bool
 cfg_obj_isfixedpoint(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_fixedpoint));
+       return (obj->type->rep == &cfg_rep_fixedpoint);
 }
 
 /*
@@ -940,10 +941,10 @@ cfg_print_uint32(cfg_printer_t *pctx, const cfg_obj_t *obj) {
        cfg_print_rawuint(pctx, obj->value.uint32);
 }
 
-isc_boolean_t
+bool
 cfg_obj_isuint32(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_uint32));
+       return (obj->type->rep == &cfg_rep_uint32);
 }
 
 uint32_t
@@ -961,10 +962,10 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_uint32 = {
 /*
  * uint64
  */
-isc_boolean_t
+bool
 cfg_obj_isuint64(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_uint64));
+       return (obj->type->rep == &cfg_rep_uint64);
 }
 
 uint64_t
@@ -1141,7 +1142,7 @@ doc_btext(cfg_printer_t *pctx, const cfg_type_t *type) {
 }
 
 
-isc_boolean_t
+bool
 cfg_is_enum(const char *s, const char *const *enums) {
        const char * const *p;
 
@@ -1150,9 +1151,9 @@ cfg_is_enum(const char *s, const char *const *enums) {
 
        for (p = enums; *p != NULL; p++) {
                if (strcasecmp(*p, s) == 0)
-                       return (ISC_TRUE);
+                       return (true);
        }
-       return (ISC_FALSE);
+       return (false);
 }
 
 static isc_result_t
@@ -1232,10 +1233,10 @@ free_string(cfg_parser_t *pctx, cfg_obj_t *obj) {
                    obj->value.string.length + 1);
 }
 
-isc_boolean_t
+bool
 cfg_obj_isstring(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_string));
+       return (obj->type->rep == &cfg_rep_string);
 }
 
 const char *
@@ -1285,13 +1286,13 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_bracketed_text = {
  * Booleans
  */
 
-isc_boolean_t
+bool
 cfg_obj_isboolean(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_boolean));
+       return (obj->type->rep == &cfg_rep_boolean);
 }
 
-isc_boolean_t
+bool
 cfg_obj_asboolean(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_boolean);
        return (obj->value.boolean);
@@ -1301,7 +1302,7 @@ isc_result_t
 cfg_parse_boolean(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
 {
        isc_result_t result;
-       isc_boolean_t value;
+       bool value;
        cfg_obj_t *obj = NULL;
 
        REQUIRE(pctx != NULL);
@@ -1319,11 +1320,11 @@ cfg_parse_boolean(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
        if ((strcasecmp(TOKEN_STRING(pctx), "true") == 0) ||
            (strcasecmp(TOKEN_STRING(pctx), "yes") == 0) ||
            (strcmp(TOKEN_STRING(pctx), "1") == 0)) {
-               value = ISC_TRUE;
+               value = true;
        } else if ((strcasecmp(TOKEN_STRING(pctx), "false") == 0) ||
                   (strcasecmp(TOKEN_STRING(pctx), "no") == 0) ||
                   (strcmp(TOKEN_STRING(pctx), "0") == 0)) {
-               value = ISC_FALSE;
+               value = false;
        } else {
                goto bad_boolean;
        }
@@ -1580,10 +1581,10 @@ cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) {
        }
 }
 
-isc_boolean_t
+bool
 cfg_obj_islist(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_list));
+       return (obj->type->rep == &cfg_rep_list);
 }
 
 const cfg_listelt_t *
@@ -1605,7 +1606,7 @@ cfg_list_next(const cfg_listelt_t *elt) {
  * a list, return 0.
  */
 unsigned int
-cfg_list_length(const cfg_obj_t *obj, isc_boolean_t recurse) {
+cfg_list_length(const cfg_obj_t *obj, bool recurse) {
        const cfg_listelt_t *elt;
        unsigned int count = 0;
 
@@ -1801,9 +1802,8 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
                } else {
                        /* Single-valued clause */
                        if (result == ISC_R_NOTFOUND) {
-                               isc_boolean_t callback =
-                                       ISC_TF((clause->flags &
-                                               CFG_CLAUSEFLAG_CALLBACK) != 0);
+                               bool callback =
+                                       (clause->flags & CFG_CLAUSEFLAG_CALLBACK);
                                CHECK(parse_symtab_elt(pctx, clause->name,
                                                       clause->type,
                                                       obj->value.map.symtab,
@@ -1837,7 +1837,7 @@ cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
 static isc_result_t
 parse_symtab_elt(cfg_parser_t *pctx, const char *name,
                 cfg_type_t *elttype, isc_symtab_t *symtab,
-                isc_boolean_t callback)
+                bool callback)
 {
        isc_result_t result;
        cfg_obj_t *obj = NULL;
@@ -2012,7 +2012,7 @@ static struct flagtext {
 void
 cfg_print_clauseflags(cfg_printer_t *pctx, unsigned int flags) {
        struct flagtext *p;
-       isc_boolean_t first = ISC_TRUE;
+       bool first = true;
        for (p = flagtexts; p->flag != 0; p++) {
                if ((flags & p->flag) != 0) {
                        if (first)
@@ -2020,7 +2020,7 @@ cfg_print_clauseflags(cfg_printer_t *pctx, unsigned int flags) {
                        else
                                cfg_print_cstr(pctx, ", ");
                        cfg_print_cstr(pctx, p->text);
-                       first = ISC_FALSE;
+                       first = false;
                }
        }
 }
@@ -2095,10 +2095,10 @@ cfg_doc_map(cfg_printer_t *pctx, const cfg_type_t *type) {
        print_close(pctx);
 }
 
-isc_boolean_t
+bool
 cfg_obj_ismap(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_map));
+       return (obj->type->rep == &cfg_rep_map);
 }
 
 isc_result_t
@@ -2392,7 +2392,7 @@ cfg_parse_rawaddr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
        return (result);
 }
 
-isc_boolean_t
+bool
 cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags) {
        isc_result_t result;
        isc_netaddr_t na_dummy;
@@ -2400,7 +2400,7 @@ cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags) {
        REQUIRE(pctx != NULL);
 
        result = token_addr(pctx, flags, &na_dummy);
-       return (ISC_TF(result == ISC_R_SUCCESS));
+       return (result == ISC_R_SUCCESS);
 }
 
 isc_result_t
@@ -2619,10 +2619,10 @@ print_netprefix(cfg_printer_t *pctx, const cfg_obj_t *obj) {
        cfg_print_rawuint(pctx, p->prefixlen);
 }
 
-isc_boolean_t
+bool
 cfg_obj_isnetprefix(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_netprefix));
+       return (obj->type->rep == &cfg_rep_netprefix);
 }
 
 void
@@ -2780,10 +2780,10 @@ cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
        }
 }
 
-isc_boolean_t
+bool
 cfg_obj_issockaddr(const cfg_obj_t *obj) {
        REQUIRE(obj != NULL);
-       return (ISC_TF(obj->type->rep == &cfg_rep_sockaddr));
+       return (obj->type->rep == &cfg_rep_sockaddr);
 }
 
 const isc_sockaddr_t *
@@ -2812,7 +2812,7 @@ cfg_gettoken(cfg_parser_t *pctx, int options) {
  redo:
        pctx->token.type = isc_tokentype_unknown;
        result = isc_lex_gettoken(pctx->lexer, options, &pctx->token);
-       pctx->ungotten = ISC_FALSE;
+       pctx->ungotten = false;
        pctx->line = isc_lex_getsourceline(pctx->lexer);
 
        switch (result) {
@@ -2836,7 +2836,7 @@ cfg_gettoken(cfg_parser_t *pctx, int options) {
                                                value.list, elt, link);
                                goto redo;
                        }
-                       pctx->seen_eof = ISC_TRUE;
+                       pctx->seen_eof = true;
                }
                break;
 
@@ -2865,7 +2865,7 @@ cfg_ungettoken(cfg_parser_t *pctx) {
        if (pctx->seen_eof)
                return;
        isc_lex_ungettoken(pctx->lexer, &pctx->token);
-       pctx->ungotten = ISC_TRUE;
+       pctx->ungotten = true;
 }
 
 isc_result_t
@@ -2908,7 +2908,7 @@ cfg_parser_error(cfg_parser_t *pctx, unsigned int flags, const char *fmt, ...) {
        REQUIRE(fmt != NULL);
 
        va_start(args, fmt);
-       parser_complain(pctx, ISC_FALSE, flags, fmt, args);
+       parser_complain(pctx, false, flags, fmt, args);
        va_end(args);
        pctx->errors++;
 }
@@ -2921,24 +2921,24 @@ cfg_parser_warning(cfg_parser_t *pctx, unsigned int flags, const char *fmt, ...)
        REQUIRE(fmt != NULL);
 
        va_start(args, fmt);
-       parser_complain(pctx, ISC_TRUE, flags, fmt, args);
+       parser_complain(pctx, true, flags, fmt, args);
        va_end(args);
        pctx->warnings++;
 }
 
 #define MAX_LOG_TOKEN 30 /* How much of a token to quote in log messages. */
 
-static isc_boolean_t
+static bool
 have_current_file(cfg_parser_t *pctx) {
        cfg_listelt_t *elt;
        if (pctx->open_files == NULL)
-               return (ISC_FALSE);
+               return (false);
 
        elt = ISC_LIST_TAIL(pctx->open_files->value.list);
        if (elt == NULL)
-             return (ISC_FALSE);
+             return (false);
 
-       return (ISC_TRUE);
+       return (true);
 }
 
 static char *
@@ -2960,7 +2960,7 @@ current_file(cfg_parser_t *pctx) {
 }
 
 static void
-parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
+parser_complain(cfg_parser_t *pctx, bool is_warning,
                unsigned int flags, const char *format,
                va_list args)
 {
@@ -3113,7 +3113,7 @@ create_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        CHECK(cfg_create_obj(pctx, type, &obj));
        CHECK(isc_symtab_create(pctx->mctx, 5, /* XXX */
                                map_symtabitem_destroy,
-                               pctx, ISC_FALSE, &symtab));
+                               pctx, false, &symtab));
        obj->value.map.symtab = symtab;
        obj->value.map.id = NULL;
 
@@ -3132,13 +3132,13 @@ free_map(cfg_parser_t *pctx, cfg_obj_t *obj) {
        isc_symtab_destroy(&obj->value.map.symtab);
 }
 
-isc_boolean_t
+bool
 cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type) {
 
        REQUIRE(obj != NULL);
        REQUIRE(type != NULL);
 
-       return (ISC_TF(obj->type == type));
+       return (obj->type == type);
 }
 
 /*
index e89be0ec3fc4af85851a332e7f773469d66d002a..2ebb19a11025449000ac22bb0d67fb517e7da7d9 100644 (file)
@@ -20,6 +20,7 @@
 #include <netdb.h>
 #endif
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -90,12 +91,12 @@ struct probe_ns {
 };
 
 struct probe_trans {
-       isc_boolean_t inuse;
+       bool inuse;
        char *domain;
        dns_fixedname_t fixedname;
        dns_name_t *qname;
        const char **qlabel;
-       isc_boolean_t qname_found;
+       bool qname_found;
        dns_clientrestrans_t *resid;
        dns_message_t *qmessage;
        dns_message_t *rmessage;
@@ -121,7 +122,7 @@ struct lcl_stat {
 static unsigned long number_of_domains = 0;
 static unsigned long number_of_servers = 0;
 static unsigned long multiple_error_domains = 0;
-static isc_boolean_t debug_mode = ISC_FALSE;
+static bool debug_mode = false;
 static int verbose_level = 0;
 static const char *qlabels[] = {"www.", "ftp.", NULL};
 static struct probe_trans probes[MAX_PROBES];
@@ -147,7 +148,7 @@ print_rdataset(dns_rdataset_t *rdataset, dns_name_t *owner) {
 
        if (!dns_rdataset_isassociated(rdataset))
                return (ISC_R_SUCCESS);
-       result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(rdataset, owner, false, false,
                                     &target);
        if (result != ISC_R_SUCCESS)
                return (result);
@@ -165,7 +166,7 @@ print_name(dns_name_t *name) {
        char t[4096];
 
        isc_buffer_init(&target, t, sizeof(t));
-       result = dns_name_totext(name, ISC_TRUE, &target);
+       result = dns_name_totext(name, true, &target);
        if (result == ISC_R_SUCCESS) {
                isc_buffer_usedregion(&target, &r);
                printf("%.*s", (int)r.length, (char *)r.base);
@@ -502,7 +503,7 @@ request_done(isc_task_t *task, isc_event_t *event) {
        dns_rdatatype_t type;
 
        REQUIRE(task == probe_task);
-       REQUIRE(trans != NULL && trans->inuse == ISC_TRUE);
+       REQUIRE(trans != NULL && trans->inuse == true);
        rmessage = rev->rmessage;
        REQUIRE(rmessage == trans->rmessage);
        INSIST(outstanding_probes > 0);
@@ -638,7 +639,7 @@ request_done(isc_task_t *task, isc_event_t *event) {
  found:
        INSIST(*resultp != none);
        if (type == dns_rdatatype_a && *resultp == exist)
-               trans->qname_found = ISC_TRUE;
+               trans->qname_found = true;
 
        dns_client_destroyreqtrans(&trans->reqid);
        isc_event_free(&event);
@@ -751,7 +752,7 @@ resolve_nsaddress(isc_task_t *task, isc_event_t *event) {
        isc_result_t result;
 
        REQUIRE(task == probe_task);
-       REQUIRE(trans->inuse == ISC_TRUE);
+       REQUIRE(trans->inuse == true);
        REQUIRE(pns != NULL);
        INSIST(outstanding_probes > 0);
 
@@ -850,7 +851,7 @@ reset_probe(struct probe_trans *trans) {
        dns_message_reset(trans->qmessage, DNS_MESSAGE_INTENTRENDER);
        dns_message_reset(trans->rmessage, DNS_MESSAGE_INTENTPARSE);
 
-       trans->inuse = ISC_FALSE;
+       trans->inuse = false;
        if (trans->domain != NULL)
                isc_mem_free(mctx, trans->domain);
        trans->domain = NULL;
@@ -858,7 +859,7 @@ reset_probe(struct probe_trans *trans) {
                dns_fixedname_invalidate(&trans->fixedname);
        trans->qname = NULL;
        trans->qlabel = qlabels;
-       trans->qname_found = ISC_FALSE;
+       trans->qname_found = false;
        trans->current_ns = NULL;
 
        while ((pns = ISC_LIST_HEAD(trans->nslist)) != NULL) {
@@ -888,7 +889,7 @@ resolve_ns(isc_task_t *task, isc_event_t *event) {
        struct probe_ns *pns;
 
        REQUIRE(task == probe_task);
-       REQUIRE(trans->inuse == ISC_TRUE);
+       REQUIRE(trans->inuse == true);
        INSIST(outstanding_probes > 0);
 
        for (name = ISC_LIST_HEAD(rev->answerlist); name != NULL;
@@ -967,7 +968,7 @@ probe_domain(struct probe_trans *trans) {
        char *cp;
 
        REQUIRE(trans != NULL);
-       REQUIRE(trans->inuse == ISC_FALSE);
+       REQUIRE(trans->inuse == false);
        REQUIRE(outstanding_probes < MAX_PROBES);
 
        /* Construct domain */
@@ -998,7 +999,7 @@ probe_domain(struct probe_trans *trans) {
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
-       trans->inuse = ISC_TRUE;
+       trans->inuse = true;
        outstanding_probes++;
 
        return (ISC_R_SUCCESS);
@@ -1038,7 +1039,7 @@ main(int argc, char *argv[]) {
                        cacheserver = isc_commandline_argument;
                        break;
                case 'd':
-                       debug_mode = ISC_TRUE;
+                       debug_mode = true;
                        break;
                case 'h':
                        usage();
@@ -1131,12 +1132,12 @@ main(int argc, char *argv[]) {
 
        /* Set up and start probe */
        for (i = 0; i < MAX_PROBES; i++) {
-               probes[i].inuse = ISC_FALSE;
+               probes[i].inuse = false;
                probes[i].domain = NULL;
                dns_fixedname_init(&probes[i].fixedname);
                probes[i].qname = NULL;
                probes[i].qlabel = qlabels;
-               probes[i].qname_found = ISC_FALSE;
+               probes[i].qname_found = false;
                probes[i].resid = NULL;
                ISC_LIST_INIT(probes[i].nslist);
                probes[i].reqid = NULL;
index e8013cfc77df9ec041007d7b755f974f028e21ba..30389fcf5055d56aff2b617302f1b9e3afab049f 100644 (file)
@@ -23,6 +23,7 @@
 #include <unistd.h>
 #endif
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -73,7 +74,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner) {
 
        isc_buffer_init(&target, t, sizeof(t));
 
-       result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(rdataset, owner, false, false,
                                     &target);
        if (result != ISC_R_SUCCESS)
                return (result);
@@ -98,7 +99,7 @@ usage(void) {
 
 static void
 set_key(dns_client_t *client, char *keynamestr, char *keystr,
-       isc_boolean_t is_sep, isc_mem_t **mctxp)
+       bool is_sep, isc_mem_t **mctxp)
 {
        isc_result_t result;
        dns_fixedname_t fkeyname;
@@ -250,7 +251,7 @@ main(int argc, char *argv[]) {
        dns_namelist_t namelist;
        isc_mem_t *keymctx = NULL;
        unsigned int clientopt, resopt;
-       isc_boolean_t is_sep = ISC_FALSE;
+       bool is_sep = false;
        const char *port = "53";
        isc_mem_t *mctx = NULL;
        isc_appctx_t *actx = NULL;
@@ -308,7 +309,7 @@ main(int argc, char *argv[]) {
                        }
                        break;
                case 'e':
-                       is_sep = ISC_TRUE;
+                       is_sep = true;
                        break;
                case 'S':
                        if (altserver != NULL) {
index 4c28c549bdc7990a6d6985ac856b3e56ef3f9341..28c6573c427e12e8e777a5252898098542571dda 100644 (file)
@@ -13,6 +13,7 @@
 #include <config.h>
 
 #ifndef WIN32
+#include <stdbool.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 
@@ -59,7 +60,7 @@ static FILE *fp;
 
 struct query_trans {
        int id;
-       isc_boolean_t inuse;
+       bool inuse;
        dns_rdatatype_t type;
        dns_fixedname_t fixedname;
        dns_name_t *qname;
@@ -138,7 +139,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner) {
 
        if (!dns_rdataset_isassociated(rdataset))
                return (ISC_R_SUCCESS);
-       result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
+       result = dns_rdataset_totext(rdataset, owner, false, false,
                                     &target);
        if (result != ISC_R_SUCCESS)
                return (result);
@@ -157,7 +158,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
        isc_result_t result;
 
        REQUIRE(task == query_task);
-       REQUIRE(trans->inuse == ISC_TRUE);
+       REQUIRE(trans->inuse == true);
        REQUIRE(outstanding_queries > 0);
 
        printf("answer[%2d]\n", trans->id);
@@ -180,7 +181,7 @@ process_answer(isc_task_t *task, isc_event_t *event) {
 
        isc_event_free(&event);
 
-       trans->inuse = ISC_FALSE;
+       trans->inuse = false;
        dns_fixedname_invalidate(&trans->fixedname);
        trans->qname = NULL;
        outstanding_queries--;
@@ -207,7 +208,7 @@ dispatch_query(struct query_trans *trans) {
        char *cp;
 
        REQUIRE(trans != NULL);
-       REQUIRE(trans->inuse == ISC_FALSE);
+       REQUIRE(trans->inuse == false);
        REQUIRE(ISC_LIST_EMPTY(trans->answerlist));
        REQUIRE(outstanding_queries < MAX_QUERIES);
 
@@ -234,7 +235,7 @@ dispatch_query(struct query_trans *trans) {
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
-       trans->inuse = ISC_TRUE;
+       trans->inuse = true;
        outstanding_queries++;
 
        return (ISC_R_SUCCESS);
@@ -313,7 +314,7 @@ main(int argc, char *argv[]) {
 
        for (i = 0; i < MAX_QUERIES; i++) {
                query_array[i].id = i;
-               query_array[i].inuse = ISC_FALSE;
+               query_array[i].inuse = false;
                query_array[i].type = type;
                dns_fixedname_init(&query_array[i].fixedname);
                query_array[i].qname = NULL;
@@ -389,7 +390,7 @@ main(int argc, char *argv[]) {
 
        /* Sanity check */
        for (i = 0; i < MAX_QUERIES; i++)
-               INSIST(query_array[i].inuse == ISC_FALSE);
+               INSIST(query_array[i].inuse == false);
 
        /* Cleanup */
        isc_task_detach(&query_task);
index b70aecd3f23f4e142276b81707e51b3c590a428f..83f963d032e3b6b7ae1a85a80663f25212997a7d 100644 (file)
@@ -27,6 +27,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <inttypes.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -67,7 +68,7 @@ static const char *port = "53";
 
 static void setup_tsec(char *keyfile, isc_mem_t *mctx);
 static void update_addordelete(isc_mem_t *mctx, char *cmdline,
-                              isc_boolean_t isdelete, dns_name_t *name);
+                              bool isdelete, dns_name_t *name);
 static void evaluate_prereq(isc_mem_t *mctx, char *cmdline, dns_name_t *name);
 
 ISC_PLATFORM_NORETURN_PRE static void
@@ -111,7 +112,7 @@ DestroySockets(void) {
 #define DestroySockets() ((void)0)
 #endif
 
-static isc_boolean_t
+static bool
 addserver(const char *server, isc_sockaddrlist_t *list,
           isc_sockaddr_t *sockaddr)
 {
@@ -134,7 +135,7 @@ addserver(const char *server, isc_sockaddrlist_t *list,
                fprintf(stderr, "getaddrinfo(%s) failed: %s\n",
                        server, gai_strerror(gaierror));
                DestroySockets();
-               return (ISC_FALSE);
+               return (false);
        }
        INSIST(res->ai_addrlen <= sizeof(sockaddr->type));
        memmove(&sockaddr->type, res->ai_addr, res->ai_addrlen);
@@ -143,7 +144,7 @@ addserver(const char *server, isc_sockaddrlist_t *list,
        ISC_LIST_APPEND(*list, sockaddr, link);
        freeaddrinfo(res);
        DestroySockets();
-       return (ISC_TRUE);
+       return (true);
 }
 
 int
@@ -158,7 +159,7 @@ main(int argc, char *argv[]) {
        isc_sockaddrlist_t rec_servers;
        isc_sockaddrlist_t auth_servers, *auth_serversp = &auth_servers;
        isc_result_t result;
-       isc_boolean_t isdelete;
+       bool isdelete;
        isc_buffer_t b, *buf;
        dns_fixedname_t zname0, pname0, uname0;
        unsigned int namelen;
@@ -168,7 +169,7 @@ main(int argc, char *argv[]) {
        dns_rdata_t *rdata;
        dns_namelist_t updatelist, prereqlist, *prereqlistp = NULL;
        isc_mem_t *umctx = NULL;
-       isc_boolean_t sendtwice = ISC_FALSE;
+       bool sendtwice = false;
 
        ISC_LIST_INIT(auth_servers);
        ISC_LIST_INIT(rec_servers);
@@ -200,7 +201,7 @@ main(int argc, char *argv[]) {
                                nsa_recursive++;
                        break;
                case 's':
-                       sendtwice = ISC_TRUE;
+                       sendtwice = true;
                        break;
                case 'z':
                        zonenamestr = isc_commandline_argument;
@@ -217,9 +218,9 @@ main(int argc, char *argv[]) {
 
        /* command line argument validation */
        if (strcmp(argv[0], "delete") == 0)
-               isdelete = ISC_TRUE;
+               isdelete = true;
        else if (strcmp(argv[0], "add") == 0)
-               isdelete = ISC_FALSE;
+               isdelete = false;
        else {
                fprintf(stderr, "invalid update command: %s\n", argv[0]);
                exit(1);
@@ -478,7 +479,7 @@ parse_rdata(isc_mem_t *mctx, char **cmdlinep, dns_rdataclass_t rdataclass,
 }
 
 static void
-update_addordelete(isc_mem_t *mctx, char *cmdline, isc_boolean_t isdelete,
+update_addordelete(isc_mem_t *mctx, char *cmdline, bool isdelete,
                   dns_name_t *name)
 {
        isc_result_t result;
@@ -636,8 +637,8 @@ update_addordelete(isc_mem_t *mctx, char *cmdline, isc_boolean_t isdelete,
 }
 
 static void
-make_prereq(isc_mem_t *mctx, char *cmdline, isc_boolean_t ispositive,
-           isc_boolean_t isrrset, dns_name_t *name)
+make_prereq(isc_mem_t *mctx, char *cmdline, bool ispositive,
+           bool isrrset, dns_name_t *name)
 {
        isc_result_t result;
        char *word;
@@ -738,7 +739,7 @@ make_prereq(isc_mem_t *mctx, char *cmdline, isc_boolean_t ispositive,
 static void
 evaluate_prereq(isc_mem_t *mctx, char *cmdline, dns_name_t *name) {
        char *word;
-       isc_boolean_t ispositive, isrrset;
+       bool ispositive, isrrset;
 
        word = nsu_strsep(&cmdline, " \t\r\n");
        if (word == NULL || *word == 0) {
@@ -746,17 +747,17 @@ evaluate_prereq(isc_mem_t *mctx, char *cmdline, dns_name_t *name) {
                exit(1);
        }
        if (strcasecmp(word, "nxdomain") == 0) {
-               ispositive = ISC_FALSE;
-               isrrset = ISC_FALSE;
+               ispositive = false;
+               isrrset = false;
        } else if (strcasecmp(word, "yxdomain") == 0) {
-               ispositive = ISC_TRUE;
-               isrrset = ISC_FALSE;
+               ispositive = true;
+               isrrset = false;
        } else if (strcasecmp(word, "nxrrset") == 0) {
-               ispositive = ISC_FALSE;
-               isrrset = ISC_TRUE;
+               ispositive = false;
+               isrrset = true;
        } else if (strcasecmp(word, "yxrrset") == 0) {
-               ispositive = ISC_TRUE;
-               isrrset = ISC_TRUE;
+               ispositive = true;
+               isrrset = true;
        } else {
                fprintf(stderr, "incorrect operation code: %s\n", word);
                exit(1);
index 674abaf9ff026843ef43f250e494a06444353672..1bf9d4ebf8dc5f9209620a34ca17e8fa18858953 100644 (file)
@@ -103,12 +103,6 @@ for (<>) {
       unless $file =~ m%isc/resultclass.h%;
   }
 
-  if (/$nocomment.*ISC_(TRUE|FALSE|TF)\W/m &&
-      ! m%^#include <isc/(types|boolean).h>%m) {
-    print "$file has ISC_TRUE/FALSE/TF without <isc/(boolean|types).h>\n"
-      unless $file =~ m%isc/boolean.h%;
-  }
-
   if (/$nocomment.*ISC_PLATFORM_/m &&
       ! m%^#include <isc/platform.h>%m) {
     print "$file has ISC_PLATFORM_ without <isc/platform.h>\n"
@@ -248,10 +242,6 @@ for (<>) {
       next;
     }
 
-    if ($elided eq "<isc/boolean.h>") {
-      next if /^$nocomment.*ISC_(TRUE|FALSE|TF)\W/m;
-    }
-
     if ($elided eq "<isc/platform.h>") {
       if (! /^$nocomment.*ISC_PLATFORM_/m) {
         print "$file has <isc/platform.h> but no ISC_PLATFORM_\n";
index bd651c96ef34d75908e5de8bf7d130dd4e5db788..4b7642d68f690a7e13a5ed4a95c1074d15e06d9c 100644 (file)
 ./lib/isc/include/isc/base32.h                 C       2008,2014,2016,2018
 ./lib/isc/include/isc/base64.h                 C       1999,2000,2001,2004,2005,2006,2007,2016,2018
 ./lib/isc/include/isc/bind9.h                  C       2009,2013,2016,2018
-./lib/isc/include/isc/boolean.h                        C       1998,1999,2000,2001,2004,2005,2006,2007,2016,2018
 ./lib/isc/include/isc/buffer.h                 C       1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2010,2012,2014,2016,2017,2018
 ./lib/isc/include/isc/bufferlist.h             C       1999,2000,2001,2004,2005,2006,2007,2016,2018
 ./lib/isc/include/isc/commandline.h            C       1999,2000,2001,2004,2005,2006,2007,2015,2016,2018