Skip to contentSkip to conversation

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

PATCH New Yang Chenzhi 1 participant 1 message Oct 24, 2024

lore
Share & tools
lore
#0 lore raw

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

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.

---
 fs/minix/dir.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/minix/dir.c +3 -2
index dd2a425b41f0..42e1c46ae729 100644
@@ -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);
Signature · 1 line
2.34.1