-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdel_matrix.c
31 lines (28 loc) · 1.1 KB
/
del_matrix.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: enoye <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/22 15:12:43 by enoye #+# #+# */
/* Updated: 2021/11/22 15:12:55 by enoye ### ########.fr */
/* */
/* ************************************************************************** */
#include "libpushswap.h"
void del_matrix(char **matrix, char **argv)
{
char **arr;
arr = matrix;
argv++;
if (matrix != argv)
{
while (*matrix != 0)
{
free(*matrix);
matrix++;
}
free(*matrix);
free(arr);
}
}