26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstdelone_bonus.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: pbonilla <eirodeis.lepnj@gmail.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2020/12/04 16:05:34 by pbonilla #+# #+# */
|
|
/* Updated: 2020/12/04 16:05:37 by pbonilla ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void ft_lstdelone(t_list *lst, void (*del)(void *))
|
|
{
|
|
if (!lst)
|
|
return ;
|
|
if (del)
|
|
{
|
|
del(lst->content);
|
|
free(lst);
|
|
}
|
|
}
|
|
|