-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstclear_int.c
31 lines (28 loc) · 1.12 KB
/
ft_lstclear_int.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstclear_int.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: belkarto <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/11 19:46:56 by belkarto #+# #+# */
/* Updated: 2022/12/11 19:47:18 by belkarto ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstclear_int(t_list_int **lst)
{
t_list_int *tmp;
t_list_int *tmp1;
tmp = *lst;
tmp1 = *lst;
if (tmp == NULL)
return ;
while (tmp != NULL)
{
tmp = tmp->next;
ft_lstdelone_int(tmp1);
tmp1 = tmp;
}
*lst = NULL;
}