aboutsummaryrefslogtreecommitdiff
path: root/ft_lstlast.c
blob: 7442937b05cdd93183a19676f9b635064de3f83e (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdlib.h>
#include "libft.h"

t_list  *ft_lstlast(t_list *lst)
{
    if (lst == NULL)
        return (NULL);
    while (lst->next != NULL)
        lst = lst->next;
    return (lst);
}