-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstadd.c
26 lines (24 loc) · 1.02 KB
/
ft_lstadd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ciglesia <ciglesia@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/08/13 20:45:43 by ciglesia #+# #+# */
/* Updated: 2020/08/10 21:51:58 by ciglesia ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd(t_list **alst, t_list *new)
{
if (*alst)
{
new->next = *alst;
*alst = new;
}
else
{
*alst = new;
}
}