fractol/libft/src/ft_lstadd_back.c

30 lines
1.1 KiB
C
Raw Normal View History

2023-03-01 04:36:42 +01:00
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/13 18:48:54 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:30 by houtworm ### ########.fr */
/* */
/* ************************************************************************** */
#include "../libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *l;
if (lst)
{
if (*lst)
{
l = ft_lstlast(*lst);
l->next = new;
}
else
*lst = new;
}
}