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>] [day] [month] [year] [list]
Date:   Sat, 12 Sep 2020 12:34:52 +0200
From:   mateusznosek0@...il.com
To:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Mateusz Nosek <mateusznosek0@...il.com>, viro@...iv.linux.org.uk
Subject: [PATCH] fs/pipe.c: clean code by removing unnecessary initialization

From: Mateusz Nosek <mateusznosek0@...il.com>

Previously variable 'buf' was initialized, but was not read later before
reassigning.  So the initialization can be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@...il.com>
---
 fs/pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 60dbee457143..a18ee5f6383b 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -495,7 +495,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
 		head = pipe->head;
 		if (!pipe_full(head, pipe->tail, pipe->max_usage)) {
 			unsigned int mask = pipe->ring_size - 1;
-			struct pipe_buffer *buf = &pipe->bufs[head & mask];
+			struct pipe_buffer *buf;
 			struct page *page = pipe->tmp_page;
 			int copied;
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ