diff options
Diffstat (limited to 'src/core/list.c')
| -rw-r--r-- | src/core/list.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/list.c b/src/core/list.c index f489a705..65e86670 100644 --- a/src/core/list.c +++ b/src/core/list.c @@ -1,7 +1,6 @@ // -// Copyright 2017 Garrett D'Amore <garrett@damore.org> // Copyright 2017 Capitar IT Group BV <info@capitar.com> -// Copyright 2017 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -114,7 +113,7 @@ nni_list_next(const nni_list *list, void *item) { nni_list_node *node = NODE(list, item); - if ((node = node->ln_next) == &list->ll_head) { + if (((node = node->ln_next) == &list->ll_head) || (node == NULL)) { return (NULL); } return (ITEM(list, node)); @@ -125,7 +124,7 @@ nni_list_prev(const nni_list *list, void *item) { nni_list_node *node = NODE(list, item); - if ((node = node->ln_prev) == &list->ll_head) { + if (((node = node->ln_prev) == &list->ll_head) || (node == NULL)) { return (NULL); } return (ITEM(list, node)); |
