aboutsummaryrefslogtreecommitdiff
path: root/src/core/list.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2019-12-29 14:39:27 -0800
committerGarrett D'Amore <garrett@damore.org>2019-12-29 15:21:42 -0800
commitb4d3ff2d460607ba8e1b351233cb6cbe9f031264 (patch)
tree74a9aba0717f74404438bbca1bdc75a9e6105abf /src/core/list.h
parente457590015f8c3f4e840e4bed290f052c001e07c (diff)
downloadnng-b4d3ff2d460607ba8e1b351233cb6cbe9f031264.tar.gz
nng-b4d3ff2d460607ba8e1b351233cb6cbe9f031264.tar.bz2
nng-b4d3ff2d460607ba8e1b351233cb6cbe9f031264.zip
fixes #1064 Potential deadlock in statistics code
fixes #1063 Include sanitizer runs in CI fixes #1068 Wssfile test sometimes fails with wrong error code While here, addressed a number of clang-tidy items, and some light cleanup of code we were already in.
Diffstat (limited to 'src/core/list.h')
-rw-r--r--src/core/list.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/list.h b/src/core/list.h
index b0007ec0..204057a2 100644
--- a/src/core/list.h
+++ b/src/core/list.h
@@ -30,9 +30,9 @@ extern void nni_list_init_offset(nni_list *list, size_t offset);
nni_list_init_offset(list, offsetof(type, field))
#define NNI_LIST_NODE_INIT(node) \
- { \
+ do { \
(node)->ln_prev = (node)->ln_next = 0; \
- }
+ } while (0)
extern void *nni_list_first(const nni_list *);
extern void *nni_list_last(const nni_list *);