42_solong/libftx/libft/ft_lstnew.c
Camille Chauvet 9e58abcd5c kekw
2022-12-22 17:54:17 +01:00

26 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/29 23:41:40 by cchauvet #+# #+# */
/* Updated: 2022/09/29 23:47:50 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *new;
new = malloc(sizeof(t_list));
if (new == NULL)
return (NULL);
new->next = NULL;
new->content = content;
return (new);
}