Skip to contentSkip to conversation

fs:remove redundant variable

PATCH New [email protected] 1 participant 1 message Dec 6, 2021 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs:remove redundant variable

From: chiminghao <[email protected]>

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

---
 fs/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/file.c +1 -2
index 8627dacfc424..97605ef3c390 100644
@@ -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)
Signature · 1 line
2.25.1