libft
Loading...
Searching...
No Matches
ft_lstlast.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_lstlast_bonus.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tspoof <tspoof@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2022/11/07 13:07:18 by tspoof #+# #+# */
9/* Updated: 2022/11/07 13:29:31 by tspoof ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
16{
17 if (!lst)
18 return (NULL);
19 while (lst->next)
20 lst = lst->next;
21 return (lst);
22}
t_list * ft_lstlast(t_list *lst)
Last node in a list.
Definition ft_lstlast.c:15
Definition libft.h:22
struct s_list * next
Definition libft.h:24