libft_old/extended_libft/ft_lstnew.c
Willem Haffmans 326f52308e all
2024-07-26 22:32:04 +02:00

28 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/05 18:42:06 by whaffman #+# #+# */
/* Updated: 2024/07/10 16:32:16 by whaffman ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "libft.h"
t_list *ft_lstnew(void *content)
{
t_list *node;
node = malloc(sizeof(t_list));
if (node)
{
node->content = content;
node->next = NULL;
}
return (node);
}