get_next_line/ft_get_last_node.c

24 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_get_last_node.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/02/28 07:10:21 by gbrochar #+# #+# */
/* Updated: 2016/02/28 07:12:12 by gbrochar ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_get_last_node(t_list **alst)
{
t_list *tmp;
tmp = *alst;
while (tmp->next)
tmp = tmp->next;
return (tmp);
}