Remove a useless memory write in zend_llist_del_element

The zend_llist_element *next pointer is not necessary and removing
it will also remove a write on memory
This commit is contained in:
Pierrick Charron 2012-12-25 20:45:24 -05:00
parent a2b6d9c104
commit fad960a404

View File

@ -91,15 +91,13 @@ 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 = next;
current = current->next;
}
}