DORMANTno replies

[PATCH] hpfs: remove redundant variable r

From: Colin Ian King <hidden>
Date: 2021-12-30 15:33:06
Also in: lkml
Subsystem: filesystems (vfs and infrastructure), hpfs filesystem, the rest · Maintainers: Alexander Viro, Christian Brauner, Mikulas Patocka, Linus Torvalds

The variable r is being assigned a value and it is never read. The
declaration and assignment are redundant and can be removed.

Signed-off-by: Colin Ian King <redacted>
---
 fs/hpfs/namei.c                   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index d73f8a67168e..81b44bac4e1f 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -555,8 +555,7 @@ static int hpfs_rename(struct user_namespace *mnt_userns, 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.33.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help