-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstclear_bonus.c
More file actions
28 lines (25 loc) · 1.09 KB
/
ft_lstclear_bonus.c
File metadata and controls
28 lines (25 loc) · 1.09 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
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstclear_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ulyildiz <ulyildiz@student.42kocaeli.co +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/15 21:05:25 by ulyildiz #+# #+# */
/* Updated: 2023/10/26 21:36:30 by ulyildiz ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstclear(t_list **lst, void (*del)(void *))
{
t_list *tp;
if (lst == NULL)
return ;
while (*lst != NULL)
{
tp = (*lst)->next;
ft_lstdelone(*lst, del);
*lst = tp;
}
*lst = NULL;
}