diff options
| author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-10-21 22:08:38 +0000 | 
|---|---|---|
| committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-10-21 22:08:38 +0000 | 
| commit | d69dfa4b9f58e2148f986e0ef5dba91f00c2f639 (patch) | |
| tree | c86c9f2955005a0c78c9ea5f0e181a0ddf8980a6 /ext/standard/array.c | |
| parent | 261f0c32a59ba9ecc59f36536ea27bdfdead0939 (diff) | |
| download | php-git-d69dfa4b9f58e2148f986e0ef5dba91f00c2f639.tar.gz | |
MFH: initialize optional vars
Diffstat (limited to 'ext/standard/array.c')
| -rw-r--r-- | ext/standard/array.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index e4d72a8acf..90f59e65d4 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1981,14 +1981,14 @@ PHP_FUNCTION(array_unshift)  PHP_FUNCTION(array_splice)  {  	zval *array,				/* Input array */ -		 *repl_array,			/* Replacement array */ +		 *repl_array = NULL,	/* Replacement array */  		 ***repl = NULL;		/* Replacement elements */  	HashTable *new_hash = NULL,	/* Output array's hash */  	         **rem_hash = NULL;	/* Removed elements' hash */  	Bucket *p;					/* Bucket used for traversing hash */  	long	i,  			offset, -			length, +			length = 0,  			repl_num = 0;		/* Number of replacement elements */  	int		num_in;				/* Number of elements in the input array */ @@ -2061,7 +2061,7 @@ PHP_FUNCTION(array_splice)  PHP_FUNCTION(array_slice)  {  	zval	 *input,		/* Input array */ -			**z_length,		/* How many elements to get */  +			**z_length = NULL, /* How many elements to get */   			**entry;		/* An array entry */  	long	 offset,		/* Offset to get elements from */  			 length = 0;	 @@ -4004,7 +4004,7 @@ PHP_FUNCTION(array_reduce)  	zval *retval;  	zend_fcall_info fci;  	zend_fcall_info_cache fci_cache = empty_fcall_info_cache; -	zval *initial; +	zval *initial = NULL;  	HashPosition pos;  	HashTable *htbl; @@ -4073,7 +4073,7 @@ PHP_FUNCTION(array_filter)  	zval *retval = NULL;  	zend_bool have_callback = 0;  	char *string_key; -	zend_fcall_info fci; +	zend_fcall_info fci = empty_fcall_info;  	zend_fcall_info_cache fci_cache = empty_fcall_info_cache;  	uint string_key_len;  	ulong num_key;  | 
