]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/pager: Remove struct field `no_stdin`
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 19 Jan 2026 18:10:42 +0000 (19:10 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 20 Jan 2026 16:36:45 +0000 (17:36 +0100)
The struct field `no_stdin` is always false, since it's never
initialized and only eventually reset to false when the whole
`pager_process` is reset to 0 with a `memset` call.

Since pager is supposed to read from stdin, this feature is not needed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/pager.c

index b753c5f6d271d56685e62dbe38e808ed2dedbf4e..b0520abcd35527c5a50ee93337111a2c344d9484 100644 (file)
@@ -40,8 +40,6 @@ struct child_process {
        struct sigaction orig_sigterm;
        struct sigaction orig_sigquit;
        struct sigaction orig_sigpipe;
-
-       bool no_stdin;
 };
 static struct child_process pager_process;
 
@@ -78,7 +76,7 @@ static int start_command(struct child_process *cmd)
         * In case of errors we must keep the promise to close FD
         * that has been passed in via ->in.
         */
-       need_in = !cmd->no_stdin && cmd->in < 0;
+       need_in = cmd->in < 0;
        if (need_in) {
                if (pipe(fdin) < 0)
                        return -1;