From b4d3ff2d460607ba8e1b351233cb6cbe9f031264 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 29 Dec 2019 14:39:27 -0800 Subject: 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. --- src/core/list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/list.h') 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 *); -- cgit v1.2.3-70-g09d2