Util-Linux Archive mirror
 help / color / mirror / Atom feed
From: Dragan Simic <dsimic@manjaro.org>
To: util-linux@vger.kernel.org
Subject: [PATCH 2/3] dmesg: Delete redundant pager setup
Date: Tue,  4 Jul 2023 11:14:29 +0200	[thread overview]
Message-ID: <20230704091430.3555428-2-dsimic@manjaro.org> (raw)
In-Reply-To: <20230704091430.3555428-1-dsimic@manjaro.org>

The setup of the pager is already performed a few lines of code above,
so it's safe to delete the repeated setup, which actually does nothing.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
 sys-utils/dmesg.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 02358e449..971712b56 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -1646,8 +1646,6 @@ int main(int argc, char *argv[])
 		/* only kmsg supports multi-line messages */
 		if (ctl.force_prefix && ctl.method != DMESG_METHOD_KMSG)
 			ctl.force_prefix = 0;
-		if (ctl.pager)
-			pager_redirect();
 		n = read_buffer(&ctl, &buf);
 		if (n > 0)
 			print_buffer(&ctl, buf, n);
-- 
2.33.1


  reply	other threads:[~2023-07-04  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04  9:14 [PATCH 1/3] lib/pager: Allow PAGER commands with options Dragan Simic
2023-07-04  9:14 ` Dragan Simic [this message]
2023-07-11  9:55   ` [PATCH 2/3] dmesg: Delete redundant pager setup Karel Zak
2023-07-11 12:52     ` Dragan Simic
2023-07-04  9:14 ` [PATCH 3/3] lib/pager: Apply pager-specific fixes only when needed Dragan Simic
2023-07-11  9:55   ` Karel Zak
2023-07-11  9:52 ` [PATCH 1/3] lib/pager: Allow PAGER commands with options Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230704091430.3555428-2-dsimic@manjaro.org \
    --to=dsimic@manjaro.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).