summaryrefslogtreecommitdiff
path: root/lib/lists.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-03-24 12:41:43 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2014-03-24 12:41:43 +0100
commitc980f8002e0f0578d5e715d48d65d9fb9a0c5a70 (patch)
treef1d3be6b0992c7cb0be3694229ffb42dc740ae91 /lib/lists.h
parent2e84b4e82dbf8fce0fd12fb0c25d925ffd287970 (diff)
parent227af309e55a59f14d1a5a757f17900164bffc97 (diff)
Merge branch 'bgp-grace'
Diffstat (limited to 'lib/lists.h')
-rw-r--r--lib/lists.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lists.h b/lib/lists.h
index 9153029c..37c56efb 100644
--- a/lib/lists.h
+++ b/lib/lists.h
@@ -36,6 +36,8 @@ typedef struct list { /* In fact two overlayed nodes */
#define NODE_NEXT(n) ((void *)((NODE (n))->next))
#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_LIST2(n,nn,list,pos) \
+ for(nn=(list).head; NODE_VALID(nn) && (n=SKIP_BACK(typeof(*n),pos,nn)); nn=nn->next)
#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 */