-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_lstapp.c
26 lines (24 loc) · 1.04 KB
/
ft_lstapp.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_lstapp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: smonroe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/16 14:53:41 by smonroe #+# #+# */
/* Updated: 2019/04/16 14:54:52 by smonroe ### ########.fr */
/* */
/* ************************************************************************** */
void ft_lstapp(t_list **alst, t_list *new)
{
t_list *tmp;
if (!*alst)
{
*alst = new;
return ;
}
tmp = *alst;
while (tmp->next)
tmp = tmp->next;
tmp->next = new;
}