From 462e664d0fdfbe2e9eae5c7e093c5a23b202dae8 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 29 Sep 2020 19:11:10 +0200 Subject: Norm update --- libft/src/ft_lstclear.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libft/src/ft_lstclear.c') diff --git a/libft/src/ft_lstclear.c b/libft/src/ft_lstclear.c index 10a6d91..37fec4e 100644 --- a/libft/src/ft_lstclear.c +++ b/libft/src/ft_lstclear.c @@ -13,16 +13,17 @@ #include #include -void - ft_lstclear(t_list **lst, void (*del)(void *)) +void ft_lstclear(t_list **lst, void (*del)(void *)) { t_list *tmp; t_list *renext; - if (!lst) + if (lst == NULL) + { return ; + } tmp = *lst; - while (tmp) + while (tmp != NULL) { renext = tmp->next; del(tmp->content); -- cgit v1.2.3