]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
change "expr == false" to "!expr" in conditionals
authorEvan Hunt <each@isc.org>
Mon, 30 Mar 2020 20:49:55 +0000 (13:49 -0700)
committerEvan Hunt <each@isc.org>
Tue, 26 May 2020 00:04:04 +0000 (17:04 -0700)
(cherry picked from commit 57e54c46e4569914b5f6e594d4748db0309d5d51)

31 files changed:
bin/named/unix/dlz_dlopen_driver.c
bin/named/win32/dlz_dlopen_driver.c
contrib/dlz/bin/dlzbdb/dlzbdb.c
contrib/dlz/drivers/dlz_filesystem_driver.c
contrib/dlz/modules/filesystem/dlz_filesystem_dynamic.c
lib/bind9/check.c
lib/dns/adb.c
lib/dns/catz.c
lib/dns/dst_api.c
lib/dns/lib.c
lib/dns/masterdump.c
lib/dns/message.c
lib/dns/sdb.c
lib/dns/sdlz.c
lib/dns/tsig.c
lib/dns/update.c
lib/dns/view.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/isc/app.c
lib/isc/astack.c
lib/isc/pthreads/mutex.c
lib/isc/win32/socket.c
lib/ns/client.c
lib/ns/interfacemgr.c
lib/ns/lib.c
lib/ns/query.c
lib/ns/update.c
lib/ns/xfrout.c
lib/samples/nsprobe.c
lib/samples/sample-async.c

index 5b0e7a55072a61415dd84f3feb3e90884eb399be..e6e9e2e02a60bdbcaf570d6d2a3668767a7c1077 100644 (file)
@@ -65,14 +65,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)
 
index 1a9c85e14ae2c0a492a25be00706e8b149e6fcec..f21abcf052211e0c1222ceca91f0129ab1189aa4 100644 (file)
@@ -63,14 +63,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)
 
index 13bdca3f02cfc50bd825a41100c4a9ff25c31a62..f77ebb15051643871a2be25c0a6ea6d2606bec55 100644 (file)
@@ -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);
index 779ab1c7894360b637418db5839d17a10555a622..8ed1af1b330021774f557017fe7268a9a556a3d3 100644 (file)
@@ -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. */
index a6049c2849c219d8678da8c54b63a90759d20221..ceb5dfe3cd02544afdde01f9c86dededb9ecbff2 100644 (file)
@@ -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. */
index 2a5e63c54bfee8e45a906b35d9c44589149cbb88..40192669ad7d9d0202620bc22682fa258ba4f1f2 100644 (file)
@@ -811,7 +811,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",
index 8df418d189dcfdce2a1d70549cdcc32b9427fcf1..14c40eb4b90f93131c26b89a78309316181a796f 100644 (file)
@@ -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;
                }
index 454d075ff2e36debf43046f522aeeb4929039723..f66bec7af9decc28be6d26763f989af7e53a5e6e 100644 (file)
@@ -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);
index 4e587d24ea6e302c8747c43166176a8afb9423ff..df410e44705ffce253a8934830a6bf258c7f4738 100644 (file)
@@ -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);
 
@@ -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);
        }
 
@@ -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);
        }
 
index b4e7f1c6d55f2915c9afd850658faa6149999190..8690934f3aabf923caabe725b08259ff322a4d1d 100644 (file)
@@ -48,7 +48,7 @@ static void
 initialize(void) {
        isc_result_t result;
 
-       REQUIRE(initialize_done == false);
+       REQUIRE(!initialize_done);
 
        isc_refcount_init(&references, 0);
 
index 12376b50d12c166b5480b52c5578d55d7b32f20d..0d1bed1a296925ab4a20ed290bfd08b58c93002e 100644 (file)
@@ -643,7 +643,7 @@ rdataset_totext(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
                 */
                if ((ctx->style.flags & DNS_STYLEFLAG_NO_CLASS) == 0 &&
                    ((ctx->style.flags & DNS_STYLEFLAG_OMIT_CLASS) == 0 ||
-                    ctx->class_printed == false))
+                    !ctx->class_printed))
                {
                        unsigned int class_start;
                        INDENT_TO(class_column);
@@ -919,7 +919,7 @@ dump_rdataset(isc_mem_t *mctx, const dns_name_t *name, dns_rdataset_t *rdataset,
         */
 
        if ((ctx->style.flags & DNS_STYLEFLAG_TTL) != 0) {
-               if (ctx->current_ttl_valid == false ||
+               if (!ctx->current_ttl_valid ||
                    ctx->current_ttl != rdataset->ttl) {
                        if ((ctx->style.flags & DNS_STYLEFLAG_COMMENT) != 0) {
                                isc_buffer_clear(buffer);
index bd10c7d6789af9fbf64deb85fb12a558ff145b1e..1448fd1df662c16ab998c7a899a9d358ea3e12d3 100644 (file)
@@ -1652,8 +1652,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                        }
                        free_name = free_rdataset = false;
                }
-               INSIST(free_name == false);
-               INSIST(free_rdataset == false);
+               INSIST(!free_name);
+               INSIST(!free_rdataset);
        }
 
        /*
index 2d85032a314ac8e24df8f812382331015656cbef..ffc53f758d7e76045dd6d1040098adecadddfaac 100644 (file)
@@ -606,7 +606,7 @@ attachversion(dns_db_t *db, dns_dbversion_t *source,
 static void
 closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
        REQUIRE(versionp != NULL && *versionp == (void *)&dummy);
-       REQUIRE(commit == false);
+       REQUIRE(!commit);
 
        UNUSED(db);
        UNUSED(commit);
@@ -763,7 +763,6 @@ findnodeext(dns_db_t *db, const dns_name_t *name, bool create,
        unsigned int labels;
 
        REQUIRE(VALID_SDB(sdb));
-       REQUIRE(create == false);
        REQUIRE(nodep != NULL && *nodep == NULL);
 
        UNUSED(name);
index fcdf0e66d88a990a4b40f505c2f03efdc20ac2f1..172d21d782243c01e2ba23e6eb011b1a42d0fbdc 100644 (file)
@@ -529,7 +529,7 @@ getnodedata(dns_db_t *db, const dns_name_t *name, bool create,
        REQUIRE(nodep != NULL && *nodep == NULL);
 
        if (sdlz->dlzimp->methods->newversion == NULL) {
-               REQUIRE(create == false);
+               REQUIRE(!create);
        }
 
        isc_buffer_init(&b, namestr, sizeof(namestr));
index c940469520e120f9adfd5c4e9d43db131a3d0240..591dfca77a62b6e8b087ebf3ca28a268f0c7a192 100644 (file)
@@ -144,7 +144,7 @@ tsig_log(dns_tsigkey_t *key, int level, const char *fmt, ...) {
        char namestr[DNS_NAME_FORMATSIZE];
        char creatorstr[DNS_NAME_FORMATSIZE];
 
-       if (isc_log_wouldlog(dns_lctx, level) == false) {
+       if (!isc_log_wouldlog(dns_lctx, level)) {
                return;
        }
        if (key != NULL) {
index 76d4cee4ef52f71256bcd9b8c47f18944793a28d..49f177002b5efe672c4413e917675dfe3af62a90 100644 (file)
@@ -210,7 +210,7 @@ update_log(dns_update_log_t *callback, dns_zone_t *zone, int level,
                return;
        }
 
-       if (isc_log_wouldlog(dns_lctx, level) == false) {
+       if (!isc_log_wouldlog(dns_lctx, level)) {
                return;
        }
 
index c9733d91d03921253dd621340902ea816a900c49..86f3aea797badd34fe112db26d22c3873203fe90 100644 (file)
@@ -1512,7 +1512,7 @@ dns_viewlist_findzone(dns_viewlist_t *list, const dns_name_t *name,
        for (view = ISC_LIST_HEAD(*list); view != NULL;
             view = ISC_LIST_NEXT(view, link))
        {
-               if (allclasses == false && view->rdclass != rdclass) {
+               if (!allclasses && view->rdclass != rdclass) {
                        continue;
                }
 
index 5040f7334f3abd40198ee9d4c0180d61e730d340..b124f22098cdd69a6f9a0bc3be7a6354574d152a 100644 (file)
@@ -1629,7 +1629,7 @@ xfrin_log1(int level, const char *zonetext, const isc_sockaddr_t *masteraddr,
           const char *fmt, ...) {
        va_list ap;
 
-       if (isc_log_wouldlog(dns_lctx, level) == false) {
+       if (!isc_log_wouldlog(dns_lctx, level)) {
                return;
        }
 
@@ -1647,7 +1647,7 @@ xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...) {
        va_list ap;
        char zonetext[DNS_NAME_MAXTEXT + 32];
 
-       if (isc_log_wouldlog(dns_lctx, level) == false) {
+       if (!isc_log_wouldlog(dns_lctx, level)) {
                return;
        }
 
index ecccab73ad259d4c90112c51066632b878d8612c..828f573b0f2a38e14348996ed24e682d87ac6996 100644 (file)
@@ -156,11 +156,11 @@ typedef struct dns_include dns_include_t;
 
 #define DNS_ZONE_CHECKLOCK
 #ifdef DNS_ZONE_CHECKLOCK
-#define LOCK_ZONE(z)                          \
-       do {                                  \
-               LOCK(&(z)->lock);             \
-               INSIST((z)->locked == false); \
-               (z)->locked = true;           \
+#define LOCK_ZONE(z)                  \
+       do {                          \
+               LOCK(&(z)->lock);     \
+               INSIST(!(z)->locked); \
+               (z)->locked = true;   \
        } while (0)
 #define UNLOCK_ZONE(z)               \
        do {                         \
@@ -172,7 +172,7 @@ typedef struct dns_include dns_include_t;
        do {                                            \
                result = isc_mutex_trylock(&(z)->lock); \
                if (result == ISC_R_SUCCESS) {          \
-                       INSIST((z)->locked == false);   \
+                       INSIST(!(z)->locked);           \
                        (z)->locked = true;             \
                }                                       \
        } while (0)
@@ -10737,7 +10737,7 @@ zone_refreshkeys(dns_zone_t *zone) {
                 */
 
 #ifdef ENABLE_AFL
-               if (dns_fuzzing_resolver == false) {
+               if (!dns_fuzzing_resolver) {
 #endif /* ifdef ENABLE_AFL */
                        result = dns_resolver_createfetch(
                                zone->view->resolver, kname,
@@ -12741,7 +12741,7 @@ next_master:
                         * Did we get a good answer from all the masters?
                         */
                        for (j = 0; j < zone->masterscnt; j++) {
-                               if (zone->mastersok[j] == false) {
+                               if (!zone->mastersok[j]) {
                                        {
                                                done = false;
                                                break;
@@ -13265,7 +13265,7 @@ next_master:
                         * Did we get a good answer from all the masters?
                         */
                        for (j = 0; j < zone->masterscnt; j++) {
-                               if (zone->mastersok[j] == false) {
+                               if (!zone->mastersok[j]) {
                                        {
                                                done = false;
                                                break;
@@ -16980,7 +16980,7 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
                if (peer == NULL || result != ISC_R_SUCCESS) {
                        use_ixfr = zone->requestixfr;
                }
-               if (use_ixfr == false) {
+               if (!use_ixfr) {
                        dns_zone_logc(zone, DNS_LOGCATEGORY_XFER_IN,
                                      ISC_LOG_DEBUG(1),
                                      "IXFR disabled, "
index d292d1c022368c1be6416cb99df57d6f96cdbeb5..d66894927a6a53b33964ab7f825e6cbe4a371f38 100644 (file)
@@ -266,7 +266,7 @@ isc_app_ctxrun(isc_appctx_t *ctx) {
         * simply be made pending and we will get it when we call
         * sigwait().
         */
-       while (atomic_load_acquire(&ctx->want_shutdown) == false) {
+       while (!atomic_load_acquire(&ctx->want_shutdown)) {
 #ifdef WIN32
                DWORD dwWaitResult = WaitForMultipleObjects(
                        NUM_EVENTS, ctx->hEvents, FALSE, INFINITE);
@@ -424,7 +424,7 @@ isc_app_ctxsuspend(isc_appctx_t *ctx) {
        /*
         * Don't send the reload signal if we're shutting down.
         */
-       if (atomic_load_acquire(&ctx->shutdown_requested) == false) {
+       if (!atomic_load_acquire(&ctx->shutdown_requested)) {
 #ifdef WIN32
                SetEvent(ctx->hEvents[RELOAD_EVENT]);
 #else  /* WIN32 */
index 8ae0d515d525e51cac5c6a0dcd38169cb3bf988a..1c9c324c668c19409c990a4d6c16d887cc5b09d1 100644 (file)
@@ -43,7 +43,7 @@ isc_astack_new(isc_mem_t *mctx, size_t size) {
 
 bool
 isc_astack_trypush(isc_astack_t *stack, void *obj) {
-       if (isc_mutex_trylock(&stack->lock) == false) {
+       if (!isc_mutex_trylock(&stack->lock)) {
                if (stack->pos >= stack->size) {
                        UNLOCK(&stack->lock);
                        return (false);
index 899406ef73d8aa036a04ed0bbd771b79fd2cac94..3cc02bbb64f3ee65ea5f9bd3ed7244ab17f0ce65 100644 (file)
@@ -92,7 +92,7 @@ isc_mutex_init_profile(isc_mutex_t *mp, const char *file, int line) {
 
        RUNTIME_CHECK(pthread_mutex_lock(&statslock) == 0);
 
-       if (stats_init == false) {
+       if (!stats_init) {
                stats_init = true;
        }
 
index c93a635654e060409b15b95807cd86b264d33b18..d418cfdf1b00e92a49b9b41f9dff08d6460b4082 100644 (file)
@@ -1463,7 +1463,7 @@ consistent(isc_socket_t *sock) {
                socket_log(__LINE__, sock, NULL, CREATION,
                           "SOCKET INCONSISTENT: %s", crash_reason);
                sock_dump(sock);
-               INSIST(crash == false);
+               INSIST(!crash);
        }
 }
 
index 657495e4a58916bc99ccb99fc8d38e0eaa8e42f6..14f9618b07249bd1fa4d372ef28d40957cce407d 100644 (file)
@@ -518,7 +518,7 @@ ns_client_send(ns_client_t *client) {
                        dns_compress_setsensitive(&cctx, true);
                }
 
-               if (client->view->msgcompression == false) {
+               if (!client->view->msgcompression) {
                        dns_compress_disable(&cctx);
                }
        }
index d40edbcb1a7e0db4bc737c79b595a34e1bac2285..633485f6478ee9b5503d06b011198bdaa206dac0 100644 (file)
@@ -504,7 +504,7 @@ ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
        isc_result_t result;
        ns_interface_t *ifp = NULL;
        REQUIRE(ifpret != NULL && *ifpret == NULL);
-       REQUIRE(addr_in_use == NULL || *addr_in_use == false);
+       REQUIRE(addr_in_use == NULL || !*addr_in_use);
 
        result = ns_interface_create(mgr, addr, name, &ifp);
        if (result != ISC_R_SUCCESS) {
@@ -882,7 +882,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
                return (result);
        }
 
-       if (adjusting == false) {
+       if (!adjusting) {
                result = clearacl(mgr->mctx, &mgr->aclenv.localhost);
                if (result != ISC_R_SUCCESS) {
                        goto cleanup_iter;
@@ -912,10 +912,10 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
                if (family != AF_INET && family != AF_INET6) {
                        continue;
                }
-               if (scan_ipv4 == false && family == AF_INET) {
+               if (!scan_ipv4 && family == AF_INET) {
                        continue;
                }
-               if (scan_ipv6 == false && family == AF_INET6) {
+               if (!scan_ipv6 && family == AF_INET6) {
                        continue;
                }
 
@@ -935,7 +935,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
                        continue;
                }
 
-               if (adjusting == false) {
+               if (!adjusting) {
                        /*
                         * If running with -T fixedlocal, then we only
                         * want 127.0.0.1 and ::1 in the localhost ACL.
@@ -990,7 +990,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen, bool verbose) {
                                continue;
                        }
 
-                       if (adjusting == false && dolistenon) {
+                       if (!adjusting && dolistenon) {
                                setup_listenon(mgr, &interface, le->port);
                                dolistenon = false;
                        }
@@ -1053,7 +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) {
+                               if (!adjusting && ipv6_wildcard) {
                                        continue;
                                }
 
index 6d9d7c177c0f786e5b158ac413b9e2d01cdca014..4613b6432dd90a7f6bf52a11b6e928e18dff4c15 100644 (file)
@@ -41,7 +41,7 @@ static isc_refcount_t references;
 
 static void
 initialize(void) {
-       REQUIRE(initialize_done == false);
+       REQUIRE(!initialize_done);
 
        isc_mem_create(&ns_g_mctx);
 
index c36e6acd3974544b1ebe06399066605017bf05ea..f4a8f30d6475512f59c08ffef5c5a8d4ce81982a 100644 (file)
@@ -5903,7 +5903,7 @@ ns_query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
                sigrdataset = NULL;
        }
 
-       if (client->query.timerset == false) {
+       if (!client->query.timerset) {
                ns_client_settimeout(client, 60);
        }
 
index eaa6cb33cce0758a92a545dee2966fbf2d09692f..5cb67d852e625b5f3a935cf4f354ad31f8712f20 100644 (file)
@@ -280,7 +280,7 @@ update_log(ns_client_t *client, dns_zone_t *zone, int level, const char *fmt,
                return;
        }
 
-       if (isc_log_wouldlog(ns_lctx, level) == false) {
+       if (!isc_log_wouldlog(ns_lctx, level)) {
                return;
        }
 
index 79f3cb7bb83136ca0800e4802d11fa34f0d16103..f35ec79679a52b5524401ae721842dc23f4f7375 100644 (file)
@@ -1663,7 +1663,7 @@ xfrout_senddone(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
                xfrout_maybe_destroy(xfr);
        } else if (result != ISC_R_SUCCESS) {
                xfrout_fail(xfr, result, "send");
-       } else if (xfr->end_of_stream == false) {
+       } else if (!xfr->end_of_stream) {
                sendstream(xfr);
        } else {
                /* End of zone transfer stream. */
index ab46e6a448333afda790cc13d64e0a0687dc9b32..6eb48460f60f31f100dec1d5422e13e9f26a0b2e 100644 (file)
@@ -997,7 +997,7 @@ probe_domain(struct probe_trans *trans) {
        char *cp;
 
        REQUIRE(trans != NULL);
-       REQUIRE(trans->inuse == false);
+       REQUIRE(!trans->inuse);
        REQUIRE(outstanding_probes < MAX_PROBES);
 
        /* Construct domain */
index eb7ac09bc89192233fd013a5c7c678a46fb7048a..a0f523b3ee489184b63ad61c133e2c6ddcd4fc68 100644 (file)
@@ -211,7 +211,7 @@ dispatch_query(struct query_trans *trans) {
        char *cp;
 
        REQUIRE(trans != NULL);
-       REQUIRE(trans->inuse == false);
+       REQUIRE(!trans->inuse);
        REQUIRE(ISC_LIST_EMPTY(trans->answerlist));
        REQUIRE(outstanding_queries < MAX_QUERIES);
 
@@ -395,7 +395,7 @@ main(int argc, char *argv[]) {
 
        /* Sanity check */
        for (i = 0; i < MAX_QUERIES; i++) {
-               INSIST(query_array[i].inuse == false);
+               INSIST(!query_array[i].inuse);
        }
 
        /* Cleanup */