23 lines
1.0 KiB
C
23 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstlast.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/09/29 23:55:52 by cchauvet #+# #+# */
|
||
|
/* Updated: 2022/09/30 01:20:18 by cchauvet ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
t_list *ft_lstlast(t_list *lst)
|
||
|
{
|
||
|
if (lst == NULL)
|
||
|
return (NULL);
|
||
|
while (lst->next != NULL)
|
||
|
lst = lst->next;
|
||
|
return (lst);
|
||
|
}
|