ft_lstnew - gabrielcoelhodacunha-old/42sp-libft GitHub Wiki

Description

Creates a new element containing content.

Implementation

t_list	*ft_lstnew(void *content)
{
	t_list	*lst;

	lst = malloc(sizeof(t_list));
	if (!lst)
		return (NULL);
	lst->content = content;
	lst->next = NULL;
	return (lst);
}

References