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:   Mon,  6 Dec 2021 07:47:54 +0000
From:   cgel.zte@...il.com
To:     viro@...iv.linux.org.uk
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        chiminghao <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cm>
Subject: [PATCH] fs:remove redundant variable

From: chiminghao <chi.minghao@....com.cn>

return value form directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cm>
Signed-off-by: chiminghao <chi.minghao@....com.cn>
---
 fs/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/file.c b/fs/file.c
index 8627dacfc424..97605ef3c390 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -265,8 +265,7 @@ static unsigned int count_open_files(struct fdtable *fdt)
 		if (fdt->open_fds[--i])
 			break;
 	}
-	i = (i + 1) * BITS_PER_LONG;
-	return i;
+	return (i + 1) * BITS_PER_LONG;
 }
 
 static unsigned int sane_fdtable_size(struct fdtable *fdt, unsigned int max_fds)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ