diff options
Diffstat (limited to 'c12/ex06/ft_list_clear.c')
| -rw-r--r-- | c12/ex06/ft_list_clear.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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; |
