GCC Code Coverage Report


Directory: ./
File: lib/my/my_free_array.c
Date: 2024-05-07 14:54:03
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 1 1 100.0%
Branches: 4 4 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** my_free_array
4 ** File description:
5 ** Free an array (array)
6 */
7 /**
8 * @file my_free_array.c
9 * @brief The file containing the my_free_array function
10 * @author Nicolas TORO
11 */
12
13 #include "my.h"
14
15 13409 void my_free_array(void **array)
16 {
17
2/2
✓ Branch 0 taken 1666 times.
✓ Branch 1 taken 11743 times.
13409 if (array == NULL)
18 1666 return;
19
2/2
✓ Branch 0 taken 17732 times.
✓ Branch 1 taken 11743 times.
29475 for (int i = 0; array[i] != NULL; i++)
20 17732 FREE(array[i]);
21 11743 FREE(array);
22 }
23