/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstclear_bonus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/09 09:02:39 by cacharle #+# #+# */ /* Updated: 2019/10/17 09:03:58 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include #include "libft.h" void ft_lstclear(t_list **lst, void (*del)(void *)) { if (*lst == NULL || lst == NULL || del == NULL) return ; ft_lstclear(&((*lst)->next), del); ft_lstdelone(*lst, del); *lst = NULL; }