From 795aebbee77bb74d8792df96dfe1aa79ec9548fc Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 10 Jul 2017 15:02:38 -0700 Subject: Give up on uncrustify; switch to clang-format. --- src/core/list.h | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'src/core/list.h') diff --git a/src/core/list.h b/src/core/list.h index 9701431e..b0007ec0 100644 --- a/src/core/list.h +++ b/src/core/list.h @@ -15,13 +15,13 @@ // In order to make life easy, we just define the list structures // directly, and let consumers directly inline structures. typedef struct nni_list_node { - struct nni_list_node * ln_next; - struct nni_list_node * ln_prev; + struct nni_list_node *ln_next; + struct nni_list_node *ln_prev; } nni_list_node; typedef struct nni_list { - struct nni_list_node ll_head; - size_t ll_offset; + struct nni_list_node ll_head; + size_t ll_offset; } nni_list; extern void nni_list_init_offset(nni_list *list, size_t offset); @@ -29,24 +29,26 @@ extern void nni_list_init_offset(nni_list *list, size_t offset); #define NNI_LIST_INIT(list, type, field) \ nni_list_init_offset(list, offsetof(type, field)) -#define NNI_LIST_NODE_INIT(node) \ - { (node)->ln_prev = (node)->ln_next = 0; } +#define NNI_LIST_NODE_INIT(node) \ + { \ + (node)->ln_prev = (node)->ln_next = 0; \ + } extern void *nni_list_first(const nni_list *); extern void *nni_list_last(const nni_list *); -extern void nni_list_append(nni_list *, void *); -extern void nni_list_prepend(nni_list *, void *); -extern void nni_list_insert_before(nni_list *, void *, void *); -extern void nni_list_insert_after(nni_list *, void *, void *); +extern void nni_list_append(nni_list *, void *); +extern void nni_list_prepend(nni_list *, void *); +extern void nni_list_insert_before(nni_list *, void *, void *); +extern void nni_list_insert_after(nni_list *, void *, void *); extern void *nni_list_next(const nni_list *, void *); extern void *nni_list_prev(const nni_list *, void *); -extern void nni_list_remove(nni_list *, void *); -extern int nni_list_active(nni_list *, void *); -extern int nni_list_empty(nni_list *); -extern int nni_list_node_active(nni_list_node *); -extern void nni_list_node_remove(nni_list_node *); +extern void nni_list_remove(nni_list *, void *); +extern int nni_list_active(nni_list *, void *); +extern int nni_list_empty(nni_list *); +extern int nni_list_node_active(nni_list_node *); +extern void nni_list_node_remove(nni_list_node *); -#define NNI_LIST_FOREACH(l, it) \ +#define NNI_LIST_FOREACH(l, it) \ for (it = nni_list_first(l); it != NULL; it = nni_list_next(l, it)) -#endif // CORE_LIST_H +#endif // CORE_LIST_H -- cgit v1.2.3-70-g09d2