-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstadd_back_bonus.c
23 lines (21 loc) · 1.04 KB
/
ft_lstadd_back_bonus.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_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tchevrie <tchevrie@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/19 16:45:15 by tchevrie #+# #+# */
/* Updated: 2022/10/05 05:07:42 by tchevrie ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **alst, t_list *new)
{
if (!alst || !new)
return ;
if (*alst)
ft_lstlast(*alst)->next = new;
else
*alst = new;
}