-
Notifications
You must be signed in to change notification settings - Fork 0
/
free_funcs.c
32 lines (28 loc) · 1.11 KB
/
free_funcs.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
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* free_funcs.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zessadqu <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/26 11:42:02 by zessadqu #+# #+# */
/* Updated: 2022/06/04 11:31:48 by zessadqu ### ########.fr */
/* */
/* ************************************************************************** */
#include "check_header.h"
void free_here(t_nums **all)
{
t_nums *tmp;
while (*all)
{
tmp = *all;
tmp->num = 0;
(*all) = (*all)->next;
free(tmp);
}
}
void free_a_and_b(t_nums **a, t_nums **b)
{
free_here(a);
free_here(b);
}