diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-03-24 12:41:43 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-03-24 12:41:43 +0100 |
commit | c980f8002e0f0578d5e715d48d65d9fb9a0c5a70 (patch) | |
tree | f1d3be6b0992c7cb0be3694229ffb42dc740ae91 /lib/lists.h | |
parent | 2e84b4e82dbf8fce0fd12fb0c25d925ffd287970 (diff) | |
parent | 227af309e55a59f14d1a5a757f17900164bffc97 (diff) |
Merge branch 'bgp-grace'
Diffstat (limited to 'lib/lists.h')
-rw-r--r-- | lib/lists.h | 2 |
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 */ |