core/exec-invoke: drop redundant stdio_fdname checks
exec_context_fdname() would never return NULL if corresponding stdio mode is set to named fd.
This commit is contained in:
@@ -4765,7 +4765,6 @@ static int exec_context_named_iofds(
|
||||
for (size_t i = 0; i < n_fds && targets > 0; i++)
|
||||
if (named_iofds[STDIN_FILENO] < 0 &&
|
||||
c->std_input == EXEC_INPUT_NAMED_FD &&
|
||||
stdio_fdname[STDIN_FILENO] &&
|
||||
streq(p->fd_names[i], stdio_fdname[STDIN_FILENO])) {
|
||||
|
||||
named_iofds[STDIN_FILENO] = p->fds[i];
|
||||
@@ -4773,7 +4772,6 @@ static int exec_context_named_iofds(
|
||||
|
||||
} else if (named_iofds[STDOUT_FILENO] < 0 &&
|
||||
c->std_output == EXEC_OUTPUT_NAMED_FD &&
|
||||
stdio_fdname[STDOUT_FILENO] &&
|
||||
streq(p->fd_names[i], stdio_fdname[STDOUT_FILENO])) {
|
||||
|
||||
named_iofds[STDOUT_FILENO] = p->fds[i];
|
||||
@@ -4781,7 +4779,6 @@ static int exec_context_named_iofds(
|
||||
|
||||
} else if (named_iofds[STDERR_FILENO] < 0 &&
|
||||
c->std_error == EXEC_OUTPUT_NAMED_FD &&
|
||||
stdio_fdname[STDERR_FILENO] &&
|
||||
streq(p->fd_names[i], stdio_fdname[STDERR_FILENO])) {
|
||||
|
||||
named_iofds[STDERR_FILENO] = p->fds[i];
|
||||
|
||||
Reference in New Issue
Block a user