-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstdelone.c
26 lines (23 loc) · 1.07 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
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tlevaufr <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/12/19 18:12:45 by tlevaufr #+# #+# */
/* Updated: 2017/12/19 21:14:55 by tlevaufr ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstdelone(t_list **alst, void (*del)(void *, size_t))
{
t_list *lst;
if (alst)
{
lst = *alst;
del(lst->content, lst->content_size);
free(lst);
*alst = NULL;
}
}