test
Tests Basics avec Criterion / test (push) Failing after 6s

This commit is contained in:
2026-04-02 22:13:01 +02:00
parent 6da27cbf48
commit 8491a3aa7d
@@ -87,6 +87,7 @@ struct list *list_get(struct list *l, size_t index){
tmp = tmp->next; tmp = tmp->next;
ind ++; ind ++;
} }
if(ind >= index) return NULL; if(ind >= index) return NULL;
return tmp; return tmp;
@@ -96,7 +97,9 @@ struct list *list_get(struct list *l, size_t index){
void list_destroy(struct list *l){ void list_destroy(struct list *l){
if (!l) return; if (!l) return;
list_destroy(l->next); list_destroy(l->next);
free(l); free(l);
} }
@@ -151,7 +154,7 @@ int list_remove(struct list **l, int e){
tmp = tmp->next; tmp = tmp->next;
} }
if (!tmp) return NULL; if (!tmp) return 0;
if(!old) *l = tmp->next; if(!old) *l = tmp->next;
else old->next = tmp->next; else old->next = tmp->next;