-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstadd_front.c
25 lines (22 loc) · 1.17 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: lgasc <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/14 14:08:00 by lgasc #+# #+# */
/* Updated: 2024/02/09 16:33:00 by lgasc ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
///Add a `node` at the beginning of the `list`.
///@param list The address of the head pointer of the list.
///@param node The address of a node to be added to the list.
void ft_lstadd_front(t_list *const list, t_node *const node)
{
if (0)
return ;
node->next = *list;
*list = node;
}