From 234d8f8bc38375a75bedc79b5eb46df21e962a98 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 29 Oct 2025 19:39:35 +0100 Subject: [PATCH] core/exec-invoke: drop redundant stdio_fdname checks exec_context_fdname() would never return NULL if corresponding stdio mode is set to named fd. --- src/core/exec-invoke.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 27eb8bc53c..5b0245df33 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -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];