diff -r 7345ee0a0301 -r 35b2b99ee523 src/linked_list.c --- a/src/linked_list.c Sat Apr 22 14:09:46 2023 +0200 +++ b/src/linked_list.c Sat Apr 22 14:21:02 2023 +0200 @@ -56,7 +56,7 @@ return (void *) cur; } -size_t cx_linked_list_find( +ssize_t cx_linked_list_find( void const *start, ptrdiff_t loc_advance, ptrdiff_t loc_data, @@ -69,7 +69,7 @@ assert(cmp_func); void const *node = start; - size_t index = 0; + ssize_t index = 0; do { void *current = ll_data(node); if (cmp_func(current, elem) == 0) { @@ -78,7 +78,7 @@ node = ll_advance(node); index++; } while (node != NULL); - return index; + return -1; } void *cx_linked_list_first( @@ -729,7 +729,7 @@ return node == NULL ? NULL : node->payload; } -static size_t cx_ll_find( +static ssize_t cx_ll_find( struct cx_list_s const *list, void const *elem ) {