diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-03-11 16:52:28 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-03-11 16:52:28 +0100 |
commit | f5cf4e478bf7dec70dc22d80de706f82ef4b38f1 (patch) | |
tree | 60160c5cac28eb8cfcd376428429e03cf2e7e203 /include/ouroboros/list.h | |
parent | d68e4e5e540720d9b02e2062e3982f1c438eb1e0 (diff) | |
download | ouroboros-f5cf4e478bf7dec70dc22d80de706f82ef4b38f1.tar.gz ouroboros-f5cf4e478bf7dec70dc22d80de706f82ef4b38f1.zip |
lib: Add helpers for RINA names
This adds helper functions for RINA names, to aid with handling them.
Diffstat (limited to 'include/ouroboros/list.h')
-rw-r--r-- | include/ouroboros/list.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/include/ouroboros/list.h b/include/ouroboros/list.h index 1a96ddb4..f446749d 100644 --- a/include/ouroboros/list.h +++ b/include/ouroboros/list.h @@ -241,30 +241,4 @@ void list_splice_init(struct list_head * list, for (pos = (head)->next, n = pos->next; pos != (head); \ pos = n, n = pos->next) -/** - * list_for_each_entry - iterate over list of given type - * @pos: the type * to use as a loop counter. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define list_for_each_entry(pos, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member)) - -/** - * list_for_each_entry_safe - iterate over list of given type safe - * against removal of list entry - * @pos: the type * to use as a loop counter. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define list_for_each_entry_safe(pos, n, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member), \ - n = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.next, typeof(*n), member)) - - #endif |