From: Mike Yuan Date: Wed, 29 Oct 2025 18:39:35 +0000 (+0100) Subject: core/exec-invoke: drop redundant stdio_fdname checks X-Git-Tag: v259-rc1~217^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=234d8f8bc38375a75bedc79b5eb46df21e962a98;p=thirdparty%2Fsystemd.git core/exec-invoke: drop redundant stdio_fdname checks exec_context_fdname() would never return NULL if corresponding stdio mode is set to named fd. --- diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 27eb8bc53c1..5b0245df33e 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];