diff --git a/slides/cours_12.md b/slides/cours_12.md index 825a674a5f0b11eb80c346e47f4ad0353016b066..f5bcda8192ca2d6460e9e4d888e4a39db163fe33 100644 --- a/slides/cours_12.md +++ b/slides/cours_12.md @@ -477,8 +477,7 @@ sorted_list sorted_list_push(sorted_list list, int val) { element *tmp = malloc(sizeof(*tmp)); tmp->data = val; tmp->next = list; - list = tmp; - return list; + return tmp; } } ```