summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2017-11-27 13:15:15 +0100
committerjvoisin2017-11-27 13:15:15 +0100
commitda60d1f06ba1b22894b570b121f94d34da6d571f (patch)
treedbf1e3fad631ff481cf760e910282ea1fa9163b2
parent73c30e3b45f9260bd2b94f6b37bcec8d0fe7d856 (diff)
Initialize some possibly uninitialized variables
Thanks to coverity
-rw-r--r--src/sp_harden_rand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp_harden_rand.c b/src/sp_harden_rand.c
index 812686e..4b6fa18 100644
--- a/src/sp_harden_rand.c
+++ b/src/sp_harden_rand.c
@@ -7,7 +7,9 @@ ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)
7/* This function is needed because `rand` and `mt_rand` parameters 7/* This function is needed because `rand` and `mt_rand` parameters
8 * are optional, while the ones from `random_int` aren't. */ 8 * are optional, while the ones from `random_int` aren't. */
9static void random_int_wrapper(INTERNAL_FUNCTION_PARAMETERS) { 9static void random_int_wrapper(INTERNAL_FUNCTION_PARAMETERS) {
10 zend_long min, max, result; 10 zend_long min = 0;
11 zend_long max = PHP_MT_RAND_MAX;
12 zend_long result;
11 13
12 switch (EX_NUM_ARGS()) { 14 switch (EX_NUM_ARGS()) {
13 case 0: 15 case 0: