/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstadd_back.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:06:40 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:06:40 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include void ft_lstadd_back(t_list **alst, t_list *new) { t_list *tmp; if (alst == NULL || new == NULL) { return ; } if (*alst == NULL) { *alst = new; } else { tmp = ft_lstlast(*alst); tmp->next = new; } }