-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstlast_bonus.c
More file actions
27 lines (24 loc) · 1.08 KB
/
ft_lstlast_bonus.c
File metadata and controls
27 lines (24 loc) · 1.08 KB
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_lstlast_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ymassiou <ymassiou@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/07 22:12:02 by ymassiou #+# #+# */
/* Updated: 2023/11/09 12:32:02 by ymassiou ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstlast(t_list *lst)
{
t_list *current;
current = lst;
if (current == NULL)
return (NULL);
while (current->next != NULL)
{
current = current->next;
}
return (current);
}