Commit 0ef6dde1 authored by Evan Hunt's avatar Evan Hunt

Merge branch 'each-bool-conditionals' into 'master'

remove unnecessary 'true' and 'false' comparisons in boolean expressions

See merge request !3312
parents 1093c366 57e54c46
Pipeline #42626 passed with stages
in 28 minutes and 24 seconds
......@@ -816,7 +816,7 @@ keygen(keygen_ctx_t *ctx, isc_mem_t *mctx, int argc, char **argv) {
dst_key_free(&key);
}
} while (conflict == true);
} while (conflict);
if (conflict) {
fatal("cannot generate a null key due to possible key ID "
......
......@@ -2672,7 +2672,7 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
result = dns_zt_find(ev->view->zonetable,
dns_catz_entry_getname(ev->entry), 0, NULL, &zone);
if (ev->mod == true) {
if (ev->mod) {
if (result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
......
......@@ -62,14 +62,14 @@ typedef struct dlopen_data {
#define MAYBE_LOCK(cd) \
do { \
if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
cd->in_configure == false) \
!cd->in_configure) \
LOCK(&cd->lock); \
} while (0)
#define MAYBE_UNLOCK(cd) \
do { \
if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
cd->in_configure == false) \
!cd->in_configure) \
UNLOCK(&cd->lock); \
} while (0)
......
......@@ -62,14 +62,14 @@ typedef struct dlopen_data {
#define MAYBE_LOCK(cd) \
do { \
if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
cd->in_configure == false) \
!cd->in_configure) \
LOCK(&cd->lock); \
} while (0)
#define MAYBE_UNLOCK(cd) \
do { \
if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \
cd->in_configure == false) \
!cd->in_configure) \
UNLOCK(&cd->lock); \
} while (0)
......
......@@ -434,7 +434,7 @@ bdb_opendb(DBTYPE db_type, DB **db_out, const char *db_name, int flags) {
return (ISC_R_FAILURE);
}
if (create_allowed == true) {
if (create_allowed) {
createFlag = DB_CREATE;
}
/* open the database. */
......@@ -537,7 +537,7 @@ insert_data(void) {
data_type = 'b';
}
} else if (data_type == 'c' || data_type == 'C') {
if (have_czone == true) {
if (have_czone) {
isc_buffer_putstr(
&buf2, token.value.as_pointer);
/* add string terminator to buffer */
......@@ -634,7 +634,7 @@ openBDB(void) {
}
/* open BDB environment */
if (create_allowed == true) {
if (create_allowed) {
/* allowed to create new files */
bdbres = db.dbenv->open(db.dbenv, db_envdir,
DB_INIT_CDB | DB_INIT_MPOOL | DB_CREATE,
......@@ -917,7 +917,7 @@ operation_listOrDelete(bool dlt) {
int curIndex = 0;
/* verify that only allowed parameters were passed. */
if (dlt == true) {
if (dlt) {
checkInvalidParam(zone, "z", "for delete operation");
checkInvalidParam(host, "h", "for delete operation");
checkInvalidOption(list_everything, true, "e",
......@@ -944,7 +944,7 @@ operation_listOrDelete(bool dlt) {
memset(&bdbdata, 0, sizeof(bdbdata));
/* Dump database in "dlzbdb" bulk format */
if (list_everything == true) {
if (list_everything) {
if (bulk_write('c', db.client, db.cursor, &bdbkey, &bdbdata) !=
ISC_R_SUCCESS) {
return;
......@@ -969,7 +969,7 @@ operation_listOrDelete(bool dlt) {
bdbkey.data = &recno;
bdbkey.size = sizeof(recno);
if (dlt == true) {
if (dlt) {
bdbres = db.data->del(db.data, NULL, &bdbkey, 0);
} else {
bdbdata.flags = DB_DBT_REALLOC;
......@@ -1082,7 +1082,7 @@ operation_listOrDelete(bool dlt) {
/* if client_zone was passed */
if (c_zone != NULL) {
/* create a cursor and make sure it worked. */
if (dlt == true) {
if (dlt) {
/* open read-write cursor */
bdbres = db.client->cursor(db.client, NULL, &db.cursor,
DB_WRITECURSOR);
......@@ -1116,7 +1116,7 @@ operation_listOrDelete(bool dlt) {
}
while (bdbres == 0) {
if (dlt == false) {
if (!dlt) {
printf("%.*s | %.*s\n", (int)bdbkey.size,
(char *)bdbkey.data, (int)bdbdata.size,
(char *)bdbdata.data);
......
......@@ -489,7 +489,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
* are performing a zone xfr and we
* could not find a host entry.
*/
} else if (dir_list != NULL && foundHost == false) {
} else if (dir_list != NULL && !foundHost) {
continue;
}
} else { /* if we cannot stat entry, skip it. */
......
......@@ -83,7 +83,7 @@ destroy_querylist(isc_mem_t *mctx, query_list_t **querylist) {
* was really a query segment, and not a pointer to
* %zone%, or %record%, or %client%
*/
if (tseg->sql != NULL && tseg->direct == true) {
if (tseg->sql != NULL && tseg->direct) {
isc_mem_free(mctx, tseg->sql);
}
/* get the next query segment, before we destroy this one. */
......@@ -281,7 +281,7 @@ sdlzh_build_querystring(isc_mem_t *mctx, query_list_t *querylist) {
* if this is a query segment, use the
* precalculated string length
*/
if (tseg->direct == true) {
if (tseg->direct) {
length += tseg->strlen;
} else { /* calculate string length for dynamic segments. */
length += strlen(*(char **)tseg->sql);
......@@ -297,7 +297,7 @@ sdlzh_build_querystring(isc_mem_t *mctx, query_list_t *querylist) {
/* start at the top of the list again */
tseg = ISC_LIST_HEAD(*querylist);
while (tseg != NULL) {
if (tseg->direct == true) {
if (tseg->direct) {
/* query segments */
strcat(qs, tseg->sql);
} else {
......
......@@ -79,7 +79,7 @@ destroy_querylist(query_list_t **querylist) {
* was really a query segment, and not a pointer to
* %zone%, or %record%, or %client%
*/
if (tseg->cmd != NULL && tseg->direct == true) {
if (tseg->cmd != NULL && tseg->direct) {
free(tseg->cmd);
}
/* get the next query segment, before we destroy this one. */
......@@ -283,7 +283,7 @@ build_querystring(query_list_t *querylist) {
* if this is a query segment, use the
* precalculated string length
*/
if (tseg->direct == true) {
if (tseg->direct) {
length += tseg->strlen;
} else { /* calculate string length for dynamic segments. */
length += strlen(*(char **)tseg->cmd);
......@@ -301,7 +301,7 @@ build_querystring(query_list_t *querylist) {
/* start at the top of the list again */
tseg = DLZ_LIST_HEAD(*querylist);
while (tseg != NULL) {
if (tseg->direct == true) {
if (tseg->direct) {
/* query segments */
strcat(qs, tseg->cmd);
} else {
......
......@@ -502,7 +502,7 @@ process_dir(dir_t *dir, void *passback, config_data_t *cd, dlist_t *dir_list,
* are performing a zone xfr and we
* could not find a host entry.
*/
} else if (dir_list != NULL && foundHost == false) {
} else if (dir_list != NULL && !foundHost) {
continue;
}
} else { /* if we cannot stat entry, skip it. */
......
......@@ -812,7 +812,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
continue;
}
if (recursion == false && !dns_acl_isnone(acl)) {
if (!recursion && !dns_acl_isnone(acl)) {
cfg_obj_log(aclobj, logctx, ISC_LOG_WARNING,
"both \"recursion no;\" and "
"\"%s\" active%s%s",
......
......@@ -1111,7 +1111,7 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
* just kill the name here.
*/
if (!NAME_FETCH(name)) {
INSIST(result == false);
INSIST(!result);
result = unlink_name(adb, name);
free_adbname(adb, &name);
if (result) {
......@@ -1302,7 +1302,7 @@ shutdown_names(dns_adb_t *adb) {
* irefcnt ourselves, since it will not be
* automatically triggered by a name being unlinked.
*/
INSIST(result == false);
INSIST(!result);
result = dec_adb_irefcnt(adb);
} else {
/*
......@@ -1313,7 +1313,7 @@ shutdown_names(dns_adb_t *adb) {
*/
while (name != NULL) {
next_name = ISC_LIST_NEXT(name, plink);
INSIST(result == false);
INSIST(!result);
result = kill_name(&name,
DNS_EVENT_ADBSHUTDOWN);
name = next_name;
......@@ -2442,8 +2442,7 @@ check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
(overmem || victim->last_used + ADB_STALE_MARGIN <= now))
{
RUNTIME_CHECK(
kill_name(&victim, DNS_EVENT_ADBCANCELED) ==
false);
!kill_name(&victim, DNS_EVENT_ADBCANCELED));
victims++;
}
......@@ -2507,7 +2506,7 @@ cleanup_names(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
name = ISC_LIST_HEAD(adb->names[bucket]);
while (name != NULL) {
next_name = ISC_LIST_NEXT(name, plink);
INSIST(result == false);
INSIST(!result);
result = check_expire_namehooks(name, now);
if (!result) {
result = check_expire_name(&name, now);
......@@ -2532,7 +2531,7 @@ cleanup_entries(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
entry = ISC_LIST_HEAD(adb->entries[bucket]);
while (entry != NULL) {
next_entry = ISC_LIST_NEXT(entry, plink);
INSIST(result == false);
INSIST(!result);
result = check_expire_entry(adb, &entry, now);
entry = next_entry;
}
......@@ -3087,7 +3086,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
if (adb->name_sd[bucket]) {
DP(DEF_LEVEL, "dns_adb_createfind: returning "
"ISC_R_SHUTTINGDOWN");
RUNTIME_CHECK(free_adbfind(adb, &find) == false);
RUNTIME_CHECK(!free_adbfind(adb, &find));
result = ISC_R_SHUTTINGDOWN;
goto out;
}
......@@ -3104,7 +3103,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
adbname = new_adbname(adb, name);
if (adbname == NULL) {
RUNTIME_CHECK(free_adbfind(adb, &find) == false);
RUNTIME_CHECK(!free_adbfind(adb, &find));
result = ISC_R_NOMEMORY;
goto out;
}
......@@ -3128,7 +3127,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
/*
* Expire old entries, etc.
*/
RUNTIME_CHECK(check_expire_namehooks(adbname, now) == false);
RUNTIME_CHECK(!check_expire_namehooks(adbname, now));
/*
* Do we know that the name is an alias?
......@@ -3408,8 +3407,7 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
entry = ai->entry;
ai->entry = NULL;
INSIST(DNS_ADBENTRY_VALID(entry));
RUNTIME_CHECK(dec_entry_refcnt(adb, overmem, entry, true) ==
false);
RUNTIME_CHECK(!dec_entry_refcnt(adb, overmem, entry, true));
free_adbaddrinfo(adb, &ai);
ai = ISC_LIST_HEAD(find->list);
}
......@@ -3506,10 +3504,10 @@ dns_adb_dump(dns_adb_t *adb, FILE *f) {
isc_stdtime_get(&now);
for (i = 0; i < adb->nnames; i++) {
RUNTIME_CHECK(cleanup_names(adb, i, now) == false);
RUNTIME_CHECK(!cleanup_names(adb, i, now));
}
for (i = 0; i < adb->nentries; i++) {
RUNTIME_CHECK(cleanup_entries(adb, i, now) == false);
RUNTIME_CHECK(!cleanup_entries(adb, i, now));
}
dump_adb(adb, f, false, now);
......@@ -4823,10 +4821,10 @@ dns_adb_flush(dns_adb_t *adb) {
* Call our cleanup routines.
*/
for (i = 0; i < adb->nnames; i++) {
RUNTIME_CHECK(cleanup_names(adb, i, INT_MAX) == false);
RUNTIME_CHECK(!cleanup_names(adb, i, INT_MAX));
}
for (i = 0; i < adb->nentries; i++) {
RUNTIME_CHECK(cleanup_entries(adb, i, INT_MAX) == false);
RUNTIME_CHECK(!cleanup_entries(adb, i, INT_MAX));
}
#ifdef DUMP_ADB_AFTER_CLEANING
......@@ -4854,8 +4852,7 @@ dns_adb_flushname(dns_adb_t *adb, const dns_name_t *name) {
if (!NAME_DEAD(adbname) && dns_name_equal(name, &adbname->name))
{
RUNTIME_CHECK(
kill_name(&adbname, DNS_EVENT_ADBCANCELED) ==
false);
!kill_name(&adbname, DNS_EVENT_ADBCANCELED));
}
adbname = nextname;
}
......@@ -4882,7 +4879,7 @@ dns_adb_flushnames(dns_adb_t *adb, const dns_name_t *name) {
dns_name_issubdomain(&adbname->name, name)) {
ret = kill_name(&adbname,
DNS_EVENT_ADBCANCELED);
RUNTIME_CHECK(ret == false);
RUNTIME_CHECK(!ret);
}
adbname = nextname;
}
......
......@@ -819,7 +819,7 @@ dns_catz_zone_detach(dns_catz_zone_t **zonep) {
}
zone->magic = 0;
isc_timer_detach(&zone->updatetimer);
if (zone->db_registered == true) {
if (zone->db_registered) {
INSIST(dns_db_updatenotify_unregister(
zone->db, dns_catz_dbupdate_callback,
zone->catzs) == ISC_R_SUCCESS);
......@@ -1668,7 +1668,7 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
isc_buffer_putstr(buffer, "; ");
}
isc_buffer_putstr(buffer, "}; ");
if (entry->opts.in_memory == false) {
if (!entry->opts.in_memory) {
isc_buffer_putstr(buffer, "file \"");
result = dns_catz_generate_masterfilename(zone, entry, &buffer);
if (result != ISC_R_SUCCESS) {
......@@ -1758,7 +1758,7 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
dns_db_attach(db, &zone->db);
}
if (zone->updatepending == false) {
if (!zone->updatepending) {
zone->updatepending = true;
isc_time_now(&now);
tdiff = isc_time_microdiff(&now, &zone->lastupdated) / 1000000;
......@@ -1981,7 +1981,7 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
* update callback in zone_startload or axfr_makedb, but we will
* call onupdate() artificially so we can register the callback here.
*/
if (oldzone->db_registered == false) {
if (!oldzone->db_registered) {
result = dns_db_updatenotify_register(
db, dns_catz_dbupdate_callback, oldzone->catzs);
if (result == ISC_R_SUCCESS) {
......@@ -2025,7 +2025,7 @@ dns_catz_postreconfig(dns_catz_zones_t *catzs) {
dns_catz_zone_t *zone = NULL;
isc_ht_iter_current(iter, (void **)&zone);
if (zone->active == false) {
if (!zone->active) {
char cname[DNS_NAME_FORMATSIZE];
dns_name_format(&zone->name, cname,
DNS_NAME_FORMATSIZE);
......
......@@ -224,7 +224,7 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
unsigned char *p;
REQUIRE(VALID_CCTX(cctx));
REQUIRE(dns_name_isabsolute(name) == true);
REQUIRE(dns_name_isabsolute(name));
REQUIRE(offset != NULL);
if (ISC_UNLIKELY((cctx->allowed & DNS_COMPRESS_ENABLED) == 0)) {
......
......@@ -410,7 +410,7 @@ dns_db_closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
(db->methods->closeversion)(db, versionp, commit);
if (commit == true) {
if (commit) {
for (listener = ISC_LIST_HEAD(db->update_listeners);
listener != NULL; listener = ISC_LIST_NEXT(listener, link))
{
......@@ -890,7 +890,7 @@ dns_db_unregister(dns_dbimplementation_t **dbimp) {
isc_result_t
dns_db_getoriginnode(dns_db_t *db, dns_dbnode_t **nodep) {
REQUIRE(DNS_DB_VALID(db));
REQUIRE(dns_db_iszone(db) == true);
REQUIRE(dns_db_iszone(db));
REQUIRE(nodep != NULL && *nodep == NULL);
if (db->methods->getoriginnode != NULL) {
......@@ -928,7 +928,7 @@ dns_db_getnsec3parameters(dns_db_t *db, dns_dbversion_t *version,
uint16_t *iterations, unsigned char *salt,
size_t *salt_length) {
REQUIRE(DNS_DB_VALID(db));
REQUIRE(dns_db_iszone(db) == true);
REQUIRE(dns_db_iszone(db));
if (db->methods->getnsec3parameters != NULL) {
return ((db->methods->getnsec3parameters)(db, version, hash,
......@@ -943,7 +943,7 @@ isc_result_t
dns_db_getsize(dns_db_t *db, dns_dbversion_t *version, uint64_t *records,
uint64_t *bytes) {
REQUIRE(DNS_DB_VALID(db));
REQUIRE(dns_db_iszone(db) == true);
REQUIRE(dns_db_iszone(db));
if (db->methods->getsize != NULL) {
return ((db->methods->getsize)(db, version, records, bytes));
......
......@@ -3272,7 +3272,7 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) {
LOCK(&disp->lock);
REQUIRE(resp->item_out == true);
REQUIRE(resp->item_out);
resp->item_out = false;
if (ev->buffer.base != NULL) {
......@@ -3379,7 +3379,7 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp,
}
if (ev != NULL) {
REQUIRE(res->item_out == true);
REQUIRE(res->item_out);
res->item_out = false;
if (ev->buffer.base != NULL) {
free_buffer(disp, ev->buffer.base, ev->buffer.length);
......
......@@ -186,7 +186,7 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) {
isc_result_t result;
REQUIRE(mctx != NULL);
REQUIRE(dst_initialized == false);
REQUIRE(!dst_initialized);
UNUSED(engine);
......@@ -248,7 +248,7 @@ out:
void
dst_lib_destroy(void) {
int i;
RUNTIME_CHECK(dst_initialized == true);
RUNTIME_CHECK(dst_initialized);
dst_initialized = false;
for (i = 0; i < DST_MAX_ALGS; i++) {
......@@ -264,7 +264,7 @@ dst_lib_destroy(void) {
bool
dst_algorithm_supported(unsigned int alg) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
if (alg >= DST_MAX_ALGS || dst_t_func[alg] == NULL) {
return (false);
......@@ -285,7 +285,7 @@ dst_context_create(dst_key_t *key, isc_mem_t *mctx, isc_logcategory_t *category,
dst_context_t *dctx;
isc_result_t result;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE(mctx != NULL);
REQUIRE(dctxp != NULL && *dctxp == NULL);
......@@ -366,8 +366,7 @@ dst_context_sign(dst_context_t *dctx, isc_buffer_t *sig) {
if (key->func->sign == NULL) {
return (DST_R_NOTPRIVATEKEY);
}
if (key->func->isprivate == NULL || key->func->isprivate(key) == false)
{
if (key->func->isprivate == NULL || !key->func->isprivate(key)) {
return (DST_R_NOTPRIVATEKEY);
}
......@@ -413,7 +412,7 @@ dst_context_verify2(dst_context_t *dctx, unsigned int maxbits,
isc_result_t
dst_key_computesecret(const dst_key_t *pub, const dst_key_t *priv,
isc_buffer_t *secret) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(pub) && VALID_KEY(priv));
REQUIRE(secret != NULL);
......@@ -430,7 +429,7 @@ dst_key_computesecret(const dst_key_t *pub, const dst_key_t *priv,
return (DST_R_KEYCANNOTCOMPUTESECRET);
}
if (dst_key_isprivate(priv) == false) {
if (!dst_key_isprivate(priv)) {
return (DST_R_NOTPRIVATEKEY);
}
......@@ -441,7 +440,7 @@ isc_result_t
dst_key_tofile(const dst_key_t *key, int type, const char *directory) {
isc_result_t ret = ISC_R_SUCCESS;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE((type &
(DST_TYPE_PRIVATE | DST_TYPE_PUBLIC | DST_TYPE_STATE)) != 0);
......@@ -490,7 +489,7 @@ dst_key_getfilename(dns_name_t *name, dns_keytag_t id, unsigned int alg,
isc_buffer_t *buf) {
isc_result_t result;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(dns_name_isabsolute(name));
REQUIRE((type &
(DST_TYPE_PRIVATE | DST_TYPE_PUBLIC | DST_TYPE_STATE)) != 0);
......@@ -519,7 +518,7 @@ dst_key_fromfile(dns_name_t *name, dns_keytag_t id, unsigned int alg, int type,
isc_buffer_t buf;
dst_key_t *key;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(dns_name_isabsolute(name));
REQUIRE((type & (DST_TYPE_PRIVATE | DST_TYPE_PUBLIC)) != 0);
REQUIRE(mctx != NULL);
......@@ -572,7 +571,7 @@ dst_key_fromnamedfile(const char *filename, const char *dirname, int type,
int newfilenamelen = 0;
isc_lex_t *lex = NULL;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(filename != NULL);
REQUIRE((type & (DST_TYPE_PRIVATE | DST_TYPE_PUBLIC)) != 0);
REQUIRE(mctx != NULL);
......@@ -703,7 +702,7 @@ out:
isc_result_t
dst_key_todns(const dst_key_t *key, isc_buffer_t *target) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE(target != NULL);
......@@ -806,7 +805,7 @@ dst_key_frombuffer(const dns_name_t *name, unsigned int alg, unsigned int flags,
isc_result_t
dst_key_tobuffer(const dst_key_t *key, isc_buffer_t *target) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE(target != NULL);
......@@ -824,7 +823,7 @@ dst_key_privatefrombuffer(dst_key_t *key, isc_buffer_t *buffer) {
isc_lex_t *lex = NULL;
isc_result_t result = ISC_R_SUCCESS;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE(!dst_key_isprivate(key));
REQUIRE(buffer != NULL);
......@@ -893,7 +892,7 @@ dst_key_buildinternal(const dns_name_t *name, unsigned int alg,
dst_key_t *key;
isc_result_t result;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(dns_name_isabsolute(name));
REQUIRE(mctx != NULL);
REQUIRE(keyp != NULL && *keyp == NULL);
......@@ -927,7 +926,7 @@ dst_key_fromlabel(const dns_name_t *name, int alg, unsigned int flags,
dst_key_t *key;
isc_result_t result;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(dns_name_isabsolute(name));
REQUIRE(mctx != NULL);
REQUIRE(keyp != NULL && *keyp == NULL);
......@@ -969,7 +968,7 @@ dst_key_generate(const dns_name_t *name, unsigned int alg, unsigned int bits,
dst_key_t *key;
isc_result_t ret;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(dns_name_isabsolute(name));
REQUIRE(mctx != NULL);
REQUIRE(keyp != NULL && *keyp == NULL);
......@@ -1138,7 +1137,7 @@ static bool
comparekeys(const dst_key_t *key1, const dst_key_t *key2,
bool match_revoked_key,
bool (*compare)(const dst_key_t *key1, const dst_key_t *key2)) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key1));
REQUIRE(VALID_KEY(key2));
......@@ -1234,7 +1233,7 @@ dst_key_pubcompare(const dst_key_t *key1, const dst_key_t *key2,
bool
dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key1));
REQUIRE(VALID_KEY(key2));
......@@ -1243,7 +1242,7 @@ dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
}
if (key1->key_alg == key2->key_alg &&
key1->func->paramcompare != NULL &&
key1->func->paramcompare(key1, key2) == true)
key1->func->paramcompare(key1, key2))
{
return (true);
} else {
......@@ -1253,7 +1252,7 @@ dst_key_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
void
dst_key_attach(dst_key_t *source, dst_key_t **target) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(target != NULL && *target == NULL);
REQUIRE(VALID_KEY(source));
......@@ -1263,7 +1262,7 @@ dst_key_attach(dst_key_t *source, dst_key_t **target) {
void
dst_key_free(dst_key_t **keyp) {
REQUIRE<