implemented why2_list_t in why2_list_find

This commit is contained in:
Václav Šmejkal 2023-04-13 16:42:39 +02:00
parent 57a03f348c
commit cec94db537
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

@ -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)
{