GCC Code Coverage Report


Directory: ./
File: lib/mylist/my_rev_list.c
Date: 2024-06-05 02:24:39
Exec Total Coverage
Lines: 0 12 0.0%
Functions: 0 1 0.0%
Branches: 0 2 0.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_rev_list
4 ** File description:
5 ** Reverses a linked list
6 */
7
8 #include "mylist.h"
9
10 ✗ void my_rev_list(linked_list_t **begin)
11 {
12 ✗ linked_list_t *previous_list = NULL;
13 ✗ linked_list_t *current_list = *begin;
14 ✗ linked_list_t *next_list = NULL;
15
16 ✗ while (current_list != NULL) {
17 ✗ next_list = current_list->next;
18 ✗ current_list->next = previous_list;
19 ✗ current_list->prev = next_list;
20 ✗ previous_list = current_list;
21 ✗ current_list = next_list;
22 }
23 ✗ *begin = previous_list;
24 ✗ }
25