42_cube3D/libftx/libft/ft_lstnew.c
Camille Chauvet 537283e940 add: libftx
2023-04-26 11:02:44 +00: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);
}