42_cub3d/Libft/ft_lstnew.c
2024-10-09 03:35:09 +02:00

24 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: grobledo <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/21 19:40:32 by grobledo #+# #+# */
/* Updated: 2023/02/21 22:58:42 by grobledo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *new;
new = malloc(sizeof(t_list));
if (new == 0)
return (NULL);
new->content = content;
new->next = NULL;
return (new);
}