-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstadd_back.c
More file actions
26 lines (23 loc) · 1.07 KB
/
Copy pathft_lstadd_back.c
File metadata and controls
26 lines (23 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmariano <mmariano@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/03 15:15:23 by marieli #+# #+# */
/* Updated: 2025/02/14 18:56:13 by mmariano ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *last_node;
if (*lst == NULL)
*lst = new;
else
{
last_node = ft_lstlast(*lst);
last_node->next = new;
}
}