-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstlast.c
23 lines (21 loc) · 1.04 KB
/
ft_lstlast.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstlast.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lumfred <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/15 14:34:06 by lumfred #+# #+# */
/* Updated: 2021/10/16 15:11:53 by lumfred ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstlast(t_list *lst)
{
t_list *last;
last = lst;
if (last != NULL)
while (last->next != NULL)
last = last->next;
return (last);
}