Skip to content

Commit 5d177c1

Browse files
committed
ext/random: Remove useless variable
1 parent 5c9fedc commit 5d177c1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ext/random/random.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,8 @@ PHP_FUNCTION(mt_srand)
524524
PHP_FUNCTION(mt_rand)
525525
{
526526
zend_long min, max;
527-
int argc = ZEND_NUM_ARGS();
528527

529-
if (argc == 0) {
528+
if (ZEND_NUM_ARGS() == 0) {
530529
/* genrand_int31 in mt19937ar.c performs a right shift */
531530
RETURN_LONG(php_mt_rand() >> 1);
532531
}
@@ -562,9 +561,8 @@ PHP_FUNCTION(mt_getrandmax)
562561
PHP_FUNCTION(rand)
563562
{
564563
zend_long min, max;
565-
int argc = ZEND_NUM_ARGS();
566564

567-
if (argc == 0) {
565+
if (ZEND_NUM_ARGS() == 0) {
568566
/* genrand_int31 in mt19937ar.c performs a right shift */
569567
RETURN_LONG(php_mt_rand() >> 1);
570568
}

0 commit comments

Comments
 (0)