/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstadd_back_bonus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/22 14:51:11 by narnaud #+# #+# */ /* Updated: 2021/11/15 13:07:12 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void ft_lstadd_back(t_list **alst, t_list *new) { t_list *i_cell; if (!alst || !new) return ; if (*alst) { i_cell = ft_lstlast(*alst); i_cell->next = new; } else *alst = new; }