adjustement to ft_strjoin() after libft update

from libft : ft_strjoin() no longer return if an arg is NULL
This commit is contained in:
LuckyLaszlo
2021-12-08 03:46:40 +01:00
parent 8a7611da92
commit 312c90539b
3 changed files with 2 additions and 11 deletions

2
libft

Submodule libft updated: d58ee38bab...af88c1ce23

View File

@@ -99,10 +99,6 @@ static t_list *ret_parameter_expansion(char *content, int *i)
free(tmp);
if (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);
}

View File

@@ -18,12 +18,7 @@ char *rejoin_after_expand(t_list *expand_lst)
char *result;
head = expand_lst;
result = ft_calloc(1, 1);
if (!result)
{//todo wrap
perror("rejoin_after_expand() error");
return (ft_lstclear(&head, free));
}
result = NULL;
while (expand_lst)
{
result = ft_strjoinfree_s1(result, expand_lst->content);