From 693773195dcd877164314d6b4c37cbd980cbb6ab Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 20 Oct 2024 17:01:10 -0700 Subject: Use `const` for nng_stat when possible. This should help the compiler enforce checks, and may result in better optimizations. --- src/core/list.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/list.h') diff --git a/src/core/list.h b/src/core/list.h index d3c703bb..28720564 100644 --- a/src/core/list.h +++ b/src/core/list.h @@ -1,5 +1,5 @@ // -// Copyright 2017 Garrett D'Amore +// Copyright 2024 Garrett D'Amore // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -58,7 +58,8 @@ 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) \ - for (it = nni_list_first(l); it != NULL; it = nni_list_next(l, it)) +#define NNI_LIST_FOREACH(l, it) \ + for (it = nni_list_first(l); it != NULL; \ + it = nni_list_next(l, (void *) it)) #endif // CORE_LIST_H -- cgit v1.2.3-70-g09d2