Skip to content

Commit de3e83b

Browse files
committed
Set the initial value of zend_long
1 parent ade0929 commit de3e83b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/bcmath/bcmath.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,11 +1165,11 @@ static zend_result bcmath_number_do_operation(uint8_t opcode, zval *ret_val, zva
11651165

11661166
zend_object *obj1 = NULL;
11671167
zend_string *str1 = NULL;
1168-
zend_long lval1;
1168+
zend_long lval1 = 0;
11691169

11701170
zend_object *obj2 = NULL;
11711171
zend_string *str2 = NULL;
1172-
zend_long lval2;
1172+
zend_long lval2 = 0;
11731173

11741174
if (UNEXPECTED(bcmath_number_parse_num(op1, &obj1, &str1, &lval1) == FAILURE || bcmath_number_parse_num(op2, &obj2, &str2, &lval2) == FAILURE)) {
11751175
return FAILURE;
@@ -1248,11 +1248,11 @@ static int bcmath_number_compare(zval *op1, zval *op2)
12481248
{
12491249
zend_object *obj1 = NULL;
12501250
zend_string *str1 = NULL;
1251-
zend_long lval1;
1251+
zend_long lval1 = 0;
12521252

12531253
zend_object *obj2 = NULL;
12541254
zend_string *str2 = NULL;
1255-
zend_long lval2;
1255+
zend_long lval2 = 0;
12561256

12571257
bc_num n1 = NULL;
12581258
bc_num n2 = NULL;
@@ -1543,7 +1543,7 @@ PHP_METHOD(BcMath_Number, powmod)
15431543

15441544
PHP_METHOD(BcMath_Number, sqrt)
15451545
{
1546-
zend_long scale_lval;
1546+
zend_long scale_lval = 0;
15471547
bool scale_is_null = true;
15481548

15491549
ZEND_PARSE_PARAMETERS_START(0, 1)

0 commit comments

Comments
 (0)