-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstadd_back.c
23 lines (21 loc) · 1.05 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
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kakiba <kotto555555@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/12 00:01:25 by kakiba #+# #+# */
/* Updated: 2022/07/21 15:24:52 by kakiba ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
if (new == NULL || lst == NULL)
return ;
if (*lst == NULL)
*lst = new;
else
ft_lstlast(*lst)-> next = new;
}