Push_swap/libft/ft_lstnew.c
2022-01-03 04:54:22 +01:00

26 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <alexpomms@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/09 01:06:20 by apommier #+# #+# */
/* Updated: 2020/12/11 17:46:20 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *new;
new = (t_list*)malloc(sizeof(t_list));
if (!new)
return (0);
new->nbr = content;
new->next = 0;
return (new);
}