-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_ppdel.c
33 lines (30 loc) · 1.1 KB
/
ft_ppdel.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
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ppdel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vpopovyc <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/02 16:12:56 by vpopovyc #+# #+# */
/* Updated: 2017/02/06 15:09:51 by vpopovyc ### ########.fr */
/* */
/* ************************************************************************** */
#include "includes/libft.h"
void ft_ppdel(char ***sv)
{
char i;
i = 0;
if (*sv != NULL && **sv != NULL)
{
while (**sv)
{
free(**sv);
**sv = NULL;
++(*sv);
++i;
}
*sv -= i;
free(*sv);
*sv = NULL;
}
}