mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Revert "Remove a useless memory write in zend_llist_del_element"
This reverts commit fad960a404
as
required by Stas and Christopher
This commit is contained in:
parent
fad960a404
commit
b35ffdeae1
@ -91,13 +91,15 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
|
||||
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
|
||||
{
|
||||
zend_llist_element *current=l->head;
|
||||
zend_llist_element *next;
|
||||
|
||||
while (current) {
|
||||
next = current->next;
|
||||
if (compare(current->data, element)) {
|
||||
DEL_LLIST_ELEMENT(current, l);
|
||||
break;
|
||||
}
|
||||
current = current->next;
|
||||
current = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user