/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstnew_bonus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: thrieg +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/16 11:54:17 by thrieg #+# #+# */ /* Updated: 2025/02/16 19:04:02 by thrieg ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" //returns NULL if any allocation fails t_list *ft_lstnew(void *content) { t_list *ret; ret = malloc(sizeof(t_list)); if (!ret) return (NULL); ret->content = content; ret->next = NULL; return (ret); }