-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstadd_back.c
20 lines (19 loc) · 1 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sperez-p <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/24 10:16:21 by sperez-p #+# #+# */
/* Updated: 2021/09/06 17:13:11 by sperez-p ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
if (!*lst)
*lst = new;
else
ft_lstlast(*lst)->next = new;
}