Address nits missed from original review

BUG=chromium:761005

Change-Id: I538e49f1eeb32891b33677d8587d2bed110b1fc1
Reviewed-on: https://pdfium-review.googlesource.com/13692
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
index b421e8f..21d971b 100644
--- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -510,8 +510,9 @@
     return false;
 
   if (pitch<static_cast<int>(m_Image->comps[0].w * 8 * m_Image->numcomps + 31)>>
-      5 << 2)
+      5 << 2) {
     return false;
+  }
 
   if (!m_Parameters.nb_tile_to_decode) {
     if (!opj_set_decode_area(m_Codec, m_Image, m_Parameters.DA_x0,
@@ -527,11 +528,9 @@
       m_Image = nullptr;
       return false;
     }
-  } else {
-    if (!opj_get_decoded_tile(m_Codec, m_Stream, m_Image,
-                              m_Parameters.tile_index)) {
-      return false;
-    }
+  } else if (!opj_get_decoded_tile(m_Codec, m_Stream, m_Image,
+                                   m_Parameters.tile_index)) {
+    return false;
   }
 
   opj_stream_destroy(m_Stream);
@@ -609,11 +608,7 @@
           } else {
             int tmpPixel = (src >> adjust_comps[channel]) +
                            ((src >> (adjust_comps[channel] - 1)) % 2);
-            if (tmpPixel > 255) {
-              tmpPixel = 255;
-            } else if (tmpPixel < 0) {
-              tmpPixel = 0;
-            }
+            tmpPixel = pdfium::clamp(tmpPixel, 0, 255);
             *pPixel = static_cast<uint8_t>(tmpPixel);
           }
         }