Skip to content

Commit

Permalink
Revert "Remove a useless memory write in zend_llist_del_element"
Browse files Browse the repository at this point in the history
This reverts commit fad960a as
required by Stas and Christopher
  • Loading branch information
adoy committed Dec 26, 2012
1 parent fad960a commit b35ffde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Zend/zend_llist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit b35ffde

Please sign in to comment.