42-archive/libftasm/srcs/lst/ft_lstlast.c
2017-03-31 18:21:20 +02:00

21 lines
1,013 B
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstlast.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/04 11:09:48 by jhalford #+# #+# */
/* Updated: 2017/02/09 20:46:28 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstlast(t_list *lst)
{
if (lst)
while (lst->next)
lst = lst->next;
return (lst);
}