Skip to content

Commit e508ea6

Browse files
committed
Use ZEND_LONG_EXCEEDS_INT over manual bound checking
1 parent 5b86f5d commit e508ea6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ext/bcmath/bcmath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static zend_always_inline zend_result bcmath_check_scale(zend_long scale, uint32
157157

158158
static zend_result bcmath_check_precision(zend_long precision, uint32_t arg_num)
159159
{
160-
if (UNEXPECTED(precision < INT_MIN || precision > INT_MAX)) {
160+
if (ZEND_LONG_EXCEEDS_INT(precision)) {
161161
zend_argument_value_error(arg_num, "must be between %d and %d", INT_MIN, INT_MAX);
162162
return FAILURE;
163163
}

0 commit comments

Comments
 (0)