From 56ccad6b85a5f3f17eebaf4ba511e07ba760b050 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 15 Aug 2020 18:00:23 +0200 Subject: Can read scripts, but need to handle fails --- src/m_minishell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/m_minishell.c') diff --git a/src/m_minishell.c b/src/m_minishell.c index e88207b..a538041 100644 --- a/src/m_minishell.c +++ b/src/m_minishell.c @@ -30,13 +30,11 @@ int int32_t ret; t_msh *msh; - /* TODO: handle general variables | $var */ - if (!(msh = init_msh(argv, envp))) + if ((msh = init_msh(argv, envp)) == NULL) { ft_dprintf(2, "%s\n", strerror(errno)); return (FT_RET_ALLOC); } - /* TODO: delet this */ ret = m_argv(argc, argv, msh); s_destroy(msh); return (ret); -- cgit v1.2.3