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:   Fri, 21 Oct 2022 19:14:23 +0100
From:   Colin Ian King <colin.i.king@...il.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] sysv: Remove variable res

The variable res being incremented but it is never referenced,
it is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
 fs/sysv/itree.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c
index d4ec9bb97de9..505f4cb7be79 100644
--- a/fs/sysv/itree.c
+++ b/fs/sysv/itree.c
@@ -430,12 +430,10 @@ static unsigned sysv_nblocks(struct super_block *s, loff_t size)
 {
 	struct sysv_sb_info *sbi = SYSV_SB(s);
 	int ptrs_bits = sbi->s_ind_per_block_bits;
-	unsigned blocks, res, direct = DIRECT, i = DEPTH;
+	unsigned blocks, direct = DIRECT, i = DEPTH;
 	blocks = (size + s->s_blocksize - 1) >> s->s_blocksize_bits;
-	res = blocks;
 	while (--i && blocks > direct) {
 		blocks = ((blocks - direct - 1) >> ptrs_bits) + 1;
-		res += blocks;
 		direct = 1;
 	}
 	return blocks;
-- 
2.37.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ