-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstclear_bonus.c
26 lines (23 loc) · 1.05 KB
/
ft_lstclear_bonus.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_lstclear_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: antlopez <antlopez@student.42malaga.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/11 11:00:57 by antlopez #+# #+# */
/* Updated: 2022/12/11 11:00:59 by antlopez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstclear(t_list **lst, void (*del)(void*))
{
t_list *aux;
while (*lst)
{
aux = (**lst).next;
ft_lstdelone(*lst, del);
*lst = aux;
}
*lst = NULL;
}