com php-src: drop redundant checks: ext/opcache/ZendAccelerator.c

[email protected] (Anatol Belski)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    fe8112e8f8cadfb89dcee62f7c9323f12b7b200b
Author:    Anatol Belski <[email protected]>         Tue, 7 Mar 2017 15:42:19 +0100
Parents:   c20ae623c2ed2ffb35e5c4c635d22b62b31285e9
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=fe8112e8f8cadfb89dcee62f7c9323f12b7b200b

Log:
drop redundant checks

Changed paths:
  M  ext/opcache/ZendAccelerator.c


Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 2861261..926aaea 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -511,7 +511,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 
 	/* function table hash keys */
 	ZEND_HASH_FOREACH_BUCKET(CG(function_table), p) {
-		if (Z_TYPE(p->val) == IS_UNDEF) continue;
 		if (p->key) {
 			p->key = new_interned_string(p->key);
 		}
@@ -540,7 +539,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 	ZEND_HASH_FOREACH_BUCKET(CG(class_table), p) {
 		zend_class_entry *ce;
 
-		if (Z_TYPE(p->val) == IS_UNDEF) continue;
 		ce = (zend_class_entry*)Z_PTR(p->val);
 
 		if (p->key) {
@@ -554,8 +552,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 		ZEND_HASH_FOREACH_BUCKET(&ce->properties_info, q) {
 			zend_property_info *info;
 
-			if (Z_TYPE(q->val) == IS_UNDEF) continue;
-
 			info = (zend_property_info*)Z_PTR(q->val);
 
 			if (q->key) {
@@ -568,7 +564,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 		} ZEND_HASH_FOREACH_END();
 
 		ZEND_HASH_FOREACH_BUCKET(&ce->function_table, q) {
-			if (Z_TYPE(q->val) == IS_UNDEF) continue;
 			if (q->key) {
 				q->key = new_interned_string(q->key);
 			}
@@ -578,7 +573,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 		} ZEND_HASH_FOREACH_END();
 
 		ZEND_HASH_FOREACH_BUCKET(&ce->constants_table, q) {
-			if (Z_TYPE(q->val) == IS_UNDEF) continue;
 			if (q->key) {
 				q->key = new_interned_string(q->key);
 			}
@@ -589,7 +583,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 	ZEND_HASH_FOREACH_BUCKET(EG(zend_constants), p) {
 		zend_constant *c;
 
-		if (Z_TYPE(p->val) == IS_UNDEF) continue;
 		if (p->key) {
 			p->key = new_interned_string(p->key);
 		}
@@ -603,8 +596,6 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
 	ZEND_HASH_FOREACH_BUCKET(CG(auto_globals), p) {
 		zend_auto_global *auto_global;
 
-		if (Z_TYPE(p->val) == IS_UNDEF) continue;
-
 		auto_global = (zend_auto_global*)Z_PTR(p->val);;
 
 		zend_string_addref(auto_global->name);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.