aboutsummaryrefslogtreecommitdiff
path: root/src/core/list.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-10-05 08:25:50 -0700
committerGarrett D'Amore <garrett@damore.org>2025-10-05 08:38:19 -0700
commitd1bd64c8251171ac8e1d4e71ab8726c2a64fd55a (patch)
tree579cc387639a9be8e0b162aeaa0cd55d9c87f725 /src/core/list.h
parent883e0289cdab5a81312b0593b098f70114b61f88 (diff)
downloadnng-d1bd64c8251171ac8e1d4e71ab8726c2a64fd55a.tar.gz
nng-d1bd64c8251171ac8e1d4e71ab8726c2a64fd55a.tar.bz2
nng-d1bd64c8251171ac8e1d4e71ab8726c2a64fd55a.zip
Various header file fixes... also fix compilation errors when HTTP is disabled.v2.0.0-alpha.6
Also, some instances nni_aio are changed to nng_aio. We think we want to harmonize some of these types going forward as it will reduce the need to include headers hopefully letting us get away with just "defs.h" in more places.
Diffstat (limited to 'src/core/list.h')
-rw-r--r--src/core/list.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/list.h b/src/core/list.h
index 28720564..b8feaa36 100644
--- a/src/core/list.h
+++ b/src/core/list.h
@@ -1,5 +1,5 @@
//
-// Copyright 2024 Garrett D'Amore <garrett@damore.org>
+// Copyright 2025 Garrett D'Amore <garrett@damore.org>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -10,7 +10,7 @@
#ifndef CORE_LIST_H
#define CORE_LIST_H
-#include "core/defs.h"
+#include "defs.h"
// In order to make life easy, we just define the list structures
// directly, and let consumers directly inline structures.
@@ -32,12 +32,10 @@ extern void nni_list_init_offset(nni_list *list, size_t offset);
// NNI_LIST_INITIALIZER is used to initialize structures at declaration time.
// The list argument is the structure being initialized and the type and
// offset determine where the node lives within each item.
-#define NNI_LIST_INITIALIZER(list, type, field) \
- { \
- .ll_head.ln_next = &(list).ll_head, \
- .ll_head.ln_prev = &(list).ll_head, \
- .ll_offset = offsetof(type, field) \
- }
+#define NNI_LIST_INITIALIZER(list, type, field) \
+ { .ll_head.ln_next = &(list).ll_head, \
+ .ll_head.ln_prev = &(list).ll_head, \
+ .ll_offset = offsetof(type, field) }
#define NNI_LIST_NODE_INIT(node) \
do { \
@@ -60,6 +58,6 @@ extern void nni_list_node_remove(nni_list_node *);
#define NNI_LIST_FOREACH(l, it) \
for (it = nni_list_first(l); it != NULL; \
- it = nni_list_next(l, (void *) it))
+ it = nni_list_next(l, (void *) it))
#endif // CORE_LIST_H