1.1 --- a/src/linked_list.c Sat Apr 22 14:09:46 2023 +0200 1.2 +++ b/src/linked_list.c Sat Apr 22 14:21:02 2023 +0200 1.3 @@ -56,7 +56,7 @@ 1.4 return (void *) cur; 1.5 } 1.6 1.7 -size_t cx_linked_list_find( 1.8 +ssize_t cx_linked_list_find( 1.9 void const *start, 1.10 ptrdiff_t loc_advance, 1.11 ptrdiff_t loc_data, 1.12 @@ -69,7 +69,7 @@ 1.13 assert(cmp_func); 1.14 1.15 void const *node = start; 1.16 - size_t index = 0; 1.17 + ssize_t index = 0; 1.18 do { 1.19 void *current = ll_data(node); 1.20 if (cmp_func(current, elem) == 0) { 1.21 @@ -78,7 +78,7 @@ 1.22 node = ll_advance(node); 1.23 index++; 1.24 } while (node != NULL); 1.25 - return index; 1.26 + return -1; 1.27 } 1.28 1.29 void *cx_linked_list_first( 1.30 @@ -729,7 +729,7 @@ 1.31 return node == NULL ? NULL : node->payload; 1.32 } 1.33 1.34 -static size_t cx_ll_find( 1.35 +static ssize_t cx_ll_find( 1.36 struct cx_list_s const *list, 1.37 void const *elem 1.38 ) {