[PATCH] fs/minix: Add missing curly braces in minix_empty for clarity

Yang Chenzhi posted 1 patch 1 month ago
fs/minix/dir.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] fs/minix: Add missing curly braces in minix_empty for clarity
Posted by Yang Chenzhi 1 month ago
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@vivo.com>
---
 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