aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_lstnew.c
blob: 37412b4972b0b6dfe54f47d372481102acd09698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "libft.h"
#include <stdlib.h>

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

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