-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstdel.c
executable file
·32 lines (28 loc) · 1.16 KB
/
ft_lstdel.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
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ngouy <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/11 16:59:23 by ngouy #+# #+# */
/* Updated: 2015/11/04 16:07:19 by ngouy ### ########.fr */
/* */
/* ************************************************************************** */
/*
** free memory alocated for the entire list
*/
#include "libft.h"
void ft_lstdel(t_list **alst, void (*del)(void *, size_t))
{
t_list *list;
list = *alst;
if (!alst || !del)
return ;
while (list)
{
(*alst) = (*alst)->next;
ft_lstdelone(&list, del);
list = *alst;
}
}