/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstlast.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:42:54 by rparodi #+# #+# */ /* Updated: 2025/09/01 16:36:47 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "list.h" #include /** * @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); }