-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstadd_back.c
More file actions
24 lines (21 loc) · 1.03 KB
/
ft_lstadd_back.c
File metadata and controls
24 lines (21 loc) · 1.03 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: atutuncu <atutuncu@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/02 16:07:25 by atutuncu #+# #+# */
/* Updated: 2023/01/03 14:14:03 by atutuncu ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *curr;
curr = ft_lstlast(*lst);
if (!curr)
*lst = new;
else
curr->next = new;
}