/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstlast.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:42:54 by rparodi #+# #+# */ /* Updated: 2024/10/31 17:48:08 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" /** * @brief Found the last element of the chained list * * @param lst the chained list * @return the last element of the chained list */ t_list *ft_lstlast(t_list *lst) { if (lst == NULL) return (lst); while (lst->next != NULL) lst = lst->next; return (lst); }