diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-10 17:56:38 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-10 17:56:38 +0200 |
commit | 4b233e06a16bf5183223e8253b4d9ac9ee59e6a2 (patch) | |
tree | dc36a64dcad37e076f478aadc7cccb0f322ea192 /src/u_vars.c | |
parent | pwd TODO done (diff) | |
download | 42-minishell-4b233e06a16bf5183223e8253b4d9ac9ee59e6a2.tar.gz 42-minishell-4b233e06a16bf5183223e8253b4d9ac9ee59e6a2.tar.bz2 42-minishell-4b233e06a16bf5183223e8253b4d9ac9ee59e6a2.tar.xz 42-minishell-4b233e06a16bf5183223e8253b4d9ac9ee59e6a2.tar.zst 42-minishell-4b233e06a16bf5183223e8253b4d9ac9ee59e6a2.zip |
Work in progress
Diffstat (limited to 'src/u_vars.c')
-rw-r--r-- | src/u_vars.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/u_vars.c b/src/u_vars.c index e949cc9..ebdba25 100644 --- a/src/u_vars.c +++ b/src/u_vars.c @@ -29,9 +29,7 @@ static char if (!(varval = ft_strdup(p_env))) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } @@ -76,9 +74,7 @@ static char { if ((varval = ft_uitoa(msh->ret)) == NULL) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } @@ -86,9 +82,7 @@ static char { if ((varval = ft_strdup(msh->shname)) == NULL) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } @@ -112,9 +106,7 @@ char { if (!(varval = ft_strdup(ptr->val))) { - lcom_clear(&msh->curr); - s_destroy(msh); - f_fail_alloc(msh); + f_alloc_and_destroy_msh(msh); } return (varval); } |