Loading src/list.c +7 Changes for src/list.c: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -72,6 +72,13 @@ void list_destroy(list_t l, void (*free_void)(void *)) // return the found element or NULL void *list_in(list_t l, void *x, int (*eq)(void *, void *)) { while (!list_is_empty(l)) { if (eq(x, l->val)) return l->val; l = l->next; } return NULL; } unsigned long int list_len(list_t l) Loading Loading
src/list.c +7 Changes for src/list.c: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -72,6 +72,13 @@ void list_destroy(list_t l, void (*free_void)(void *)) // return the found element or NULL void *list_in(list_t l, void *x, int (*eq)(void *, void *)) { while (!list_is_empty(l)) { if (eq(x, l->val)) return l->val; l = l->next; } return NULL; } unsigned long int list_len(list_t l) Loading