-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstlast.c
25 lines (22 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
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstlast.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ahmaymou <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 12:03:59 by ahmaymou #+# #+# */
/* Updated: 2022/10/26 16:35:47 by ahmaymou ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstlast(t_list *lst)
{
t_list *temp;
temp = lst;
if (!lst)
return (NULL);
while (temp->next)
temp = temp->next;
return (temp);
}