Mercurial > dovecot > core-2.2
changeset 10261:16d40abb75b8 HEAD
DLLIST_REMOVE(): Set removed item's prev/next pointers to NULL.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 05 Nov 2009 19:47:18 -0500 |
parents | 32d007b5f41d |
children | 07e0e2b4abe1 |
files | src/lib/llist.h |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/llist.h Thu Nov 05 18:39:36 2009 -0500 +++ b/src/lib/llist.h Thu Nov 05 19:47:18 2009 -0500 @@ -14,8 +14,11 @@ *(list) = (item)->next; \ else \ (item)->prev->next = (item)->next; \ - if ((item)->next != NULL) \ + if ((item)->next != NULL) { \ (item)->next->prev = (item)->prev; \ + (item)->next = NULL; \ + } \ + (item)->prev = NULL; \ } STMT_END #endif