GCC Code Coverage Report


Directory: ./
File: lib/mylist/my_pop_front.c
Date: 2024-06-05 00:36:48
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 1 1 100.0%
Branches: 4 4 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** template
4 ** File description:
5 ** The my_pop_front.c
6 */
7 /**
8 * @file my_pop_front.c
9 * @brief The file containing the my_pop_front function
10 * @author Nicolas TORO
11 */
12
13 #include "mylist.h"
14
15 1396 node_t *my_pop_front(node_t **begin)
16 {
17 1396 node_t *tmp = *begin;
18
19
2/2
✓ Branch 0 taken 689 times.
✓ Branch 1 taken 707 times.
1396 if (*begin == NULL)
20 689 return NULL;
21 707 *begin = (*begin)->next;
22
2/2
✓ Branch 0 taken 21 times.
✓ Branch 1 taken 686 times.
707 if (*begin != NULL)
23 21 (*begin)->prev = NULL;
24 707 return tmp;
25 }
26