-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_create_elem.c
More file actions
29 lines (26 loc) · 1.17 KB
/
ft_create_elem.c
File metadata and controls
29 lines (26 loc) · 1.17 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
27
28
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_create_elem.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: knzeng-e <knzeng-e@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/04/01 01:32:19 by knzeng-e #+# #+# */
/* Updated: 2016/04/01 01:32:32 by knzeng-e ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_create_elem(void *data, size_t size_content)
{
t_list *list;
list = NULL;
list = (t_list*)malloc(sizeof(t_list));
if (list)
{
list->content = ft_memalloc(size_content);
list->content = data;
list->content_size = size_content;
list->next = NULL;
}
return (list);
}