diff options
Diffstat (limited to 'chromium/base/numerics/safe_math_impl.h')
-rw-r--r-- | chromium/base/numerics/safe_math_impl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chromium/base/numerics/safe_math_impl.h b/chromium/base/numerics/safe_math_impl.h index 663f393665d..08f2e88345f 100644 --- a/chromium/base/numerics/safe_math_impl.h +++ b/chromium/base/numerics/safe_math_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SAFE_MATH_IMPL_H_ -#define SAFE_MATH_IMPL_H_ +#ifndef BASE_NUMERICS_SAFE_MATH_IMPL_H_ +#define BASE_NUMERICS_SAFE_MATH_IMPL_H_ #include <stdint.h> @@ -176,8 +176,8 @@ typename enable_if<std::numeric_limits<T>::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) { @@ -498,4 +498,4 @@ struct IsIntegerArithmeticSafe { } // namespace internal } // namespace base -#endif // SAFE_MATH_IMPL_H_ +#endif // BASE_NUMERICS_SAFE_MATH_IMPL_H_ |