-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstadd_back_bonus.c
More file actions
25 lines (23 loc) · 1.06 KB
/
ft_lstadd_back_bonus.c
File metadata and controls
25 lines (23 loc) · 1.06 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rgerdzhi <rgerdzhi@student.42barcelon +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/17 18:32:33 by rgerdzhi #+# #+# */
/* Updated: 2024/07/17 19:05:42 by rgerdzhi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *back;
if (!new || !lst)
return ;
back = ft_lstlast(*lst);
if (!back)
*lst = new;
else
back->next = new;
}