-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstnew.c
More file actions
26 lines (23 loc) · 1.08 KB
/
ft_lstnew.c
File metadata and controls
26 lines (23 loc) · 1.08 KB
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_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jbadaire <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/17 17:19:10 by jbadaire #+# #+# */
/* Updated: 2023/01/17 17:19:23 by jbadaire ### ########lyon.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <stdlib.h>
t_list *ft_lstnew(void *content)
{
t_list *list;
list = malloc(sizeof (t_list));
if (!list)
return (0);
list->content = content;
list->next = NULL;
return (list);
}