diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-21 00:38:26 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-21 00:38:26 -0800 |
| commit | 5db7f0f969fb05cb0783acd187857b7b06b09b8b (patch) | |
| tree | 421d2fdaf2830e961ab9cd50dc518e22803b62ec /src/core/list.h | |
| parent | 529c84d6a1bf2400170263c9e68d9433a70cc43d (diff) | |
| download | nng-5db7f0f969fb05cb0783acd187857b7b06b09b8b.tar.gz nng-5db7f0f969fb05cb0783acd187857b7b06b09b8b.tar.bz2 nng-5db7f0f969fb05cb0783acd187857b7b06b09b8b.zip | |
Uncrustify configuration, and shorter copyright banners, plus reformat
code with uncrustify. (Minor adjustments.) No more arguments!
Diffstat (limited to 'src/core/list.h')
| -rw-r--r-- | src/core/list.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/core/list.h b/src/core/list.h index f12087a2..65d6ae9e 100644 --- a/src/core/list.h +++ b/src/core/list.h @@ -1,23 +1,10 @@ /* * Copyright 2016 Garrett D'Amore <garrett@damore.org> * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. + * This software is supplied under the terms of the MIT License, a + * copy of which should be located in the distribution where this + * file was obtained (LICENSE.txt). A copy of the license may also be + * found online at https://opensource.org/licenses/MIT. */ #ifndef CORE_LIST_H @@ -30,8 +17,8 @@ * directly, and let consumers directly inline structures. */ typedef struct nni_list_node { - struct nni_list_node *ln_next; - struct nni_list_node *ln_prev; + struct nni_list_node * ln_next; + struct nni_list_node * ln_prev; } nni_list_node_t; typedef struct nni_list { @@ -40,8 +27,9 @@ typedef struct nni_list { } nni_list_t; extern void nni_list_init_offset(nni_list_t *list, size_t offset); -#define NNI_LIST_INIT(list, type, field) \ - nni_list_init_offset(list, offsetof (type, field)) + +#define NNI_LIST_INIT(list, type, field) \ + nni_list_init_offset(list, offsetof(type, field)) extern void *nni_list_first(nni_list_t *); extern void *nni_list_last(nni_list_t *); extern void nni_list_append(nni_list_t *, void *); @@ -50,7 +38,8 @@ extern void *nni_list_next(nni_list_t *, void *); extern void *nni_list_prev(nni_list_t *, void *); extern void nni_list_remove(nni_list_t *, void *); extern void nni_list_node_init(nni_list_t *, void *); + #define NNI_LIST_FOREACH(l, it) \ for (it = nni_list_first(l); it != NULL; it = nni_list_next(l, it)) -#endif /* CORE_LIST_H */ +#endif /* CORE_LIST_H */ |
