]> granicus.if.org Git - php/commitdiff
Remove unnecessary check
authorNikita Popov <nikic@php.net>
Thu, 20 Mar 2014 21:58:10 +0000 (22:58 +0100)
committerNikita Popov <nikic@php.net>
Thu, 20 Mar 2014 21:58:10 +0000 (22:58 +0100)
In case of an update the key already existed, so the next free
element can not change.

Zend/zend_hash.c

index 829cd33641657c60ae2e23aebe64461fdcf7cbb1..b5c310623e6cbd9d3f4e2571822b0105c1dd91df 100644 (file)
@@ -358,9 +358,6 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
                        }
                        UPDATE_DATA(ht, p, pData, nDataSize);
                        HANDLE_UNBLOCK_INTERRUPTIONS();
-                       if ((long)h >= (long)ht->nNextFreeElement) {
-                               ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX;
-                       }
                        if (pDest) {
                                *pDest = p->pData;
                        }