Browse code

core: clist - restet prev/next when removing from clist slot

Daniel-Constantin Mierla authored on 05/11/2015 07:51:25
Showing 1 changed files
... ...
@@ -87,7 +87,9 @@
87 87
 #define clist_rm_sublist(s, e, next, prev) \
88 88
 	do{\
89 89
 		(s)->prev->next=(e)->next;  \
90
-		(e)->next->prev=(s)->prev ; \
90
+		(e)->next->prev=(s)->prev;  \
91
+		(s)->prev=NULL; \
92
+		(e)->next=NULL; \
91 93
 	}while(0)
92 94
 
93 95