提交 79a3ed2e 编写于 作者: Y Yaowei Bai 提交者: Ilya Dryomov

ceph: ceph_frag_contains_value can be boolean

This patch makes ceph_frag_contains_value return bool to improve
readability due to this particular function only using either one or
zero as its return value.

No functional change.
Signed-off-by: NYaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: NYan, Zheng <zyan@redhat.com>
上级 eade1fe7
...@@ -40,7 +40,7 @@ static inline __u32 ceph_frag_mask_shift(__u32 f) ...@@ -40,7 +40,7 @@ static inline __u32 ceph_frag_mask_shift(__u32 f)
return 24 - ceph_frag_bits(f); return 24 - ceph_frag_bits(f);
} }
static inline int ceph_frag_contains_value(__u32 f, __u32 v) static inline bool ceph_frag_contains_value(__u32 f, __u32 v)
{ {
return (v & ceph_frag_mask(f)) == ceph_frag_value(f); return (v & ceph_frag_mask(f)) == ceph_frag_value(f);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册