From 6ef53eea67b55990f80104c2bd13d90be065f822 Mon Sep 17 00:00:00 2001 From: "yassin.elhakoun" <yassin.el-hakouni@etu.hesge.ch> Date: Mon, 18 Dec 2023 14:07:20 +0100 Subject: [PATCH] =?UTF-8?q?Update=20cours=5F12.md=20(list=20n'=C3=A9tait?= =?UTF-8?q?=20pas=20modifi=C3=A9=20en=20dehors=20de=20la=20fonction)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/cours_12.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/slides/cours_12.md b/slides/cours_12.md index 825a674..f5bcda8 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; } } ``` -- GitLab