blob: 3dfbbbb7e6d4229071f02f57703115fde16339a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 09:03:02 by cacharle #+# #+# */
/* Updated: 2019/11/20 04:02:31 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_lst.h"
/*
** \brief Delete list node
** \param del Delete function for node's data
*/
void ft_lstdelone(t_ftlst *lst, void (*del)(void *))
{
if (lst == NULL)
return ;
if (del != NULL)
(*del)(lst->data);
free(lst);
}
|