diff options
Diffstat (limited to 'src/lst/ft_lstnew.c')
| -rw-r--r-- | src/lst/ft_lstnew.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lst/ft_lstnew.c b/src/lst/ft_lstnew.c index 11cf223..1616b71 100644 --- a/src/lst/ft_lstnew.c +++ b/src/lst/ft_lstnew.c @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_lstnew_bonus.c :+: :+: :+: */ +/* ft_lstnew.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -10,16 +10,20 @@ /* */ /* ************************************************************************** */ -#include "libft.h" #include "libft_lst.h" -t_ftlst *ft_lstnew(void const *content) +/* +** \brief Create a list node +** \param data Pointer to data of node +*/ + +t_ftlst *ft_lstnew(void const *data) { t_ftlst *elem; if ((elem = (t_ftlst*)malloc(sizeof(t_ftlst))) == NULL) return (NULL); - elem->content = (void*)content; + elem->data = (void*)data; elem->next = NULL; return (elem); } |
