com php-src: avoid needless function call: ext/standard/array.c
| From: | Anatol Belski | Date: | Thu, 01 Sep 2016 21:45:31 +0000 |
| Subject: | com php-src: avoid needless function call: ext/standard/array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94235@lists.php.net to get a copy of this message | ||
Commit: 1d64b4c71e930426361c630eafc89c529d940165
Author: Anatol Belski <ab@php.net> Thu, 1 Sep 2016 23:13:42 +0200
Parents: a9890918801f867b0e7ab9996c51312581512c48
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1d64b4c71e930426361c630eafc89c529d940165
Log:
avoid needless function call
Changed paths:
M ext/standard/array.c
Diff:
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 0988a86..af9734d 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2398,7 +2398,6 @@ static void php_array_data_shuffle(zval *array) /* {{{ */
}
}
while (--n_left) {
- rnd_idx = php_rand();
RAND_RANGE(rnd_idx, 0, n_left, PHP_RAND_MAX);
if (rnd_idx != n_left) {
temp = hash->arData[n_left];
@@ -2424,7 +2423,6 @@ static void php_array_data_shuffle(zval *array) /* {{{ */
}
}
while (--n_left) {
- rnd_idx = php_rand();
RAND_RANGE(rnd_idx, 0, n_left, PHP_RAND_MAX);
if (rnd_idx != n_left) {
temp = hash->arData[n_left];