lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250226204707.1941274-1-vvidic@valentin-vidic.from.hr>
Date: Wed, 26 Feb 2025 21:47:07 +0100
From: Valentin Vidic <vvidic@...entin-vidic.from.hr>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jirislaby@...nel.org>,
	linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org,
	Valentin Vidic <vvidic@...entin-vidic.from.hr>
Subject: [PATCH] tty: pty: remove redundant local variable

The value of to is only used once, so no need to store it in a
variable.

Signed-off-by: Valentin Vidic <vvidic@...entin-vidic.from.hr>
---
 drivers/tty/pty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index df08f13052ff..c6eb711500b6 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -110,12 +110,10 @@ static void pty_unthrottle(struct tty_struct *tty)
 
 static ssize_t pty_write(struct tty_struct *tty, const u8 *buf, size_t c)
 {
-	struct tty_struct *to = tty->link;
-
 	if (tty->flow.stopped || !c)
 		return 0;
 
-	return tty_insert_flip_string_and_push_buffer(to->port, buf, c);
+	return tty_insert_flip_string_and_push_buffer(tty->link->port, buf, c);
 }
 
 /**
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ