libft/list/ft_lstlast.c
Raphael 3cadabea0a
docs(list): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:29 +02:00

23 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstlast.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:42:54 by rparodi #+# #+# */
/* Updated: 2025/09/05 16:14:04 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "list.h"
#include <unistd.h>
t_list *ft_lstlast(t_list *lst)
{
if (lst == NULL)
return (lst);
while (lst->next != NULL)
lst = lst->next;
return (lst);
}