Skip to content

Commit b7f4f48

Browse files
committed
Strength reduction
1 parent a78998c commit b7f4f48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Zend/zend_hash.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,9 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
645645
zend_hash_get_current_data_ptr_ex(ht, &(ht)->nInternalPointer)
646646

647647
#define ZEND_HASH_FOREACH(_ht, indirect) do { \
648-
uint _idx; \
649-
for (_idx = 0; _idx < (_ht)->nNumUsed; _idx++) { \
650-
Bucket *_p = (_ht)->arData + _idx; \
648+
Bucket *_p = (_ht)->arData; \
649+
Bucket *_end = _p + (_ht)->nNumUsed; \
650+
for (; _p != _end; _p++) { \
651651
zval *_z = &_p->val; \
652652
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
653653
_z = Z_INDIRECT_P(_z); \

0 commit comments

Comments
 (0)