diff --git a/srcs/export.c b/srcs/export.c index 215ddc5..f882a6d 100755 --- a/srcs/export.c +++ b/srcs/export.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/18 18:29:20 by marde-vr #+# #+# */ -/* Updated: 2024/04/24 13:45:58 by marde-vr ### ########.fr */ +/* Updated: 2024/04/24 14:41:01 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -46,7 +46,7 @@ t_env *set_env(t_env *env, char *name, char *value, int append) } tmp = tmp->next; } - return (env); + return (env_add_back(env, name, value)); } t_env *export_set_env(t_env *env, char *name, char *value, int append) @@ -58,8 +58,7 @@ t_env *export_set_env(t_env *env, char *name, char *value, int append) ft_printf_fd(2, "minishell: malloc failed"); return (env); } - set_env(env, name, value, append); - return (env_add_back(env, name, value)); + return (set_env(env, name, value, append)); } int ft_export(t_msh *msh, t_token *cmd, t_env *env) diff --git a/srcs/input_redirections.c b/srcs/input_redirections.c index 403d8e3..661a03c 100755 --- a/srcs/input_redirections.c +++ b/srcs/input_redirections.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/05 18:15:27 by marde-vr #+# #+# */ -/* Updated: 2024/04/24 14:04:30 by tomoron ### ########.fr */ +/* Updated: 2024/04/24 14:41:40 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -75,8 +75,8 @@ int get_in_type(t_msh *msh, t_cmd *t_strt, t_cmd *tokens, int here_doc) while (cur_token && (cur_token->cmd_type == CMD || cur_token->cmd_type == PAREN)) cur_token = cur_token->next; - if (cur_token && ((cur_token->cmd_type == HERE_DOC && here_doc) - || (cur_token->cmd_type == RED_I && !here_doc))) + if (cur_token && ((cur_token->cmd_type == HERE_DOC && here_doc) + || (cur_token->cmd_type == RED_I && !here_doc))) { msh->in_type = cur_token->cmd_type; if (open_input_file(msh, &cur_token)) @@ -86,7 +86,7 @@ int get_in_type(t_msh *msh, t_cmd *t_strt, t_cmd *tokens, int here_doc) && cur_token->cmd_type != PIPE && cur_token->next->cmd_type != PIPE) return (get_in_type(msh, t_strt, cur_token->next, here_doc)); if (here_doc) - return(get_in_type(msh, t_strt, t_strt, 0)); + return (get_in_type(msh, t_strt, t_strt, 0)); return (0); }