-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathft_lstadd.c
23 lines (20 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rlambert <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/07 15:54:56 by rlambert #+# #+# */
/* Updated: 2015/01/03 10:17:51 by rlambert ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lstadd(t_list **alst, void *content, size_t content_size)
{
t_list *new;
if ((new = ft_lstnew(content, content_size)) == NULL)
return (0);
ft_lstlink(alst, new);
return (1);
}