/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstclear_bonus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/09 09:02:39 by cacharle #+# #+# */ /* Updated: 2019/11/20 04:02:37 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" #include "libft_lst.h" void ft_lstclear(t_ftlst **lst, void (*del)(void *)) { if (lst == NULL) return ; if (*lst == NULL) return ; ft_lstclear(&((*lst)->next), del); ft_lstdelone(*lst, del); *lst = NULL; }