libft/ft_lstnew.c
Etienne Rey-bethbeder 191a193cb2 origin
2022-10-11 22:51:06 +02:00

26 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/09 21:34:58 by erey-bet #+# #+# */
/* Updated: 2022/10/11 22:13:33 by erey-bet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *list;
list = malloc(sizeof(t_list));
if (list == NULL)
return (NULL);
list->content = content;
list->next = NULL;
return (list);
}