tgrekov-push_swap
HIVE push_swap July 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/07/17 08:31:24 by tgrekov ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
20
#include <stdlib.h>
21
29
void
**
arr_free
(
void
**arr)
30
{
31
int
i;
32
33
if
(!arr || !*arr)
34
return
(0);
35
i = 0;
36
while
(arr[i])
37
free(arr[i++]);
38
free(arr);
39
return
(0);
40
}
arr_free
void ** arr_free(void **arr)
Free each element in a null-terminated array, and then the array itself.
Definition
arr_free.c:29
src
mandatory
utils
arr_free.c