From: Tobias Stoeckmann Date: Mon, 19 Jan 2026 18:02:50 +0000 (+0100) Subject: lib/pager: Remove unused struct field "out" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf3d1839f94b532133cf35759b82a520a9a30af;p=thirdparty%2Futil-linux.git lib/pager: Remove unused struct field "out" The struct field `out` is never set, thus always 0. Since the pager output is never redirected, this functionality stub can be removed. Signed-off-by: Tobias Stoeckmann --- diff --git a/lib/pager.c b/lib/pager.c index c3b42d19e..39a2ccb1c 100644 --- a/lib/pager.c +++ b/lib/pager.c @@ -34,7 +34,6 @@ struct child_process { const char **argv; pid_t pid; int in; - int out; int err; int org_err; @@ -62,16 +61,13 @@ static int start_command(struct child_process *cmd) int fdin[2]; /* - * In case of errors we must keep the promise to close FDs - * that have been passed in via ->in and ->out. + * 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; if (need_in) { - if (pipe(fdin) < 0) { - if (cmd->out > 0) - close(cmd->out); + if (pipe(fdin) < 0) return -1; - } cmd->in = fdin[1]; }