From 721780d0d08d35e666993fa37149a2f101b100ed Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 21 May 2015 15:17:40 -0700 Subject: Merge to XFA: Update copy of safe_math_impl.h to take a fix from upstream. Original Review URL: https://codereview.chromium.org/1126243007 BUG=488302 TBR=eroman@chromium.org Review URL: https://codereview.chromium.org/1153543003 --- third_party/base/numerics/safe_math_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/base/numerics/safe_math_impl.h b/third_party/base/numerics/safe_math_impl.h index f9a4a71570..14897202bd 100644 --- a/third_party/base/numerics/safe_math_impl.h +++ b/third_party/base/numerics/safe_math_impl.h @@ -178,8 +178,8 @@ typename enable_if::is_integer&& std::numeric_limits< T>::is_signed&&(sizeof(T) * 2 > sizeof(uintmax_t)), T>::type CheckedMul(T x, T y, RangeConstraint* validity) { - // if either side is zero then the result will be zero. - if (!(x || y)) { + // If either side is zero then the result will be zero. + if (!x || !y) { return RANGE_VALID; } else if (x > 0) { -- cgit v1.2.3