| 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 | 3 | node_t *my_pop_front(node_t **begin) | |
| 16 | { | ||
| 17 | 3 | node_t *tmp = *begin; | |
| 18 | |||
| 19 | 2/2✓ Branch 0 taken 1 times. ✓ Branch 1 taken 2 times. | 3 | if (*begin == NULL) | 
| 20 | 1 | return NULL; | |
| 21 | 2 | *begin = (*begin)->next; | |
| 22 | 1/2✓ Branch 0 taken 2 times. ✗ Branch 1 not taken. | 2 | if (*begin != NULL) | 
| 23 | 2 | (*begin)->prev = NULL; | |
| 24 | 2 | return tmp; | |
| 25 | } | ||
| 26 |