From 86b25977265727217ec3360c3dc19b74f2bd448f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 28 Apr 2020 15:49:58 +0200 Subject: exit is fine --- src/ft_b_exit.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/ft_b_exit.c') diff --git a/src/ft_b_exit.c b/src/ft_b_exit.c index ae421cf..7a7e5e8 100644 --- a/src/ft_b_exit.c +++ b/src/ft_b_exit.c @@ -13,6 +13,8 @@ #include #include #include +#include + #include "ft_f_fail.h" #include "ft_s_lcom.h" #include "ft_s_destroy.h" @@ -36,13 +38,6 @@ uint8_t ret = ft_atoi(args[0]); /* TODO: non numeric args[0] */ } - else - { - ret = msh->ret; - } - ft_lcom_clear(&msh->curr); - ft_s_destroy(msh); - ft_printf("exit\n"); - exit(ret); + ft_dprintf(STDERR_FILENO, "exit\n"); return (0); } -- cgit v1.2.3