This commit is contained in:
kinou-p 2022-04-19 12:47:08 +02:00
parent 954e8c47fb
commit c492d6416d
2 changed files with 11 additions and 12 deletions

View File

@ -6,15 +6,15 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */ /* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/09 12:33:30 by apommier #+# #+# */ /* Created: 2022/03/09 12:33:30 by apommier #+# #+# */
/* Updated: 2022/04/19 12:01:16 by apommier ### ########.fr */ /* Updated: 2022/04/19 12:46:46 by apommier ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "../../includes/minishell.h" #include "../../includes/minishell.h"
void exit_shell(t_cmd *cmd, int ret) void exit_shell(t_cmd *cmd, int ret)
{ {
int i; int i;
i = 0; i = 0;
ft_putstr_fd("exit\n", 1); ft_putstr_fd("exit\n", 1);
@ -40,7 +40,7 @@ void exit_shell(t_cmd *cmd, int ret)
exit(ret); exit(ret);
} }
void free_cmd(t_cmd *cmd) void free_cmd(t_cmd *cmd)
{ {
int i; int i;

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */ /* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/08 15:19:42 by apommier #+# #+# */ /* Created: 2022/03/08 15:19:42 by apommier #+# #+# */
/* Updated: 2022/04/19 12:35:26 by apommier ### ########.fr */ /* Updated: 2022/04/19 12:46:09 by apommier ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -98,7 +98,6 @@ t_cmd *set_cmd(char *input, char **env, int nb)
cmds = ft_split_with_quote(input, '|'); cmds = ft_split_with_quote(input, '|');
if (!cmds) if (!cmds)
return (0); return (0);
cmd = malloc(sizeof(t_cmd)); cmd = malloc(sizeof(t_cmd));
if (!cmd) if (!cmd)
return (0); return (0);