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

t_list  *ft_lstnew(void const *content)
{
    t_list  *elem;

    if ((elem = (t_list*)malloc(sizeof(t_list))) == NULL)
        return (NULL);
    /* elem->content = (void*)content; */
    (void)content;
    elem->next = NULL;
    return (elem);
}