From 840957aee277e7c426647cc133b2a41e7cecd9a9 Mon Sep 17 00:00:00 2001 From: Cabergs Charles Date: Wed, 9 Oct 2019 09:12:43 +0200 Subject: Normed, Makefile bonus rule - bonus rule to add the *_bonus files to libft.a - normed memmove, calloc and bonus --- ft_lstlast_bonus.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ft_lstlast_bonus.c (limited to 'ft_lstlast_bonus.c') diff --git a/ft_lstlast_bonus.c b/ft_lstlast_bonus.c new file mode 100644 index 0000000..e3195e8 --- /dev/null +++ b/ft_lstlast_bonus.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstlast_bonus.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/09 09:03:40 by cacharle #+# #+# */ +/* Updated: 2019/10/09 09:08:12 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include "libft_bonus.h" + +t_list *ft_lstlast(t_list *lst) +{ + if (lst == NULL) + return (NULL); + while (lst->next != NULL) + lst = lst->next; + return (lst); +} -- cgit