com php-src: Remove a useless memory write in zend_llist_de l_element: Zend/zend_llist.c

From: Date: Wed, 26 Dec 2012 01:45:24 +0000
Subject: com php-src: Remove a useless memory write in zend_llist_de l_element: Zend/zend_llist.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-70820@lists.php.net to get a copy of this message
Commit: fad960a4045da86cdbd8308a165ffc47892f05b9 Author: Pierrick Charron <pierrick@php.net> Tue, 25 Dec 2012 20:45:24 -0500 Parents: a2b6d9c1047a4e5f3419ebc3489a66d62aa12d07 Branches: PHP-5.3 PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fad960a4045da86cdbd8308a165ffc47892f05b9 Log: 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 Changed paths: M Zend/zend_llist.c Diff: diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index 4656420..26baf4d 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -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; } }

« previous php.cvs (#70820) next »