Skip to contentSkip to conversation

ocfs2: Simplify return statement in ocfs2_filecheck_attr_store()

PATCH In review Thorsten Blum 2 participants 2 messages Apr 8, 2025 – Apr 12, 2025 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: Simplify return statement in ocfs2_filecheck_attr_store()

Don't negate 'ret' and simplify the return statement.

No functional changes intended.

---
 fs/ocfs2/filecheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/filecheck.c +1 -1
index 1ad7106741f8..3ad7baf67658 100644
@@ -505,5 +505,5 @@ static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
 		ocfs2_filecheck_handle_entry(ent, entry);
 
 exit:
-	return (!ret ? count : ret);
+	return ret ?: count;
 }
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thorsten Blum

Don't negate 'ret' and simplify the return statement.

No functional changes intended.

Quoted 15 lines
---
 fs/ocfs2/filecheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/filecheck.c +1 -1
index 1ad7106741f8..3ad7baf67658 100644
@@ -505,5 +505,5 @@ static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
 		ocfs2_filecheck_handle_entry(ent, entry);
 
 exit:
-	return (!ret ? count : ret);
+	return ret ?: count;
 }