-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strdel.c
35 lines (32 loc) · 1.31 KB
/
ft_strdel.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
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strdel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbutt <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/10 15:05:47 by mbutt #+# #+# */
/* Updated: 2019/03/12 15:39:06 by mbutt ### ########.fr */
/* */
/* ************************************************************************** */
/*
** Description - Takes as a parameter the address of a string that need to be
** freed with free(3), then sets its pointer to NULL.
** Param#1 - The string’s address that needs to be freed and its pointer set
** to NULL.
** RETURN VALUE _ NONE
** Libc FUnction - Free
*/
#include "libft.h"
void ft_strdel(char **as)
{
if (as)
{
free(*as);
*as = NULL;
}
}
/*
** How to use ft_memdel to write ft_strdel?
** ft_memdel((void **)as);
*/