1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "libft.h" #include <stdlib.h> t_list * ft_lstnew (void *content) { t_list *node; node = malloc (sizeof (t_list)); if (!node) return (NULL); node->content = content; node->next = NULL; return (node); }