-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstadd_front.c
25 lines (22 loc) · 1.03 KB
/
ft_lstadd_front.c
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_front_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kgriset <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/16 12:37:23 by kgriset #+# #+# */
/* Updated: 2023/11/17 09:46:35 by kgriset ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_front(t_list **lst, t_list *new)
{
t_list *temp;
if (lst != NULL)
{
temp = *lst;
*lst = new;
new->next = temp;
}
}