]> granicus.if.org Git - php/commitdiff
- avoid local redeclaration
authorPierre Joye <pajoye@php.net>
Wed, 19 Jan 2011 17:06:50 +0000 (17:06 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 19 Jan 2011 17:06:50 +0000 (17:06 +0000)
Zend/zend_compile.c

index 07f83914cda573bb2f035fc7a0d24517f21725ee..628ef7ae34676e0278c50b086bb0b334a4a6ef08 100644 (file)
@@ -6540,13 +6540,13 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
                c_ns_name[Z_STRLEN_P(CG(current_namespace))] = '\\';
                memcpy(c_ns_name+Z_STRLEN_P(CG(current_namespace))+1, lcname, Z_STRLEN_P(name)+1);
                if (zend_hash_exists(CG(class_table), c_ns_name, Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name)+1)) {
-                       char *tmp = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns));
+                       char *tmp2 = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns));
 
                        if (Z_STRLEN_P(ns) != Z_STRLEN_P(CG(current_namespace)) + 1 + Z_STRLEN_P(name) ||
-                               memcmp(tmp, c_ns_name, Z_STRLEN_P(ns))) {
+                               memcmp(tmp2, c_ns_name, Z_STRLEN_P(ns))) {
                                zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name));
                        }
-                       efree(tmp);
+                       efree(tmp2);
                }
                efree(c_ns_name);
        } else if (zend_hash_find(CG(class_table), lcname, Z_STRLEN_P(name)+1, (void**)&pce) == SUCCESS &&