GCC Code Coverage Report


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

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_list_size
4 ** File description:
5 ** Returns the size of a linked list
6 */
7 /**
8 * @file my_list_size.c
9 * @brief The file containing the my_list_size function
10 * @author Nicolas TORO
11 */
12
13 #include "mylist.h"
14
15 1578 int my_list_size(node_t const *begin)
16 {
17 1578 int nb = 0;
18
19
2/2
✓ Branch 0 taken 16965 times.
✓ Branch 1 taken 1578 times.
18543 for (; begin != NULL; nb++)
20 16965 begin = begin->next;
21 1578 return nb;
22 }
23