26 lines
1.1 KiB
C
26 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstdelone.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/09/30 00:02:55 by cchauvet #+# #+# */
|
|
/* Updated: 2022/09/30 01:26:24 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void ft_lstdelone(t_list *lst, void (*del)(void *))
|
|
{
|
|
if (lst == NULL || lst == NULL)
|
|
return ;
|
|
if (lst != NULL)
|
|
{
|
|
if (lst->content != NULL)
|
|
del(lst->content);
|
|
free(lst);
|
|
}
|
|
}
|