adjustement to ft_strjoin() after libft update
from libft : ft_strjoin() no longer return if an arg is NULL
This commit is contained in:
2
libft
2
libft
Submodule libft updated: d58ee38bab...af88c1ce23
@@ -99,10 +99,6 @@ static t_list *ret_parameter_expansion(char *content, int *i)
|
|||||||
free(tmp);
|
free(tmp);
|
||||||
if (expand->content)
|
if (expand->content)
|
||||||
expand->content = ft_strdup(expand->content);
|
expand->content = ft_strdup(expand->content);
|
||||||
else
|
|
||||||
expand->content = ft_calloc(1, 1);
|
|
||||||
if (!expand->content)
|
|
||||||
return (ft_retp_free(NULL, expand, free));
|
|
||||||
return (expand);
|
return (expand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,7 @@ char *rejoin_after_expand(t_list *expand_lst)
|
|||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
head = expand_lst;
|
head = expand_lst;
|
||||||
result = ft_calloc(1, 1);
|
result = NULL;
|
||||||
if (!result)
|
|
||||||
{//todo wrap
|
|
||||||
perror("rejoin_after_expand() error");
|
|
||||||
return (ft_lstclear(&head, free));
|
|
||||||
}
|
|
||||||
while (expand_lst)
|
while (expand_lst)
|
||||||
{
|
{
|
||||||
result = ft_strjoinfree_s1(result, expand_lst->content);
|
result = ft_strjoinfree_s1(result, expand_lst->content);
|
||||||
|
|||||||
Reference in New Issue
Block a user