blob: 9030da386d8375ef7c6b7f976d0b6405dd6bc015 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 09:03:02 by cacharle #+# #+# */
/* Updated: 2019/10/18 12:20:38 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "libft.h"
void ft_lstdelone(t_list *lst, void (*del)(void *))
{
if (lst == NULL || del == NULL)
return ;
(*del)(lst->content);
free(lst);
}
|