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
15
t_list
*
ft_lstlast
(
t_list
*lst)
16
{
17
if
(!lst)
18
return
(NULL);
19
while
(lst->
next
)
20
lst = lst->
next
;
21
return
(lst);
22
}
ft_lstlast
t_list * ft_lstlast(t_list *lst)
Last node in a list.
Definition
ft_lstlast.c:15
libft.h
s_list
Definition
libft.h:22
s_list::next
struct s_list * next
Definition
libft.h:24
src
ft_lstlast.c
Generated by
1.9.7