GCC Code Coverage Report


Directory: ./
File: lib/my/my_free_ptr.c
Date: 2024-06-05 02:24:39
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 1 1 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** my_free_ptr
4 ** File description:
5 ** Free a pointer (ptr) and set it to NULL
6 */
7 /**
8 * @file my_free_ptr.c
9 * @brief The file containing the my_free_ptr function
10 * @author Nicolas TORO
11 */
12
13 #include "my.h"
14
15 212 void *my_free_ptr(void *ptr)
16 {
17
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 211 times.
212 if (ptr == NULL)
18 1 return NULL;
19 211 free(ptr);
20 211 ptr = NULL;
21 211 return NULL;
22 }
23