]> granicus.if.org Git - php/commitdiff
Added expectation
authorDmitry Stogov <dmitry@zend.com>
Wed, 10 Jan 2018 09:37:13 +0000 (12:37 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 10 Jan 2018 09:37:13 +0000 (12:37 +0300)
Zend/zend_hash.h

index 0b899fb72768154a680dcd5cd51a32e1efcc15d8..50529cea3b44de8c0f57d38a20b4e063ddcbf12c 100644 (file)
@@ -932,7 +932,7 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
                                uint32_t j = HT_IDX_TO_HASH(_idx - 1); \
                                uint32_t nIndex = _p->h | __ht->nTableMask; \
                                uint32_t i = HT_HASH(__ht, nIndex); \
-                               if (j != i) { \
+                               if (UNEXPECTED(j != i)) { \
                                        Bucket *prev = HT_HASH_TO_BUCKET(__ht, i); \
                                        while (Z_NEXT(prev->val) != j) { \
                                                i = Z_NEXT(prev->val); \