Replaced malloc to ft_malloc for completion
This commit is contained in:
parent
151b4ec02d
commit
6313e7ff4c
3 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ static int c_addnode(t_comp *c, char *value)
|
|||
{
|
||||
t_clst *tmp;
|
||||
|
||||
if (!(tmp = (t_clst *)malloc(sizeof(t_clst))))
|
||||
if (!(tmp = (t_clst *)ft_malloc(sizeof(t_clst))))
|
||||
return (-1);
|
||||
tmp->name = value;
|
||||
tmp->len = ft_strlen(tmp->name);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ void c_init(t_data *s, long int input)
|
|||
{
|
||||
int len_trail;
|
||||
|
||||
if (!(s->comp = (t_comp *)malloc((sizeof(t_comp)))))
|
||||
if (!(s->comp = (t_comp *)ft_malloc((sizeof(t_comp)))))
|
||||
return ;
|
||||
c_init_base(s->comp);
|
||||
s->comp->rcmd = c_trimmer(s->line.input, s->line.pos, s->line.pos);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static int c_storing(t_comp *c, char *value, unsigned char type)
|
|||
return (0);
|
||||
if (c->match && ft_strnequ(c->match, value, ft_strlen(c->match)) != 1)
|
||||
return (0);
|
||||
if (!(tmp = (t_clst *)malloc(sizeof(t_clst))))
|
||||
if (!(tmp = (t_clst *)ft_malloc(sizeof(t_clst))))
|
||||
return (-1);
|
||||
tmp->name = ft_strdup(value);
|
||||
tmp->len = ft_strlen(tmp->name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue