From cec94db5379fb21c15a4cdf61a01e9143d227866 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 13 Apr 2023 16:42:39 +0200 Subject: [PATCH] implemented why2_list_t in why2_list_find --- src/core/lib/utils/llist.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/lib/utils/llist.c b/src/core/lib/utils/llist.c index 76e49f1..bfe1e25 100644 --- a/src/core/lib/utils/llist.c +++ b/src/core/lib/utils/llist.c @@ -105,11 +105,12 @@ void why2_list_remove_back(why2_list_t *list) free(deallocating_node); } -why2_node_t *why2_list_find(why2_node_t *llist_head, void *value) +why2_node_t *why2_list_find(why2_list_t *list, void *value) { - if (llist_head == NULL) return NULL; //EMPTY LIST + why2_node_t *head = list -> head; + if (head == NULL) return NULL; //EMPTY LIST - why2_node_t *buffer = llist_head; + why2_node_t *buffer = head; while (buffer -> next != NULL) {