trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch master updated: Ran clang-tidy with modernize-use-bool-literals
Date Tue, 25 Apr 2017 00:15:07 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  8d53b87   Ran clang-tidy with modernize-use-bool-literals
8d53b87 is described below

commit 8d53b8795191fbfdbba033f41985ceca341cb3ec
Author: Bryan Call <bcall@apache.org>
AuthorDate: Mon Apr 17 09:07:36 2017 -0700

    Ran clang-tidy with modernize-use-bool-literals
---
 cmd/traffic_manager/MgmtHandlers.cc                |  2 +-
 cmd/traffic_top/traffic_top.cc                     |  4 +--
 example/cache_scan/cache_scan.cc                   |  6 ++--
 iocore/aio/AIO.cc                                  |  4 +--
 iocore/cache/Cache.cc                              | 20 +++++++-------
 iocore/cache/CacheDir.cc                           | 14 +++++-----
 iocore/cache/CacheHosting.cc                       | 16 +++++------
 iocore/cache/CacheRead.cc                          |  6 ++--
 iocore/cache/CacheVol.cc                           | 12 ++++----
 iocore/cache/CacheWrite.cc                         | 26 +++++++++---------
 iocore/cache/RamCacheCLFUS.cc                      |  2 +-
 iocore/cluster/ClusterAPI.cc                       |  4 +--
 iocore/cluster/ClusterCache.cc                     |  6 ++--
 iocore/cluster/ClusterConfig.cc                    |  2 +-
 iocore/cluster/ClusterHandler.cc                   |  4 +--
 iocore/cluster/ClusterVConnection.cc               |  4 +--
 iocore/dns/DNS.cc                                  |  8 +++---
 iocore/hostdb/HostDB.cc                            |  3 +-
 iocore/net/SSLNetVConnection.cc                    | 14 +++++-----
 iocore/net/Socks.cc                                |  2 +-
 iocore/net/UnixNetVConnection.cc                   |  4 +--
 iocore/net/UnixUDPNet.cc                           |  2 +-
 iocore/utils/OneWayTunnel.cc                       | 12 ++++----
 lib/records/P_RecCore.cc                           |  2 +-
 lib/records/RecLocal.cc                            |  2 +-
 lib/ts/HostLookup.cc                               | 10 +++----
 lib/ts/X509HostnameValidator.cc                    |  4 +--
 lib/ts/ink_string.cc                               |  2 +-
 mgmt/LocalManager.cc                               |  2 +-
 mgmt/api/APITestCliRemote.cc                       |  2 +-
 mgmt/api/CfgContextUtils.cc                        |  2 +-
 mgmt/api/EventCallback.cc                          |  6 ++--
 mgmt/api/EventControlMain.cc                       |  4 +--
 mgmt/api/NetworkUtilsRemote.cc                     |  4 +--
 mgmt/api/TSControlMain.cc                          |  2 +-
 plugins/esi/esi.cc                                 |  4 +--
 .../experimental/buffer_upload/buffer_upload.cc    |  6 ++--
 plugins/experimental/mysql_remap/mysql_remap.cc    |  2 +-
 proxy/FetchSM.cc                                   |  4 +--
 proxy/ICP.cc                                       |  6 ++--
 proxy/InkAPI.cc                                    |  4 +--
 proxy/InkAPITest.cc                                |  2 +-
 proxy/Plugin.cc                                    |  2 +-
 proxy/SocksProxy.cc                                |  4 +--
 proxy/hdrs/HdrHeap.cc                              |  2 +-
 proxy/hdrs/HdrTest.cc                              | 22 +++++++--------
 proxy/hdrs/MIME.cc                                 | 32 +++++++++++-----------
 proxy/http/HttpBodyFactory.cc                      |  2 +-
 proxy/http/HttpConfig.cc                           |  2 +-
 proxy/http/HttpTransact.cc                         | 10 +++----
 proxy/http/HttpUpdateSM.cc                         |  2 +-
 proxy/http2/HTTP2.cc                               |  4 +--
 proxy/shared/DiagsConfig.cc                        | 12 ++++----
 53 files changed, 171 insertions(+), 170 deletions(-)

diff --git a/cmd/traffic_manager/MgmtHandlers.cc b/cmd/traffic_manager/MgmtHandlers.cc
index f1a198c..dafef1e 100644
--- a/cmd/traffic_manager/MgmtHandlers.cc
+++ b/cmd/traffic_manager/MgmtHandlers.cc
@@ -252,7 +252,7 @@ mgmt_synthetic_main(void *)
     lmgmt->alarm_keeper->signalAlarm(MGMT_ALARM_WEB_ERROR, "Healthcheck service failed to initialize");
   }
 
-  while (1) {
+  while (true) {
     struct sockaddr_in clientInfo; // Info about client connection
     socklen_t addrLen = sizeof(clientInfo);
 
diff --git a/cmd/traffic_top/traffic_top.cc b/cmd/traffic_top/traffic_top.cc
index 39861dc..86380b7 100644
--- a/cmd/traffic_top/traffic_top.cc
+++ b/cmd/traffic_top/traffic_top.cc
@@ -221,7 +221,7 @@ help(const string &host, const string &version)
 {
   timeout(1000);
 
-  while (1) {
+  while (true) {
     clear();
     time_t now       = time(nullptr);
     struct tm *nowtm = localtime(&now);
@@ -447,7 +447,7 @@ main(int argc, char **argv)
   Page page       = MAIN_PAGE;
   string page_alt = "(r)esponse";
 
-  while (1) {
+  while (true) {
     attron(COLOR_PAIR(colorPair::border));
     attron(A_BOLD);
 
diff --git a/example/cache_scan/cache_scan.cc b/example/cache_scan/cache_scan.cc
index dfc168c..9172aca 100644
--- a/example/cache_scan/cache_scan.cc
+++ b/example/cache_scan/cache_scan.cc
@@ -149,7 +149,7 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
 
     cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, s2, sizeof(s2) - 1);
     if (!cstate->write_pending) {
-      cstate->write_pending = 1;
+      cstate->write_pending = true;
       TSVIOReenable(cstate->write_vio);
     }
 
@@ -168,7 +168,7 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
     cstate->total_bytes += TSIOBufferWrite(cstate->resp_buffer, s, s_len);
     TSVIONBytesSet(cstate->write_vio, cstate->total_bytes);
     if (!cstate->write_pending) {
-      cstate->write_pending = 1;
+      cstate->write_pending = true;
       TSVIOReenable(cstate->write_vio);
     }
     return TS_CACHE_SCAN_RESULT_DONE;
@@ -284,7 +284,7 @@ handle_io(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
   }
   case TS_EVENT_VCONN_WRITE_READY: {
     TSDebug(PLUGIN_NAME, "ndone: %" PRId64 " total_bytes: % " PRId64, TSVIONDoneGet(cstate->write_vio), cstate->total_bytes);
-    cstate->write_pending = 0;
+    cstate->write_pending = false;
     // the cache scan handler should call vio reenable when there is
     // available data
     // TSVIOReenable(cstate->write_vio);
diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index 52498dc..b5a8239 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -399,7 +399,7 @@ aio_queue_req(AIOCallbackInternal *op, int fromAPI = 0)
 static inline int
 cache_op(AIOCallbackInternal *op)
 {
-  bool read = (op->aiocb.aio_lio_opcode == LIO_READ) ? 1 : 0;
+  bool read = (op->aiocb.aio_lio_opcode == LIO_READ);
   for (; op; op = (AIOCallbackInternal *)op->then) {
     ink_aiocb_t *a = &op->aiocb;
     ssize_t err, res = 0;
@@ -513,7 +513,7 @@ aio_thread_main(void *arg)
       else
         op->thread->schedule_imm_signal(op);
       ink_mutex_acquire(&my_aio_req->aio_mutex);
-    } while (1);
+    } while (true);
     timespec timedwait_msec = ink_hrtime_to_timespec(Thread::get_hrtime_updated() + HRTIME_MSECONDS(net_config_poll_timeout));
     ink_cond_timedwait(&my_aio_req->aio_cond, &my_aio_req->aio_mutex, &timedwait_msec);
   }
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index b4752ad..4e75c32 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -1236,7 +1236,7 @@ bool
 CacheProcessor::IsCacheReady(CacheFragType type)
 {
   if (IsCacheEnabled() != CACHE_INITIALIZED)
-    return 0;
+    return false;
   return (bool)(cache_ready & (1 << type));
 }
 
@@ -1539,12 +1539,12 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
       return handle_recover_write_dir(EVENT_IMMEDIATE, nullptr);
     }
     // initialize
-    recover_wrapped   = 0;
+    recover_wrapped   = false;
     last_sync_serial  = 0;
     last_write_serial = 0;
     recover_pos       = header->last_write_pos;
     if (recover_pos >= skip + len) {
-      recover_wrapped = 1;
+      recover_wrapped = true;
       recover_pos     = start;
     }
     io.aiocb.aio_buf    = (char *)ats_memalign(ats_pagesize(), RECOVERY_SIZE);
@@ -1647,7 +1647,7 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
           // (doc->sync_serial > header->sync_serial + 1).
           // if we are too close to the end, wrap around
           else if (recover_pos - (e - s) > (skip + len) - AGG_SIZE) {
-            recover_wrapped     = 1;
+            recover_wrapped     = true;
             recover_pos         = start;
             io.aiocb.aio_nbytes = RECOVERY_SIZE;
 
@@ -1662,7 +1662,7 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
           // from the end, then wrap around
           recover_pos -= e - s;
           if (recover_pos > (skip + len) - AGG_SIZE) {
-            recover_wrapped     = 1;
+            recover_wrapped     = true;
             recover_pos         = start;
             io.aiocb.aio_nbytes = RECOVERY_SIZE;
 
@@ -1686,7 +1686,7 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
         s -= round_to_approx_size(doc->len);
       recover_pos -= e - s;
       if (recover_pos >= skip + len) {
-        recover_wrapped = 1;
+        recover_wrapped = true;
         recover_pos     = start;
       }
       io.aiocb.aio_nbytes = RECOVERY_SIZE;
@@ -1856,9 +1856,9 @@ Vol::dir_init_done(int /* event ATS_UNUSED */, void * /* data ATS_UNUSED */)
     gvol[vol_no] = this;
     SET_HANDLER(&Vol::aggWrite);
     if (fd == -1)
-      cache->vol_initialized(0);
+      cache->vol_initialized(false);
     else
-      cache->vol_initialized(1);
+      cache->vol_initialized(true);
     return EVENT_DONE;
   }
 }
@@ -2567,10 +2567,10 @@ CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       if (vol->open_write(this, true, 1)) {
         // writer  exists
         ink_release_assert(od = vol->open_read(&key));
-        od->dont_update_directory = 1;
+        od->dont_update_directory = true;
         od                        = nullptr;
       } else {
-        od->dont_update_directory = 1;
+        od->dont_update_directory = true;
       }
       f.remove_aborted_writers = 1;
     }
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index ed83e3b..6f29de2 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -92,10 +92,10 @@ OpenDir::open_write(CacheVC *cont, int allow_if_writers, int max_writers)
   od->num_writers           = 1;
   od->max_writers           = max_writers;
   od->vector.data.data      = &od->vector.data.fast_data[0];
-  od->dont_update_directory = 0;
-  od->move_resident_alt     = 0;
-  od->reading_vec           = 0;
-  od->writing_vec           = 0;
+  od->dont_update_directory = false;
+  od->move_resident_alt     = false;
+  od->reading_vec           = false;
+  od->writing_vec           = false;
   dir_clear(&od->first_dir);
   cont->od           = od;
   cont->write_vector = &od->vector;
@@ -1058,7 +1058,7 @@ Lrestart:
       }
       if (vol->is_io_in_progress() || vol->agg_buf_pos) {
         Debug("cache_dir_sync", "Dir %s: waiting for agg buffer", vol->hash_text.get());
-        vol->dir_sync_waiting = 1;
+        vol->dir_sync_waiting = true;
         if (!vol->is_io_in_progress())
           vol->aggWrite(EVENT_IMMEDIATE, nullptr);
         return EVENT_CONT;
@@ -1087,7 +1087,7 @@ Lrestart:
       vol->footer->sync_serial = vol->header->sync_serial;
       CHECK_DIR(d);
       memcpy(buf, vol->raw_dir, dirlen);
-      vol->dir_sync_in_progress = 1;
+      vol->dir_sync_in_progress = true;
     }
     size_t B    = vol->header->sync_serial & 1;
     off_t start = vol->skip + (B ? dirlen : 0);
@@ -1109,7 +1109,7 @@ Lrestart:
       aio_write(vol->fd, buf + writepos, headerlen, start + writepos);
       writepos += headerlen;
     } else {
-      vol->dir_sync_in_progress = 0;
+      vol->dir_sync_in_progress = false;
       CACHE_INCREMENT_DYN_STAT(cache_directory_sync_count_stat);
       CACHE_SUM_DYN_STAT(cache_directory_sync_time_stat, Thread::get_hrtime() - start_time);
       start_time = 0;
diff --git a/iocore/cache/CacheHosting.cc b/iocore/cache/CacheHosting.cc
index 2cac146..b18b287 100644
--- a/iocore/cache/CacheHosting.cc
+++ b/iocore/cache/CacheHosting.cc
@@ -28,7 +28,7 @@
 
 extern int gndisks;
 
-matcher_tags CacheHosting_tags = {"hostname", "domain", nullptr, nullptr, nullptr, nullptr, 0};
+matcher_tags CacheHosting_tags = {"hostname", "domain", nullptr, nullptr, nullptr, nullptr, false};
 
 /*************************************************************
  *   Begin class HostMatcher
@@ -503,7 +503,7 @@ CacheHostRecord::Init(matcher_line *line_info, CacheType typ)
       cp = (CacheVol **)ats_malloc(num_cachevols * sizeof(CacheVol *));
       memset(cp, 0, num_cachevols * sizeof(CacheVol *));
       num_cachevols = 0;
-      while (1) {
+      while (true) {
         char c = *s;
         if ((c == ',') || (c == '\0')) {
           *s            = '\0';
@@ -639,7 +639,7 @@ ConfigVolumes::BuildListFromString(char *config_file_path, char *file_buf)
     int size          = 0;
     int in_percent    = 0;
 
-    while (1) {
+    while (true) {
       // skip all blank spaces at beginning of line
       while (*tmp && isspace(*tmp)) {
         tmp++;
@@ -740,9 +740,9 @@ ConfigVolumes::BuildListFromString(char *config_file_path, char *file_buf)
       configp->number    = volume_number;
       if (in_percent) {
         configp->percent    = size;
-        configp->in_percent = 1;
+        configp->in_percent = true;
       } else {
-        configp->in_percent = 0;
+        configp->in_percent = false;
       }
       configp->scheme = scheme;
       configp->size   = size;
@@ -828,7 +828,7 @@ create_config(RegressionTest *t, int num)
         cp->number     = vol_num++;
         cp->scheme     = CACHE_HTTP_TYPE;
         cp->size       = 128;
-        cp->in_percent = 0;
+        cp->in_percent = false;
         cp->cachep     = nullptr;
         config_volumes.cp_queue.enqueue(cp);
         config_volumes.num_volumes++;
@@ -867,7 +867,7 @@ create_config(RegressionTest *t, int num)
       cp->scheme     = CACHE_HTTP_TYPE;
       cp->size       = 10;
       cp->percent    = 10;
-      cp->in_percent = 1;
+      cp->in_percent = true;
       cp->cachep     = nullptr;
       config_volumes.cp_queue.enqueue(cp);
       config_volumes.num_volumes++;
@@ -925,7 +925,7 @@ create_config(RegressionTest *t, int num)
       cp->scheme     = scheme;
       cp->size       = random_size >> 20;
       cp->percent    = 0;
-      cp->in_percent = 0;
+      cp->in_percent = false;
       cp->cachep     = nullptr;
       config_volumes.cp_queue.enqueue(cp);
       config_volumes.num_volumes++;
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index ec3cf3d..a9986bd 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -871,7 +871,7 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
           // the evacuator changes the od->first_dir to the new directory
           // that it inserted
           od->first_dir   = first_dir;
-          od->writing_vec = 1;
+          od->writing_vec = true;
           earliest_key    = zero_key;
 
           // set up this VC as a alternate delete write_vc
@@ -884,7 +884,7 @@ CacheVC::openReadStartEarliest(int /* event ATS_UNUSED */, Event * /* e ATS_UNUS
           // when another alternate does not exist.                      //
           /////////////////////////////////////////////////////////////////
           if (doc1->total_len > 0) {
-            od->move_resident_alt = 1;
+            od->move_resident_alt = true;
             od->single_doc_key    = doc1->key;
             dir_assign(&od->single_doc_dir, &dir);
             dir_set_tag(&od->single_doc_dir, od->single_doc_key.slice32(2));
@@ -923,7 +923,7 @@ CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */
   cancel_trigger();
   set_io_not_in_progress();
   ink_assert(od);
-  od->writing_vec = 0;
+  od->writing_vec = false;
   if (_action.cancelled)
     return openWriteCloseDir(EVENT_IMMEDIATE, nullptr);
   {
diff --git a/iocore/cache/CacheVol.cc b/iocore/cache/CacheVol.cc
index b53f412..ce641c8 100644
--- a/iocore/cache/CacheVol.cc
+++ b/iocore/cache/CacheVol.cc
@@ -223,7 +223,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       goto Lskip;
 
     last_collision = nullptr;
-    while (1) {
+    while (true) {
       if (!dir_probe(&doc->first_key, vol, &dir, &last_collision))
         goto Lskip;
       if (!dir_agg_valid(vol, &dir) || !dir_head(&dir) ||
@@ -251,7 +251,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     if (this->load_http_info(&vector, doc) != doc->hlen)
       goto Lskip;
     changed         = false;
-    hostinfo_copied = 0;
+    hostinfo_copied = false;
     for (i = 0; i < vector.count(); i++) {
       if (!vector.get(i)->valid())
         goto Lskip;
@@ -259,7 +259,7 @@ CacheVC::scanObject(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         memccpy(hname, vector.get(i)->request_get()->host_get(&hlen), 0, 500);
         hname[hlen] = 0;
         Debug("cache_scan", "hostname = '%s', hostlen = %d", hname, hlen);
-        hostinfo_copied = 1;
+        hostinfo_copied = true;
       }
       vector.get(i)->object_key_get(&key);
       alternate_index = i;
@@ -424,7 +424,7 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
     for (int i = 0; i < alt_count; i++) {
       write_vector->insert(vector.get(i));
     }
-    od->writing_vec = 1;
+    od->writing_vec = true;
     vector.clear(false);
     // check that the directory entry was not overwritten
     // if so return failure
@@ -441,10 +441,10 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       dir_assign(&od->single_doc_dir, &dir);
       dir_set_tag(&od->single_doc_dir, doc->key.slice32(2));
       od->single_doc_key    = doc->key;
-      od->move_resident_alt = 1;
+      od->move_resident_alt = true;
     }
 
-    while (1) {
+    while (true) {
       if (!dir_probe(&first_key, vol, &d, &l)) {
         vol->close_write(this);
         _action.continuation->handleEvent(CACHE_EVENT_SCAN_OPERATION_FAILED, nullptr);
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index c352b13..7b6d082 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -89,11 +89,11 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         }
       }
       if (update_key == od->single_doc_key && (total_len || !vec))
-        od->move_resident_alt = 0;
+        od->move_resident_alt = false;
     }
     if (cache_config_http_max_alts > 1 && write_vector->count() >= cache_config_http_max_alts && alternate_index < 0) {
       if (od->move_resident_alt && get_alternate_index(write_vector, od->single_doc_key) == 0)
-        od->move_resident_alt = 0;
+        od->move_resident_alt = false;
       write_vector->remove(0, true);
     }
     if (vec) {
@@ -122,7 +122,7 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
         // for multiple fragment document, we must have done
         // CacheVC:openWriteCloseDataDone
         ink_assert(!fragment || f.data_done);
-        od->move_resident_alt  = 0;
+        od->move_resident_alt  = false;
         f.rewrite_resident_alt = 1;
         write_len              = doc->data_len();
         Debug("cache_update_alt", "rewriting resident alt size: %d key: %X, first_key: %X", write_len, doc->key.slice32(0),
@@ -130,7 +130,7 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       }
     }
     header_len      = write_vector->marshal_length();
-    od->writing_vec = 1;
+    od->writing_vec = true;
     f.use_first_key = 1;
     SET_HANDLER(&CacheVC::openWriteCloseHeadDone);
     ret = do_write_call();
@@ -352,7 +352,7 @@ Vol::aggWriteDone(int event, Event *e)
     }
   }
   if (dir_sync_waiting) {
-    dir_sync_waiting = 0;
+    dir_sync_waiting = false;
     cacheDirSync->handleEvent(EVENT_IMMEDIATE, nullptr);
   }
   if (agg.head || sync.head)
@@ -1129,7 +1129,7 @@ CacheVC::openWriteCloseHeadDone(int event, Event *e)
     CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
     if (!lock.is_locked())
       VC_LOCK_RETRY_EVENT();
-    od->writing_vec = 0;
+    od->writing_vec = false;
     if (!io.ok())
       goto Lclose;
     ink_assert(f.use_first_key);
@@ -1143,13 +1143,13 @@ CacheVC::openWriteCloseHeadDone(int event, Event *e)
         if (od->move_resident_alt) {
           if (dir_valid(vol, &od->single_doc_dir))
             dir_insert(&od->single_doc_key, vol, &od->single_doc_dir);
-          od->move_resident_alt = 0;
+          od->move_resident_alt = false;
         }
       }
       od->first_dir = dir;
       if (frag_type == CACHE_FRAG_TYPE_HTTP && f.single_fragment) {
         // fragment is tied to the vector
-        od->move_resident_alt = 1;
+        od->move_resident_alt = true;
         if (!f.rewrite_resident_alt) {
           od->single_doc_key = earliest_key;
         }
@@ -1490,7 +1490,7 @@ CacheVC::openWriteStartDone(int event, Event *e)
       first_dir     = dir;
       if (doc->single_fragment()) {
         // fragment is tied to the vector
-        od->move_resident_alt = 1;
+        od->move_resident_alt = true;
         od->single_doc_key    = doc->key;
         dir_assign(&od->single_doc_dir, &dir);
         dir_set_tag(&od->single_doc_dir, od->single_doc_key.slice32(2));
@@ -1512,7 +1512,7 @@ CacheVC::openWriteStartDone(int event, Event *e)
     }
     // check for collision
     if (dir_probe(&first_key, vol, &dir, &last_collision)) {
-      od->reading_vec = 1;
+      od->reading_vec = true;
       int ret         = do_read_call(&first_key);
       if (ret == EVENT_RETURN)
         goto Lcallreturn;
@@ -1524,7 +1524,7 @@ CacheVC::openWriteStartDone(int event, Event *e)
     }
   }
 Lsuccess:
-  od->reading_vec = 0;
+  od->reading_vec = false;
   if (_action.cancelled)
     goto Lcancel;
   SET_HANDLER(&CacheVC::openWriteMain);
@@ -1535,7 +1535,7 @@ Lfailure:
   _action.continuation->handleEvent(CACHE_EVENT_OPEN_WRITE_FAILED, (void *)-err);
 Lcancel:
   if (od) {
-    od->reading_vec = 0;
+    od->reading_vec = false;
     return openWriteCloseDir(event, e);
   } else
     return free_CacheVC(this);
@@ -1731,7 +1731,7 @@ Cache::open_write(Continuation *cont, const CacheKey *key, CacheHTTPInfo *info,
         // document doesn't exist, begin write
         goto Lmiss;
       } else {
-        c->od->reading_vec = 1;
+        c->od->reading_vec = true;
         // document exists, read vector
         SET_CONTINUATION_HANDLER(c, &CacheVC::openWriteStartDone);
         switch (c->do_read_call(&c->first_key)) {
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 6d00449..c5bda05 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -624,7 +624,7 @@ RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy, ui
       return 0;
     }
   }
-  while (1) {
+  while (true) {
     victim = lru[0].dequeue();
     if (!victim) {
       if (bytes + size <= max_bytes)
diff --git a/iocore/cluster/ClusterAPI.cc b/iocore/cluster/ClusterAPI.cc
index 1eee14d..8d5d5a8 100644
--- a/iocore/cluster/ClusterAPI.cc
+++ b/iocore/cluster/ClusterAPI.cc
@@ -214,7 +214,7 @@ ClusterAPIPeriodicSM::GetNextSM()
   MachineStatusSM *msmp;
   MachineStatusSM *msmp_next;
 
-  while (1) {
+  while (true) {
     msmp = status_callout_q.pop();
     if (!msmp) {
       msmp = (MachineStatusSM *)ink_atomiclist_popall(&status_callout_atomic_q);
@@ -242,7 +242,7 @@ ClusterAPIPeriodicSM::ClusterAPIPeriodicSMEvent(int e, void *d)
   // Maintain node status event order by serializing the processing.
   int ret;
 
-  while (1) {
+  while (true) {
     if (_active_msmp) {
       ret = _active_msmp->handleEvent(e, d);
       if (ret != EVENT_DONE) {
diff --git a/iocore/cluster/ClusterCache.cc b/iocore/cluster/ClusterCache.cc
index 68abf24..59afb4b 100644
--- a/iocore/cluster/ClusterCache.cc
+++ b/iocore/cluster/ClusterCache.cc
@@ -176,7 +176,7 @@ public:
     INK_MD5 key;
     ClusterVConnection *vc;
 
-    Entry() : mark_for_delete(0), vc(nullptr) {}
+    Entry() : mark_for_delete(false), vc(nullptr) {}
     ~Entry() {}
   };
 
@@ -2216,9 +2216,9 @@ retry:
 
         have_all_data = pToken->is_clear(); // no conn implies all data
         if (have_all_data) {
-          read_cluster_vc->have_all_data = 1;
+          read_cluster_vc->have_all_data = true;
         } else {
-          read_cluster_vc->have_all_data = 0;
+          read_cluster_vc->have_all_data = false;
         }
         // Move CacheHTTPInfo reply data into VC
         read_cluster_vc->marshal_buf = this->getMsgBufferIOBData();
diff --git a/iocore/cluster/ClusterConfig.cc b/iocore/cluster/ClusterConfig.cc
index 6894c7e..33cbc7d 100644
--- a/iocore/cluster/ClusterConfig.cc
+++ b/iocore/cluster/ClusterConfig.cc
@@ -380,7 +380,7 @@ cluster_machine_at_depth(unsigned int hash, int *pprobe_depth, ClusterMachine **
   }
 #endif // CLUSTER_TEST
 
-  while (1) {
+  while (true) {
     // If we are out of our depth, fail
     //
     if (probe_depth > CONFIGURATION_HISTORY_PROBE_DEPTH)
diff --git a/iocore/cluster/ClusterHandler.cc b/iocore/cluster/ClusterHandler.cc
index bf2f114..09f1db9 100644
--- a/iocore/cluster/ClusterHandler.cc
+++ b/iocore/cluster/ClusterHandler.cc
@@ -162,7 +162,7 @@ ClusterHandler::ClusterHandler()
     last_cluster_op_enable(0),
     last_trace_dump(0),
     clm(nullptr),
-    disable_remote_cluster_ops(0),
+    disable_remote_cluster_ops(false),
     pw_write_descriptors_built(0),
     pw_freespace_descriptors_built(0),
     pw_controldata_descriptors_built(0),
@@ -2436,7 +2436,7 @@ ClusterHandler::mainClusterEvent(int event, Event *e)
 
   while (io_activity) {
     io_activity             = 0;
-    only_write_control_msgs = 0;
+    only_write_control_msgs = false;
 
     if (downing) {
       machine_down();
diff --git a/iocore/cluster/ClusterVConnection.cc b/iocore/cluster/ClusterVConnection.cc
index a1a606e..f15a584 100644
--- a/iocore/cluster/ClusterVConnection.cc
+++ b/iocore/cluster/ClusterVConnection.cc
@@ -203,8 +203,8 @@ ClusterVConnection::ClusterVConnection(int is_new_connect_read)
     n_set_data_msgs(0),
     n_recv_set_data_msgs(0),
     pending_remote_fill(0),
-    remote_ram_cache_hit(0),
-    have_all_data(0),
+    remote_ram_cache_hit(false),
+    have_all_data(false),
     initial_data_bytes(0),
     current_cont(nullptr),
     iov_map(CLUSTER_IOV_NOT_OPEN),
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 036b0e8..168dea7 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -607,7 +607,7 @@ void
 DNSHandler::switch_named(int ndx)
 {
   for (DNSEntry *e = entries.head; e; e = (DNSEntry *)e->link.next) {
-    e->written_flag = 0;
+    e->written_flag = false;
     if (e->retries < dns_retries)
       ++(e->retries); // give them another chance
   }
@@ -682,7 +682,7 @@ DNSHandler::rr_failure(int ndx)
     // actual retries will be done in retry_named called from mainEvent
     // mark any outstanding requests as not sent for later retry
     for (DNSEntry *e = entries.head; e; e = (DNSEntry *)e->link.next) {
-      e->written_flag = 0;
+      e->written_flag = false;
       if (e->retries < dns_retries)
         ++(e->retries); // give them another chance
       --in_flight;
@@ -692,7 +692,7 @@ DNSHandler::rr_failure(int ndx)
     // move outstanding requests that were sent to this nameserver to another
     for (DNSEntry *e = entries.head; e; e = (DNSEntry *)e->link.next) {
       if (e->which_ns == ndx) {
-        e->written_flag = 0;
+        e->written_flag = false;
         if (e->retries < dns_retries)
           ++(e->retries); // give them another chance
         --in_flight;
@@ -728,7 +728,7 @@ DNSHandler::recv_dns(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
   ip_text_buffer ipbuff1, ipbuff2;
 
   while ((dnsc = (DNSConnection *)triggered.dequeue())) {
-    while (1) {
+    while (true) {
       IpEndpoint from_ip;
       socklen_t from_length = sizeof(from_ip);
 
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index 69de227..7ead1e1 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -2320,7 +2320,8 @@ struct ShowHostDB : public ShowCont {
     return complete(event, e);
   }
 
-  ShowHostDB(Continuation *c, HTTPHdr *h) : ShowCont(c, h), name(nullptr), port(0), force(0), output_json(false), records_seen(0)
+  ShowHostDB(Continuation *c, HTTPHdr *h)
+    : ShowCont(c, h), name(nullptr), port(0), force(false), output_json(false), records_seen(0)
   {
     ats_ip_invalidate(&ip);
     SET_HANDLER(&ShowHostDB::showMain);
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 0316993..2467474 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -471,7 +471,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
       // the client hello message back into the standard read.vio
       // so it will get forwarded onto the origin server
       if (!this->getSSLHandShakeComplete()) {
-        this->sslHandShakeComplete = 1;
+        this->sslHandShakeComplete = true;
 
         // Copy over all data already read in during the SSL_accept
         // (the client hello message)
@@ -850,8 +850,8 @@ SSLNetVConnection::do_io_close(int lerrno)
 void
 SSLNetVConnection::free(EThread *t)
 {
-  got_remote_addr = 0;
-  got_local_addr  = 0;
+  got_remote_addr = false;
+  got_local_addr  = false;
   read.vio.mutex.clear();
   write.vio.mutex.clear();
   this->mutex.clear();
@@ -950,7 +950,7 @@ SSLNetVConnection::sslStartHandShake(int event, int &err)
       // directly into blind tunnel mode
       if (cc && SSLCertContext::OPT_TUNNEL == cc->opt && this->is_transparent) {
         this->attributes     = HttpProxyPort::TRANSPORT_BLIND_TUNNEL;
-        sslHandShakeComplete = 1;
+        sslHandShakeComplete = true;
         SSL_free(this->ssl);
         this->ssl = nullptr;
         return EVENT_DONE;
@@ -1072,7 +1072,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     // over the buffered handshake packets to the O.S.
     return EVENT_DONE;
   } else if (SSL_HOOK_OP_TERMINATE == hookOpRequested) {
-    sslHandShakeComplete = 1;
+    sslHandShakeComplete = true;
     return EVENT_DONE;
   }
 
@@ -1102,7 +1102,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     if (getTransparentPassThrough() && buf && *buf != SSL_OP_HANDSHAKE) {
       SSLDebugVC(this, "Data does not look like SSL handshake, starting blind tunnel");
       this->attributes     = HttpProxyPort::TRANSPORT_BLIND_TUNNEL;
-      sslHandShakeComplete = 0;
+      sslHandShakeComplete = false;
       return EVENT_CONT;
     }
   }
@@ -1210,7 +1210,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
 #if defined(SSL_ERROR_WANT_SNI_RESOLVE) || defined(SSL_ERROR_WANT_X509_LOOKUP)
     if (this->attributes == HttpProxyPort::TRANSPORT_BLIND_TUNNEL || SSL_HOOK_OP_TUNNEL == hookOpRequested) {
       this->attributes     = HttpProxyPort::TRANSPORT_BLIND_TUNNEL;
-      sslHandShakeComplete = 0;
+      sslHandShakeComplete = false;
       return EVENT_CONT;
     } else {
       //  Stopping for some other reason, perhaps loading certificate
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index 30e3855..c03413c 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -288,7 +288,7 @@ SocksEntry::mainEvent(int event, void *data)
       timeout = this_ethread()->schedule_in(this, HRTIME_SECONDS(netProcessor.socks_conf_stuff->socks_timeout));
     }
 
-    netVConnection->do_io_write(this, n_bytes, reader, 0);
+    netVConnection->do_io_write(this, n_bytes, reader, false);
     // Debug("Socks", "Sent the request to the SOCKS server");
 
     ret = EVENT_CONT;
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index dc190d7..55034e6 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1443,8 +1443,8 @@ UnixNetVConnection::free(EThread *t)
   // clear variables for reuse
   this->mutex.clear();
   action_.mutex.clear();
-  got_remote_addr = 0;
-  got_local_addr  = 0;
+  got_remote_addr = false;
+  got_local_addr  = false;
   attributes      = 0;
   read.vio.mutex.clear();
   write.vio.mutex.clear();
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index cb39aa9..260b682 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -776,7 +776,7 @@ UDPQueue::SendUDPPacket(UDPPacketInternal *p, int32_t /* pktLen ATS_UNUSED */)
   msg.msg_iovlen = iov_len;
 
   count = 0;
-  while (1) {
+  while (true) {
     // stupid Linux problem: sendmsg can return EAGAIN
     n = ::sendmsg(p->conn->getFd(), &msg, 0);
     if ((n >= 0) || ((n < 0) && (errno != EAGAIN)))
diff --git a/iocore/utils/OneWayTunnel.cc b/iocore/utils/OneWayTunnel.cc
index d35c45d..ff6c011 100644
--- a/iocore/utils/OneWayTunnel.cc
+++ b/iocore/utils/OneWayTunnel.cc
@@ -70,10 +70,10 @@ OneWayTunnel::OneWayTunnel()
     manipulate_fn(nullptr),
     n_connections(0),
     lerrno(0),
-    single_buffer(0),
-    close_source(0),
-    close_target(0),
-    tunnel_till_done(0),
+    single_buffer(false),
+    close_source(false),
+    close_target(false),
+    tunnel_till_done(false),
     tunnel_peer(nullptr),
     free_vcs(true)
 {
@@ -159,7 +159,7 @@ OneWayTunnel::init(VConnection *vcSource, VConnection *vcTarget, Continuation *a
 
   SCOPED_MUTEX_LOCK(lock, mutex, this_ethread());
   vioSource = vcSource->do_io_read(this, nbytes, buf1);
-  vioTarget = vcTarget->do_io_write(this, nbytes, buf2->alloc_reader(), 0);
+  vioTarget = vcTarget->do_io_write(this, nbytes, buf2->alloc_reader(), false);
   ink_assert(vioSource && vioTarget);
 
   return;
@@ -189,7 +189,7 @@ OneWayTunnel::init(VConnection *vcSource, VConnection *vcTarget, Continuation *a
   SCOPED_MUTEX_LOCK(lock, mutex, this_ethread());
   vioSource = SourceVio;
 
-  vioTarget = vcTarget->do_io_write(this, TUNNEL_TILL_DONE, reader, 0);
+  vioTarget = vcTarget->do_io_write(this, TUNNEL_TILL_DONE, reader, false);
   ink_assert(vioSource && vioTarget);
 }
 
diff --git a/lib/records/P_RecCore.cc b/lib/records/P_RecCore.cc
index aac94b2..c4e8040 100644
--- a/lib/records/P_RecCore.cc
+++ b/lib/records/P_RecCore.cc
@@ -994,7 +994,7 @@ RecWriteConfigFile(TextBuffer *tb)
     }
 
     result = REC_ERR_OKAY;
-  } while (0);
+  } while (false);
 
   if (h_file != REC_HANDLE_INVALID) {
     RecFileClose(h_file);
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index abe31db..de7cc0a 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -65,7 +65,7 @@ sync_thr(void *data)
   TextBuffer *tb           = new TextBuffer(65536);
   FileManager *configFiles = (FileManager *)data;
 
-  while (1) {
+  while (true) {
     bool inc_version;
     RecBool disabled = false;
     RecBool check    = true;
diff --git a/lib/ts/HostLookup.cc b/lib/ts/HostLookup.cc
index 08e6d02..b8be759 100644
--- a/lib/ts/HostLookup.cc
+++ b/lib/ts/HostLookup.cc
@@ -155,7 +155,7 @@ hostcmp(const char *c1, const char *c2)
     }
     c1++;
     c2++;
-  } while (1);
+  } while (true);
 
   return 0;
 }
@@ -366,7 +366,7 @@ charIndex::Insert(const char *match_data, HostBranch *toInsert)
     return;
   }
 
-  while (1) {
+  while (true) {
     index = asciiToTable[(unsigned char)(*match_data)];
 
     // Check to see if our index into table is for an
@@ -421,7 +421,7 @@ charIndex::Lookup(const char *match_data)
     return nullptr;
   }
 
-  while (1) {
+  while (true) {
     index = asciiToTable[(unsigned char)(*match_data)];
 
     // Check to see if our index into table is for an
@@ -498,7 +498,7 @@ charIndex::iter_next(charIndexIterState *s)
     index         = s->cur_index;
   }
 
-  while (1) {
+  while (true) {
     // Check to see if we need to go back up a level
     if (index >= numLegalChars) {
       if (level <= 0) {
@@ -1210,7 +1210,7 @@ HostLookup::MatchNext(HostLookupState *s, void **opaque_ptr)
 
         s->host_copy_next--;
 
-        while (1) {
+        while (true) {
           if (s->host_copy_next <= s->host_copy) {
             s->host_copy_next = s->host_copy;
             break;
diff --git a/lib/ts/X509HostnameValidator.cc b/lib/ts/X509HostnameValidator.cc
index c46bcc9..efa7fda 100644
--- a/lib/ts/X509HostnameValidator.cc
+++ b/lib/ts/X509HostnameValidator.cc
@@ -107,7 +107,7 @@ static bool
 equal_nocase(const unsigned char *pattern, size_t pattern_len, const unsigned char *subject, size_t subject_len)
 {
   if (pattern_len != subject_len)
-    return 0;
+    return false;
   return (strncasecmp((char *)pattern, (char *)subject, pattern_len) == 0);
 }
 
@@ -116,7 +116,7 @@ static bool
 equal_case(const unsigned char *pattern, size_t pattern_len, const unsigned char *subject, size_t subject_len)
 {
   if (pattern_len != subject_len)
-    return 0;
+    return false;
   return (memcmp(pattern, subject, pattern_len) == 0);
 }
 
diff --git a/lib/ts/ink_string.cc b/lib/ts/ink_string.cc
index 6556287..6ee87eb 100644
--- a/lib/ts/ink_string.cc
+++ b/lib/ts/ink_string.cc
@@ -62,7 +62,7 @@ ink_string_concatenate_strings(char *dest, ...)
 
   d = dest;
 
-  while (1) {
+  while (true) {
     s = va_arg(ap, char *);
     if (s == nullptr)
       break;
diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc
index 8c0cfbe..3cebd4b 100644
--- a/mgmt/LocalManager.cc
+++ b/mgmt/LocalManager.cc
@@ -389,7 +389,7 @@ LocalManager::pollMgmtProcessServer()
   struct timeval timeout;
   fd_set fdlist;
 
-  while (1) {
+  while (true) {
 #if TS_HAS_WCCP
     int wccp_fd = wccp_cache.getSocket();
 #endif
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index 5f6aaad..7efbeb8 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -2292,7 +2292,7 @@ runInteractive()
   char buf[512]; // holds request from interactive prompt
 
   // process input from command line
-  while (1) {
+  while (true) {
     // Display a prompt
     printf("api_cli-> ");
 
diff --git a/mgmt/api/CfgContextUtils.cc b/mgmt/api/CfgContextUtils.cc
index 1dea013..72e7409 100644
--- a/mgmt/api/CfgContextUtils.cc
+++ b/mgmt/api/CfgContextUtils.cc
@@ -998,7 +998,7 @@ pdest_sspec_to_string(TSPrimeDestT pd, char *pd_val, TSSspec *sspec)
         }
       }
     }
-  } while (0);
+  } while (false);
 
   str = ats_strdup(buf);
   return str;
diff --git a/mgmt/api/EventCallback.cc b/mgmt/api/EventCallback.cc
index 629dfae..baa630c 100644
--- a/mgmt/api/EventCallback.cc
+++ b/mgmt/api/EventCallback.cc
@@ -182,7 +182,7 @@ get_events_with_callbacks(CallbackTable *cb_table)
 TSMgmtError
 cb_table_register(CallbackTable *cb_table, const char *event_name, TSEventSignalFunc func, void *data, bool *first_cb)
 {
-  bool first_time = 0;
+  bool first_time = false;
   int id;
   EventCallbackT *event_cb; // create new EventCallbackT EACH TIME enqueue
 
@@ -199,7 +199,7 @@ cb_table_register(CallbackTable *cb_table, const char *event_name, TSEventSignal
     for (int i = 0; i < NUM_EVENTS; i++) {
       if (!cb_table->event_callback_l[i]) {
         cb_table->event_callback_l[i] = create_queue();
-        first_time                    = 1;
+        first_time                    = true;
       }
 
       if (!cb_table->event_callback_l[i]) {
@@ -216,7 +216,7 @@ cb_table_register(CallbackTable *cb_table, const char *event_name, TSEventSignal
     if (id != -1) {
       if (!cb_table->event_callback_l[id]) {
         cb_table->event_callback_l[id] = create_queue();
-        first_time                     = 1;
+        first_time                     = true;
       }
 
       if (!cb_table->event_callback_l[id]) {
diff --git a/mgmt/api/EventControlMain.cc b/mgmt/api/EventControlMain.cc
index 96462aa..a0a1d19 100644
--- a/mgmt/api/EventControlMain.cc
+++ b/mgmt/api/EventControlMain.cc
@@ -62,7 +62,7 @@ new_event_client()
 
   // now set the alarms registered section
   for (int i = 0; i < NUM_EVENTS; i++) {
-    ele->events_registered[i] = 0;
+    ele->events_registered[i] = false;
   }
 
   ele->adr = (struct sockaddr *)ats_malloc(sizeof(struct sockaddr));
@@ -274,7 +274,7 @@ event_callback_main(void *arg)
   int fds_ready;                       // return value for select go here
   struct timeval timeout;
 
-  while (1) {
+  while (true) {
     // LINUX fix: to prevent hard-spin reset timeout on each loop
     timeout.tv_sec  = 1;
     timeout.tv_usec = 0;
diff --git a/mgmt/api/NetworkUtilsRemote.cc b/mgmt/api/NetworkUtilsRemote.cc
index 5d3577d..2d0e521 100644
--- a/mgmt/api/NetworkUtilsRemote.cc
+++ b/mgmt/api/NetworkUtilsRemote.cc
@@ -403,7 +403,7 @@ void *
 socket_test_thread(void *)
 {
   // loop until client process dies
-  while (1) {
+  while (true) {
     if (main_socket_fd == -1 || !socket_test(main_socket_fd)) {
       // ASSUMES that in between the time the socket_test is made
       // and this reconnect call is made, the main_socket_fd remains
@@ -602,7 +602,7 @@ event_poll_thread_main(void *arg)
   sock_fd = *((int *)arg); // should be same as event_socket_fd
 
   // the sock_fd is going to be the one we listen for events on
-  while (1) {
+  while (true) {
     TSMgmtError ret;
     TSMgmtEvent *event = nullptr;
 
diff --git a/mgmt/api/TSControlMain.cc b/mgmt/api/TSControlMain.cc
index b7d900d..6a336af 100644
--- a/mgmt/api/TSControlMain.cc
+++ b/mgmt/api/TSControlMain.cc
@@ -143,7 +143,7 @@ ts_ctrl_main(void *arg)
   struct timeval timeout;
 
   // loops until TM dies; waits for and processes requests from clients
-  while (1) {
+  while (true) {
     // LINUX: to prevent hard-spin of CPU,  reset timeout on each loop
     timeout.tv_sec  = TIMEOUT_SECS;
     timeout.tv_usec = 0;
diff --git a/plugins/esi/esi.cc b/plugins/esi/esi.cc
index 9a4e75b..91ea082 100644
--- a/plugins/esi/esi.cc
+++ b/plugins/esi/esi.cc
@@ -559,7 +559,7 @@ removeCacheKey(TSHttpTxn txnp)
     TSCacheRemove(contp, cacheKey);
     result = true;
     TSError("[esi][%s] TSCacheRemoved", __FUNCTION__);
-  } while (0);
+  } while (false);
 
   if (cacheKey != nullptr) {
     TSCacheKeyDestroy(cacheKey);
@@ -1325,7 +1325,7 @@ isTxnTransformable(TSHttpTxn txnp, bool is_cache_txn, bool *intercept_header, bo
     }
 
     retval = true;
-  } while (0);
+  } while (false);
 
   TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
   return retval;
diff --git a/plugins/experimental/buffer_upload/buffer_upload.cc b/plugins/experimental/buffer_upload/buffer_upload.cc
index 60877cb..2630823 100644
--- a/plugins/experimental/buffer_upload/buffer_upload.cc
+++ b/plugins/experimental/buffer_upload/buffer_upload.cc
@@ -322,7 +322,7 @@ pvc_process_p_read(TSCont contp, TSEvent event, pvc_state *my_state)
         TSMutexLock(my_state->disk_io_mutex);
         if (write_buffer_to_disk(my_state->req_hdr_reader, my_state, contp) == TS_ERROR) {
           LOG_ERROR("write_buffer_to_disk");
-          uconfig->use_disk_buffer = 0;
+          uconfig->use_disk_buffer = false;
           close(my_state->fd);
           my_state->fd = -1;
         }
@@ -906,7 +906,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
       unlink(path);
       if (my_state->fd < 0) {
         LOG_ERROR("open");
-        uconfig->use_disk_buffer = 0;
+        uconfig->use_disk_buffer = false;
         my_state->fd             = -1;
       } else {
         TSDebug(DEBUG_TAG, "temp filename: %s", path);
@@ -1228,7 +1228,7 @@ TSPluginInit(int argc, const char *argv[])
 
   if (uconfig->use_disk_buffer && !create_directory()) {
     TSError("[buffer_upload] Directory creation failed.");
-    uconfig->use_disk_buffer = 0;
+    uconfig->use_disk_buffer = false;
   }
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
diff --git a/plugins/experimental/mysql_remap/mysql_remap.cc b/plugins/experimental/mysql_remap/mysql_remap.cc
index a023023..f7f6527 100644
--- a/plugins/experimental/mysql_remap/mysql_remap.cc
+++ b/plugins/experimental/mysql_remap/mysql_remap.cc
@@ -118,7 +118,7 @@ do_mysql_remap(TSCont contp, TSHttpTxn txnp)
     TSUrlHostSet(reqp, url_loc, row[1], -1);
     TSUrlSchemeSet(reqp, url_loc, row[0], -1);
     TSUrlPortSet(reqp, url_loc, atoi(row[2]));
-  } while (0);
+  } while (false);
 
   ret_val = true;
 
diff --git a/proxy/FetchSM.cc b/proxy/FetchSM.cc
index d4e06ce..627f26d 100644
--- a/proxy/FetchSM.cc
+++ b/proxy/FetchSM.cc
@@ -468,8 +468,8 @@ FetchSM::process_fetch_read(int event)
     }
 
     if (header_done == 0 && ((fetch_flags & TS_FETCH_FLAGS_STREAM) || callback_options == AFTER_HEADER)) {
-      if (client_response_hdr.parse_resp(&http_parser, resp_reader, &bytes_used, 0) == PARSE_RESULT_DONE) {
-        header_done = 1;
+      if (client_response_hdr.parse_resp(&http_parser, resp_reader, &bytes_used, false) == PARSE_RESULT_DONE) {
+        header_done = true;
         if (fetch_flags & TS_FETCH_FLAGS_STREAM) {
           return InvokePluginExt();
         } else {
diff --git a/proxy/ICP.cc b/proxy/ICP.cc
index 1a1b04f..abc166d 100644
--- a/proxy/ICP.cc
+++ b/proxy/ICP.cc
@@ -519,7 +519,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData *s, Event *e)
     return EVENT_CONT; // try again later
   }
 
-  while (1) { // loop forever
+  while (true) { // loop forever
 
     switch (s->_next_state) {
     case READ_ACTIVE: {
@@ -1128,7 +1128,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
   ICPConfiguration *ICPcf = _ICPpr->GetConfig();
   ip_port_text_buffer ipb;
 
-  while (1) { // loop forever
+  while (true) { // loop forever
 
     switch (_next_state) {
     case ICP_START: {
@@ -2182,7 +2182,7 @@ ICPProcessor::ReconfigureStateMachine(ReconfigState_t s, int gconfig_changed, in
   ink_assert(_ICPConfig->HaveLock());
   int reconfig_status;
 
-  while (1) {
+  while (true) {
     switch (s) {
     case RC_RECONFIG: {
       if (!Lock()) {
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 5374058..2dee4fe 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -3053,7 +3053,7 @@ TSMimeHdrFieldNext(TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
     return TS_NULL_MLOC;
   }
 
-  while (1) {
+  while (true) {
     ++slotnum;
     MIMEField *f = mime_hdr_field_get_slotnum(handle->mh, slotnum);
 
@@ -3172,7 +3172,7 @@ TSMimeHdrFieldValuesClear(TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
    * An empty string is also considered to be a token. The correct value of
    * the field after this function should be NULL.
    */
-  mime_field_value_set(heap, handle->mh, handle->field_ptr, nullptr, 0, 1);
+  mime_field_value_set(heap, handle->mh, handle->field_ptr, nullptr, 0, true);
   return TS_SUCCESS;
 }
 
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index d393ab3..ca803ee 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -5910,7 +5910,7 @@ ssn_handler(TSCont contp, TSEvent event, void *edata)
     SDK_RPRINT(data->test, "TSHttpTxnHookAdd", "TestCase2", TC_PASS, "ok");
     data->test_passed_txn_hook_add++;
     txnp = (TSHttpTxn)edata;
-    if (1) {
+    if (true) {
       char *temp = TSstrdup(ERROR_BODY);
       TSHttpTxnErrorBodySet(txnp, temp, strlen(temp), nullptr);
     }
diff --git a/proxy/Plugin.cc b/proxy/Plugin.cc
index abbc77f..1ca60c7 100644
--- a/proxy/Plugin.cc
+++ b/proxy/Plugin.cc
@@ -255,7 +255,7 @@ plugin_init(bool validateOnly)
     }
 
     // not comment or blank, so rip line into tokens
-    while (1) {
+    while (true) {
       if (argc >= MAX_PLUGIN_ARGS) {
         Warning("Exceeded max number of args (%d) for plugin: [%s]", MAX_PLUGIN_ARGS, argc > 0 ? argv[0] : "???");
         break;
diff --git a/proxy/SocksProxy.cc b/proxy/SocksProxy.cc
index d995367..b7bd1d7 100644
--- a/proxy/SocksProxy.cc
+++ b/proxy/SocksProxy.cc
@@ -279,7 +279,7 @@ SocksProxy::mainEvent(int event, void *data)
 
           buf->fill(n_bytes);
 
-          clientVC->do_io_write(this, n_bytes, reader, 0);
+          clientVC->do_io_write(this, n_bytes, reader, false);
 
           state = AUTH_DONE;
         } else {
@@ -439,7 +439,7 @@ SocksProxy::sendResp(bool granted)
   }
 
   buf->fill(n_bytes);
-  clientVC->do_io_write(this, n_bytes, reader, 0);
+  clientVC->do_io_write(this, n_bytes, reader, false);
 
   return n_bytes;
 }
diff --git a/proxy/hdrs/HdrHeap.cc b/proxy/hdrs/HdrHeap.cc
index 7a35625..f81a8be 100644
--- a/proxy/hdrs/HdrHeap.cc
+++ b/proxy/hdrs/HdrHeap.cc
@@ -204,7 +204,7 @@ HdrHeap::allocate_obj(int nbytes, int type)
 
   HdrHeap *h = this;
 
-  while (1) {
+  while (true) {
     if ((unsigned)nbytes <= (h->m_free_size)) {
       new_space = h->m_free_start;
       h->m_free_start += nbytes;
diff --git a/proxy/hdrs/HdrTest.cc b/proxy/hdrs/HdrTest.cc
index e69f37a..eaa98e7 100644
--- a/proxy/hdrs/HdrTest.cc
+++ b/proxy/hdrs/HdrTest.cc
@@ -516,7 +516,7 @@ HdrTest::test_mime()
 
   mime_parser_init(&parser);
 
-  bool must_copy_strs = 0;
+  bool must_copy_strs = false;
 
   hdr.create(nullptr);
   err = hdr.parse(&parser, &start, end, must_copy_strs, false);
@@ -580,7 +580,7 @@ HdrTest::test_mime()
     return (failures_to_status("test_mime", 1));
   }
 
-  hdr.value_append("Cache-Control", 13, "no-cache", 8, 1);
+  hdr.value_append("Cache-Control", 13, "no-cache", 8, true);
 
   MIMEField *cc_field;
   StrList slist;
@@ -735,7 +735,7 @@ HdrTest::test_http_aux(const char *request, const char *response)
   rsp_hdr.create(HTTP_TYPE_RESPONSE);
 
   printf("======== parsing\n\n");
-  while (1) {
+  while (true) {
     err = req_hdr.parse_req(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -776,7 +776,7 @@ HdrTest::test_http_aux(const char *request, const char *response)
   http_parser_clear(&parser);
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = rsp_hdr.parse_resp(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1086,7 +1086,7 @@ HdrTest::test_http_hdr_copy_over_aux(int testnum, const char *request, const cha
 
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = req_hdr.parse_req(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1108,7 +1108,7 @@ HdrTest::test_http_hdr_copy_over_aux(int testnum, const char *request, const cha
 
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = resp_hdr.parse_resp(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1209,7 +1209,7 @@ HdrTest::test_http_hdr_null_char(int testnum, const char *request, const char *
   cpy_buf[length / 2] = '\0';
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = hdr.parse_req(&parser, &cpy_buf_ptr, cpy_buf_ptr + length, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1251,7 +1251,7 @@ HdrTest::test_http_hdr_ctl_char(int testnum, const char *request, const char * /
 
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = hdr.parse_req(&parser, &cpy_buf_ptr, cpy_buf_ptr + strlen(start), true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1298,7 +1298,7 @@ HdrTest::test_http_hdr_print_and_copy_aux(int testnum, const char *request, cons
 
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = hdr.parse_req(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1372,7 +1372,7 @@ HdrTest::test_http_hdr_print_and_copy_aux(int testnum, const char *request, cons
 
   http_parser_init(&parser);
 
-  while (1) {
+  while (true) {
     err = hdr.parse_resp(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
@@ -1678,7 +1678,7 @@ HdrTest::test_http_mutation()
 
   resp_hdr.create(HTTP_TYPE_RESPONSE);
 
-  while (1) {
+  while (true) {
     err = resp_hdr.parse_resp(&parser, &start, end, true);
     if (err != PARSE_RESULT_CONT) {
       break;
diff --git a/proxy/hdrs/MIME.cc b/proxy/hdrs/MIME.cc
index 9a424b4..418c34a 100644
--- a/proxy/hdrs/MIME.cc
+++ b/proxy/hdrs/MIME.cc
@@ -1029,7 +1029,7 @@ mime_hdr_cooked_stuff_init(MIMEHdrImpl *mh, MIMEField *changing_field_or_null)
     mh->m_cooked_stuff.m_cache_control.m_secs_min_fresh = 0;
   }
   if ((changing_field_or_null == nullptr) || (changing_field_or_null->m_wks_idx != MIME_WKSIDX_CACHE_CONTROL)) {
-    mh->m_cooked_stuff.m_pragma.m_no_cache = 0;
+    mh->m_cooked_stuff.m_pragma.m_no_cache = false;
   }
 }
 
@@ -1449,7 +1449,7 @@ mime_field_create_named(HdrHeap *heap, MIMEHdrImpl *mh, const char *name, int le
 {
   MIMEField *field       = mime_field_create(heap, mh);
   int field_name_wks_idx = hdrtoken_tokenize(name, length);
-  mime_field_name_set(heap, mh, field, field_name_wks_idx, name, length, 1);
+  mime_field_name_set(heap, mh, field, field_name_wks_idx, name, length, true);
   return field;
 }
 
@@ -1637,7 +1637,7 @@ mime_hdr_field_delete(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, bool del
       heap->free_string(field->m_ptr_value, field->m_len_value);
 
       MIME_HDR_SANITY_CHECK(mh);
-      mime_hdr_field_detach(mh, field, 0);
+      mime_hdr_field_detach(mh, field, false);
 
       MIME_HDR_SANITY_CHECK(mh);
       mime_field_destroy(mh, field);
@@ -1650,7 +1650,7 @@ mime_hdr_field_delete(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, bool del
     heap->free_string(field->m_ptr_value, field->m_len_value);
 
     MIME_HDR_SANITY_CHECK(mh);
-    mime_hdr_field_detach(mh, field, 0);
+    mime_hdr_field_detach(mh, field, false);
 
     MIME_HDR_SANITY_CHECK(mh);
     mime_field_destroy(mh, field);
@@ -1699,7 +1699,7 @@ mime_hdr_prepare_for_value_set(HdrHeap *heap, MIMEHdrImpl *mh, const char *name,
   {
     wks_idx = hdrtoken_tokenize(name, name_length);
     field   = mime_field_create(heap, mh);
-    mime_field_name_set(heap, mh, field, wks_idx, name, name_length, 1);
+    mime_field_name_set(heap, mh, field, wks_idx, name, name_length, true);
     mime_hdr_field_attach(mh, field, 0, nullptr);
 
   } else if (field->m_next_dup) // list of more than 1 field
@@ -1707,7 +1707,7 @@ mime_hdr_prepare_for_value_set(HdrHeap *heap, MIMEHdrImpl *mh, const char *name,
     wks_idx = field->m_wks_idx;
     mime_hdr_field_delete(heap, mh, field, true);
     field = mime_field_create(heap, mh);
-    mime_field_name_set(heap, mh, field, wks_idx, name, name_length, 1);
+    mime_field_name_set(heap, mh, field, wks_idx, name, name_length, true);
     mime_hdr_field_attach(mh, field, 0, nullptr);
   }
   return field;
@@ -2136,7 +2136,7 @@ mime_field_value_set_int(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, int32
 {
   char buf[16];
   int len = mime_format_int(buf, value, sizeof(buf));
-  mime_field_value_set(heap, mh, field, buf, len, 1);
+  mime_field_value_set(heap, mh, field, buf, len, true);
 }
 
 void
@@ -2144,7 +2144,7 @@ mime_field_value_set_uint(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, uint
 {
   char buf[16];
   int len = mime_format_uint(buf, value, sizeof(buf));
-  mime_field_value_set(heap, mh, field, buf, len, 1);
+  mime_field_value_set(heap, mh, field, buf, len, true);
 }
 
 void
@@ -2152,7 +2152,7 @@ mime_field_value_set_int64(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, int
 {
   char buf[20];
   int len = mime_format_int64(buf, value, sizeof(buf));
-  mime_field_value_set(heap, mh, field, buf, len, 1);
+  mime_field_value_set(heap, mh, field, buf, len, true);
 }
 
 void
@@ -2160,7 +2160,7 @@ mime_field_value_set_date(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, time
 {
   char buf[33];
   int len = mime_format_date(buf, value);
-  mime_field_value_set(heap, mh, field, buf, len, 1);
+  mime_field_value_set(heap, mh, field, buf, len, true);
 }
 
 void
@@ -2173,8 +2173,8 @@ mime_field_name_value_set(HdrHeap *heap, MIMEHdrImpl *mh, MIMEField *field, int1
   ink_assert(field->m_readiness == MIME_FIELD_SLOT_READINESS_DETACHED);
 
   if (must_copy_strings) {
-    mime_field_name_set(heap, mh, field, name_wks_idx_or_neg1, name, name_length, 1);
-    mime_field_value_set(heap, mh, field, value, value_length, 1);
+    mime_field_name_set(heap, mh, field, name_wks_idx_or_neg1, name, name_length, true);
+    mime_field_value_set(heap, mh, field, value, value_length, true);
   } else {
     field->m_wks_idx   = name_wks_idx_or_neg1;
     field->m_ptr_name  = name;
@@ -2558,7 +2558,7 @@ mime_parser_parse(MIMEParser *parser, HdrHeap *heap, MIMEHdrImpl *mh, const char
 
   MIMEScanner *scanner = &parser->m_scanner;
 
-  while (1) {
+  while (true) {
     ////////////////////////////////////////////////////////////////////////////
     // get a name:value line, with all continuation lines glued into one line //
     ////////////////////////////////////////////////////////////////////////////
@@ -2657,7 +2657,7 @@ mime_parser_parse(MIMEParser *parser, HdrHeap *heap, MIMEHdrImpl *mh, const char
 
     MIMEField *field = mime_field_create(heap, mh);
     mime_field_name_value_set(heap, mh, field, field_name_wks_idx, field_name_first, field_name_length, field_value_first,
-                              field_value_length, true, total_line_length, 0);
+                              field_value_length, true, total_line_length, false);
     mime_hdr_field_attach(mh, field, 1, nullptr);
   }
 }
@@ -3890,7 +3890,7 @@ MIMEHdrImpl::recompute_cooked_stuff(MIMEField *changing_field_or_null)
       if (!field->has_dups()) { // try fastpath first
         s = field->value_get(&len);
         if (ptr_len_casecmp(s, len, "no-cache", 8) == 0) {
-          m_cooked_stuff.m_pragma.m_no_cache = 1;
+          m_cooked_stuff.m_pragma.m_no_cache = true;
           return;
         }
       }
@@ -3907,7 +3907,7 @@ MIMEHdrImpl::recompute_cooked_stuff(MIMEField *changing_field_or_null)
 
           if (hdrtoken_tokenize(s, tlen, &token_wks) >= 0) {
             if (token_wks == MIME_VALUE_NO_CACHE) {
-              m_cooked_stuff.m_pragma.m_no_cache = 1;
+              m_cooked_stuff.m_pragma.m_no_cache = true;
             }
           }
         }
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index ed0bb8f..bbc4835 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -810,7 +810,7 @@ HttpBodySet::init(char *set, char *dir)
 
   lineno = 0;
 
-  while (1) {
+  while (true) {
     char *name_s, *name_e, *value_s, *value_e, *hash;
 
     ++lineno;
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 6732512..8b60753 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1476,7 +1476,7 @@ HttpConfig::parse_ports_list(char *ports_string)
 
     start = ports_string;
 
-    while (1) { // eat whitespace
+    while (true) { // eat whitespace
       while ((start[0] != '\0') && ParseRules::is_space(start[0])) {
         start++;
       }
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 16cb0af..5ae8dbd 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -717,7 +717,7 @@ HttpTransact::StartRemapRequest(State *s)
 
   if (is_debug_tag_set("http_chdr_describe") || is_debug_tag_set("http_trans")) {
     DebugTxn("http_trans", "Before Remapping:");
-    obj_describe(s->hdr_info.client_request.m_http, 1);
+    obj_describe(s->hdr_info.client_request.m_http, true);
   }
 
   if (url_remap_mode == URL_REMAP_DEFAULT || url_remap_mode == URL_REMAP_ALL) {
@@ -867,7 +867,7 @@ done:
 
   if (is_debug_tag_set("http_chdr_describe") || is_debug_tag_set("http_trans") || is_debug_tag_set("url_rewrite")) {
     DebugTxn("http_trans", "After Remapping:");
-    obj_describe(s->hdr_info.client_request.m_http, 1);
+    obj_describe(s->hdr_info.client_request.m_http, true);
   }
 
   /*
@@ -1210,7 +1210,7 @@ HttpTransact::HandleRequest(State *s)
   DebugTxn("http_seq", "[HttpTransact::HandleRequest] request valid.");
 
   if (is_debug_tag_set("http_chdr_describe")) {
-    obj_describe(s->hdr_info.client_request.m_http, 1);
+    obj_describe(s->hdr_info.client_request.m_http, true);
   }
 
   // at this point we are guaranteed that the request is good and acceptable.
@@ -1347,7 +1347,7 @@ HttpTransact::HandleRequest(State *s)
   if (s->dns_info.lookup_name[0] <= '9' && s->dns_info.lookup_name[0] >= '0' &&
       (!s->state_machine->enable_redirection || !s->redirect_info.redirect_in_process) &&
       s->parent_params->parent_table->hostMatch) {
-    s->force_dns = 1;
+    s->force_dns = true;
   }
   /* A redirect means we need to check some things again.
      If the cache is enabled then we need to check the new (redirected) request against the cache.
@@ -7971,7 +7971,7 @@ HttpTransact::build_response(State *s, HTTPHdr *base_response, HTTPHdr *outgoing
               field = base_response->field_find(fields[i].name, fields[i].len);
               ink_assert(field != nullptr);
               value = field->value_get(&len);
-              outgoing_response->value_append(fields[i].name, fields[i].len, value, len, 0);
+              outgoing_response->value_append(fields[i].name, fields[i].len, value, len, false);
             }
           }
         }
diff --git a/proxy/http/HttpUpdateSM.cc b/proxy/http/HttpUpdateSM.cc
index 16e3463..91d6074 100644
--- a/proxy/http/HttpUpdateSM.cc
+++ b/proxy/http/HttpUpdateSM.cc
@@ -74,7 +74,7 @@ HttpUpdateSM::start_scheduled_update(Continuation *cont, HTTPHdr *request)
   // Fix ME: What should these be set to since there is not a
   //   real client
   ats_ip4_set(&t_state.client_info.src_addr, htonl(INADDR_LOOPBACK), 0);
-  t_state.backdoor_request           = 0;
+  t_state.backdoor_request           = false;
   t_state.client_info.port_attribute = HttpProxyPort::TRANSPORT_DEFAULT;
 
   t_state.req_flavor = HttpTransact::REQ_FLAVOR_SCHEDULED_UPDATE;
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index 833e80c..32689e5 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -463,7 +463,7 @@ http2_convert_header_from_2_to_1_1(HTTPHdr *headers)
     memcpy(url + scheme_len, "://", 3);
     memcpy(url + scheme_len + 3, authority, authority_len);
     memcpy(url + scheme_len + 3 + authority_len, path, path_len);
-    url_parse(headers->m_heap, headers->m_http->u.req.m_url_impl, &url_start, url + url_length, 1);
+    url_parse(headers->m_heap, headers->m_http->u.req.m_url_impl, &url_start, url + url_length, true);
     arena.str_free(url);
 
     // Get value of :method
@@ -471,7 +471,7 @@ http2_convert_header_from_2_to_1_1(HTTPHdr *headers)
       method = field->value_get(&method_len);
 
       int method_wks_idx = hdrtoken_tokenize(method, method_len);
-      http_hdr_method_set(headers->m_heap, headers->m_http, method, method_wks_idx, method_len, 0);
+      http_hdr_method_set(headers->m_heap, headers->m_http, method, method_wks_idx, method_len, false);
     } else {
       return PARSE_RESULT_ERROR;
     }
diff --git a/proxy/shared/DiagsConfig.cc b/proxy/shared/DiagsConfig.cc
index b5d8d4d..bbf3f63 100644
--- a/proxy/shared/DiagsConfig.cc
+++ b/proxy/shared/DiagsConfig.cc
@@ -73,13 +73,13 @@ DiagsConfig::reconfigure_diags()
 
   e = (int)REC_readInteger("proxy.config.diags.debug.enabled", &found);
   if (e && found) {
-    c.enabled[DiagsTagType_Debug] = 1; // implement OR logic
+    c.enabled[DiagsTagType_Debug] = true; // implement OR logic
   }
   all_found = all_found && found;
 
   e = (int)REC_readInteger("proxy.config.diags.action.enabled", &found);
   if (e && found) {
-    c.enabled[DiagsTagType_Action] = 1; // implement OR logic
+    c.enabled[DiagsTagType_Action] = true; // implement OR logic
   }
   all_found = all_found && found;
 
@@ -224,16 +224,16 @@ DiagsConfig::config_diags_norecords()
 
   if (diags->base_debug_tags) {
     diags->activate_taglist(diags->base_debug_tags, DiagsTagType_Debug);
-    c.enabled[DiagsTagType_Debug] = 1;
+    c.enabled[DiagsTagType_Debug] = true;
   } else {
-    c.enabled[DiagsTagType_Debug] = 0;
+    c.enabled[DiagsTagType_Debug] = false;
   }
 
   if (diags->base_action_tags) {
     diags->activate_taglist(diags->base_action_tags, DiagsTagType_Action);
-    c.enabled[DiagsTagType_Action] = 1;
+    c.enabled[DiagsTagType_Action] = true;
   } else {
-    c.enabled[DiagsTagType_Action] = 0;
+    c.enabled[DiagsTagType_Action] = false;
   }
 
 #if !defined(__GNUC__)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message