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

Go to the source code of this file.

Functions

void ft_lstadd_back (t_list **lst, t_list *new)
 

Function Documentation

◆ ft_lstadd_back()

void ft_lstadd_back ( t_list **  lst,
t_list new 
)

Definition at line 16 of file ft_lstadd_back.c.

17 {
18  if (lst == NULL || new == NULL)
19  return ;
20  if (*lst == NULL)
21  *lst = new;
22  else
23  ft_lstlast(*lst)->next = new;
24 }
t_list * ft_lstlast(t_list *lst)
Definition: ft_lstlast.c:16
struct s_list * next
Definition: ft_lst.h:20
Here is the call graph for this function:
Here is the caller graph for this function: