pajoye                                   Mon, 10 Jan 2011 08:28:47 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=307330

Log:
- remove local redeclaration

Changed paths:
    U   php/php-src/branches/PHP_5_3/main/php_ini.c
    U   php/php-src/trunk/main/php_ini.c

Modified: php/php-src/branches/PHP_5_3/main/php_ini.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/php_ini.c 2011-01-10 08:07:38 UTC (rev 
307329)
+++ php/php-src/branches/PHP_5_3/main/php_ini.c 2011-01-10 08:28:47 UTC (rev 
307330)
@@ -650,14 +650,14 @@
                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 @@
                                }
                                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 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 @@
                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++;

Modified: php/php-src/trunk/main/php_ini.c
===================================================================
--- php/php-src/trunk/main/php_ini.c    2011-01-10 08:07:38 UTC (rev 307329)
+++ php/php-src/trunk/main/php_ini.c    2011-01-10 08:28:47 UTC (rev 307330)
@@ -646,14 +646,14 @@
                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++) {

@@ -672,11 +672,11 @@
                                }
                                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;
@@ -815,7 +815,7 @@
  */
 PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len 
TSRMLS_DC)
 {
-       zval *tmp;
+       zval *tmp2;
        char *ptr;

 #if PHP_WIN32
@@ -832,8 +832,8 @@
                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++;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to