com php-src: removed useless check: ext/reflection/php_reflec tion.c
| From: | Anatol Belski | Date: | Fri, 14 Nov 2014 16:39:35 +0000 |
| Subject: | com php-src: removed useless check: ext/reflection/php_reflec tion.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83092@lists.php.net to get a copy of this message | ||
Commit: 3b4a6dc11496dbdf22a5a83966f963107d20234e
Author: Anatol Belski <ab@php.net> Fri, 14 Nov 2014 09:46:06 +0100
Parents: 871dc9febc4aade2e3c069b70a53da6404150bb3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3b4a6dc11496dbdf22a5a83966f963107d20234e
Log:
removed useless check
the offset member is an unsigned
Changed paths:
M ext/reflection/php_reflection.c
Diff:
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index b972c28..e9c59ea 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3359,12 +3359,10 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval
*return_value
continue;
}
prop = NULL;
- if (prop_info->offset >= 0) {
- if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
- prop = &ce->default_static_members_table[prop_info->offset];
- } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
- prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
- }
+ if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
+ prop = &ce->default_static_members_table[prop_info->offset];
+ } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
+ prop = &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
}
if (!prop) {
continue;