From: Martin Mares Date: Sun, 8 Jun 2003 12:31:17 +0000 (+0000) Subject: Fixed WALK_LIST. X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4714c94258760aae404c6d732ffd581b62fda088;p=netgrind.git Fixed WALK_LIST. --- diff --git a/lib/lists.h b/lib/lists.h index b5a232b..cd2de0c 100644 --- a/lib/lists.h +++ b/lib/lists.h @@ -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) {