From a209aad99392b9a4201870f93ce71abb0d121152 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 10 Jan 2011 08:28:47 +0000 Subject: [PATCH] - remove local redeclaration --- main/php_ini.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main/php_ini.c b/main/php_ini.c index e3c5a69d46..e2c72d6c5f 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -650,14 +650,14 @@ int php_init_config(TSRMLS_D) struct stat sb; char ini_file[MAXPATHLEN]; char *p; - zend_file_handle fh; + zend_file_handle fh2; zend_llist scanned_ini_list; zend_llist_element *element; int l, total_l = 0; if ((ndir = php_scandir(php_ini_scanned_path, &namelist, 0, php_alphasort)) > 0) { zend_llist_init(&scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1); - memset(&fh, 0, sizeof(fh)); + memset(&fh2, 0, sizeof(fh2)); for (i = 0; i < ndir; i++) { @@ -676,11 +676,11 @@ int php_init_config(TSRMLS_D) } if (VCWD_STAT(ini_file, &sb) == 0) { if (S_ISREG(sb.st_mode)) { - if ((fh.handle.fp = VCWD_FOPEN(ini_file, "r"))) { - fh.filename = ini_file; - fh.type = ZEND_HANDLE_FP; + if ((fh2.handle.fp = VCWD_FOPEN(ini_file, "r"))) { + fh2.filename = ini_file; + fh2.type = ZEND_HANDLE_FP; - if (zend_parse_ini_file(&fh, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) { + if (zend_parse_ini_file(&fh2, 1, ZEND_INI_SCANNER_NORMAL, (zend_ini_parser_cb_t) php_ini_parser_cb, &configuration_hash TSRMLS_CC) == SUCCESS) { /* Here, add it to the list of ini files read */ l = strlen(ini_file); total_l += l + 2; @@ -819,7 +819,7 @@ PHPAPI int php_ini_has_per_dir_config(void) */ PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC) { - zval *tmp; + zval *tmp2; char *ptr; #if PHP_WIN32 @@ -836,8 +836,8 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC) while ((ptr = strchr(ptr, '/')) != NULL) { *ptr = 0; /* Search for source array matching the path from configuration_hash */ - if (zend_hash_find(&configuration_hash, path, strlen(path) + 1, (void **) &tmp) == SUCCESS) { - php_ini_activate_config(Z_ARRVAL_P(tmp), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); + if (zend_hash_find(&configuration_hash, path, strlen(path) + 1, (void **) &tmp2) == SUCCESS) { + php_ini_activate_config(Z_ARRVAL_P(tmp2), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); } *ptr = '/'; ptr++; -- 2.40.0