-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_node.c
25 lines (22 loc) · 1.12 KB
/
create_node.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* create_node.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: atoof <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/11 17:33:02 by atoof #+# #+# */
/* Updated: 2023/04/11 17:33:02 by atoof ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
t_node *create_node(int data)
{
t_node *new_node;
new_node = (t_node *)malloc(sizeof(t_node));
if (!new_node)
return (NULL);
new_node->data = data;
new_node->next = NULL;
return (new_node);
}