mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 17:42:20 +00:00
lib: add a frr_each_const macro
Add a frr_each_const macro equivalent to loop on const lists. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
46fb37cf67
commit
72eae2c3cb
@ -20,6 +20,9 @@ extern "C" {
|
||||
#define frr_each(prefix, head, item) \
|
||||
for (item = prefix##_first(head); item; \
|
||||
item = prefix##_next(head, item))
|
||||
#define frr_each_const(prefix, head, item) \
|
||||
for (item = prefix##_const_first(head); item; \
|
||||
item = prefix##_const_next(head, item))
|
||||
#define frr_each_safe(prefix, head, item) \
|
||||
for (typeof(prefix##_next_safe(head, NULL)) prefix##_safe = \
|
||||
prefix##_next_safe(head, \
|
||||
|
Loading…
Reference in New Issue
Block a user