From 22ad5660800e534e18e653ed31ccaec650df8769 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Mon, 13 Mar 2023 16:52:54 +0100 Subject: Change the sign of clist_iterator_has_next We don't need the pointer passed as argument. --- src/list.c | 2 +- src/list.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/list.c b/src/list.c index 42f4056..7714f5d 100644 --- a/src/list.c +++ b/src/list.c @@ -100,7 +100,7 @@ clist_iterator(list_t *list) int clist_iterator_has_next(iterator_t i) { - return iterator->current != NULL; + return i.current != NULL; } list_item_t diff --git a/src/list.h b/src/list.h index 1bd83dc..c98f8e8 100644 --- a/src/list.h +++ b/src/list.h @@ -40,7 +40,7 @@ void clist_add (list_t *, void *); void clist_add_all (list_t *, list_t *); void clist_remove (list_t *, list_item_t *); iterator_t clist_iterator (list_t *); -int clist_iterator_has_next(iterator_t *); +int clist_iterator_has_next(iterator_t); list_item_t *clist_iterator_next (iterator_t *); char* clist_version (void); -- cgit v1.2.3