-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_lstadd_front.c
25 lines (23 loc) · 1.19 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.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cjackows <@student.42wolfsburg.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/12 17:23:01 by cjackows #+# #+# */
/* Updated: 2023/06/01 10:02:59 by cjackows ### ########.fr */
/* */
/* ************************************************************************** */
#include "../inc/libft.h"
/**
* @brief Adds the node ’new’ at the beginning of the list
*
* @param lst The address of a pointer to the first link of a list
* @param new The address of a pointer to the node to be added to the list.
*/
void ft_lstadd_front(t_list **lst, t_list *new)
{
new->next = (*lst);
*lst = new;
}