-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstadd_back.c
21 lines (19 loc) · 1.01 KB
/
ft_lstadd_back.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: alouzizi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/18 14:21:48 by alouzizi #+# #+# */
/* Updated: 2021/11/19 22:34:11 by alouzizi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
if (*lst == NULL)
*lst = new;
else
ft_lstlast(*lst)->next = new;
}