-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstadd_front.c
More file actions
26 lines (24 loc) · 1.05 KB
/
ft_lstadd_front.c
File metadata and controls
26 lines (24 loc) · 1.05 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_front_bonus.c :+: :+: */
/* +:+ */
/* By: cwesseli <cwesseli@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2022/10/20 10:29:13 by cwesseli #+# #+# */
/* Updated: 2022/10/20 10:29:16 by cwesseli ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_front(t_list **lst, t_list *new)
{
if (!new || !lst)
return ;
if (*lst == NULL)
{
*lst = new;
return ;
}
new->next = *lst;
*lst = new;
}