ART: Refactor for bool literals

Apply modernize-use-bool-literals.

Bug: 32619234
Test: mmma art
Change-Id: Ib9b36ca360af0f68ce89517a24b5d9fb49f23e58
diff --git a/build/Android.bp b/build/Android.bp
index 8557798..0ac6514 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -21,6 +21,7 @@
     "bugprone-lambda-function-name",
     "bugprone-unused-raii",  // Protect scoped things like MutexLock.
     "bugprone-virtual-near-miss",
+    "modernize-use-bool-literals",
     "modernize-use-nullptr",
     "performance-faster-string-find",
     "performance-for-range-copy",
@@ -33,6 +34,7 @@
 art_clang_tidy_errors_str = "bugprone-lambda-function-name"
         + ",bugprone-unused-raii"
         + ",bugprone-virtual-near-miss"
+        + ",modernize-use-bool-literals"
         + ",modernize-use-nullptr"
         + ",performance-faster-string-find"
         + ",performance-for-range-copy"
diff --git a/dex2oat/linker/oat_writer.cc b/dex2oat/linker/oat_writer.cc
index e2db11f..e89de84 100644
--- a/dex2oat/linker/oat_writer.cc
+++ b/dex2oat/linker/oat_writer.cc
@@ -2405,7 +2405,7 @@
   if (static_cast<uint32_t>(new_offset) != expected_file_offset) {
     PLOG(ERROR) << "Failed to seek to oat code section. Actual: " << new_offset
                 << " Expected: " << expected_file_offset << " File: " << out->GetLocation();
-    return 0;
+    return false;
   }
   DCHECK_OFFSET();
 
diff --git a/dexlayout/dexlayout_main.cc b/dexlayout/dexlayout_main.cc
index 9f73347..e3c2d29 100644
--- a/dexlayout/dexlayout_main.cc
+++ b/dexlayout/dexlayout_main.cc
@@ -85,7 +85,7 @@
   bool want_usage = false;
 
   // Parse all arguments.
-  while (1) {
+  while (true) {
     const int ic = getopt(argc, argv, "abcdefghil:o:p:stuvw:x:");
     if (ic < 0) {
       break;  // done
diff --git a/runtime/jdwp/jdwp_adb.cc b/runtime/jdwp/jdwp_adb.cc
index e6043c6..9245f1e 100644
--- a/runtime/jdwp/jdwp_adb.cc
+++ b/runtime/jdwp/jdwp_adb.cc
@@ -346,7 +346,7 @@
   if (!HaveFullPacket()) {
     /* read some more, looping until we have data */
     errno = 0;
-    while (1) {
+    while (true) {
       int selCount;
       fd_set readfds;
       int maxfd = -1;
diff --git a/runtime/jdwp/jdwp_socket.cc b/runtime/jdwp/jdwp_socket.cc
index 29fa160..b8b0e16 100644
--- a/runtime/jdwp/jdwp_socket.cc
+++ b/runtime/jdwp/jdwp_socket.cc
@@ -383,7 +383,7 @@
   if (!HaveFullPacket()) {
     /* read some more, looping until we have data */
     errno = 0;
-    while (1) {
+    while (true) {
       int selCount;
       fd_set readfds;
       int maxfd = -1;