-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstnew.c
24 lines (21 loc) · 1.06 KB
/
ft_lstnew.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: earnaud <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/14 20:05:31 by earnaud #+# #+# */
/* Updated: 2020/11/15 20:03:45 by earnaud ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *result;
if (!(result = malloc(sizeof(t_list))))
return (0);
result->content = content;
result->next = 0;
return (result);
}