blob: 973e1a46e8fbfd9b212ea3aebd3a98dd2eda7f6b (
plain)
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_btnew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/07 21:33:16 by cacharle #+# #+# */
/* Updated: 2020/02/07 21:34:35 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_bt.h"
t_ftbtree *ft_btnew(void *data)
{
t_ftbtree *tree;
if ((tree = (t_ftbtree*)malloc(sizeof(t_ftbtree))) == NULL)
return (NULL);
tree->data = data;
tree->left = NULL;
tree->right = NULL;
return (tree);
}
|