-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstdel.c
28 lines (25 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: albarret <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/06 23:40:48 by albarret #+# #+# */
/* Updated: 2018/11/12 22:16:57 by albarret ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstdel(t_list **alst, void (*del)(void *, size_t))
{
t_list *ptr;
t_list *tmp;
ptr = *alst;
while (ptr)
{
tmp = ptr;
ft_lstdelone(&ptr, del);
ptr = tmp->next;
}
*alst = NULL;
}