-
Notifications
You must be signed in to change notification settings - Fork 17
/
ft_lstdelone.c
25 lines (23 loc) · 1.02 KB
/
ft_lstdelone.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncolomer <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 20:16:43 by ncolomer #+# #+# */
/* Updated: 2019/10/18 23:02:26 by ncolomer ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void
ft_lstdelone(t_list *lst, void (*del)(void*))
{
if (!del)
return ;
if (lst)
{
(*del)(lst->content);
free(lst);
}
}