Use a bool in FindBit() in the fax codec.

Change-Id: If75c0db94d341715e0bc6406f0fd89812f1ea73c
Reviewed-on: https://pdfium-review.googlesource.com/31311
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
index c800fda..20280a3 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -48,7 +48,7 @@
 // Limit of image dimension, an arbitrary large number.
 const int kMaxImageDimension = 0x01FFFF;
 
-int FindBit(const uint8_t* data_buf, int max_pos, int start_pos, int bit) {
+int FindBit(const uint8_t* data_buf, int max_pos, int start_pos, bool bit) {
   ASSERT(start_pos >= 0);
   if (start_pos >= max_pos)
     return max_pos;
@@ -87,8 +87,7 @@
                    bool a0color,
                    int* b1,
                    int* b2) {
-  uint8_t first_bit =
-      (a0 < 0) ? 1 : ((ref_buf[a0 / 8] & (1 << (7 - a0 % 8))) != 0);
+  bool first_bit = a0 < 0 || (ref_buf[a0 / 8] & (1 << (7 - a0 % 8))) != 0;
   *b1 = FindBit(ref_buf.data(), columns, a0 + 1, !first_bit);
   if (*b1 >= columns) {
     *b1 = *b2 = columns;