[PATCH] fs:remove redundant variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: chiminghao <chi.minghao@xxxxxxxxxx>

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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: chiminghao <chi.minghao@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux