diff options
author | Pierre Joye <pajoye@php.net> | 2011-01-19 17:06:50 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-01-19 17:06:50 +0000 |
commit | 3584bbee3b79ea6bb982d3bd1cde85fe239accdb (patch) | |
tree | 23e78c479ad1a9db5d27d61f05526e86c4f0a078 | |
parent | f47405315ddb59f7635f5bda8bc57959bae62db4 (diff) | |
download | php-git-3584bbee3b79ea6bb982d3bd1cde85fe239accdb.tar.gz |
- avoid local redeclaration
-rw-r--r-- | Zend/zend_compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 07f83914cd..628ef7ae34 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -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 && |