-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstcircle.c
27 lines (23 loc) · 1.07 KB
/
ft_lstcircle.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstcircle.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lrocigno <lrocigno@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/05 11:10:31 by lrocigno #+# #+# */
/* Updated: 2021/11/06 14:17:16 by lrocigno ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** Close a linked list, creating a circular list.
*/
t_list *ft_lstcircle(t_list *list)
{
t_list *head;
head = list;
list = ft_lstlast(list);
list->next = head;
return (list);
}