clist: corrupt removed entry pointers if DEBUG

main
anna 3 years ago
parent 3f73072153
commit 7c4819e5fd
Signed by: fef
GPG Key ID: EC22E476DC2D3D84

@ -1,6 +1,7 @@
/* See the end of this file for copyright and license terms. */
#include <gay/clist.h>
#include <gay/config.h>
void clist_init(struct clist *head)
{
@ -30,6 +31,11 @@ void clist_del(struct clist *node)
{
node->next->prev = node->prev;
node->prev->next = node->next;
# ifdef DEBUG
node->next = NULL;
node->prev = NULL;
# endif
}
/*

Loading…
Cancel
Save