Commit 68a1c9d6 authored by Evan Hunt's avatar Evan Hunt

change 'expr == true' to 'expr' in conditionals

parent 1093c366
......@@ -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,
......
......@@ -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);
......
......@@ -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 {
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......@@ -413,7 +413,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);
......@@ -441,7 +441,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 +490,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 +519,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 +572,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 +703,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 +806,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 +824,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 +893,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 +927,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 +969,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 +1138,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 +1234,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 +1243,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 +1253,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 +1263,7 @@ dst_key_attach(dst_key_t *source, dst_key_t **target) {
void
dst_key_free(dst_key_t **keyp) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(keyp != NULL && VALID_KEY(*keyp));
dst_key_t *key = *keyp;
*keyp = NULL;
......@@ -1311,7 +1311,7 @@ dst_key_buildfilename(const dst_key_t *key, int type, const char *directory,
isc_result_t
dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE(n != NULL);
......@@ -1365,7 +1365,7 @@ dst_key_sigsize(const dst_key_t *key, unsigned int *n) {
isc_result_t
dst_key_secretsize(const dst_key_t *key, unsigned int *n) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
REQUIRE(n != NULL);
......@@ -1416,7 +1416,7 @@ dst_key_restore(dns_name_t *name, unsigned int alg, unsigned int flags,
isc_result_t result;
dst_key_t *key;
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(keyp != NULL && *keyp == NULL);
if (alg >= DST_MAX_ALGS || dst_t_func[alg] == NULL) {
......@@ -1841,7 +1841,7 @@ cleanup:
static bool
issymmetric(const dst_key_t *key) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
REQUIRE(VALID_KEY(key));
/* XXXVIX this switch statement is too sparse to gen a jump table. */
......@@ -2264,7 +2264,7 @@ frombuffer(const dns_name_t *name, unsigned int alg, unsigned int flags,
static isc_result_t
algorithm_status(unsigned int alg) {
REQUIRE(dst_initialized == true);
REQUIRE(dst_initialized);
if (dst_algorithm_supported(alg)) {
return (ISC_R_SUCCESS);
......
......@@ -261,7 +261,7 @@ dns_dyndb_cleanup(bool exiting) {
}
UNLOCK(&dyndb_lock);
if (exiting == true) {
if (exiting) {
isc_mutex_destroy(&dyndb_lock);
}
}
......
......@@ -304,7 +304,7 @@ keymgr_createkey(dns_kasp_key_t *kkey, const dns_name_t *origin,
dst_key_free(&newkey);
}
}
} while (conflict == true);
} while (conflict);
INSIST(!conflict);
dst_key_setnum(newkey, DST_NUM_LIFETIME, dns_kasp_key_lifetime(kkey));
......
......@@ -1806,7 +1806,7 @@ truncated:
if (ret == ISC_R_UNEXPECTEDEND && ignore_tc) {
return (DNS_R_RECOVERABLE);
}
if (seen_problem == true) {
if (seen_problem) {
return (DNS_R_RECOVERABLE);
}
return (ISC_R_SUCCESS);
......
......@@ -907,7 +907,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
unsigned int length;
bool unknown;
REQUIRE(origin == NULL || dns_name_isabsolute(origin) == true);
REQUIRE(origin == NULL || dns_name_isabsolute(origin));
if (rdata != NULL) {
REQUIRE(DNS_RDATA_INITIALIZED(rdata));
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
......@@ -1075,8 +1075,7 @@ rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
unsigned int cur;
REQUIRE(rdata != NULL);
REQUIRE(tctx->origin == NULL ||
dns_name_isabsolute(tctx->origin) == true);
REQUIRE(tctx->origin == NULL || dns_name_isabsolute(tctx->origin));
/*
* Some DynDNS meta-RRs have empty rdata.
......@@ -1407,7 +1406,7 @@ txt_totext(isc_region_t *source, bool quote, isc_buffer_t *target) {
REQUIRE(n + 1 <= source->length);
if (n == 0U) {
REQUIRE(quote == true);
REQUIRE(quote);
}
if (quote) {
......
......@@ -1787,7 +1787,7 @@ finish_update(dns_rpz_zone_t *rpz) {
/*
* If there's an update pending, schedule it.
*/
if (rpz->updatepending == true) {
if (rpz->updatepending) {
if (rpz->min_update_interval > 0) {
uint64_t defer = rpz->min_update_interval;
char dname[DNS_NAME_FORMATSIZE];
......
......@@ -1514,7 +1514,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
RETERR(dns_rdata_tostruct(&rtkeyrdata, &rtkey, NULL));
freertkey = true;
if (win2k == true) {
if (win2k) {
RETERR(find_tkey(qmsg, &tkeyname, &qtkeyrdata,
DNS_SECTION_ANSWER));
} else {
......
......@@ -233,8 +233,8 @@ isc_app_ctxrun(isc_appctx_t *ctx) {
REQUIRE(main_thread == GetCurrentThread());
#endif /* ifdef WIN32 */
if (atomic_compare_exchange_strong_acq_rel(
&ctx->running, &(bool){ false }, true) == true)
if (atomic_compare_exchange_strong_acq_rel(&ctx->running,
&(bool){ false }, true))
{
/*
* Post any on-run events (in FIFO order).
......@@ -360,8 +360,8 @@ isc_result_t
isc_app_run(void) {
isc_result_t result;
REQUIRE(atomic_compare_exchange_strong_acq_rel(
&is_running, &(bool){ false }, true) == true);
REQUIRE(atomic_compare_exchange_strong_acq_rel(&is_running,
&(bool){ false }, true));
result = isc_app_ctxrun(&isc_g_appctx);
atomic_store_release(&is_running, false);
......
......@@ -1041,7 +1041,7 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev) {
isc_httpd_addheader(httpd, "Server: libisc", NULL);
if (is_compressed == true) {
if (is_compressed) {
isc_httpd_addheader(httpd, "Content-Encoding", "deflate");
isc_httpd_addheaderuint(
httpd, "Content-Length",
......
......@@ -1416,7 +1416,7 @@ isc__nm_drop_interlocked(isc_nm_t *mgr) {
LOCK(&mgr->lock);
bool success = atomic_compare_exchange_strong(&mgr->interlocked,
&(bool){ true }, false);
INSIST(success == true);
INSIST(success);
BROADCAST(&mgr->wkstatecond);
UNLOCK(&mgr->lock);
}
......
......@@ -195,8 +195,8 @@ void
isc__taskmgr_resume(isc_taskmgr_t *manager0);
#define DEFAULT_DEFAULT_QUANTUM 25
#define FINISHED(m) \
(atomic_load_relaxed(&((m)->exiting)) == true && \
#define FINISHED(m) \
(atomic_load_relaxed(&((m)->exiting)) && \
atomic_load(&(m)->tasks_count) == 0)
/*%
......@@ -1677,7 +1677,7 @@ isc_task_endexclusive(isc_task_t *task0) {
isc_nm_resume(manager->nm);
}
LOCK(&manager->halt_lock);
REQUIRE(atomic_load_relaxed(&manager->exclusive_req) == true);
REQUIRE(atomic_load_relaxed(&manager->exclusive_req));
atomic_store_relaxed(&manager->exclusive_req, false);
while (manager->halted > 0) {
BROADCAST(&manager->halt_cond);
......
......@@ -204,7 +204,7 @@ NTFS_Access_Control(const char *filename, const char *user, int access,
}
/* For directories check the directory-specific bits */
if (isdir == true) {
if (isdir) {
if ((caccess & ISC_FSACCESS_CREATECHILD) != 0) {
NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE;
}
......
......@@ -2148,7 +2148,7 @@ ns__client_request(isc_nmhandle_t *handle, isc_region_t *region, void *arg) {
* cache there is no point in setting RA.
*/
ra = false;
if (client->view->resolver != NULL && client->view->recursion == true &&
if (client->view->resolver != NULL && client->view->recursion &&
ns_client_checkaclsilent(client, NULL, client->view->recursionacl,
true) == ISC_R_SUCCESS &&
ns_client_checkaclsilent(client, NULL, client->view->cacheacl,
......@@ -2163,7 +2163,7 @@ ns__client_request(isc_nmhandle_t *handle, isc_region_t *region, void *arg) {
ra = true;
}
if (ra == true) {
if (ra) {
client->attributes |= NS_CLIENTATTR_RA;
}
......
......@@ -521,8 +521,7 @@ ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
goto cleanup_interface;
}
if (((mgr->sctx->options & NS_SERVER_NOTCP) == 0) && accept_tcp == true)
{
if (((mgr->sctx->options & NS_SERVER_NOTCP) == 0) && accept_tcp) {
result = ns_interface_listentcp(ifp);
if (result != ISC_R_SUCCESS) {
if ((result == ISC_R_ADDRINUSE) &&
......@@ -817,16 +816,16 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
* unless explicitly allowed.
*/
#ifndef ISC_ALLOW_MAPPED
if (scan_ipv6 == true && isc_net_probe_ipv6only() != ISC_R_SUCCESS) {
if (scan_ipv6 && isc_net_probe_ipv6only() != ISC_R_SUCCESS) {
ipv6only = false;
log_explicit = true;
}
#endif /* ifndef ISC_ALLOW_MAPPED */
if (scan_ipv6 == true && isc_net_probe_ipv6pktinfo() != ISC_R_SUCCESS) {
if (scan_ipv6 && isc_net_probe_ipv6pktinfo() != ISC_R_SUCCESS) {
ipv6pktinfo = false;
log_explicit = true;
}
if (scan_ipv6 == true && ipv6only && ipv6pktinfo) {
if (scan_ipv6 && ipv6only && ipv6pktinfo) {
for (le = ISC_LIST_HEAD(mgr->listenon6->elts); le != NULL;
le = ISC_LIST_NEXT(le, link))
{
......@@ -991,7 +990,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
continue;
}
if (adjusting == false && dolistenon == true) {
if (adjusting == false && dolistenon) {
setup_listenon(mgr, &interface, le->port);
dolistenon = false;
}
......@@ -1012,7 +1011,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
* interface, we need to listen on the address
* explicitly.
*/
if (adjusting == true) {
if (adjusting) {
ns_listenelt_t *ele;
match = 0;
......@@ -1031,7 +1030,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
match = 0;
}
}
if (ipv6_wildcard == true && match == 0) {
if (ipv6_wildcard && match == 0) {
continue;
}
}
......@@ -1054,8 +1053,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
} else {
bool addr_in_use = false;
if (adjusting == false && ipv6_wildcard == true)
{
if (adjusting == false && ipv6_wildcard) {
continue;
}
......@@ -1078,15 +1076,13 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
"%s"
"listening on %s interface "
"%s, %s",