-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstlast.c
21 lines (19 loc) · 1.02 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstlast_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aizsak <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/19 10:12:08 by aizsak #+# #+# */
/* Updated: 2022/11/19 14:54:04 by aizsak ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstlast(t_list *lst)
{
if (lst == NULL || lst->next == NULL)
return (lst);
else
return (ft_lstlast(lst->next));
}