#186 Adopt to bind without isc/boolean.h
Merged 4 years ago by abbra. Opened 4 years ago by abbra.
abbra/bind-dyndb-ldap remove-outdated-types  into  master

file modified
+5 -5
@@ -67,7 +67,7 @@ 

  	} while (0)

  

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

- get_mode(const cfg_obj_t *obj, isc_boolean_t *value)

+ get_mode(const cfg_obj_t *obj, bool *value)

  {

  	const char *str;

  
@@ -82,8 +82,8 @@ 

  	}

  	str = cfg_obj_asstring(obj);

  

- 	MATCH("grant", ISC_TRUE);

- 	MATCH("deny", ISC_FALSE);

+ 	MATCH("grant", true);

+ 	MATCH("deny", false);

  

  	log_bug("unsupported ACL mode '%s'", str);

  	return ISC_R_NOTIMPLEMENTED;
@@ -175,7 +175,7 @@ 

  	dns_fixedname_init(fname);

  

  	result = dns_name_fromtext(dns_fixedname_name(fname), &buf,

- 				   dns_rootname, ISC_FALSE, NULL);

+ 				   dns_rootname, false, NULL);

  	if (result != ISC_R_SUCCESS)

  		log_error("'%s' is not a valid name", str);

  
@@ -296,7 +296,7 @@ 

  

  	for (el = cfg_list_first(policy); el != NULL; el = cfg_list_next(el)) {

  		const cfg_obj_t *stmt;

- 		isc_boolean_t grant;

+ 		bool grant;

  		unsigned int match_type;

  		dns_fixedname_t fname, fident;

  		dns_rdatatype_t *types;

file modified
+8 -8
@@ -153,7 +153,7 @@ 

  	int order;

  	unsigned int nlabels;

  	dns_zone_t *zone = NULL;

- 	isc_boolean_t isempty;

+ 	bool isempty;

  

  	REQUIRE(iter != NULL);

  	REQUIRE(iter->nextidx < sizeof(empty_zones));
@@ -184,12 +184,12 @@ 

  				isempty = zone_isempty(zone);

  			else if (result == DNS_R_PARTIALMATCH

  				 || result == ISC_R_NOTFOUND)

- 				isempty = ISC_FALSE;

+ 				isempty = false;

  			else

  				goto cleanup;

  			if (zone != NULL)

  				dns_zone_detach(&zone);

- 			if (isempty == ISC_FALSE)

+ 			if (isempty == false)

  				continue;

  			++iter->nextidx;

  			CLEANUP_WITH(ISC_R_SUCCESS);
@@ -299,10 +299,10 @@ 

   */

  isc_result_t

  empty_zone_handle_conflicts(dns_name_t *name, dns_zt_t *zonetable,

- 			    isc_boolean_t warn_only)

+ 			    bool warn_only)

  {

  	isc_result_t result;

- 	isc_boolean_t first = ISC_TRUE;

+ 	bool first = true;

  	empty_zone_search_t eziter = {}; /* init with zeroes */

  	char name_char[DNS_NAME_FORMATSIZE];

  	char ezname_char[DNS_NAME_FORMATSIZE];
@@ -312,7 +312,7 @@ 

  	     result = empty_zone_search_next(&eziter))

  	{

  		dns_name_format(name, name_char, DNS_NAME_FORMATSIZE);

- 		if (warn_only == ISC_TRUE) {

+ 		if (warn_only == true) {

  			dns_name_format(&eziter.ezname, ezname_char,

  					DNS_NAME_FORMATSIZE);

  			log_warn("ignoring inherited 'forward first;' for zone "
@@ -325,10 +325,10 @@ 

  		/* Shutdown automatic empty zone if it is present. */

  		result = empty_zone_unload(&eziter.ezname, zonetable);

  		if (result == ISC_R_SUCCESS) {

- 			if (first == ISC_TRUE) {

+ 			if (first == true) {

  				log_info("shutting down automatic empty zones to "

  					 "enable forwarding for domain '%s'", name_char);

- 				first = ISC_FALSE;

+ 				first = false;

  			}

  		} else if (result == DNS_R_DISALLOWED) {

  			/* A normal (non-empty) zone exists:

file modified
+2 -2
@@ -26,7 +26,7 @@ 

  

  isc_result_t

  empty_zone_handle_conflicts(dns_name_t *name, dns_zt_t *zonetable,

- 			    isc_boolean_t warn_only) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 			    bool warn_only) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  /* Trigger to execute empty_zone_handle_conflicts() for dns_rootname. */

  #define LDAPDB_EVENT_GLOBALFWD_HANDLEEZ	(LDAPDB_EVENTCLASS + 5)
@@ -34,7 +34,7 @@ 

  typedef struct ldap_globalfwd_handleez ldap_globalfwd_handleez_t;

  struct ldap_globalfwd_handleez {

  	ISC_EVENT_COMMON(ldap_globalfwd_handleez_t);

- 	isc_boolean_t warn_only;

+ 	bool warn_only;

  };

  

  void

file modified
+20 -22
@@ -6,8 +6,6 @@ 

  

  #include "config.h"

  

- #include <isc/boolean.h>

- 

  #include <isccfg/grammar.h>

  

  #include <dns/forward.h>
@@ -308,15 +306,15 @@ 

   * a) policy = none

   * b) (policy != none) && (non-empty list of forwarders)

   *

-  * @param[out] isexplicit ISC_TRUE if conditions for explicit configuration

-  *                        are met, ISC_FALSE otherwise

+  * @param[out] isexplicit true if conditions for explicit configuration

+  *                        are met, false otherwise

   *

   * @retval ISC_R_SUCCESS isexplicit is set appropriately

   * @retval other         memory allocation or parsing errors etc.

   */

  static isc_result_t

  fwd_setting_isexplicit(isc_mem_t *mctx, const settings_set_t *set,

- 		       isc_boolean_t *isexplicit) {

+ 		       bool *isexplicit) {

  	isc_result_t result;

  	setting_t *setting = NULL;

  	dns_fwdpolicy_t	fwdpolicy;
@@ -325,16 +323,16 @@ 

  	REQUIRE(isexplicit != NULL);

  	ISC_LIST_INIT(fwdrs);

  

- 	CHECK(setting_find("forward_policy", set, ISC_FALSE, ISC_TRUE, &setting));

+ 	CHECK(setting_find("forward_policy", set, false, true, &setting));

  	INSIST(get_enum_value(forwarder_policy_txts, setting->value.value_char,

  			      (int *)&fwdpolicy) == ISC_R_SUCCESS);

  	if (fwdpolicy == dns_fwdpolicy_none) {

- 		*isexplicit = ISC_TRUE;

+ 		*isexplicit = true;

  		return ISC_R_SUCCESS;

  	}

  

  	setting = NULL;

- 	CHECK(setting_find("forwarders", set, ISC_FALSE, ISC_TRUE, &setting));

+ 	CHECK(setting_find("forwarders", set, false, true, &setting));

  	CHECK(fwd_parse_str(setting->value.value_char, mctx, &fwdrs));

  

  cleanup:
@@ -356,7 +354,7 @@ 

  fwd_setting_find_explicit(isc_mem_t *mctx, const settings_set_t *start_set,

  			  const settings_set_t **found) {

  	isc_result_t result;

- 	isc_boolean_t isexplicit;

+ 	bool isexplicit;

  

  	REQUIRE(found != NULL && *found == NULL);

  
@@ -365,7 +363,7 @@ 

  	     set = set->parent_set)

  	{

  		CHECK(fwd_setting_isexplicit(mctx, set, &isexplicit));

- 		if (isexplicit == ISC_TRUE) {

+ 		if (isexplicit == true) {

  			*found = set;

  			CLEANUP_WITH(ISC_R_SUCCESS);

  		}
@@ -436,7 +434,7 @@ 

  	first = result;

  	if (result != ISC_R_SUCCESS && result != ISC_R_IGNORE)

  		goto cleanup;

- 	result = setting_find("forward_policy", set, ISC_FALSE, ISC_TRUE, NULL);

+ 	result = setting_find("forward_policy", set, false, true, NULL);

  	if (result == ISC_R_NOTFOUND) {

  		log_debug(2, "defaulting to forward policy 'first' for "

  			  "%s", ldap_entry_logname(entry));
@@ -503,7 +501,7 @@ 

  	dns_view_t *view = NULL;

  	isc_result_t lock_state = ISC_R_IGNORE;

  	dns_forwarderlist_t fwdrs;

- 	isc_boolean_t is_global_config;

+ 	bool is_global_config;

  	dns_fixedname_t foundname;

  	const char *msg_use_global_fwds;

  	const char *msg_obj_type;
@@ -515,7 +513,7 @@ 

  	dns_fwdpolicy_t fwdpolicy;

  	const char *fwdpolicy_str = NULL;

  	const char *forwarders_str = NULL;

- 	isc_boolean_t isconfigured;

+ 	bool isconfigured;

  	const settings_set_t *explicit_set = NULL;

  

  	REQUIRE(inst != NULL && name != NULL);
@@ -526,11 +524,11 @@ 

  	ISC_LIST_INIT(fwdrs);

  

  	if (dns_name_equal(name, dns_rootname)) {

- 		is_global_config = ISC_TRUE;

+ 		is_global_config = true;

  		msg_obj_type = "global forwarding configuration";

  		msg_use_global_fwds = "; global forwarders will be disabled";

  	} else {

- 		is_global_config = ISC_FALSE;

+ 		is_global_config = false;

  		msg_obj_type = "zone";

  		msg_use_global_fwds = "; global forwarders will be used "

  				      "(if they are configured)";
@@ -543,10 +541,10 @@ 

  	 * For all other zones (non-root) zones *do not* use recursive getter

  	 * and let BIND to handle inheritance in fwdtable itself. */

  	CHECK(fwd_setting_isexplicit(mctx, set, &isconfigured));

- 	if (isconfigured == ISC_FALSE && is_global_config == ISC_TRUE) {

+ 	if (isconfigured == false && is_global_config == true) {

  		result = fwd_setting_find_explicit(mctx, set, &explicit_set);

  		if (result == ISC_R_SUCCESS) {

- 			isconfigured = ISC_TRUE;

+ 			isconfigured = true;

  			if (set != explicit_set) {

  				log_debug(5, "%s was inherited from %s",

  					  msg_obj_type, explicit_set->name);
@@ -556,7 +554,7 @@ 

  			goto cleanup;

  	}

  

- 	if (isconfigured == ISC_TRUE) {

+ 	if (isconfigured == true) {

  		CHECK(setting_get_str("forward_policy", set, &fwdpolicy_str));

  		result = get_enum_value(forwarder_policy_txts,

  					fwdpolicy_str, (int *)&fwdpolicy);
@@ -580,7 +578,7 @@ 

  	/* update forwarding table */

  	run_exclusive_enter(inst, &lock_state);

  	CHECK(fwd_delete_table(view, name, msg_obj_type, set->name));

- 	if (isconfigured == ISC_TRUE) {

+ 	if (isconfigured == true) {

  		CHECK(dns_fwdtable_addfwd(view->fwdtable, name, &fwdrs,

  					  fwdpolicy));

  	}
@@ -592,7 +590,7 @@ 

  		  dns_result_totext(result));

  

  	/* Handle collisions with automatic empty zones. */

- 	if (isconfigured == ISC_TRUE)

+ 	if (isconfigured == true)

  		CHECK(empty_zone_handle_conflicts(name,

  						  view->zonetable,

  						  (fwdpolicy == dns_fwdpolicy_first)));
@@ -634,7 +632,7 @@ 

  fwd_reconfig_global(ldap_instance_t *inst) {

  	isc_result_t result;

  	settings_set_t *toplevel_settings = NULL;

- 	isc_boolean_t root_zone_is_active = ISC_FALSE;

+ 	bool root_zone_is_active = false;

  

  	/* we have to respect forwarding configuration for root zone */

  	result = zr_get_zone_settings(ldap_instance_getzr(inst), dns_rootname,
@@ -646,7 +644,7 @@ 

  	else if (result != ISC_R_NOTFOUND)

  		goto cleanup;

  

- 	if (root_zone_is_active == ISC_FALSE)

+ 	if (root_zone_is_active == false)

  		toplevel_settings = ldap_instance_getsettings_server(inst);

  

  	CHECK(fwd_configure_zone(toplevel_settings, inst, dns_rootname));

file modified
+1 -1
@@ -101,7 +101,7 @@ 

  

  	RWLOCK(&fwdr->rwlock, isc_rwlocktype_write);

  

- 	CHECK(dns_rbt_deletename(fwdr->rbt, name, ISC_FALSE));

+ 	CHECK(dns_rbt_deletename(fwdr->rbt, name, false));

  

  cleanup:

  	RWUNLOCK(&fwdr->rwlock, isc_rwlocktype_write);

file modified
+11 -11
@@ -34,7 +34,7 @@ 

   * @param[out] target Absolute DNS name derived from the first two idnsNames.

   * @param[out] origin Absolute DNS name derived from the last idnsName

   *                    component of DN, i.e. zone. Can be NULL.

-  * @param[out] iszone ISC_TRUE if DN points to zone object, ISC_FALSE otherwise.

+  * @param[out] iszone true if DN points to zone object, false otherwise.

   *

   * @code

   * Examples:
@@ -53,7 +53,7 @@ 

   */

  isc_result_t

  dn_to_dnsname(isc_mem_t *mctx, const char *dn_str, dns_name_t *target,

- 	      dns_name_t *otarget, isc_boolean_t *iszone)

+ 	      dns_name_t *otarget, bool *iszone)

  {

  	LDAPDN dn = NULL;

  	LDAPRDN rdn = NULL;
@@ -130,20 +130,20 @@ 

  		CLEANUP_WITH(ISC_R_UNEXPECTEDEND);

  	} else if (idx == 1) { /* zone only */

  		if (iszone != NULL)

- 			*iszone = ISC_TRUE;

+ 			*iszone = true;

  		CHECK(dns_name_copy(dns_rootname, &origin, NULL));

  		CHECK(dns_name_fromtext(&name, &name_buf, dns_rootname, 0, NULL));

  	} else if (idx == 2) { /* owner and zone */

  		if (iszone != NULL)

- 			*iszone = ISC_FALSE;

+ 			*iszone = false;

  		CHECK(dns_name_fromtext(&origin, &origin_buf, dns_rootname, 0,

  					NULL));

  		CHECK(dns_name_fromtext(&name, &name_buf, &origin, 0, NULL));

- 		if (dns_name_issubdomain(&name, &origin) == ISC_FALSE) {

+ 		if (dns_name_issubdomain(&name, &origin) == false) {

  			log_error("out-of-zone data: first idnsName is not a "

  				  "subdomain of the other");

  			CLEANUP_WITH(DNS_R_BADOWNERNAME);

- 		} else if (dns_name_equal(&name, &origin) == ISC_TRUE) {

+ 		} else if (dns_name_equal(&name, &origin) == true) {

  			log_error("attempt to redefine zone apex: first "

  				  "idnsName equals to zone name");

  			CLEANUP_WITH(DNS_R_BADOWNERNAME);
@@ -185,12 +185,12 @@ 

   * @param[in] prefix      Prefix for error messages, usually a function name.

   * @param[in] dn

   * @param[in] dniszone    Boolean returned by dn_to_dnsname for given DN.

-  * @param[in] classiszone ISC_TRUE if DN should be a zone, ISC_FALSE otherwise.

+  * @param[in] classiszone true if DN should be a zone, false otherwise.

   * @retval ISC_R_SUCCESS or ISC_R_UNEXPECTED if values do not match.

   */

  isc_result_t

  dn_want_zone(const char * const prefix, const char * const dn,

- 	     isc_boolean_t dniszone, isc_boolean_t classiszone) {

+ 	     bool dniszone, bool classiszone) {

  	if (dniszone != classiszone) {

  		log_error("%s: object '%s' does%s have a zone object class "

  			  "but DN format suggests that it is%s a zone",
@@ -423,12 +423,12 @@ 

   * @param[in]  rdtype

   * @param[out] target   Output buffer with \0 terminated attribute name.

   * @param[in]  size     Target size.

-  * @param[in]  unknown  ISC_TRUE = use generic syntax "UnknownRecord;TYPE65333",

-  *                      ISC_FALSE = use type-specific mnemonic like "ARecord"

+  * @param[in]  unknown  true = use generic syntax "UnknownRecord;TYPE65333",

+  *                      false = use type-specific mnemonic like "ARecord"

   */

  isc_result_t

  rdatatype_to_ldap_attribute(dns_rdatatype_t rdtype, char *target,

- 			    unsigned int size, isc_boolean_t unknown)

+ 			    unsigned int size, bool unknown)

  {

  	isc_result_t result;

  	char rdtype_str[DNS_RDATATYPE_FORMATSIZE];

file modified
+3 -3
@@ -28,11 +28,11 @@ 

   */

  isc_result_t dn_to_dnsname(isc_mem_t *mctx, const char *dn,

  			   dns_name_t *target, dns_name_t *origin,

- 			   isc_boolean_t *iszone)

+ 			   bool *iszone)

  			   ATTR_NONNULL(1, 2, 3) ATTR_CHECKRESULT;

  

  isc_result_t dn_want_zone(const char * const prefix, const char * const dn,

- 			  isc_boolean_t dniszone, isc_boolean_t classiszone)

+ 			  bool dniszone, bool classiszone)

  			  ATTR_NONNULLS ATTR_CHECKRESULT;

  

  isc_result_t dnsname_to_dn(zone_register_t *zr, dns_name_t *name, dns_name_t *zone,
@@ -43,7 +43,7 @@ 

  

  isc_result_t

  rdatatype_to_ldap_attribute(dns_rdatatype_t rdtype, char *target,

- 			    unsigned int size, isc_boolean_t unknown)

+ 			    unsigned int size, bool unknown)

  			    ATTR_NONNULLS ATTR_CHECKRESULT;

  

  isc_result_t

file modified
+23 -23
@@ -141,7 +141,7 @@ 

  			      dns_masterformat_text);

  	log_info("dump to '%s' finished: %s", str_buf(file_name),

  		 isc_result_totext(result));

- 	dns_db_closeversion(ldapdb->rbtdb, &version, ISC_FALSE);

+ 	dns_db_closeversion(ldapdb->rbtdb, &version, false);

  

  cleanup:

  	if (result != ISC_R_SUCCESS) {
@@ -267,7 +267,7 @@ 

  

  cleanup:

  	if (newversion != NULL)

- 		dns_db_closeversion(ldapdb, &newversion, ISC_TRUE);

+ 		dns_db_closeversion(ldapdb, &newversion, true);

     @endverbatim

   */

  static isc_result_t
@@ -307,7 +307,7 @@ 

   * @see newversion for related warnings and examples.

   */

  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)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *)db;

  	dns_dbversion_t *closed_version = *versionp;
@@ -322,7 +322,7 @@ 

  }

  

  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)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;
@@ -467,7 +467,7 @@ 

  

  static isc_result_t

  node_isempty(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,

- 	     isc_stdtime_t now, isc_boolean_t *isempty) {

+ 	     isc_stdtime_t now, bool *isempty) {

  	dns_rdatasetiter_t *rds_iter = NULL;

  	dns_fixedname_t fname;

  	char buff[DNS_NAME_FORMATSIZE];
@@ -479,14 +479,14 @@ 

  

  	result = dns_db_allrdatasets(db, node, version, now, &rds_iter);

  	if (result == ISC_R_NOTFOUND) {

- 		*isempty = ISC_TRUE;

+ 		*isempty = true;

  	} else if (result == ISC_R_SUCCESS) {

  		result = dns_rdatasetiter_first(rds_iter);

  		if (result == ISC_R_NOMORE) {

- 			*isempty = ISC_TRUE;

+ 			*isempty = true;

  			result = ISC_R_SUCCESS;

  		} else if (result == ISC_R_SUCCESS) {

- 			*isempty = ISC_FALSE;

+ 			*isempty = false;

  			result = ISC_R_SUCCESS;

  		} else if (result != ISC_R_SUCCESS) {

  			dns_name_format(dns_fixedname_name(&fname),
@@ -516,7 +516,7 @@ 

  	dns_fixedname_t fname;

  	dns_name_t *zname = NULL;

  	dns_rdatalist_t *rdlist = NULL;

- 	isc_boolean_t empty_node = ISC_FALSE;

+ 	bool empty_node = false;

  	isc_result_t substract_result;

  	isc_result_t result;

  
@@ -561,7 +561,7 @@ 

  	ldapdb_t *ldapdb = (ldapdb_t *) db;

  	dns_fixedname_t fname;

  	dns_name_t *zname = NULL;

- 	isc_boolean_t empty_node;

+ 	bool empty_node;

  	isc_result_t result;

  

  	REQUIRE(VALID_LDAPDB(ldapdb));
@@ -580,7 +580,7 @@ 

  	CHECK(node_isempty(ldapdb->rbtdb, node, version, 0, &empty_node));

  	CHECK(ldapdb_name_fromnode(node, dns_fixedname_name(&fname)));

  

- 	if (empty_node == ISC_TRUE) {

+ 	if (empty_node == true) {

  		CHECK(remove_entry_from_ldap(dns_fixedname_name(&fname), zname,

  					     ldapdb->ldap_inst));

  	} else {
@@ -592,7 +592,7 @@ 

  	return result;

  }

  

- static isc_boolean_t

+ static bool

  issecure(dns_db_t *db)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;
@@ -618,16 +618,16 @@ 

   *

   * !!! This could be required for optimizations (like on-disk cache).

   */

- 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 overmem)

+ overmem(dns_db_t *db, bool overmem)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;

  
@@ -669,8 +669,8 @@ 

  

  static isc_result_t

  getnsec3parameters(dns_db_t *db, dns_dbversion_t *version,

- 			  dns_hash_t *hash, isc_uint8_t *flags,

- 			  isc_uint16_t *iterations,

+ 			  dns_hash_t *hash, uint8_t *flags,

+ 			  uint16_t *iterations,

  			  unsigned char *salt, size_t *salt_length)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;
@@ -683,7 +683,7 @@ 

  }

  

  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)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;
@@ -724,7 +724,7 @@ 

  	dns_db_resigned(ldapdb->rbtdb, rdataset, version);

  }

  

- static isc_boolean_t

+ static bool

  isdnssec(dns_db_t *db)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;
@@ -766,7 +766,7 @@ 

  

  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)

  {

  	ldapdb_t *ldapdb = (ldapdb_t *) db;
@@ -950,7 +950,7 @@ 

  {

  	ldapdb_t *ldapdb = NULL;

  	isc_result_t result;

- 	isc_boolean_t lock_ready = ISC_FALSE;

+ 	bool lock_ready = false;

  

  	/* Database instance name. */

  	REQUIRE(type == LDAP_DB_TYPE);
@@ -963,7 +963,7 @@ 

  

  	isc_mem_attach(mctx, &ldapdb->common.mctx);

  	CHECK(isc_mutex_init(&ldapdb->newversion_lock));

- 	lock_ready = ISC_TRUE;

+ 	lock_ready = true;

  	dns_name_init(&ldapdb->common.origin, NULL);

  	isc_ondestroy_init(&ldapdb->common.ondest);

  
@@ -988,7 +988,7 @@ 

  

  cleanup:

  	if (ldapdb != NULL) {

- 		if (lock_ready == ISC_TRUE)

+ 		if (lock_ready == true)

  			RUNTIME_CHECK(isc_mutex_destroy(&ldapdb->newversion_lock)

  				      == ISC_R_SUCCESS);

  		if (dns_name_dynamic(&ldapdb->common.origin))

file modified
+7 -7
@@ -7,7 +7,7 @@ 

  #include <dns/ttl.h>

  #include <dns/types.h>

  

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/region.h>

  #include <isc/types.h>

  #include <isc/util.h>
@@ -190,8 +190,8 @@ 

  	char *attribute;

  	BerElement *ber = NULL;

  	ldap_entry_t *entry = NULL;

- 	isc_boolean_t has_zone_dn;

- 	isc_boolean_t has_zone_class;

+ 	bool has_zone_dn;

+ 	bool has_zone_class;

  

  	REQUIRE(ld != NULL);

  	REQUIRE(ldap_entry != NULL);
@@ -235,9 +235,9 @@ 

  		CHECK(dn_to_dnsname(mctx, entry->dn, &entry->fqdn,

  				    &entry->zone_name, &has_zone_dn));

  	else

- 		has_zone_dn = ISC_FALSE;

- 	has_zone_class = ISC_TF(entry->class & (LDAP_ENTRYCLASS_MASTER

- 						| LDAP_ENTRYCLASS_FORWARD));

+ 		has_zone_dn = false;

+ 	has_zone_class = entry->class & (LDAP_ENTRYCLASS_MASTER

+ 					 | LDAP_ENTRYCLASS_FORWARD);

  	CHECK(dn_want_zone(__func__, entry->dn, has_zone_dn, has_zone_class));

  

  
@@ -523,7 +523,7 @@ 

  	isc_textregion_t ttl_text;

  	ldap_valuelist_t values;

  	isc_result_t result;

- 	isc_uint32_t ttl;

+ 	uint32_t ttl;

  

  	REQUIRE(entry != NULL);

  

file modified
+176 -177
@@ -26,7 +26,7 @@ 

  

  #include <isc/buffer.h>

  #include <isc/dir.h>

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/mem.h>

  #include <isc/mutex.h>

  #include <isc/region.h>
@@ -151,7 +151,7 @@ 

  

  	isc_task_t		*task;

  	isc_thread_t		watcher;

- 	isc_boolean_t		exiting;

+ 	bool		exiting;

  	/* Non-zero if this instance is 'tainted' by an unrecoverable problem. */

  	isc_refcount_t		errors;

  
@@ -329,28 +329,28 @@ 

  		   ldapdb_rdatalist_t *rdatalist) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  static isc_result_t ldap_connect(ldap_instance_t *ldap_inst,

- 		ldap_connection_t *ldap_conn, isc_boolean_t force) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		ldap_connection_t *ldap_conn, bool force) ATTR_NONNULLS ATTR_CHECKRESULT;

  static isc_result_t ldap_reconnect(ldap_instance_t *ldap_inst,

- 		ldap_connection_t *ldap_conn, isc_boolean_t force) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		ldap_connection_t *ldap_conn, bool force) ATTR_NONNULLS ATTR_CHECKRESULT;

  static isc_result_t handle_connection_error(ldap_instance_t *ldap_inst,

- 		ldap_connection_t *ldap_conn, isc_boolean_t force) ATTR_NONNULLS;

+ 		ldap_connection_t *ldap_conn, bool force) ATTR_NONNULLS;

  

  /* Functions for writing to LDAP. */

  static isc_result_t ldap_rdttl_to_ldapmod(isc_mem_t *mctx,

  		dns_rdatalist_t *rdlist, LDAPMod **changep) ATTR_NONNULLS ATTR_CHECKRESULT;

  static isc_result_t ldap_rdatalist_to_ldapmod(isc_mem_t *mctx,

  		dns_rdatalist_t *rdlist, LDAPMod **changep, int mod_op,

- 		isc_boolean_t unknown) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		bool unknown) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  static isc_result_t ldap_rdata_to_char_array(isc_mem_t *mctx,

  					     dns_rdata_t *rdata_head,

- 					     isc_boolean_t unknown,

+ 					     bool unknown,

  					     char ***valsp)

  					     ATTR_NONNULLS ATTR_CHECKRESULT;

  

  static void free_char_array(isc_mem_t *mctx, char ***valsp) ATTR_NONNULLS;

  static isc_result_t modify_ldap_common(dns_name_t *owner, dns_name_t *zone, ldap_instance_t *ldap_inst,

- 		dns_rdatalist_t *rdlist, int mod_op, isc_boolean_t delete_node) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		dns_rdatalist_t *rdlist, int mod_op, bool delete_node) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  /* Functions for maintaining pool of LDAP connections */

  static isc_result_t ldap_pool_create(isc_mem_t *mctx, unsigned int connections,
@@ -376,7 +376,7 @@ 

  validate_local_instance_settings(ldap_instance_t *inst, settings_set_t *set) {

  	isc_result_t result;

  

- 	isc_uint32_t uint;

+ 	uint32_t uint;

  	const char *sasl_mech = NULL;

  	const char *sasl_user = NULL;

  	const char *sasl_realm = NULL;
@@ -385,7 +385,7 @@ 

  	const char *bind_dn = NULL;

  	const char *password = NULL;

  	const char *dir_name = NULL;

- 	isc_boolean_t dir_default;

+ 	bool dir_default;

  	ld_string_t *buff = NULL;

  	char print_buff[PRINT_BUFF_SIZE];

  	const char *auth_method_str = NULL;
@@ -400,7 +400,7 @@ 

  	CHECK(str_new(inst->mctx, &buff));

  	CHECK(setting_get_str("directory", inst->local_settings, &dir_name));

  	dir_default = (strlen(dir_name) == 0);

- 	if (dir_default == ISC_TRUE) {

+ 	if (dir_default == true) {

  		CHECK(str_cat_char(buff, "dyndb-ldap/"));

  		CHECK(str_cat_char(buff, inst->db_name));

  	} else
@@ -513,7 +513,7 @@ 

  			 "are untested; expect problems");

  	}

  

- 	if (settings_set_isfilled(set) != ISC_TRUE)

+ 	if (settings_set_isfilled(set) != true)

  		result = ISC_R_FAILURE;

  

  cleanup:
@@ -536,7 +536,7 @@ 

  	dns_forwarders_t *named_conf_forwarders = NULL;

  	isc_buffer_t *forwarders_list = NULL;

  	const char *forward_policy = NULL;

- 	isc_uint32_t connections;

+ 	uint32_t connections;

  	char settings_name[PRINT_BUFF_SIZE];

  	ldap_globalfwd_handleez_t *gfwdevent = NULL;

  	const char *server_id = NULL;
@@ -622,7 +622,7 @@ 

  

  	CHECK(validate_local_instance_settings(ldap_inst,

  					       ldap_inst->local_settings));

- 	if (settings_set_isfilled(ldap_inst->global_settings) != ISC_TRUE)

+ 	if (settings_set_isfilled(ldap_inst->global_settings) != true)

  		CLEANUP_WITH(ISC_R_FAILURE);

  

  	/* zero-length server_id means undefined value */
@@ -700,7 +700,7 @@ 

  {

  	REQUIRE(ldap_inst != NULL);

  

- 	ldap_inst->exiting = ISC_TRUE;

+ 	ldap_inst->exiting = true;

  	/*

  	 * Wake up the watcher thread. This might look like a hack

  	 * but isc_thread_t is actually pthread_t and libisc don't
@@ -821,7 +821,7 @@ 

  static isc_result_t ATTR_NONNULLS

  cleanup_zone_files(dns_zone_t *zone) {

  	isc_result_t result;

- 	isc_boolean_t failure = ISC_FALSE;

+ 	bool failure = false;

  	const char *filename = NULL;

  	dns_zone_t *raw = NULL;

  	int namelen;
@@ -853,11 +853,11 @@ 

  

  cleanup:

  	failure = failure || (result != ISC_R_SUCCESS);

- 	if (failure == ISC_TRUE)

+ 	if (failure == true)

  		dns_zone_log(zone, ISC_LOG_ERROR,

  			     "unable to remove files, expect problems");

  

- 	if (failure == ISC_TRUE && result == ISC_R_SUCCESS)

+ 	if (failure == true && result == ISC_R_SUCCESS)

  		result = ISC_R_FAILURE;

  

  	return result;
@@ -912,7 +912,7 @@ 

  

  	CHECK(dns_view_findzone(view, name, &zone));

  

- 	if (zone_isempty(zone) == ISC_TRUE) {

+ 	if (zone_isempty(zone) == true) {

  		dns_name_format(name, zone_name, DNS_NAME_FORMATSIZE);

  		result = delete_bind_zone(view->zonetable, &zone);

  		if (result != ISC_R_SUCCESS)
@@ -933,7 +933,7 @@ 

  

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  configure_paths(isc_mem_t *mctx, ldap_instance_t *inst, dns_zone_t *zone,

- 		isc_boolean_t issecure) {

+ 		bool issecure) {

  	isc_result_t result;

  	ld_string_t *file_name = NULL;

  	ld_string_t *key_dir = NULL;
@@ -942,7 +942,7 @@ 

  			       dns_zone_getorigin(zone),

  			       (issecure ? "signed" : "raw"), &file_name));

  	CHECK(dns_zone_setfile(zone, str_buf(file_name)));

- 	if (issecure == ISC_TRUE) {

+ 	if (issecure == true) {

  		CHECK(zr_get_zone_path(mctx,

  				       ldap_instance_getsettings_local(inst),

  				       dns_zone_getorigin(zone), "keys/",
@@ -965,7 +965,7 @@ 

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  create_zone(ldap_instance_t * const inst, const char * const dn,

  	    dns_name_t * const name, dns_db_t * const ldapdb,

- 	    const isc_boolean_t want_secure, dns_zone_t ** const rawp,

+ 	    const bool want_secure, dns_zone_t ** const rawp,

  	    dns_zone_t ** const securep)

  {

  	isc_result_t result;
@@ -992,9 +992,9 @@ 

  	/* dns_zone_setview(raw, view); */

  	CHECK(dns_zone_setdbtype(raw, sizeof(ldap_argv)/sizeof(ldap_argv[0]),

  				 ldap_argv));

- 	CHECK(configure_paths(inst->mctx, inst, raw, ISC_FALSE));

+ 	CHECK(configure_paths(inst->mctx, inst, raw, false));

  

- 	if (want_secure == ISC_FALSE) {

+ 	if (want_secure == false) {

  		CHECK(dns_zonemgr_managezone(inst->zmgr, raw));

  		CHECK(cleanup_zone_files(raw));

  	} else {
@@ -1006,8 +1006,8 @@ 

  		CHECK(dns_zone_setdbtype(secure, 1, rbt_argv));

  		CHECK(dns_zonemgr_managezone(inst->zmgr, secure));

  		CHECK(dns_zone_link(secure, raw));

- 		dns_zone_rekey(secure, ISC_TRUE);

- 		CHECK(configure_paths(inst->mctx, inst, secure, ISC_TRUE));

+ 		dns_zone_rekey(secure, true);

+ 		CHECK(configure_paths(inst->mctx, inst, secure, true));

  		CHECK(cleanup_zone_files(secure));

  	}

  
@@ -1049,10 +1049,10 @@ 

   * @warning Never call this on raw part of in-line secure zone.

   */

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

- load_zone(dns_zone_t *zone, isc_boolean_t log) {

+ load_zone(dns_zone_t *zone, bool log) {

  	isc_result_t result;

- 	isc_boolean_t zone_dynamic;

- 	isc_uint32_t serial;

+ 	bool zone_dynamic;

+ 	uint32_t serial;

  	dns_zone_t *raw = NULL;

  

  	result = dns_zone_load(zone);
@@ -1068,16 +1068,16 @@ 

  	}

  

  	CHECK(dns_zone_getserial2(raw, &serial));

- 	if (log == ISC_TRUE)

+ 	if (log == true)

  		dns_zone_log(raw, ISC_LOG_INFO, "loaded serial %u", serial);

  	if (zone != NULL) {

  		result = dns_zone_getserial2(zone, &serial);

- 		if (result == ISC_R_SUCCESS && log == ISC_TRUE)

+ 		if (result == ISC_R_SUCCESS && log == true)

  			dns_zone_log(zone, ISC_LOG_INFO, "loaded serial %u",

  				     serial);

  		/* in-line secure zone is loaded asynchonously in background */

  		else if (result == DNS_R_NOTLOADED) {

- 			if (log == ISC_TRUE)

+ 			if (log == true)

  				dns_zone_log(zone, ISC_LOG_INFO,

  					     "signing in progress");

  			result = ISC_R_SUCCESS;
@@ -1101,7 +1101,7 @@ 

  publish_zone(isc_task_t *task, ldap_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;
@@ -1141,7 +1141,7 @@ 

  

  	run_exclusive_enter(inst, &lock_state);

  	if (inst->view->frozen) {

- 		freeze = ISC_TRUE;

+ 		freeze = true;

  		dns_view_thaw(inst->view);

  	}

  
@@ -1189,7 +1189,7 @@ 

  		goto cleanup;

  	}

  

- 	CHECK(load_zone(toview, ISC_TRUE));

+ 	CHECK(load_zone(toview, true));

  	if (secure != NULL) {

  		CHECK(zr_get_zone_settings(inst->zone_register, name,

  					   &zone_settings));
@@ -1218,7 +1218,7 @@ 

  	unsigned int total_cnt = 0;

  	unsigned int active_cnt = 0;

  	settings_set_t *settings;

- 	isc_boolean_t active;

+ 	bool active;

  

  	INIT_BUFFERED_NAME(name);

  	for(result = zr_rbt_iter_init(inst->zone_register, &iter, &name);
@@ -1231,7 +1231,7 @@ 

  		INSIST(result == ISC_R_SUCCESS);

  

  		++total_cnt;

- 		if (active == ISC_TRUE) {

+ 		if (active == true) {

  			++active_cnt;

  			result = activate_zone(task, inst, &name);

  			if (result == ISC_R_SUCCESS)
@@ -1338,12 +1338,12 @@ 

  

  /* Delete zone by dns zone name */

  isc_result_t

- ldap_delete_zone2(ldap_instance_t *inst, dns_name_t *name, isc_boolean_t lock)

+ ldap_delete_zone2(ldap_instance_t *inst, dns_name_t *name, bool lock)

  {

  	isc_result_t result;

  	isc_result_t isforward = ISC_R_NOTFOUND;

  	isc_result_t lock_state = ISC_R_IGNORE;

- 	isc_boolean_t freeze = ISC_FALSE;

+ 	bool freeze = false;

  	dns_zone_t *raw = NULL;

  	dns_zone_t *secure = NULL;

  	dns_zone_t *foundzone = NULL;
@@ -1380,7 +1380,7 @@ 

  

  		if (lock) {

  			dns_view_thaw(inst->view);

- 			freeze = ISC_TRUE;

+ 			freeze = true;

  		}

  	} /* else: zone wasn't in a view */

  
@@ -1414,13 +1414,13 @@ 

  	dns_zone_t *raw = NULL;

  	dns_zone_t *secure = NULL;

  	dns_zone_t *zone_in_view = NULL;

- 	isc_boolean_t freeze = ISC_FALSE;

+ 	bool freeze = false;

  

  	CHECK(zr_get_zone_ptr(inst->zone_register, name, &raw, &secure));

  

  	run_exclusive_enter(inst, &lock_state);

  	if (inst->view->frozen) {

- 		freeze = ISC_TRUE;

+ 		freeze = true;

  		dns_view_thaw(inst->view);

  	}

  	CHECK(dns_view_findzone(inst->view, name, &zone_in_view));
@@ -1537,7 +1537,7 @@ 

  	if (HEAD(values) != NULL &&

  	    strcasecmp(HEAD(values)->value, "TRUE") != 0) {

  		/* Zone is not active */

- 		result = ldap_delete_zone2(inst, &entry->fqdn, ISC_TRUE);

+ 		result = ldap_delete_zone2(inst, &entry->fqdn, true);

  		goto cleanup;

  	}

  
@@ -1621,14 +1621,14 @@ 

   * @param[out]	soa_latest	Pointer to last added SOA RR from tuple list.

   *				Result can be NULL if there is no added SOA RR

   *				in the tuple list.

-  * @param[out]	data_changed	ISC_TRUE if any data other than SOA serial were

-  * 				changed. ISC_FALSE if nothing (except SOA

+  * @param[out]	data_changed	true if any data other than SOA serial were

+  * 				changed. false if nothing (except SOA

   * 				serial) was changed.

   *

   */

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  diff_analyze_serial(dns_diff_t *diff, dns_difftuple_t **soa_latest,

- 		    isc_boolean_t *data_changed) {

+ 		    bool *data_changed) {

  	dns_difftuple_t *t = NULL;

  	dns_rdata_t *del_soa = NULL; /* last seen SOA with op == DEL */

  	dns_difftuple_t *tmp_tuple = NULL; /* tuple used for SOA comparison */
@@ -1639,13 +1639,13 @@ 

  	REQUIRE(soa_latest != NULL && *soa_latest == NULL);

  	REQUIRE(data_changed != NULL);

  

- 	*data_changed = ISC_FALSE;

+ 	*data_changed = false;

  	for (t = HEAD(diff->tuples);

  	     t != NULL;

  	     t = NEXT(t, link)) {

  		INSIST(tmp_tuple == NULL);

  		if (t->rdata.type != dns_rdatatype_soa)

- 			*data_changed = ISC_TRUE;

+ 			*data_changed = true;

  		else { /* SOA is always special case */

  			if (t->op == DNS_DIFFOP_DEL ||

  			    t->op == DNS_DIFFOP_DELRESIGN) {
@@ -1660,8 +1660,8 @@ 

  				/* we are adding SOA without preceding delete

  				 * -> we are initializing new empty zone */

  				if (del_soa == NULL) {

- 					*data_changed = ISC_TRUE;

- 				} else if (*data_changed == ISC_FALSE) {

+ 					*data_changed = true;

+ 				} else if (*data_changed == false) {

  					/* detect if fields other than serial

  					 * were changed (compute only if necessary) */

  					CHECK(dns_difftuple_copy(t, &tmp_tuple));
@@ -1669,7 +1669,7 @@ 

  							  &tmp_tuple->rdata);

  					ret = dns_rdata_compare(del_soa,

  								&tmp_tuple->rdata);

- 					*data_changed = ISC_TF(ret != 0);

+ 					*data_changed = ret != 0;

  				}

  				if (tmp_tuple != NULL)

  					dns_difftuple_free(&tmp_tuple);
@@ -1700,9 +1700,9 @@ 

   */

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_replace_serial(ldap_instance_t *inst, dns_name_t *zone,

- 		    isc_uint32_t serial) {

+ 		    uint32_t serial) {

  	isc_result_t result;

- #define MAX_SERIAL_LENGTH sizeof("4294967295") /* SOA serial is isc_uint32_t */

+ #define MAX_SERIAL_LENGTH sizeof("4294967295") /* SOA serial is uint32_t */

  	char serial_char[MAX_SERIAL_LENGTH];

  	char *values[2] = { serial_char, NULL };

  	LDAPMod change;
@@ -1719,7 +1719,7 @@ 

  	change.mod_values = values;

  	CHECK(isc_string_printf(serial_char, MAX_SERIAL_LENGTH, "%u", serial));

  

- 	CHECK(ldap_modify_do(inst, str_buf(dn), changep, ISC_FALSE));

+ 	CHECK(ldap_modify_do(inst, str_buf(dn), changep, false));

  

  cleanup:

  	str_destroy(&dn);
@@ -1754,7 +1754,7 @@ 

  	CHECK(dns_zone_setnsec3param(secure, nsec3p_rr.hash, nsec3p_rr.flags,

  				     nsec3p_rr.iterations,

  				     nsec3p_rr.salt_length, nsec3p_rr.salt,

- 				     ISC_TRUE));

+ 				     true));

  

  cleanup:

  	if (nsec3p_rdata != NULL) {
@@ -1778,7 +1778,7 @@ 

  	isc_result_t result;

  	ldap_valuelist_t values;

  	isc_mem_t *mctx = NULL;

- 	isc_boolean_t ssu_changed;

+ 	bool ssu_changed;

  	dns_zone_t *inview = NULL;

  

  	REQUIRE(entry != NULL);
@@ -1817,7 +1817,7 @@ 

  		goto cleanup;

  

  	if (result == ISC_R_SUCCESS || ssu_changed) {

- 		isc_boolean_t ssu_enabled;

+ 		bool ssu_enabled;

  		const char *ssu_policy = NULL;

  

  		CHECK(setting_get_bool("dyn_update", zone_settings, &ssu_enabled));
@@ -1886,7 +1886,7 @@ 

  		dns_zone_setprivatetype(secure, 65534);

  

  		/* update-check-ksk */

- 		dns_zone_setoption(secure, DNS_ZONEOPT_UPDATECHECKKSK, ISC_TRUE);

+ 		dns_zone_setoption(secure, DNS_ZONEOPT_UPDATECHECKKSK, true);

  

  		/* dnssec-loadkeys-interval */

  		CHECK(dns_zone_setrefreshkeyinterval(secure, 60));
@@ -1904,8 +1904,8 @@ 

  			goto cleanup;

  

  		/* auto-dnssec = maintain */

- 		dns_zone_setkeyopt(secure, DNS_ZONEKEY_ALLOW, ISC_TRUE);

- 		dns_zone_setkeyopt(secure, DNS_ZONEKEY_MAINTAIN, ISC_TRUE);

+ 		dns_zone_setkeyopt(secure, DNS_ZONEKEY_ALLOW, true);

+ 		dns_zone_setkeyopt(secure, DNS_ZONEKEY_MAINTAIN, true);

  	}

  

  cleanup:
@@ -1923,7 +1923,7 @@ 

   * @param[out] diff     Initialized diff. It will be filled with differences

   *                      between RBTDB and LDAP object + SOA serial update.

   * @param[out] new_serial     SOA serial after update;

-  *                            valid if ldap_writeback = ISC_TRUE.

+  *                            valid if ldap_writeback = true.

   * @param[out] ldap_writeback SOA serial was updated.

   * @param[out] data_changed   Other data were updated.

   *
@@ -1931,14 +1931,14 @@ 

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  zone_sync_apex(const ldap_instance_t * const inst,

  	       ldap_entry_t * const entry, dns_name_t name,

- 	       const sync_state_t sync_state, const isc_boolean_t new_zone,

+ 	       const sync_state_t sync_state, const bool new_zone,

  	       dns_db_t * const ldapdb, dns_db_t * const rbtdb,

  	       dns_dbversion_t * const version,

  	       const settings_set_t * const zone_settings,

  	       dns_diff_t * const diff,

- 	       isc_uint32_t * const new_serial,

- 	       isc_boolean_t * const ldap_writeback,

- 	       isc_boolean_t * const data_changed) {

+ 	       uint32_t * const new_serial,

+ 	       bool * const ldap_writeback,

+ 	       bool * const data_changed) {

  	isc_result_t result;

  	ldapdb_rdatalist_t rdatalist;

  	dns_rdatasetiter_t *rbt_rds_iterator = NULL;
@@ -1946,12 +1946,12 @@ 

  	 * This is workaround for ISC-Bug #35080. */

  	dns_dbnode_t *node = NULL;

  	dns_difftuple_t *soa_tuple = NULL;

- 	isc_uint32_t curr_serial;

+ 	uint32_t curr_serial;

  

  	REQUIRE(ldap_writeback != NULL);

  

  	INIT_LIST(rdatalist);

- 	*ldap_writeback = ISC_FALSE; /* GCC */

+ 	*ldap_writeback = false; /* GCC */

  

  	CHECK(ldap_parse_rrentry(inst->mctx, entry, &name,

  				 zone_settings, &rdatalist));
@@ -1967,37 +1967,37 @@ 

  		goto cleanup;

  

  	/* New zone doesn't have serial defined yet. */

- 	if (new_zone != ISC_TRUE)

+ 	if (new_zone != true)

  		CHECK(dns_db_getsoaserial(rbtdb, version, &curr_serial));

  

  	/* Detect if SOA serial is affected by the update or not.

  	 * Always bump serial in case of re-synchronization. */

  	CHECK(diff_analyze_serial(diff, &soa_tuple, data_changed));

- 	if (new_zone == ISC_TRUE || *data_changed == ISC_TRUE ||

+ 	if (new_zone == true || *data_changed == true ||

  	    sync_state != sync_finished) {

  		if (soa_tuple == NULL) {

  			/* The diff doesn't contain new SOA serial

  			 * => generate new serial and write it back to LDAP. */

- 			*ldap_writeback = ISC_TRUE;

+ 			*ldap_writeback = true;

  			CHECK(zone_soaserial_addtuple(inst->mctx, ldapdb,

  						      version, diff, new_serial));

- 		} else if (new_zone == ISC_TRUE || sync_state != sync_finished ||

+ 		} else if (new_zone == true || sync_state != sync_finished ||

  			   isc_serial_le(dns_soa_getserial(&soa_tuple->rdata),

  					 curr_serial)) {

  			/* The diff tries to send SOA serial back!

  			 * => generate new serial and write it back to LDAP.

  			 * Force serial update if we are adding a new zone. */

- 			*ldap_writeback = ISC_TRUE;

+ 			*ldap_writeback = true;

  			CHECK(zone_soaserial_updatetuple(dns_updatemethod_unixtime,

  							 soa_tuple, new_serial));

  		} else {

  			/* The diff contains new serial already

  			 * => do nothing. */

- 			*ldap_writeback = ISC_FALSE;

+ 			*ldap_writeback = false;

  		}

  

- 	} else {/* if (data_changed == ISC_FALSE) */

- 		*ldap_writeback = ISC_FALSE;

+ 	} else {/* if (data_changed == false) */

+ 		*ldap_writeback = false;

  		if (soa_tuple == NULL) {

  			/* The diff is empty => do nothing. */

  			INSIST(EMPTY(diff->tuples));
@@ -2039,7 +2039,7 @@ 

  	 * in period where old zone was deleted but the new zone was not

  	 * created yet. */

  	run_exclusive_enter(inst, &lock_state);

- 	CHECK(ldap_delete_zone2(inst, name, ISC_FALSE));

+ 	CHECK(ldap_delete_zone2(inst, name, false));

  	CHECK(ldap_parse_master_zoneentry(entry, olddb, inst, task));

  

  cleanup:
@@ -2075,15 +2075,15 @@ 

  	dns_zone_t *toview = NULL;

  	isc_result_t result;

  	isc_result_t lock_state = ISC_R_IGNORE;

- 	isc_boolean_t new_zone = ISC_FALSE;

- 	isc_boolean_t want_secure = ISC_FALSE;

- 	isc_boolean_t configured = ISC_FALSE;

- 	isc_boolean_t activity_changed;

- 	isc_boolean_t isactive = ISC_FALSE;

+ 	bool new_zone = false;

+ 	bool want_secure = false;

+ 	bool configured = false;

+ 	bool activity_changed;

+ 	bool isactive = false;

  	settings_set_t *zone_settings = NULL;

- 	isc_boolean_t ldap_writeback;

- 	isc_boolean_t data_changed = ISC_FALSE; /* GCC */

- 	isc_uint32_t new_serial;

+ 	bool ldap_writeback;

+ 	bool data_changed = false; /* GCC */

+ 	uint32_t new_serial;

  

  	dns_db_t *rbtdb = NULL;

  	dns_db_t *ldapdb = NULL;
@@ -2101,10 +2101,9 @@ 

  

  	result = ldap_entry_getvalues(entry, "idnsSecInlineSigning", &values);

  	if (result == ISC_R_NOTFOUND || HEAD(values) == NULL)

- 		want_secure = ISC_FALSE;

+ 		want_secure = false;

  	else

- 		want_secure = ISC_TF(strcasecmp(HEAD(values)->value, "TRUE")

- 				     == 0);

+ 		want_secure = (strcasecmp(HEAD(values)->value, "TRUE") == 0);

  

  	/* Check if we are already serving given zone */

  	result = zr_get_zone_ptr(inst->zone_register, &entry->fqdn,
@@ -2112,13 +2111,13 @@ 

  	if (result == ISC_R_NOTFOUND || result == DNS_R_PARTIALMATCH) {

  		CHECK(create_zone(inst, entry->dn, &entry->fqdn, olddb,

  				  want_secure, &raw, &secure));

- 		new_zone = ISC_TRUE;

+ 		new_zone = true;

  		log_debug(2, "created %s: raw %p; secure %p",

  			  ldap_entry_logname(entry), raw, secure);

  	} else if (result != ISC_R_SUCCESS)

  		goto cleanup;

- 	else if (want_secure != ISC_TF(secure != NULL)) {

- 		if (want_secure == ISC_TRUE)

+ 	else if (want_secure != (secure != NULL)) {

+ 		if (want_secure == true)

  			dns_zone_log(raw, ISC_LOG_INFO,

  				     "upgrading zone to secure");

  		else
@@ -2150,7 +2149,7 @@ 

  #else

  	dns_diff_print(&diff, NULL);

  #endif

- 	if (ldap_writeback == ISC_TRUE) {

+ 	if (ldap_writeback == true) {

  		dns_zone_log(raw, ISC_LOG_DEBUG(5), "writing new zone serial "

  			     "%u to LDAP", new_serial);

  		result = ldap_replace_serial(inst, &entry->fqdn, new_serial);
@@ -2161,30 +2160,30 @@ 

  	}

  

  	if (!EMPTY(diff.tuples)) {

- 		if (sync_state == sync_finished && new_zone == ISC_FALSE) {

+ 		if (sync_state == sync_finished && new_zone == false) {

  			/* write the transaction to journal */

  			CHECK(zone_journal_adddiff(inst->mctx, raw, &diff));

  		}

  

  		/* commit */

  		CHECK(dns_diff_apply(&diff, rbtdb, version));

- 		dns_db_closeversion(ldapdb, &version, ISC_TRUE);

+ 		dns_db_closeversion(ldapdb, &version, true);

  		dns_zone_markdirty(raw);

  	} else {

  		/* It is necessary to release lock before calling load_zone()

  		 * otherwise it will deadlock on newversion() call

  		 * in journal roll-forward process! */

- 		dns_db_closeversion(ldapdb, &version, ISC_FALSE);

+ 		dns_db_closeversion(ldapdb, &version, false);

  	}

- 	configured = ISC_TRUE;

+ 	configured = true;

  

  	/* Detect active/inactive zone and activity changes */

  	result = setting_update_from_ldap_entry("active", zone_settings,

  						"idnsZoneActive", entry);

  	if (result == ISC_R_SUCCESS) {

- 		activity_changed = ISC_TRUE;

+ 		activity_changed = true;

  	} else if (result == ISC_R_IGNORE) {

- 		activity_changed = ISC_FALSE;

+ 		activity_changed = false;

  	} else

  		goto cleanup;

  	CHECK(setting_get_bool("active", zone_settings, &isactive));
@@ -2193,13 +2192,13 @@ 

  	if (sync_state != sync_finished)

  		goto cleanup;

  

- 	toview = (want_secure == ISC_TRUE) ? secure : raw;

- 	if (isactive == ISC_TRUE) {

- 		if (new_zone == ISC_TRUE || activity_changed == ISC_TRUE)

+ 	toview = (want_secure == true) ? secure : raw;

+ 	if (isactive == true) {

+ 		if (new_zone == true || activity_changed == true)

  			CHECK(publish_zone(task, inst, toview));

- 		CHECK(load_zone(toview, ISC_FALSE));

+ 		CHECK(load_zone(toview, false));

  		CHECK(fwd_configure_zone(zone_settings, inst, &entry->fqdn));

- 	} else if (activity_changed == ISC_TRUE) { /* Zone was deactivated */

+ 	} else if (activity_changed == true) { /* Zone was deactivated */

  		CHECK(unpublish_zone(inst, &entry->fqdn,

  				     ldap_entry_logname(entry)));

  		/* emulate "no explicit forwarding config" */
@@ -2212,17 +2211,17 @@ 

  cleanup:

  	dns_diff_clear(&diff);

  	if (rbtdb != NULL && version != NULL)

- 		dns_db_closeversion(ldapdb, &version, ISC_FALSE); /* rollback */

+ 		dns_db_closeversion(ldapdb, &version, false); /* rollback */

  	if (rbtdb != NULL)

  		dns_db_detach(&rbtdb);

  	if (ldapdb != NULL)

  		dns_db_detach(&ldapdb);

- 	if (new_zone == ISC_TRUE && configured == ISC_FALSE) {

+ 	if (new_zone == true && configured == false) {

  		/* Failure in ACL parsing or so. */

  		log_error_r("%s: publishing failed, rolling back due to",

  			    ldap_entry_logname(entry));

  		/* TODO: verify this */

- 		result = ldap_delete_zone2(inst, &entry->fqdn, ISC_TRUE);

+ 		result = ldap_delete_zone2(inst, &entry->fqdn, true);

  		if (result != ISC_R_SUCCESS)

  			log_error_r("%s: rollback failed: ",

  				    ldap_entry_logname(entry));
@@ -2393,8 +2392,8 @@ 

  		setting_name = tmp + matches[2].rm_so;

  		tmp[matches[2].rm_eo] = '\0';

  		setting = NULL;

- 		result = setting_find(setting_name, set, isc_boolean_true,

- 				      isc_boolean_true, &setting);

+ 		result = setting_find(setting_name, set, true,

+ 				      true, &setting);

  		if (result != ISC_R_SUCCESS) {

  			log_debug(5, "setting '%s' is not defined so it "

  				  "cannot be substituted into template '%s'",
@@ -2458,7 +2457,7 @@ 

  	dns_ttl_t ttl;

  	dns_rdatatype_t rdtype;

  	dns_rdatalist_t *rdlist = NULL;

- 	isc_boolean_t did_something = ISC_FALSE;

+ 	bool did_something = false;

  

  	CHECK(str_new(mctx, &orig_val));

  	rdclass = ldap_entry_getrdclass(entry);
@@ -2493,7 +2492,7 @@ 

  					  str_buf(new_val), &rdata));

  			APPEND(rdlist->rdata, rdata, link);

  			rdata = NULL;

- 			did_something = ISC_TRUE;

+ 			did_something = true;

  		}

  	}

  
@@ -2753,7 +2752,7 @@ 

   */

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_connect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,

- 	     isc_boolean_t force)

+ 	     bool force)

  {

  	LDAP *ld = NULL;

  	int ret;
@@ -2762,7 +2761,7 @@ 

  	isc_result_t result = ISC_R_FAILURE;

  	const char *uri = NULL;

  	const char *ldap_hostname = NULL;

- 	isc_uint32_t timeout_sec;

+ 	uint32_t timeout_sec;

  

  	REQUIRE(ldap_inst != NULL);

  	REQUIRE(ldap_conn != NULL);
@@ -2817,7 +2816,7 @@ 

  

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_reconnect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,

- 	       isc_boolean_t force)

+ 	       bool force)

  {

  	isc_result_t result;

  	int ret = 0;
@@ -2828,7 +2827,7 @@ 

  	const char *krb5_principal = NULL;

  	const char *krb5_keytab = NULL;

  	ldap_auth_t auth_method_enum = AUTH_INVALID;

- 	isc_uint32_t reconnect_interval;

+ 	uint32_t reconnect_interval;

  

  	if (force)

  		goto force_reconnect;
@@ -2951,7 +2950,7 @@ 

  

  static isc_result_t ATTR_NONNULLS

  handle_connection_error(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,

- 			isc_boolean_t force)

+ 			bool force)

  {

  	int ret;

  	int err_code;
@@ -2989,7 +2988,7 @@ 

  		/* Try to reconnect on other errors. */

  		log_ldap_error(ldap_conn->handle, "connection error");

  reconnect:

- 		if (ldap_conn->handle == NULL && force == ISC_FALSE)

+ 		if (ldap_conn->handle == NULL && force == false)

  			log_error("connection to the LDAP server was lost");

  		result = ldap_connect(ldap_inst, ldap_conn, force);

  		if (result == ISC_R_SUCCESS)
@@ -3011,12 +3010,12 @@ 

   */

  isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_modify_do(ldap_instance_t *ldap_inst, const char *dn, LDAPMod **mods,

- 		isc_boolean_t delete_node)

+ 		bool delete_node)

  {

  	int ret;

  	int err_code;

  	const char *operation_str;

- 	isc_boolean_t once = ISC_FALSE;

+ 	bool once = false;

  	isc_result_t result;

  	ldap_connection_t *ldap_conn = NULL;

  
@@ -3045,8 +3044,8 @@ 

  		 * TODO: handle this case inside ldap_pool_getconnection()?

  		 */

  retry:

- 		once = ISC_TRUE;

- 		CHECK(handle_connection_error(ldap_inst, ldap_conn, ISC_FALSE));

+ 		once = true;

+ 		CHECK(handle_connection_error(ldap_inst, ldap_conn, false));

  	}

  

  	if (delete_node) {
@@ -3109,7 +3108,7 @@ 

  	if ((mods[0]->mod_op & ~LDAP_MOD_BVALUES) != LDAP_MOD_DELETE ||

  	    err_code != LDAP_NO_SUCH_ATTRIBUTE) {

  		result = ISC_R_FAILURE;

- 		if (once == ISC_FALSE) {

+ 		if (once == false) {

  			log_error("retrying LDAP operation (%s) on entry '%s'",

  				  operation_str, dn);

  			goto retry;
@@ -3171,7 +3170,7 @@ 

   */

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_rdatalist_to_ldapmod(isc_mem_t *mctx, dns_rdatalist_t *rdlist,

- 			  LDAPMod **changep, int mod_op, isc_boolean_t unknown)

+ 			  LDAPMod **changep, int mod_op, bool unknown)

  {

  	isc_result_t result;

  	LDAPMod *change = NULL;
@@ -3198,12 +3197,12 @@ 

  /**

   * Convert list of DNS Rdata to array of LDAP values.

   *

-  * @param[in]  unknown  ISC_TRUE  = use generic (RFC 3597) format,

-  *                      ISC_FALSE = use record-specific syntax (if available).

+  * @param[in]  unknown  true  = use generic (RFC 3597) format,

+  *                      false = use record-specific syntax (if available).

   */

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_rdata_to_char_array(isc_mem_t *mctx, dns_rdata_t *rdata_head,

- 			 isc_boolean_t unknown, char ***valsp)

+ 			 bool unknown, char ***valsp)

  {

  	isc_result_t result;

  	char **vals;
@@ -3231,7 +3230,7 @@ 

  

  		/* Convert rdata to text. */

  		INIT_BUFFER(buffer);

- 		if (unknown == ISC_FALSE)

+ 		if (unknown == false)

  			CHECK(dns_rdata_totext(rdata, NULL, &buffer));

  		else

  			CHECK(rdata_to_generic(rdata, &buffer));
@@ -3325,7 +3324,7 @@ 

  

  	REQUIRE(ldap_inst != NULL);

  

- /* all values in SOA record are isc_uint32_t, i.e. max. 2^32-1 */

+ /* all values in SOA record are uint32_t, i.e. max. 2^32-1 */

  #define MAX_SOANUM_LENGTH (10 + 1)

  #define SET_LDAP_MOD(index, name) \

  	change[index].mod_op = LDAP_MOD_REPLACE; \
@@ -3346,7 +3345,7 @@ 

  

  	dns_rdata_freestruct((void *)&soa);

  

- 	result = ldap_modify_do(ldap_inst, zone_dn, changep, ISC_FALSE);

+ 	result = ldap_modify_do(ldap_inst, zone_dn, changep, false);

  

  cleanup:

  	return result;
@@ -3357,19 +3356,19 @@ 

  

  static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  modify_ldap_common(dns_name_t *owner, dns_name_t *zone, ldap_instance_t *ldap_inst,

- 		   dns_rdatalist_t *rdlist, int mod_op, isc_boolean_t delete_node)

+ 		   dns_rdatalist_t *rdlist, int mod_op, bool delete_node)

  {

  	isc_result_t result;

  	isc_mem_t *mctx = ldap_inst->mctx;

  	ld_string_t *owner_dn = NULL;

  	LDAPMod *change[3] = { NULL };

- 	isc_boolean_t zone_sync_ptr;

+ 	bool zone_sync_ptr;

  	char **vals = NULL;

  	dns_name_t zone_name;

  	char *zone_dn = NULL;

  	settings_set_t *zone_settings = NULL;

  	int af; /* address family */

- 	isc_boolean_t unknown_type = ISC_FALSE;

+ 	bool unknown_type = false;

  

  	/*

  	 * Find parent zone entry and check if Dynamic Update is allowed.
@@ -3388,7 +3387,7 @@ 

  	}

  

  	CHECK(dn_to_dnsname(mctx, zone_dn, &zone_name, NULL, NULL));

- 	INSIST(dns_name_equal(zone, &zone_name) == ISC_TRUE);

+ 	INSIST(dns_name_equal(zone, &zone_name) == true);

  

  	result = zr_get_zone_settings(ldap_inst->zone_register, &zone_name,

  				      &zone_settings);
@@ -3415,7 +3414,7 @@ 

  

  	/* First, try to store data into named attribute like "URIRecord".

  	 * If that fails, try to store the data into "UnknownRecord;TYPE256". */

- 	unknown_type = ISC_FALSE;

+ 	unknown_type = false;

  	do {

  		ldap_mod_free(mctx, &change[0]);

  		CHECK(ldap_rdatalist_to_ldapmod(mctx, rdlist, &change[0],
@@ -3423,7 +3422,7 @@ 

  		result = ldap_modify_do(ldap_inst, str_buf(owner_dn), change,

  					delete_node);

  		unknown_type = !unknown_type; /* try again with unknown type */

- 	} while (result == DNS_R_UNKNOWN && unknown_type == ISC_TRUE);

+ 	} while (result == DNS_R_UNKNOWN && unknown_type == true);

  

  	/* Keep the PTR of corresponding A/AAAA record synchronized. */

  	if (rdlist->type == dns_rdatatype_a || rdlist->type == dns_rdatatype_aaaa) {
@@ -3467,12 +3466,12 @@ 

  isc_result_t

  write_to_ldap(dns_name_t *owner, dns_name_t *zone, ldap_instance_t *ldap_inst, dns_rdatalist_t *rdlist)

  {

- 	return modify_ldap_common(owner, zone, ldap_inst, rdlist, LDAP_MOD_ADD, ISC_FALSE);

+ 	return modify_ldap_common(owner, zone, ldap_inst, rdlist, LDAP_MOD_ADD, false);

  }

  

  isc_result_t

  remove_values_from_ldap(dns_name_t *owner, dns_name_t *zone, ldap_instance_t *ldap_inst,

- 		 dns_rdatalist_t *rdlist, isc_boolean_t delete_node)

+ 		 dns_rdatalist_t *rdlist, bool delete_node)

  {

  	return modify_ldap_common(owner, zone, ldap_inst, rdlist, LDAP_MOD_DELETE,

  				  delete_node);
@@ -3489,7 +3488,7 @@ 

  	LDAPMod *change[2] = { NULL };

  	ld_string_t *dn = NULL;

  	isc_result_t result;

- 	isc_boolean_t unknown_type = ISC_FALSE;

+ 	bool unknown_type = false;

  

  	CHECK(str_new(ldap_inst->mctx, &dn));

  	CHECK(dnsname_to_dn(ldap_inst->zone_register, owner, zone, dn));
@@ -3503,10 +3502,10 @@ 

  						  unknown_type));

  		CHECK(isc_string_copy(change[0]->mod_type, LDAP_ATTR_FORMATSIZE,

  				      attr));

- 		CHECK(ldap_modify_do(ldap_inst, str_buf(dn), change, ISC_FALSE));

+ 		CHECK(ldap_modify_do(ldap_inst, str_buf(dn), change, false));

  		ldap_mod_free(ldap_inst->mctx, &change[0]);

  		unknown_type = !unknown_type;

- 	} while (unknown_type == ISC_TRUE);

+ 	} while (unknown_type == true);

  

  cleanup:

  	ldap_mod_free(ldap_inst->mctx, &change[0]);
@@ -3533,7 +3532,7 @@ 

  		 * successful

  		 * TODO: handle this case inside ldap_pool_getconnection()?

  		 */

- 		CHECK(ldap_connect(ldap_inst, ldap_conn, ISC_FALSE));

+ 		CHECK(ldap_connect(ldap_inst, ldap_conn, false));

  	}

  	ret = ldap_delete_ext_s(ldap_conn->handle, str_buf(dn), NULL, NULL);

  	result = (ret == LDAP_SUCCESS) ? ISC_R_SUCCESS : ISC_R_FAILURE;
@@ -3669,7 +3668,7 @@ 

  	for (i = 0; i < pool->connections; i++) {

  		ldap_conn = NULL;

  		CHECK(new_ldap_connection(pool, &ldap_conn));

- 		result = ldap_connect(ldap_inst, ldap_conn, ISC_FALSE);

+ 		result = ldap_connect(ldap_inst, ldap_conn, false);

  		/* Continue even if LDAP server is down */

  		if (result != ISC_R_NOTCONNECTED && result != ISC_R_TIMEDOUT &&

  		    result != ISC_R_SUCCESS) {
@@ -3726,7 +3725,7 @@ 

  	INSIST(task == inst->task); /* For task-exclusive mode */

  

  	if (SYNCREPL_DEL(pevent->chgtype)) {

- 		CHECK(ldap_delete_zone2(inst, &entry->fqdn, ISC_TRUE));

+ 		CHECK(ldap_delete_zone2(inst, &entry->fqdn, true));

  	} else {

  		if (entry->class & LDAP_ENTRYCLASS_MASTER)

  			CHECK(ldap_parse_master_zoneentry(entry, NULL, inst,
@@ -3836,9 +3835,9 @@ 

  	settings_set_t *zone_settings = NULL;

  	dns_zone_t *raw = NULL;

  	dns_zone_t *secure = NULL;

- 	isc_boolean_t zone_found = ISC_FALSE;

- 	isc_boolean_t zone_reloaded = ISC_FALSE;

- 	isc_uint32_t serial;

+ 	bool zone_found = false;

+ 	bool zone_reloaded = false;

+ 	uint32_t serial;

  	ldap_entry_t *entry = pevent->entry;

  

  	dns_db_t *rbtdb = NULL;
@@ -3870,7 +3869,7 @@ 

  

  	REQUIRE(inst != NULL);

  	CHECK(zr_get_zone_ptr(inst->zone_register, &entry->zone_name, &raw, &secure));

- 	zone_found = ISC_TRUE;

+ 	zone_found = true;

  

  update_restart:

  	rbtdb = NULL;
@@ -3880,7 +3879,7 @@ 

  	CHECK(zr_get_zone_dbs(inst->zone_register, &entry->zone_name, &ldapdb, &rbtdb));

  	CHECK(dns_db_newversion(ldapdb, &version));

  

- 	CHECK(dns_db_findnode(rbtdb, &entry->fqdn, ISC_TRUE, &node));

+ 	CHECK(dns_db_findnode(rbtdb, &entry->fqdn, true, &node));

  	result = dns_db_allrdatasets(rbtdb, node, version, 0, &rbt_rds_iterator);

  	if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND)

  		goto cleanup;
@@ -3967,7 +3966,7 @@ 

  		}

  		/* commit */

  		CHECK(dns_diff_apply(&diff, rbtdb, version));

- 		dns_db_closeversion(ldapdb, &version, ISC_TRUE);

+ 		dns_db_closeversion(ldapdb, &version, true);

  		dns_zone_markdirty(raw);

  	}

  
@@ -3989,7 +3988,7 @@ 

  		dns_db_detachnode(rbtdb, &node);

  	/* rollback */

  	if (rbtdb != NULL && version != NULL)

- 		dns_db_closeversion(ldapdb, &version, ISC_FALSE);

+ 		dns_db_closeversion(ldapdb, &version, false);

  	if (rbtdb != NULL)

  		dns_db_detach(&rbtdb);

  	if (ldapdb != NULL)
@@ -4001,16 +4000,16 @@ 

  			     "reload triggered by change in %s",

  			     ldap_entry_logname(entry));

  		if (secure != NULL)

- 			result = load_zone(secure, ISC_TRUE);

+ 			result = load_zone(secure, true);

  		else if (raw != NULL)

- 			result = load_zone(raw, ISC_TRUE);

+ 			result = load_zone(raw, true);

  		if (result == ISC_R_SUCCESS || result == DNS_R_UPTODATE ||

  		    result == DNS_R_DYNAMIC || result == DNS_R_CONTINUE) {

  			/* zone reload succeeded, fire current event again */

  			log_debug(1, "restarting update_record after zone reload "

  				     "caused by change in %s",

  				     ldap_entry_logname(entry));

- 			zone_reloaded = ISC_TRUE;

+ 			zone_reloaded = true;

  			result = dns_zone_getserial2(raw, &serial);

  			if (result == ISC_R_SUCCESS)

  				goto update_restart;
@@ -4050,7 +4049,7 @@ 

  

  isc_result_t

  ldap_dn_compare(const char *dn1_instr, const char *dn2_instr,

- 		isc_boolean_t *isequal) {

+ 		bool *isequal) {

  	int ret;

  	isc_result_t result;

  	LDAPDN dn1_ldap = NULL;
@@ -4074,7 +4073,7 @@ 

  	if (ret != LDAP_SUCCESS)

  		CLEANUP_WITH(ISC_R_FAILURE);

  

- 	*isequal = ISC_TF(strcasecmp(dn1_outstr, dn2_outstr) == 0);

+ 	*isequal = (strcasecmp(dn1_outstr, dn2_outstr) == 0);

  	result = ISC_R_SUCCESS;

  

  cleanup:
@@ -4111,7 +4110,7 @@ 

  	dns_zone_t *zone_ptr = NULL;

  	isc_taskaction_t action = NULL;

  	isc_task_t *task = NULL;

- 	isc_boolean_t synchronous;

+ 	bool synchronous;

  

  	REQUIRE(inst != NULL);

  	REQUIRE(entryp != NULL);
@@ -4135,12 +4134,12 @@ 

  		CHECK(zr_get_zone_ptr(inst->zone_register, zone_name,

  				      &zone_ptr, NULL));

  		dns_zone_gettask(zone_ptr, &task);

- 		synchronous = ISC_FALSE;

+ 		synchronous = false;

  	} else {

  		/* For configuration object and zone object use single task

  		 * to make sure that the exclusive mode actually works. */

  		isc_task_attach(inst->task, &task);

- 		synchronous = ISC_TRUE;

+ 		synchronous = true;

  	}

  	REQUIRE(task != NULL);

  
@@ -4216,9 +4215,9 @@ 

  /*

   * This "sane" sleep allows us to end if signal set the "exiting" variable.

   *

-  * Returns ISC_FALSE if we should terminate, ISC_TRUE otherwise.

+  * Returns false if we should terminate, true otherwise.

   */

- static inline isc_boolean_t ATTR_NONNULLS

+ static inline bool ATTR_NONNULLS

  sane_sleep(const ldap_instance_t *inst, unsigned int timeout)

  {

  	unsigned int remains = timeout;
@@ -4229,7 +4228,7 @@ 

  	if (remains)

  		log_debug(99, "sane_sleep: interrupted");

  

- 	return inst->exiting ? ISC_FALSE : ISC_TRUE;

+ 	return inst->exiting ? false : true;

  }

  

  /* No-op signal handler for SIGUSR1 */
@@ -4245,7 +4244,7 @@ 

  	struct sigaction sa;

  	struct sigaction oldsa;

  	int ret;

- 	static isc_boolean_t once = ISC_FALSE;

+ 	static bool once = false;

  

  	if (once)

  		return;
@@ -4259,7 +4258,7 @@ 

  	/* Don't attempt to replace already existing handler */

  	RUNTIME_CHECK(oldsa.sa_handler == NULL);

  

- 	once = ISC_TRUE;

+ 	once = true;

  }

  

  /*
@@ -4296,8 +4295,8 @@ 

  	ldap_entry_t *new_entry = NULL;

  	isc_result_t result;

  	metadb_node_t *node = NULL;

- 	isc_boolean_t mldap_open = ISC_FALSE;

- 	isc_boolean_t modrdn = ISC_FALSE;

+ 	bool mldap_open = false;

+ 	bool modrdn = false;

  

  #ifdef RBTDB_DEBUG

  	static unsigned int count = 0;
@@ -4307,7 +4306,7 @@ 

  		return LDAP_SUCCESS;

  

  	CHECK(mldap_newversion(inst->mldapdb));

- 	mldap_open = ISC_TRUE;

+ 	mldap_open = true;

  

  	CHECK(sync_concurr_limit_wait(inst->sctx));

  	log_debug(20, "ldap_sync_search_entry phase: %x", phase);
@@ -4335,7 +4334,7 @@ 

  						  &new_entry->zone_name)

  				   && dns_name_equal(&old_entry->fqdn,

  						     &new_entry->fqdn));

- 		if (modrdn == ISC_TRUE) {

+ 		if (modrdn == true) {

  			log_debug(1, "detected entry rename: %s -> %s",

  				  ldap_entry_logname(old_entry),

  				  ldap_entry_logname(new_entry));
@@ -4346,7 +4345,7 @@ 

  					ldap_entry_logname(new_entry));

  		}

  	}

- 	if (phase == LDAP_SYNC_CAPI_DELETE || modrdn == ISC_TRUE) {

+ 	if (phase == LDAP_SYNC_CAPI_DELETE || modrdn == true) {

  		/* delete old entry from zone and metaDB */

  		CHECK(syncrepl_update(inst, &old_entry, LDAP_SYNC_CAPI_DELETE));

  		CHECK(mldap_entry_delete(inst->mldapdb, entryUUID));
@@ -4361,11 +4360,11 @@ 

  						  &new_entry->zone_name, node));

  		/* commit new entry into metaLDAP DB before something breaks */

  		metadb_node_close(&node);

- 		mldap_closeversion(inst->mldapdb, ISC_TRUE);

- 		mldap_open = ISC_FALSE;

+ 		mldap_closeversion(inst->mldapdb, true);

+ 		mldap_open = false;

  		/* re-add entry under new DN, if necessary */

  		CHECK(syncrepl_update(inst, &new_entry,

- 		                      (modrdn == ISC_TRUE)

+ 		                      (modrdn == true)

  					      ? LDAP_SYNC_CAPI_ADD : phase));

  	}

  	if (phase != LDAP_SYNC_CAPI_ADD && phase != LDAP_SYNC_CAPI_MODIFY &&
@@ -4382,9 +4381,9 @@ 

  

  cleanup:

  	metadb_node_close(&node);

- 	if (mldap_open == ISC_TRUE)

+ 	if (mldap_open == true)

  		/* commit metaDB changes if the syncrepl event was sent */

- 		mldap_closeversion(inst->mldapdb, ISC_TF(result == ISC_R_SUCCESS));

+ 		mldap_closeversion(inst->mldapdb, (result == ISC_R_SUCCESS));

  	if (result != ISC_R_SUCCESS) {

  		log_error_r("ldap_sync_search_entry failed");

  		sync_concurr_limit_signal(inst->sctx);
@@ -4681,7 +4680,7 @@ 

  	int ret;

  	isc_result_t result;

  	sigset_t sigset;

- 	isc_uint32_t reconnect_interval;

+ 	uint32_t reconnect_interval;

  	sync_state_t state;

  

  	log_debug(1, "Entering ldap_syncrepl_watcher");
@@ -4717,7 +4716,7 @@ 

  			goto retry;

  		}

  

- 		result = ldap_connect(inst, conn, ISC_TRUE);

+ 		result = ldap_connect(inst, conn, true);

  		if (result != ISC_R_SUCCESS) {

  			log_error_r("reconnection to LDAP failed");

  			goto retry;
@@ -4756,7 +4755,7 @@ 

  				  reconnect_interval == 1 ? "": "s");

  			if (!sane_sleep(inst, reconnect_interval))

  				CLEANUP_WITH(ISC_R_SHUTTINGDOWN);

- 			handle_connection_error(inst, conn, ISC_TRUE);

+ 			handle_connection_error(inst, conn, true);

  		}

  

  	}
@@ -4810,7 +4809,7 @@ 

  	isc_mem_attach(ldap_inst->mctx, mctx);

  }

  

- isc_boolean_t

+ bool

  ldap_instance_isexiting(ldap_instance_t *ldap_inst)

  {

  	return ldap_inst->exiting;
@@ -4825,9 +4824,9 @@ 

  	isc_refcount_increment0(&ldap_inst->errors, NULL);

  }

  

- isc_boolean_t

+ bool

  ldap_instance_istained(ldap_instance_t *ldap_inst) {

- 	return ISC_TF(isc_refcount_current(&ldap_inst->errors) != 0);

+ 	return (isc_refcount_current(&ldap_inst->errors) != 0);

  }

  

  /**

file modified
+4 -5
@@ -7,7 +7,6 @@ 

  

  #include "types.h"

  

- #include <isc/boolean.h>

  #include <isc/eventclass.h>

  #include <isc/util.h>

  #include <isccfg/cfg.h>
@@ -48,7 +47,7 @@ 

  void destroy_ldap_instance(ldap_instance_t **ldap_inst) ATTR_NONNULLS;

  

  isc_result_t

- ldap_delete_zone2(ldap_instance_t *inst, dns_name_t *name, isc_boolean_t lock)

+ ldap_delete_zone2(ldap_instance_t *inst, dns_name_t *name, bool lock)

  		  ATTR_NONNULLS;

  

  /* Functions for writing to LDAP. */
@@ -57,7 +56,7 @@ 

  

  isc_result_t

  remove_values_from_ldap(dns_name_t *owner, dns_name_t *zone, ldap_instance_t *ldap_inst,

- 		dns_rdatalist_t *rdlist, isc_boolean_t delete_node) ATTR_NONNULLS;

+ 		dns_rdatalist_t *rdlist, bool delete_node) ATTR_NONNULLS;

  

  isc_result_t

  remove_rdtype_from_ldap(dns_name_t *owner, dns_name_t *zone,
@@ -72,7 +71,7 @@ 

  

  isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  ldap_modify_do(ldap_instance_t *ldap_inst, const char *dn, LDAPMod **mods,

- 		isc_boolean_t delete_node);

+ 		bool delete_node);

  

  void ATTR_NONNULLS

  ldap_mod_free(isc_mem_t *mctx, LDAPMod **changep);
@@ -89,7 +88,7 @@ 

  

  isc_task_t * ldap_instance_gettask(ldap_instance_t *ldap_inst);

  

- isc_boolean_t ldap_instance_isexiting(ldap_instance_t *ldap_inst) ATTR_NONNULLS ATTR_CHECKRESULT;

+ bool ldap_instance_isexiting(ldap_instance_t *ldap_inst) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  void ldap_instance_taint(ldap_instance_t *ldap_inst) ATTR_NONNULLS;

  

file modified
+15 -15
@@ -36,7 +36,7 @@ 

  metadb_new(isc_mem_t *mctx, metadb_t **mdbp) {

  	isc_result_t result;

  	metadb_t *mdb = NULL;

- 	isc_boolean_t lock_ready = ISC_FALSE;

+ 	bool lock_ready = false;

  

  	REQUIRE(mdbp != NULL && *mdbp == NULL);

  
@@ -46,7 +46,7 @@ 

  	isc_mem_attach(mctx, &mdb->mctx);

  

  	CHECK(isc_mutex_init(&mdb->newversion_lock));

- 	lock_ready = ISC_TRUE;

+ 	lock_ready = true;

  	CHECK(dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,

  			    dns_rdataclass_in, 0, NULL, &mdb->rbtdb));

  
@@ -55,7 +55,7 @@ 

  

  cleanup:

  	if (mdb != NULL) {

- 		if (lock_ready == ISC_TRUE)

+ 		if (lock_ready == true)

  			RUNTIME_CHECK(isc_mutex_destroy(&mdb->newversion_lock)

  				      == ISC_R_SUCCESS);

  		MEM_PUT_AND_DETACH(mdb);
@@ -114,10 +114,10 @@ 

   * Close writeable metaDB version and commit/discard all changes.

   *

   * @pre All metaDB nodes have to be closed before calling

-  *      closeversion(commit = ISC_TRUE).

+  *      closeversion(commit = true).

   */

  void

- metadb_closeversion(metadb_t *mdb, isc_boolean_t commit) {

+ metadb_closeversion(metadb_t *mdb, bool commit) {

  	UNLOCK(&mdb->newversion_lock);

  	dns_db_closeversion(mdb->rbtdb, &mdb->newversion, commit);

  }
@@ -141,7 +141,7 @@ 

  		if (miter->version != NULL)

  			dns_db_closeversion(miter->rbtdb,

  					    &miter->version,

- 					    ISC_FALSE);

+ 					    false);

  		dns_db_detach(&miter->rbtdb);

  	}

  
@@ -195,7 +195,7 @@ 

  			dns_db_detachnode(node->rbtdb, &node->dbnode);

  		if (node->version != NULL)

  			dns_db_closeversion(node->rbtdb, &node->version,

- 					    ISC_FALSE);

+ 					    false);

  		dns_db_detach(&node->rbtdb);

  	}

  	MEM_PUT_AND_DETACH(node);
@@ -252,7 +252,7 @@ 

   */

  static isc_result_t

  metadb_node_init(metadb_t *mdb, dns_dbversion_t *ver, dns_name_t *mname,

- 		 isc_boolean_t create, metadb_node_t **nodep) {

+ 		 bool create, metadb_node_t **nodep) {

  	isc_result_t result;

  	metadb_node_t *node = NULL;

  
@@ -288,10 +288,10 @@ 

  	dns_dbversion_t *ver = NULL;

  

  	dns_db_currentversion(mdb->rbtdb, &ver);

- 	CHECK(metadb_node_init(mdb, ver, mname, ISC_FALSE, nodep));

+ 	CHECK(metadb_node_init(mdb, ver, mname, false, nodep));

  

  cleanup:

- 	dns_db_closeversion(mdb->rbtdb, &ver, ISC_FALSE);

+ 	dns_db_closeversion(mdb->rbtdb, &ver, false);

  	return result;

  }

  
@@ -311,10 +311,10 @@ 

  

  	INSIST(mdb->newversion != NULL);

  	dns_db_attachversion(mdb->rbtdb, mdb->newversion, &ver);

- 	CHECK(metadb_node_init(mdb, ver, mname, ISC_TRUE, nodep));

+ 	CHECK(metadb_node_init(mdb, ver, mname, true, nodep));

  

  cleanup:

- 	dns_db_closeversion(mdb->rbtdb, &ver, ISC_FALSE);

+ 	dns_db_closeversion(mdb->rbtdb, &ver, false);

  	return result;

  }

  
@@ -334,10 +334,10 @@ 

  

  	INSIST(mdb->newversion != NULL);

  	dns_db_attachversion(mdb->rbtdb, mdb->newversion, &ver);

- 	CHECK(metadb_node_init(mdb, ver, mname, ISC_FALSE, nodep));

+ 	CHECK(metadb_node_init(mdb, ver, mname, false, nodep));

  

  cleanup:

- 	dns_db_closeversion(mdb->rbtdb, &ver, ISC_FALSE);

+ 	dns_db_closeversion(mdb->rbtdb, &ver, false);

  	return result;

  }

  
@@ -392,7 +392,7 @@ 

  		    dns_rdataset_t *rdataset) {

  	isc_result_t result;

  

- 	REQUIRE(dns_rdataset_isassociated(rdataset) == ISC_FALSE);

+ 	REQUIRE(dns_rdataset_isassociated(rdataset) == false);

  

  	CHECK(dns_db_findrdataset(node->rbtdb, node->dbnode, node->version,

  				  rrtype, 0, 0, rdataset, NULL));

file modified
+1 -1
@@ -49,7 +49,7 @@ 

  metadb_newversion(metadb_t *mdb);

  

  void ATTR_NONNULLS

- metadb_closeversion(metadb_t *mdb, isc_boolean_t commit);

+ metadb_closeversion(metadb_t *mdb, bool commit);

  

  isc_result_t ATTR_CHECKRESULT ATTR_NONNULLS

  metadb_iterator_create(metadb_t *mdb, metadb_iter_t **miterp);

file modified
+18 -19
@@ -9,8 +9,7 @@ 

  #include <stddef.h>

  #include <uuid/uuid.h>

  

- #include <isc/boolean.h>

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/net.h>

  #include <isc/refcount.h>

  #include <isc/result.h>
@@ -98,7 +97,7 @@ 

  }

  

  void

- mldap_closeversion(mldapdb_t *mldap, isc_boolean_t commit) {

+ mldap_closeversion(mldapdb_t *mldap, bool commit) {

  	return metadb_closeversion(mldap->mdb, commit);

  }

  
@@ -112,20 +111,20 @@ 

  }

  

  /*

-  * Verify that isc_refcount_t can be casted properly to isc_uint32_t

+  * Verify that isc_refcount_t can be casted properly to uint32_t

   * so isc_serial_* functions can be safely used for comparison.

   *

   * The spell 'typeof(isc_refcount_current((isc_refcount_t *)0))' walks through

   * isc_refcount_t abstractions and returns underlying type used for storing the

   * reference counter value.

   */

- STATIC_ASSERT((isc_uint32_t)

+ STATIC_ASSERT((uint32_t)

  		(typeof(((isc_refcount_t *)0)->refs))

  		-1

  	      == 0xFFFFFFFF, \

  	      "negative isc_refcount_t cannot be properly shortened to 32 bits");

  

- STATIC_ASSERT((isc_uint32_t)

+ STATIC_ASSERT((uint32_t)

  		(typeof(((isc_refcount_t *)0)->refs))

  		0x90ABCDEF12345678

  	      == 0x12345678, \
@@ -136,9 +135,9 @@ 

   *

   * Generation numbers have to be compared using isc_serial_* functions.

   */

- isc_uint32_t

+ uint32_t

  mldap_cur_generation_get(mldapdb_t *mldap) {

- 	return (isc_uint32_t)isc_refcount_current(&mldap->generation);

+ 	return (uint32_t)isc_refcount_current(&mldap->generation);

  }

  

  /**
@@ -231,7 +230,7 @@ 

  	unsigned char buff[sizeof(mldap->generation)];

  	isc_region_t region = { .base = buff, .length = sizeof(buff) };

  	dns_rdata_t rdata;

- 	isc_uint32_t generation;

+ 	uint32_t generation;

  

  	STATIC_ASSERT(sizeof(mldap_cur_generation_get(mldap)) == sizeof(struct in_addr), \

  		      "mldapdb_t->generation value is too big for A rdata type");
@@ -252,7 +251,7 @@ 

  }

  

  static isc_result_t

- mldap_generation_get(metadb_node_t *node, isc_uint32_t *generationp) {

+ mldap_generation_get(metadb_node_t *node, uint32_t *generationp) {

  	isc_result_t result;

  	dns_rdataset_t rdataset;

  	dns_rdata_t rdata;
@@ -431,14 +430,14 @@ 

  	REQUIRE(iterp != NULL && *iterp == NULL);

  

  	CHECK(metadb_iterator_create(mldap->mdb, &iter));

- 	CHECKED_MEM_GET(mldap->mctx, iter->state, sizeof(isc_uint32_t));

+ 	CHECKED_MEM_GET(mldap->mctx, iter->state, sizeof(uint32_t));

  	result = dns_dbiterator_seek(iter->iter, &uuid_rootname);

  	if (result == ISC_R_NOTFOUND) /* metaLDAP is empty */

  		CLEANUP_WITH(ISC_R_NOMORE);

  	else if (result != ISC_R_SUCCESS)

  		goto cleanup;

  	/* store current generation value for sanity checking */

- 	*(isc_uint32_t *)iter->state = mldap_cur_generation_get(mldap);

+ 	*(uint32_t *)iter->state = mldap_cur_generation_get(mldap);

  

  	CHECK(mldap_iter_deadnodes_next(mldap, &iter, uuid));

  
@@ -447,7 +446,7 @@ 

  

  cleanup:

  	if (iter != NULL) {

- 		SAFE_MEM_PUT(mldap->mctx, iter->state, sizeof(isc_uint32_t));

+ 		SAFE_MEM_PUT(mldap->mctx, iter->state, sizeof(uint32_t));

  		iter->state = NULL;

  		metadb_iterator_destroy(&iter);

  	}
@@ -479,8 +478,8 @@ 

  	isc_result_t result;

  	dns_dbnode_t *rbt_node = NULL;

  	metadb_iter_t *iter = NULL;

- 	isc_uint32_t node_generation;

- 	isc_uint32_t cur_generation;

+ 	uint32_t node_generation;

+ 	uint32_t cur_generation;

  	metadb_node_t metadb_node;

  	DECLARE_BUFFERED_NAME(name);

  	isc_region_t name_region;
@@ -497,14 +496,14 @@ 

  	metadb_node.rbtdb = iter->rbtdb;

  

  	/* skip nodes which do not belong to UUID sub-tree or are 'fresh' */

- 	while (ISC_TRUE) {

+ 	while (true) {

  		if (rbt_node != NULL)

  			dns_db_detachnode(iter->rbtdb, &rbt_node);

  		dns_name_reset(&name);

  

  		CHECK(dns_dbiterator_next(iter->iter));

  		CHECK(dns_dbiterator_current(iter->iter, &rbt_node, &name));

- 		if (dns_name_issubdomain(&name, &uuid_rootname) == ISC_FALSE)

+ 		if (dns_name_issubdomain(&name, &uuid_rootname) == false)

  			continue;

  		metadb_node.dbnode = rbt_node;

  
@@ -512,7 +511,7 @@ 

  		       == ISC_R_SUCCESS);

  		cur_generation = mldap_cur_generation_get(mldap);

  		/* sanity check: generation number cannot change during iteration */

- 		INSIST(*(isc_uint32_t *)(*iterp)->state == cur_generation);

+ 		INSIST(*(uint32_t *)(*iterp)->state == cur_generation);

  

  		if (isc_serial_lt(node_generation, cur_generation))

  			break; /* this node is from previous mLDAP generation */
@@ -532,7 +531,7 @@ 

  	if (rbt_node != NULL)

  		dns_db_detachnode(iter->rbtdb, &rbt_node);

  	if (result != ISC_R_SUCCESS) {

- 		SAFE_MEM_PUT(iter->mctx, iter->state, sizeof(isc_uint32_t));

+ 		SAFE_MEM_PUT(iter->mctx, iter->state, sizeof(uint32_t));

  		iter->state = NULL;

  		metadb_iterator_destroy(iterp);

  	}

file modified
+2 -2
@@ -22,7 +22,7 @@ 

  mldap_newversion(mldapdb_t *mldap);

  

  void ATTR_NONNULLS

- mldap_closeversion(mldapdb_t *mldap, isc_boolean_t commit);

+ mldap_closeversion(mldapdb_t *mldap, bool commit);

  

  isc_result_t ATTR_CHECKRESULT ATTR_NONNULLS

  mldap_entry_read(mldapdb_t *mldap, struct berval *uuid, metadb_node_t **nodep);
@@ -45,7 +45,7 @@ 

  void ATTR_NONNULLS

  mldap_cur_generation_bump(mldapdb_t *mldap);

  

- isc_uint32_t ATTR_CHECKRESULT ATTR_NONNULLS

+ uint32_t ATTR_CHECKRESULT ATTR_NONNULLS

  mldap_cur_generation_get(mldapdb_t *mldap);

  

  isc_result_t ATTR_CHECKRESULT ATTR_NONNULLS

file modified
+30 -30
@@ -7,7 +7,7 @@ 

  #include <isc/task.h>

  #include <isc/result.h>

  #include <isc/string.h>

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/parseint.h>

  

  #include <dns/name.h>
@@ -25,7 +25,7 @@ 

  #include "ldap_helper.h"

  #include "zone_register.h"

  

- isc_boolean_t verbose_checks = ISC_FALSE; /* log each failure in CHECK() macro */

+ bool verbose_checks = false; /* log each failure in CHECK() macro */

  

  /** Built-in defaults. */

  static const setting_t settings_default[] = {
@@ -48,8 +48,8 @@ 

  	{ "krb5_keytab",		default_string("")		},

  	{ "fake_mname",			default_string("")		},

  	{ "ldap_hostname",		default_string("")		},

- 	{ "sync_ptr",			default_boolean(ISC_FALSE)	},

- 	{ "dyn_update",			default_boolean(ISC_FALSE)	},

+ 	{ "sync_ptr",			default_boolean(false)	},

+ 	{ "dyn_update",			default_boolean(false)	},

  	/* Empty string as default update_policy declares zone as 'dynamic'

  	 * for dns_zone_isdynamic() to prevent unwanted

  	 * zone_postload() calls and warnings about serial and so on.
@@ -57,7 +57,7 @@ 

  	 * SSU table defined by empty string contains no rules =>

  	 * dns_ssutable_checkrules() will return deny. */

  	{ "update_policy",		default_string("")		},

- 	{ "verbose_checks",		default_boolean(ISC_FALSE)	},

+ 	{ "verbose_checks",		default_boolean(false)	},

  	{ "directory",			default_string("")		},

  	{ "server_id",			default_string("")		},

  	end_of_settings
@@ -87,7 +87,7 @@ 

   */

  isc_result_t

  setting_find(const char *name, const settings_set_t *set,

- 	     isc_boolean_t recursive, isc_boolean_t filled_only,

+ 	     bool recursive, bool filled_only,

  	     setting_t **found) {

  

  	REQUIRE(name != NULL);
@@ -150,7 +150,7 @@ 

  	REQUIRE(name != NULL);

  	REQUIRE(target != NULL);

  

- 	CHECK(setting_find(name, set, isc_boolean_true, isc_boolean_true, &setting));

+ 	CHECK(setting_find(name, set, true, true, &setting));

  

  	if (setting->type != type) {

  		log_bug("incompatible setting data type requested "
@@ -160,13 +160,13 @@ 

  

  	switch (type) {

  	case ST_UNSIGNED_INTEGER:

- 		*(isc_uint32_t *)target = setting->value.value_uint;

+ 		*(uint32_t *)target = setting->value.value_uint;

  		break;

  	case ST_STRING:

  		*(char **)target = setting->value.value_char;

  		break;

  	case ST_BOOLEAN:

- 		*(isc_boolean_t *)target = setting->value.value_boolean;

+ 		*(bool *)target = setting->value.value_boolean;

  		break;

  	default:

  		UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -183,7 +183,7 @@ 

  

  isc_result_t

  setting_get_uint(const char *const name, const settings_set_t *const set,

- 		 isc_uint32_t *target)

+ 		 uint32_t *target)

  {

  	return setting_get(name, ST_UNSIGNED_INTEGER, set, target);

  }
@@ -197,7 +197,7 @@ 

  

  isc_result_t

  setting_get_bool(const char *const name, const settings_set_t *const set,

- 		 isc_boolean_t *target)

+ 		 bool *target)

  {

  	return setting_get(name, ST_BOOLEAN, set, target);

  }
@@ -217,8 +217,8 @@ 

  	  const char *value)

  {

  	isc_result_t result;

- 	isc_uint32_t numeric_value;

- 	isc_uint32_t len;

+ 	uint32_t numeric_value;

+ 	uint32_t len;

  

  	REQUIRE(setting != NULL);

  	REQUIRE(value != NULL);
@@ -265,7 +265,7 @@ 

  			CLEANUP_WITH(ISC_R_UNEXPECTEDTOKEN);

  		}

  		if (setting->filled &&

- 		    setting->value.value_boolean == ISC_TF(numeric_value))

+ 		    setting->value.value_boolean == numeric_value)

  			CLEANUP_WITH(ISC_R_IGNORE);

  		break;

  	default:
@@ -280,7 +280,7 @@ 

  		if (setting->is_dynamic)

  			isc_mem_free(mctx, setting->value.value_char);

  		CHECKED_MEM_ALLOCATE(mctx, setting->value.value_char, len);

- 		setting->is_dynamic = ISC_TRUE;

+ 		setting->is_dynamic = true;

  		CHECK(isc_string_copy(setting->value.value_char, len, value));

  		break;

  
@@ -289,7 +289,7 @@ 

  		break;

  

  	case ST_BOOLEAN:

- 		setting->value.value_boolean = ISC_TF(numeric_value);

+ 		setting->value.value_boolean = numeric_value;

  		break;

  	default:

  		UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -328,7 +328,7 @@ 

  	isc_result_t result;

  	setting_t *setting = NULL;

  

- 	CHECK(setting_find(name, set, ISC_FALSE, ISC_FALSE, &setting));

+ 	CHECK(setting_find(name, set, false, false, &setting));

  

  	return set_value(set->mctx, set, setting, value);

  
@@ -359,7 +359,7 @@ 

  	isc_result_t result;

  	setting_t *setting = NULL;

  

- 	CHECK(setting_find(name, set, ISC_FALSE, ISC_FALSE, &setting));

+ 	CHECK(setting_find(name, set, false, false, &setting));

  

  	if (!setting->filled)

  		return ISC_R_IGNORE;
@@ -370,7 +370,7 @@ 

  	case ST_STRING:

  		if (setting->is_dynamic)

  			isc_mem_free(set->mctx, setting->value.value_char);

- 		setting->is_dynamic = ISC_FALSE;

+ 		setting->is_dynamic = false;

  		break;

  

  	case ST_UNSIGNED_INTEGER:
@@ -411,7 +411,7 @@ 

  	setting_t *setting = NULL;

  	ldap_valuelist_t values;

  

- 	CHECK(setting_find(name, set, ISC_FALSE, ISC_FALSE, &setting));

+ 	CHECK(setting_find(name, set, false, false, &setting));

  	result = ldap_entry_getvalues(entry, attr_name, &values);

  	if (result == ISC_R_NOTFOUND || HEAD(values) == NULL) {

  		CHECK(setting_unset(name, set));
@@ -559,7 +559,7 @@ 

  	isc_buffer_t *logbuffer = closure;

  

  	REQUIRE(logbuffer != NULL);

- 	REQUIRE(logbuffer->autore == ISC_TRUE);

+ 	REQUIRE(logbuffer->autore == true);

  

  	isc_buffer_putmem(logbuffer, (const unsigned char *)text, textlen);

  }
@@ -583,10 +583,10 @@ 

  	const cfg_obj_t *cfg_value;

  	const char *str_value;

  

- 	REQUIRE(cfg_obj_ismap(config) == ISC_TRUE);

+ 	REQUIRE(cfg_obj_ismap(config) == true);

  

  	CHECK(isc_buffer_allocate(set->mctx, &buf_value, ISC_BUFFER_INCR));

- 	isc_buffer_setautorealloc(buf_value, ISC_TRUE);

+ 	isc_buffer_setautorealloc(buf_value, true);

  

  	for (setting = set->first_setting;

  	     setting->name != NULL;
@@ -628,23 +628,23 @@ 

   *

   * Error message is logged for each setting without defined value.

   *

-  * @retval ISC_TRUE  All settings have value defined.

-  * @retval ISC_FALSE At least one setting do not have defined value.

+  * @retval true  All settings have value defined.

+  * @retval false At least one setting do not have defined value.

   */

- isc_boolean_t

+ bool

  settings_set_isfilled(settings_set_t *set) {

  	isc_result_t result;

- 	isc_boolean_t isfiled = ISC_TRUE;

+ 	bool isfiled = true;

  

  	REQUIRE(set != NULL);

  

  	for (int i = 0; set->first_setting[i].name != NULL; i++) {

  		const char *name = set->first_setting[i].name;

- 		result = setting_find(name, set, ISC_TRUE, ISC_TRUE, NULL);

+ 		result = setting_find(name, set, true, true, NULL);

  		if (result != ISC_R_SUCCESS) {

  			log_error_r("argument '%s' must be set "

  				    "in set of settings '%s'", name, set->name);

- 			isfiled = ISC_FALSE;

+ 			isfiled = false;

  		}

  	}

  	return isfiled;
@@ -679,7 +679,7 @@ 

  	REQUIRE(parameters != NULL);

  

  	CHECK(isc_buffer_allocate(mctx, &log_buf, ISC_BUFFER_INCR));

- 	isc_buffer_setautorealloc(log_buf, ISC_TRUE);

+ 	isc_buffer_setautorealloc(log_buf, true);

  

  	len = strlen(parameters);

  	isc_buffer_constinit(&in_buf, parameters, len);

file modified
+15 -16
@@ -6,8 +6,7 @@ 

  #define _LD_SETTINGS_H_

  

  #include <isc/types.h>

- #include <isc/boolean.h>

- #include <isc/int.h>

+ #include <inttypes.h>

  

  #include <isccfg/grammar.h>

  
@@ -34,11 +33,11 @@ 

  	setting_type_t	type;

  	union {

  		char		*value_char;

- 		isc_uint32_t	value_uint;

- 		isc_boolean_t	value_boolean;

+ 		uint32_t	value_uint;

+ 		bool	value_boolean;

  	} value;

- 	isc_boolean_t	filled;

- 	isc_boolean_t	is_dynamic;

+ 	bool	filled;

+ 	bool	is_dynamic;

  };

  

  struct settings_set {
@@ -61,13 +60,13 @@ 

   *         "name", no_default_string, &target_variable

   * }

   */

- #define default_string(val)	ST_STRING, { .value_char = (val) }, ISC_TRUE, ISC_FALSE

- #define default_uint(val)	ST_UNSIGNED_INTEGER, { .value_uint = (val) }, ISC_TRUE, ISC_FALSE

- #define default_boolean(val)	ST_BOOLEAN, { .value_boolean = (val) }, ISC_TRUE, ISC_FALSE

+ #define default_string(val)	ST_STRING, { .value_char = (val) }, true, false

+ #define default_uint(val)	ST_UNSIGNED_INTEGER, { .value_uint = (val) }, true, false

+ #define default_boolean(val)	ST_BOOLEAN, { .value_boolean = (val) }, true, false

  /* No defaults. */

- #define no_default_string	ST_STRING, { .value_char = NULL }, ISC_FALSE, ISC_FALSE

- #define no_default_uint		ST_UNSIGNED_INTEGER, { .value_uint = 0 }, ISC_FALSE, ISC_FALSE

- #define no_default_boolean	ST_BOOLEAN, { .value_boolean = ISC_FALSE }, ISC_FALSE, ISC_FALSE

+ #define no_default_string	ST_STRING, { .value_char = NULL }, false, false

+ #define no_default_uint		ST_UNSIGNED_INTEGER, { .value_uint = 0 }, false, false

+ #define no_default_boolean	ST_BOOLEAN, { .value_boolean = false }, false, false

  

  /* This is used in the end of setting_t arrays. */

  #define end_of_settings	{ NULL, default_uint(0) }
@@ -90,17 +89,17 @@ 

  		       const char *file, unsigned long line,

  		       settings_set_t *settings) ATTR_NONNULLS ATTR_CHECKRESULT;

  

- isc_boolean_t

+ bool

  settings_set_isfilled(settings_set_t *set) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  isc_result_t

  setting_find(const char *name, const settings_set_t *set,

- 	     isc_boolean_t recursive, isc_boolean_t filled_only,

+ 	     bool recursive, bool filled_only,

  	     setting_t **found) ATTR_CHECKRESULT;

  

  isc_result_t

  setting_get_uint(const char * const name, const settings_set_t * const set,

- 		 isc_uint32_t * target) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		 uint32_t * target) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  isc_result_t

  setting_get_str(const char * const name, const settings_set_t * const set,
@@ -108,7 +107,7 @@ 

  

  isc_result_t

  setting_get_bool(const char * const name, const settings_set_t * const set,

- 		 isc_boolean_t * target) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		 bool * target) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  isc_result_t

  setting_set(const char *const name, const settings_set_t *set,

file modified
+16 -16
@@ -177,7 +177,7 @@ 

   *                       or LDAP_MOD_ADD if A/AAAA record is being added.

   * @param[out] rdataset  Will be set to the existing PTR RR set in the database.

   *                       RR set exists only if dns_rdataset_isassociated()

-  *                       returns ISC_TRUE.

+  *                       returns true.

   *

   * @retval ISC_R_IGNORE  A and PTR records match, no change is required.

   * @retval ISC_R_SUCCESS Prerequisites fulfilled, update is allowed.
@@ -216,10 +216,10 @@ 

  	isc_result_t result;

  

  	char ptr_name_str[DNS_NAME_FORMATSIZE + 1];

- 	isc_boolean_t ptr_found;

+ 	bool ptr_found;

  	dns_rdata_ptr_t ptr_rdata;

  	char ptr_rdata_str[DNS_NAME_FORMATSIZE + 1];

- 	isc_boolean_t ptr_a_equal = ISC_FALSE; /* GCC requires initialization */

+ 	bool ptr_a_equal = false; /* GCC requires initialization */

  

  	dns_dbnode_t *ptr_node = NULL;

  	dns_fixedname_t found_name;
@@ -238,14 +238,14 @@ 

  	switch (result) {

  		case ISC_R_SUCCESS:

  			INSIST(dns_name_equal(dns_fixedname_name(&found_name),

- 					      ptr_name) == ISC_TRUE);

- 			ptr_found = ISC_TRUE;

+ 					      ptr_name) == true);

+ 			ptr_found = true;

  			break;

  

  		case DNS_R_NXDOMAIN:

  		case DNS_R_NXRRSET:

  		case DNS_R_EMPTYNAME:

- 			ptr_found = ISC_FALSE;

+ 			ptr_found = false;

  			/* PTR RR does not exist */

  			break;

  
@@ -258,7 +258,7 @@ 

  	}

  

  	/* Find the value of PTR entry. */

- 	if (ptr_found == ISC_TRUE) {

+ 	if (ptr_found == true) {

  		INSIST(dns_rdataset_count(rdataset) > 0);

  		if (dns_rdataset_count(rdataset) != 1) {

  			dns_name_format(ptr_name, ptr_name_str,
@@ -278,9 +278,9 @@ 

  		if (dns_name_isabsolute(a_name) &&

  		    dns_name_isabsolute(&ptr_rdata.ptr) &&

  		    dns_name_equal(&ptr_rdata.ptr, a_name)) {

- 			ptr_a_equal = ISC_TRUE;

+ 			ptr_a_equal = true;

  		} else {

- 			ptr_a_equal = ISC_FALSE;

+ 			ptr_a_equal = false;

  			dns_name_format(ptr_name, ptr_name_str,

  					DNS_NAME_FORMATSIZE);

  			append_trailing_dot(ptr_name_str,
@@ -293,13 +293,13 @@ 

  	}

  

  	if (mod_op == LDAP_MOD_DELETE) {

- 		if (ptr_found == ISC_FALSE) {

+ 		if (ptr_found == false) {

  			dns_zone_log(zone, ISC_LOG_DEBUG(3), SYNCPTR_FMTPRE

  				     "skipped: no PTR records found",

  				     SYNCPTR_FMTPOST);

  			CLEANUP_WITH(ISC_R_IGNORE);

  

- 		} else if (ptr_a_equal == ISC_FALSE) {

+ 		} else if (ptr_a_equal == false) {

  			dns_zone_log(zone, ISC_LOG_ERROR, SYNCPTR_FMTPRE "failed: "

  				  "existing PTR record '%s' contains unexpected "

  				  "value '%s' (value '%s' expected)",
@@ -308,8 +308,8 @@ 

  			CLEANUP_WITH(ISC_R_UNEXPECTEDTOKEN);

  

  		}

- 	} else if (mod_op == LDAP_MOD_ADD && ptr_found == ISC_TRUE) {

- 		if (ptr_a_equal == ISC_TRUE) {

+ 	} else if (mod_op == LDAP_MOD_ADD && ptr_found == true) {

+ 		if (ptr_a_equal == true) {

  			dns_zone_log(zone, ISC_LOG_DEBUG(3),

  				     SYNCPTR_FMTPRE "skipped: PTR record with "

  				     "desired value is already present",
@@ -380,7 +380,7 @@ 

  	isc_result_t result;

  

  	settings_set_t *zone_settings = NULL;

- 	isc_boolean_t zone_dyn_update;

+ 	bool zone_dyn_update;

  	char *a_name_str = NULL;

  

  	sync_ptrev_t *ev = NULL;
@@ -508,7 +508,7 @@ 

  	}

  

  	CHECK(dns_diff_apply(&diff, ldapdb, version));

- 	dns_db_closeversion(ldapdb, &version, ISC_TRUE);

+ 	dns_db_closeversion(ldapdb, &version, true);

  

  cleanup:

  	if (dns_rdataset_isassociated(&old_rdataset))
@@ -519,7 +519,7 @@ 

  	if (ldapdb != NULL) {

  		/* rollback if something bad happened */

  		if (version != NULL)

- 			dns_db_closeversion(ldapdb, &version, ISC_FALSE);

+ 			dns_db_closeversion(ldapdb, &version, false);

  		dns_db_detach(&ldapdb);

  	}

  	sync_ptr_destroyev(&ev);

file modified
+29 -29
@@ -93,8 +93,8 @@ 

  	ISC_LIST(task_element_t)	tasks;	/**< list of tasks processing

  						     events from initial

  						     synchronization phase */

- 	isc_uint32_t			next_id;  /**< next sequential id */

- 	isc_uint32_t			last_id;  /**< last processed event */

+ 	uint32_t			next_id;  /**< next sequential id */

+ 	uint32_t			last_id;  /**< last processed event */

  };

  

  /**
@@ -145,7 +145,7 @@ 

  				    "sync_barrier_wait(): invalid state "

  				    "%u", bev->sctx->state);

  	}

- 	sync_state_change(bev->sctx, new_state, ISC_FALSE);

+ 	sync_state_change(bev->sctx, new_state, false);

  	BROADCAST(&bev->sctx->cond);

  	UNLOCK(&bev->sctx->mutex);

  	if (new_state == sync_finished)
@@ -202,8 +202,8 @@ 

  	sync_barrierev_t *bev = NULL;

  	sync_barrierev_t *fev = NULL;

  	isc_event_t *ev = NULL;

- 	isc_uint32_t cnt;

- 	isc_boolean_t locked = ISC_FALSE;

+ 	uint32_t cnt;

+ 	bool locked = false;

  

  	REQUIRE(ISCAPI_TASK_VALID(task));

  	REQUIRE(event != NULL);
@@ -213,7 +213,7 @@ 

  	if (cnt == 0) {

  		log_debug(1, "sync_barrier_wait(): barrier reached");

  		LOCK(&bev->sctx->mutex);

- 		locked = ISC_TRUE;

+ 		locked = true;

  		CHECK(sync_finishev_create(bev->sctx, bev->inst, &fev));

  		ev = (isc_event_t *)fev;

  		isc_task_send(ldap_instance_gettask(bev->sctx->inst), &ev);
@@ -265,9 +265,9 @@ 

  sync_ctx_init(isc_mem_t *mctx, ldap_instance_t *inst, sync_ctx_t **sctxp) {

  	isc_result_t result;

  	sync_ctx_t *sctx = NULL;

- 	isc_boolean_t lock_ready = ISC_FALSE;

- 	isc_boolean_t cond_ready = ISC_FALSE;

- 	isc_boolean_t refcount_ready = ISC_FALSE;

+ 	bool lock_ready = false;

+ 	bool cond_ready = false;

+ 	bool refcount_ready = false;

  

  	REQUIRE(sctxp != NULL && *sctxp == NULL);

  
@@ -278,13 +278,13 @@ 

  	sctx->inst = inst;

  

  	CHECK(isc_mutex_init(&sctx->mutex));

- 	lock_ready = ISC_TRUE;

+ 	lock_ready = true;

  	CHECK(isc_condition_init(&sctx->cond));

- 	cond_ready = ISC_TRUE;

+ 	cond_ready = true;

  

  	/* refcount includes ldap_inst->task implicitly */

  	CHECK(isc_refcount_init(&sctx->task_cnt, 0));

- 	refcount_ready = ISC_TRUE;

+ 	refcount_ready = true;

  

  	ISC_LIST_INIT(sctx->tasks);

  
@@ -297,12 +297,12 @@ 

  	return ISC_R_SUCCESS;

  

  cleanup:

- 	if (lock_ready == ISC_TRUE)

+ 	if (lock_ready == true)

  		DESTROYLOCK(&sctx->mutex);

- 	if (cond_ready == ISC_TRUE)

+ 	if (cond_ready == true)

  		RUNTIME_CHECK(isc_condition_destroy(&sctx->cond)

  			      == ISC_R_SUCCESS);

- 	if (refcount_ready == ISC_TRUE)

+ 	if (refcount_ready == true)

  		isc_refcount_destroy(&sctx->task_cnt);

  	MEM_PUT_AND_DETACH(sctx);

  	return result;
@@ -357,14 +357,14 @@ 

   *                 support recursive mutexes in ISC mutex API.

   *

   * @warning Caller has to ensure that sctx is properly locked either externally

-  *          or by lock = ISC_TRUE parameter. Attempt to lock sctx recursively

+  *          or by lock = true parameter. Attempt to lock sctx recursively

   *          will lead to deadlock.

   */

  void

- sync_state_change(sync_ctx_t *sctx, sync_state_t new_state, isc_boolean_t lock) {

+ sync_state_change(sync_ctx_t *sctx, sync_state_t new_state, bool lock) {

  	REQUIRE(sctx != NULL);

  

- 	if (lock == ISC_TRUE)

+ 	if (lock == true)

  		LOCK(&sctx->mutex);

  

  	switch (sctx->state) {
@@ -399,7 +399,7 @@ 

  

  	sctx->state = new_state;

  	log_debug(1, "sctx state %u reached", new_state);

- 	if (lock == ISC_TRUE)

+ 	if (lock == true)

  		UNLOCK(&sctx->mutex);

  }

  
@@ -445,7 +445,7 @@ 

  isc_result_t

  sync_task_add(sync_ctx_t *sctx, isc_task_t *task) {

  	isc_result_t result = ISC_R_SUCCESS;

- 	isc_uint32_t cnt;

+ 	uint32_t cnt;

  	task_element_t *newel = NULL;

  

  	REQUIRE(sctx != NULL);
@@ -513,7 +513,7 @@ 

  				    "%u", sctx->state);

  	}

  

- 	sync_state_change(sctx, barrier_state, ISC_FALSE);

+ 	sync_state_change(sctx, barrier_state, false);

  	for (taskel = next_taskel = HEAD(sctx->tasks);

  	     taskel != NULL;

  	     taskel = next_taskel) {
@@ -553,7 +553,7 @@ 

  

  	REQUIRE(sctx != NULL);

  

- 	while (ldap_instance_isexiting(sctx->inst) == ISC_FALSE) {

+ 	while (ldap_instance_isexiting(sctx->inst) == false) {

  		result = isc_time_nowplusinterval(&abs_timeout,

  						  &shutdown_timeout);

  		INSIST(result == ISC_R_SUCCESS);
@@ -590,22 +590,22 @@ 

   */

  isc_result_t

  sync_event_send(sync_ctx_t *sctx, isc_task_t *task, ldap_syncreplevent_t **ev,

- 		isc_boolean_t synchronous) {

+ 		bool synchronous) {

  	isc_result_t result;

  	isc_time_t abs_timeout;

- 	isc_uint32_t seqid;

- 	isc_boolean_t locked = ISC_FALSE;

+ 	uint32_t seqid;

+ 	bool locked = false;

  

  	REQUIRE(sctx != NULL);

  

  	LOCK(&sctx->mutex);

- 	locked = ISC_TRUE;

+ 	locked = true;

  	/* overflow is not a problem as long as the modulo is smaller than

  	 * constant used by sync_concurr_limit_wait() */

  	(*ev)->seqid = seqid = ++sctx->next_id % 0xffffffff;

  	isc_task_send(task, (isc_event_t **)ev);

- 	while (synchronous == ISC_TRUE && sctx->last_id != seqid) {

- 		if (ldap_instance_isexiting(sctx->inst) == ISC_TRUE)

+ 	while (synchronous == true && sctx->last_id != seqid) {

+ 		if (ldap_instance_isexiting(sctx->inst) == true)

  			CLEANUP_WITH(ISC_R_SHUTTINGDOWN);

  

  		result = isc_time_nowplusinterval(&abs_timeout, &shutdown_timeout);
@@ -617,7 +617,7 @@ 

  	result = ISC_R_SUCCESS;

  

  cleanup:

- 	if (locked == ISC_TRUE)

+ 	if (locked == true)

  		UNLOCK(&sctx->mutex);

  	return result;

  }

file modified
+2 -2
@@ -40,7 +40,7 @@ 

  sync_state_get(sync_ctx_t *sctx, sync_state_t *statep) ATTR_NONNULLS;

  

  void

- sync_state_change(sync_ctx_t *sctx, sync_state_t new_state, isc_boolean_t lock) ATTR_NONNULLS;

+ sync_state_change(sync_ctx_t *sctx, sync_state_t new_state, bool lock) ATTR_NONNULLS;

  

  void

  sync_state_reset(sync_ctx_t *sctx) ATTR_NONNULLS;
@@ -59,7 +59,7 @@ 

  

  isc_result_t

  sync_event_send(sync_ctx_t *sctx, isc_task_t *task, ldap_syncreplevent_t **ev,

- 		isc_boolean_t synchronous) ATTR_NONNULLS ATTR_CHECKRESULT;

+ 		bool synchronous) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  void

  sync_event_signal(sync_ctx_t *sctx, ldap_syncreplevent_t *ev) ATTR_NONNULLS;

file modified
+2 -3
@@ -5,9 +5,8 @@ 

  #ifndef _LD_TYPES_H_

  #define _LD_TYPES_H_

  

- #include <isc/boolean.h>

  #include <isc/event.h>

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/refcount.h>

  #include <dns/name.h>

  
@@ -49,7 +48,7 @@ 

  	char *prevdn;

  	int chgtype;

  	ldap_entry_t *entry;

- 	isc_uint32_t seqid;

+ 	uint32_t seqid;

  };

  

  #endif /* !_LD_TYPES_H_ */

file modified
+2 -3
@@ -7,7 +7,6 @@ 

  

  #include <string.h>

  

- #include <isc/boolean.h>

  #include <isc/mem.h>

  #include <isc/buffer.h>

  #include <isc/result.h>
@@ -17,7 +16,7 @@ 

  

  #include "log.h"

  

- extern isc_boolean_t verbose_checks; /* from settings.c */

+ extern bool verbose_checks; /* from settings.c */

  

  #define CLEANUP_WITH(result_code)				\

  	do {							\
@@ -29,7 +28,7 @@ 

  	do {							\

  		result = (op);					\

  		if (result != ISC_R_SUCCESS) {			\

- 			if (verbose_checks == ISC_TRUE)		\

+ 			if (verbose_checks == true)		\

  				log_error_position("check failed: %s",		\

  						   dns_result_totext(result));	\

  			goto cleanup;				\

file modified
+4 -4
@@ -2,7 +2,7 @@ 

   * Copyright (C) 2014-2015  bind-dyndb-ldap authors; see COPYING for license

   */

  

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/types.h>

  #include <isc/util.h>

  
@@ -52,8 +52,8 @@ 

   */

  isc_result_t ATTR_NONNULL(2) ATTR_CHECKRESULT

  zone_soaserial_updatetuple(dns_updatemethod_t method, dns_difftuple_t *soa_tuple,

- 		  isc_uint32_t *new_serial) {

- 	isc_uint32_t serial;

+ 		  uint32_t *new_serial) {

+ 	uint32_t serial;

  

  	REQUIRE(DNS_DIFFTUPLE_VALID(soa_tuple));

  	REQUIRE(soa_tuple->op == DNS_DIFFOP_ADD ||
@@ -80,7 +80,7 @@ 

  isc_result_t ATTR_NONNULL(1,2,3,4) ATTR_CHECKRESULT

  zone_soaserial_addtuple(isc_mem_t *mctx, dns_db_t *db,

  			dns_dbversion_t *version, dns_diff_t *diff,

- 			isc_uint32_t *new_serial) {

+ 			uint32_t *new_serial) {

  	isc_result_t result;

  	dns_difftuple_t *del = NULL;

  	dns_difftuple_t *add = NULL;

file modified
+3 -3
@@ -5,7 +5,7 @@ 

  #ifndef SRC_ZONE_H_

  #define SRC_ZONE_H_

  

- #include <isc/int.h>

+ #include <inttypes.h>

  #include <isc/types.h>

  

  #include <dns/diff.h>
@@ -19,12 +19,12 @@ 

  

  isc_result_t ATTR_NONNULL(2) ATTR_CHECKRESULT

  zone_soaserial_updatetuple(dns_updatemethod_t method, dns_difftuple_t *soa_tuple,

- 		  isc_uint32_t *new_serial);

+ 		  uint32_t *new_serial);

  

  isc_result_t ATTR_NONNULL(1,2,3,4) ATTR_CHECKRESULT

  zone_soaserial_addtuple(isc_mem_t *mctx, dns_db_t *db,

  			dns_dbversion_t *version, dns_diff_t *diff,

- 			isc_uint32_t *new_serial);

+ 			uint32_t *new_serial);

  

  isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT

  rdatalist_to_diff(isc_mem_t *mctx, dns_diffop_t op, dns_name_t *name,

file modified
+8 -9
@@ -5,7 +5,6 @@ 

  #include <isc/mem.h>

  #include <isc/rwlock.h>

  #include <isc/util.h>

- #include <isc/md5.h>

  #include <isc/string.h>

  

  #include <dns/db.h>
@@ -163,7 +162,7 @@ 

  		if (result == ISC_R_SUCCESS) {

  			rbt_iter_stop(&iter);

  			result = ldap_delete_zone2(zr->ldap_inst,

- 						   &name, ISC_FALSE);

+ 						   &name, false);

  			RUNTIME_CHECK(result == ISC_R_SUCCESS);

  		}

  	} while (result == ISC_R_SUCCESS);
@@ -221,7 +220,7 @@ 

  

  	isc_buffer_init(&name_buf, name_char, sizeof(name_char));

  	CHECK(str_new(mctx, &zone_path));

- 	CHECK(dns_name_tofilenametext(zone_name, ISC_TRUE, &name_buf));

+ 	CHECK(dns_name_tofilenametext(zone_name, true, &name_buf));

  	INSIST(isc_buffer_usedlength(&name_buf) > 0);

  

  	/* Root zone is special case: replace '.' with '@'
@@ -418,7 +417,7 @@ 

  

  	RWLOCK(&zr->rwlock, isc_rwlocktype_write);

  

- 	CHECK(dns_rbt_deletename(zr->rbt, origin, ISC_FALSE));

+ 	CHECK(dns_rbt_deletename(zr->rbt, origin, false));

  

  cleanup:

  	RWUNLOCK(&zr->rwlock, isc_rwlocktype_write);
@@ -601,21 +600,21 @@ 

  }

  

  /* Test if the existing zone is 'empty zone' per RFC 6303. */

- isc_boolean_t ATTR_NONNULLS ATTR_CHECKRESULT

+ bool ATTR_NONNULLS ATTR_CHECKRESULT

  zone_isempty(dns_zone_t *zone) {

  	char **argv = NULL;

  	isc_mem_t *mctx = NULL;

- 	isc_boolean_t result = ISC_FALSE;

+ 	bool result = false;

  

  	mctx = dns_zone_getmctx(zone);

  	if (dns_zone_getdbtype(zone, &argv, mctx) != ISC_R_SUCCESS)

- 		CLEANUP_WITH(ISC_FALSE);

+ 		CLEANUP_WITH(false);

  

  	if (argv[0] != NULL && strcmp("_builtin", argv[0]) == 0 &&

  	    argv[1] != NULL && strcmp("empty", argv[1]) == 0) {

- 		result = ISC_TRUE;

+ 		result = true;

  	} else {

- 		result = ISC_FALSE;

+ 		result = false;

  	}

  	isc_mem_free(mctx, argv);

  

file modified
+1 -1
@@ -57,7 +57,7 @@ 

  isc_result_t

  delete_bind_zone(dns_zt_t *zt, dns_zone_t **zonep) ATTR_NONNULLS ATTR_CHECKRESULT;

  

- isc_boolean_t

+ bool

  zone_isempty(dns_zone_t *zone) ATTR_NONNULLS ATTR_CHECKRESULT;

  

  #endif /* !_LD_ZONE_REGISTER_H_ */