tgrekov-fdf
HIVE fdf May 2024
Loading...
Searching...
No Matches
arr_free.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* arr_free.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/04/22 07:52:00 by tgrekov #+# #+# */
9
/* Updated: 2024/06/24 08:26:23 by tgrekov ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
20
#include <stdlib.h>
21
#include <ft_printf.h>
22
30
void
**
arr_free
(
void
**arr)
31
{
32
int
i;
33
34
if
(!arr || !*arr)
35
return
(0);
36
i = 0;
37
while
(arr[i])
38
free(arr[i++]);
39
free(arr);
40
return
(0);
41
}
arr_free
void ** arr_free(void **arr)
Free each element in a null-terminated array, and then the array itself.
Definition
arr_free.c:30
src
mandatory
utils
arr_free.c