-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathft_lstdelone.c
26 lines (23 loc) · 1.11 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: oadhesiv <oadhesiv@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/18 14:13:33 by oadhesiv #+# #+# */
/* Updated: 2019/06/01 15:41:56 by oadhesiv ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "libft.h"
void ft_lstdelone(t_list **alst, void (*del)(void*, size_t))
{
t_list *tmp;
if (!alst)
return ;
tmp = *alst;
del(tmp->content, tmp->content_size);
ft_memdel((void **)&tmp);
*alst = (void *)0;
}