/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstlast.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: aortigos +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/10/22 20:25:15 by aortigos #+# #+# */ /* Updated: 2023/10/22 20:37:37 by aortigos ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" t_list *ft_lstlast(t_list *lst) { if (!lst) return (NULL); while (lst) { if (!lst->next) return (lst); lst = lst->next; } return (lst); }