Adding an else if to have a better if forest !
This commit is contained in:
parent
be1d3ff2d3
commit
7805286fa5
1 changed files with 2 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/12 16:00:33 by rparodi #+# #+# */
|
/* Created: 2024/05/12 16:00:33 by rparodi #+# #+# */
|
||||||
/* Updated: 2024/05/17 15:33:34 by maiboyer ### ########.fr */
|
/* Updated: 2024/05/18 17:49:43 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
#include "gmr/symbols.h"
|
#include "gmr/symbols.h"
|
||||||
#include "app/node.h"
|
#include "app/node.h"
|
||||||
#include "me/vec/vec_str.h"
|
#include "me/vec/vec_str.h"
|
||||||
// #include "app/node/handle_program.h"
|
|
||||||
#include "app/node/handle_command.h"
|
#include "app/node/handle_command.h"
|
||||||
#include "minishell.h"
|
#include "minishell.h"
|
||||||
#include "me/string/str_clone.h"
|
#include "me/string/str_clone.h"
|
||||||
|
|
@ -27,7 +26,7 @@ t_error semicolon_exec(t_node *first, t_node *second, t_i32 *ret_value)
|
||||||
{
|
{
|
||||||
if (!first && !second)
|
if (!first && !second)
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
if (!first)
|
else if (!first)
|
||||||
ft_command_exec(second, ret_value);
|
ft_command_exec(second, ret_value);
|
||||||
else if (!second)
|
else if (!second)
|
||||||
ft_command_exec(first, ret_value);
|
ft_command_exec(first, ret_value);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue