Projet de l'école 42 : Libft
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.1 KiB

3 years ago
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/20 17:36:09 by narnaud #+# #+# */
/* Updated: 2021/11/15 13:06:52 by narnaud ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *i_cell;
i_cell = (t_list *)malloc(sizeof(*i_cell));
if (!i_cell)
return (NULL);
i_cell->content = content;
i_cell->next = NULL;
return (i_cell);
}