Browse Source

[norm] pipe: modifications which do not modify behavior.

Moul 2 years ago
parent
commit
3af6144027
2 changed files with 2 additions and 4 deletions
  1. 1 2
      src/pipe_exec.c
  2. 1 2
      src/pipe_redir_parsing.c

+ 1 - 2
src/pipe_exec.c

@@ -47,8 +47,7 @@ void	handle_multi_piping(t_e *e, t_pipe *p, t_pipe_redir *t)
 {
 	int		ok;
 
-	if (t->itxt != NULL)
-		ok = manage_cmd_1(e, p->cmd_opt[p->i]);
+	ok = manage_cmd_1(e, p->cmd_opt[p->i]);
 	if (fork() == 0)
 	{
 		open_left_redirections(e, p, t);

+ 1 - 2
src/pipe_redir_parsing.c

@@ -65,8 +65,7 @@ int		parse_double_redir(t_e *e, char *str, t_pipe *p, t_pipe_redir **t)
 		t[p->i]->itxt = NULL;
 		t[p->i]->operator = ft_strsub(&str[snd_chev], 0, nchev);
 		t[p->i]->otxt = ft_strtrim(&str[snd_chev + nchev]);
-		t[p->i]->ofd = -100;
-		p->i++;
+		t[p->i++]->ofd = -100;
 		p->pnbr++;
 	}
 	else