summaryrefslogtreecommitdiff
path: root/lib/lists.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-07-07 10:40:00 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2012-07-07 14:26:42 +0200
commitfc06fb62443c135773ee4c05ed83925cc47b046d (patch)
tree5d80dc91da78aa19ca1b0f185128a4c40a0cc562 /lib/lists.h
parent95127cbbb76e8870e029454a5313bc4b6ce69a4a (diff)
Implements RDNSS and DNSSL support for RAdv.
Diffstat (limited to 'lib/lists.h')
-rw-r--r--lib/lists.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lists.h b/lib/lists.h
index 6fab12c4..0b0fdbe3 100644
--- a/lib/lists.h
+++ b/lib/lists.h
@@ -34,7 +34,8 @@ typedef struct list { /* In fact two overlayed nodes */
#define HEAD(list) ((void *)((list).head))
#define TAIL(list) ((void *)((list).tail))
#define NODE_NEXT(n) ((void *)((NODE (n))->next))
-#define WALK_LIST(n,list) for(n=HEAD(list);(NODE (n))->next; n=NODE_NEXT(n))
+#define NODE_VALID(n) ((NODE (n))->next)
+#define WALK_LIST(n,list) for(n=HEAD(list); NODE_VALID(n); n=NODE_NEXT(n))
#define WALK_LIST_DELSAFE(n,nxt,list) \
for(n=HEAD(list); nxt=NODE_NEXT(n); n=(void *) nxt)
/* WALK_LIST_FIRST supposes that called code removes each processed node */