[PATCH] fs/minix: Add missing curly braces in minix_empty for clarity
From: Yang Chenzhi
Date: Thu Oct 24 2024 - 05:32:19 EST
The if-else chain in the function minix_empty_dir() lacks curly braces,
which makes it harder to read and could lead to confusion. This patch
adds curly braces to the affected if-else statements to clarify the
control flow and improve code readability.
This change does not modify the functionality of the code, just ensures
that the structure is clearer.
Signed-off-by: Yang Chenzhi <yangchenzhi@xxxxxxxx>
---
fs/minix/dir.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/minix/dir.c b/fs/minix/dir.c
index dd2a425b41f0..42e1c46ae729 100644
--- a/fs/minix/dir.c
+++ b/fs/minix/dir.c
@@ -388,10 +388,11 @@ int minix_empty_dir(struct inode * inode)
if (!name[1]) {
if (inumber != inode->i_ino)
goto not_empty;
- } else if (name[1] != '.')
+ } else if (name[1] != '.') {
goto not_empty;
- else if (name[2])
+ } else if (name[2]) {
goto not_empty;
+ }
}
}
folio_release_kmap(folio, kaddr);
--
2.34.1