]> granicus.if.org Git - php/commitdiff
removed useless check
authorAnatol Belski <ab@php.net>
Fri, 14 Nov 2014 08:46:06 +0000 (09:46 +0100)
committerAnatol Belski <ab@php.net>
Fri, 14 Nov 2014 16:39:35 +0000 (17:39 +0100)
the offset member is an unsigned

ext/reflection/php_reflection.c

index b972c2899c7e62f81092f40a31c77e6328faef4b..e9c59ea86e935a1d010ab4f3d031861c8304503c 100644 (file)
@@ -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;