/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstdelone.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/12/08 14:29:12 by bchanot #+# #+# */ /* Updated: 2017/12/08 14:31:19 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void ft_lstdelone(t_slist **alst, void (*del)(void *, size_t)) { t_slist *tmp; if (alst != NULL) { tmp = *alst; if (tmp != NULL) { (*del)((*tmp).content, (*tmp).content_size); ft_memdel((void **)&tmp); } *alst = NULL; } }