Skip to content

Commit b43bfd8

Browse files
committed
ext/random: Remove useless variable
1 parent e332817 commit b43bfd8

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
@@ -525,9 +525,8 @@ PHP_FUNCTION(mt_srand)
525525
PHP_FUNCTION(mt_rand)
526526
{
527527
zend_long min, max;
528-
int argc = ZEND_NUM_ARGS();
529528

530-
if (argc == 0) {
529+
if (ZEND_NUM_ARGS() == 0) {
531530
/* genrand_int31 in mt19937ar.c performs a right shift */
532531
RETURN_LONG(php_mt_rand() >> 1);
533532
}
@@ -563,9 +562,8 @@ PHP_FUNCTION(mt_getrandmax)
563562
PHP_FUNCTION(rand)
564563
{
565564
zend_long min, max;
566-
int argc = ZEND_NUM_ARGS();
567565

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

0 commit comments

Comments
 (0)