From 880102ae9358db130ef67cc9a7177a1e1de76875 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 17 Jul 2019 19:30:52 +0200 Subject: c10 tail stuff, c11 start, c12/c13 files --- c12/ex06/ft_list_clear.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'c12/ex06') diff --git a/c12/ex06/ft_list_clear.c b/c12/ex06/ft_list_clear.c index 9a7cf5d..811469b 100644 --- a/c12/ex06/ft_list_clear.c +++ b/c12/ex06/ft_list_clear.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/09 17:53:02 by cacharle #+# #+# */ -/* Updated: 2019/07/09 18:02:09 by cacharle ### ########.fr */ +/* Updated: 2019/07/17 18:20:11 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,11 +14,11 @@ void ft_list_clear(t_list *begin_list, void (*free_fct)(void *)) { - t_list tmp; + t_list *tmp; - if (!begin_list) + if (begin_list == NULL) return ; - while (begin_list->next) + while (begin_list) { free_fct(begin_list->data); tmp = begin_list->next; -- cgit