]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
DLLIST_REMOVE(): Set removed item's prev/next pointers to NULL.
authorTimo Sirainen <tss@iki.fi>
Fri, 6 Nov 2009 00:47:18 +0000 (19:47 -0500)
committerTimo Sirainen <tss@iki.fi>
Fri, 6 Nov 2009 00:47:18 +0000 (19:47 -0500)
--HG--
branch : HEAD

src/lib/llist.h

index 86eba605d6c1d4b5e2a25d99de58df8b68e0237f..e29c7b79c7af1736071c61c752455c60545a6d1c 100644 (file)
                *(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