]> mj.ucw.cz Git - netgrind.git/commitdiff
Fixed WALK_LIST.
authorMartin Mares <mj@ucw.cz>
Sun, 8 Jun 2003 12:31:17 +0000 (12:31 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 8 Jun 2003 12:31:17 +0000 (12:31 +0000)
lib/lists.h

index b5a232b2be3a96f7d2f359f3def725361c4a645d..cd2de0c74b9768e9b250b7f29e7be03a1cc67213 100644 (file)
@@ -38,7 +38,7 @@ static inline void *list_prev(list *l, node *n)
   return (n->prev != &l->head) ? (void *) n->prev : NULL;
 }
 
-#define WALK_LIST(n,list) for(n=(void*)&(list).head; ((node*)(n))->next != &(list).head; n=(void*)((node*)(n))->next)
+#define WALK_LIST(n,list) for(n=(void*)(list).head.next; (node*)(n) != &(list).head; n=(void*)((node*)(n))->next)
 
 static inline void list_insert(node *what, node *after)
 {