minishell
ft_lstnew.c File Reference
#include <stdlib.h>
#include "ft_lst.h"
Include dependency graph for ft_lstnew.c:

Go to the source code of this file.

Functions

t_listft_lstnew (void *content)
 

Function Documentation

◆ ft_lstnew()

t_list* ft_lstnew ( void *  content)

Definition at line 16 of file ft_lstnew.c.

17 {
18  t_list *p_ret;
19 
20  p_ret = malloc(sizeof(t_list));
21  if (p_ret != NULL)
22  {
23  p_ret->content = content;
24  p_ret->next = NULL;
25  }
26  return (p_ret);
27 }
Definition: ft_lst.h:18
void * content
Definition: ft_lst.h:19
struct s_list * next
Definition: ft_lst.h:20
Here is the caller graph for this function: