Message ID | 20250408103408.804253-1-thorsten.blum@linux.dev (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ocfs2: Simplify return statement in ocfs2_filecheck_attr_store() | expand |
On 2025/4/8 18:34, Thorsten Blum wrote: > Don't negate 'ret' and simplify the return statement. > > No functional changes intended. > > Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> > --- > fs/ocfs2/filecheck.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c > index 1ad7106741f8..3ad7baf67658 100644 > --- a/fs/ocfs2/filecheck.c > +++ b/fs/ocfs2/filecheck.c > @@ -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; > }
diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c index 1ad7106741f8..3ad7baf67658 100644 --- a/fs/ocfs2/filecheck.c +++ b/fs/ocfs2/filecheck.c @@ -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; }
Don't negate 'ret' and simplify the return statement. No functional changes intended. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> --- fs/ocfs2/filecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)