-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstadd_back.c
23 lines (21 loc) · 1.03 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: agoksu <agoksu@student.42istanbul.com.tr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/05 17:53:29 by agoksu #+# #+# */
/* Updated: 2022/10/05 17:53:32 by agoksu ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *tmp;
tmp = ft_lstlast(*lst);
if (!tmp)
*lst = new;
else
tmp->next = new;
}