piscine/c12/ex00/ft_create_elem.c
Willem Haffmans 607ce08c18 all
2024-09-10 00:18:01 +02:00

27 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_create_elem.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/03 14:00:22 by whaffman #+# #+# */
/* Updated: 2024/07/03 14:29:34 by whaffman ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_list.h"
t_list *ft_create_elem(void *data)
{
t_list *node;
node = malloc(sizeof(t_list));
if (node)
{
node->data = data;
node->next = NULL;
}
return (node);
}