14-04-2026
20 lines
1.0 kB
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_lstlast.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: mleitao <mleitao@student.42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2026/03/16 18:21:34 by mleitao #+# #+# */
9/* Updated: 2026/04/14 19:19:04 by mleitao ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15t_list *ft_lstlast(t_list *lst)
16{
17 while (lst && lst->next)
18 lst = lst->next;
19 return (lst);
20}