-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstclear.c
More file actions
26 lines (23 loc) · 1.05 KB
/
ft_lstclear.c
File metadata and controls
26 lines (23 loc) · 1.05 KB
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.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marvin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/19 18:04:18 by marvin #+# #+# */
/* Updated: 2022/06/20 19:03:33 by aettouha ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstclear(t_list **lst, void (*del)(void *))
{
t_list *i;
while (*lst)
{
i = (*lst)->next;
ft_lstdelone(*lst, del);
*lst = i;
}
*lst = NULL;
}