summaryrefslogtreecommitdiff
path: root/ext/standard/rand.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2016-12-30 13:21:11 -0800
committerSara Golemon <pollita@php.net>2016-12-30 13:36:51 -0800
commitb71b12843c08dafea897f105d791741f2c098827 (patch)
tree884faece3796fed177ff06460d4ccfab73e3d4d4 /ext/standard/rand.c
parent625304fa7666ce0e3445c5f92ecb689a48ed9d8e (diff)
downloadphp-git-b71b12843c08dafea897f105d791741f2c098827.tar.gz
Use new param API in standard
Diffstat (limited to 'ext/standard/rand.c')
-rw-r--r--ext/standard/rand.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index e97e0b46f0..9e83111f58 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -57,9 +57,10 @@ PHP_FUNCTION(rand)
RETURN_LONG(php_mt_rand() >> 1);
}
- if (zend_parse_parameters(argc, "ll", &min, &max) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_LONG(min)
+ Z_PARAM_LONG(max)
+ ZEND_PARSE_PARAMETERS_END();
if (max < min) {
RETURN_LONG(php_mt_rand_common(max, min));