diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-20 17:01:10 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-20 17:01:10 -0700 |
| commit | 693773195dcd877164314d6b4c37cbd980cbb6ab (patch) | |
| tree | 3c6014205fb75d1e39227ac505dab8964e57a815 /src/core/list.h | |
| parent | 5830408d11fb19aaf78cb47016ea1692e8f6d2ed (diff) | |
| download | nng-693773195dcd877164314d6b4c37cbd980cbb6ab.tar.gz nng-693773195dcd877164314d6b4c37cbd980cbb6ab.tar.bz2 nng-693773195dcd877164314d6b4c37cbd980cbb6ab.zip | |
Use `const` for nng_stat when possible.
This should help the compiler enforce checks, and may result
in better optimizations.
Diffstat (limited to 'src/core/list.h')
| -rw-r--r-- | src/core/list.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 <garrett@damore.org> +// Copyright 2024 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 @@ -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 |
