[PATCH][next] hpfs: remove redundant variable r

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

 



The variable r is being assigned a value but it isn't being read
afterwards. The assignment is redundant and so r can be removed.

Cleans up clang scan build warning:
warning: Although the value stored to 'r' is used in the enclosing
expression, the value is never actually read from 'r'
[deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
---
 fs/hpfs/namei.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index 9184b4584b01..9b546ec6e614 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -547,8 +547,7 @@ static int hpfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 	de.hidden = new_name[0] == '.';
 
 	if (new_inode) {
-		int r;
-		if ((r = hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1)) != 2) {
+		if (hpfs_remove_dirent(old_dir, dno, dep, &qbh, 1) != 2) {
 			if ((nde = map_dirent(new_dir, hpfs_i(new_dir)->i_dno, new_name, new_len, NULL, &qbh1))) {
 				clear_nlink(new_inode);
 				copy_de(nde, &de);
-- 
2.39.2





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux