mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Make inline ABD predicates compatible with C++
FreeBSD's zfsd fails to build after e2af2acce3
due to strict type
checking errors from the implicit conversion between bool and boolean_t
in the inline predicate definitions in abd.h.
Use conditionals to return the correct value type from these functions.
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #11592
This commit is contained in:
parent
c1c31a835a
commit
436ab35a53
@ -177,19 +177,19 @@ abd_zero(abd_t *abd, size_t size)
|
|||||||
static inline boolean_t
|
static inline boolean_t
|
||||||
abd_is_linear(abd_t *abd)
|
abd_is_linear(abd_t *abd)
|
||||||
{
|
{
|
||||||
return ((abd->abd_flags & ABD_FLAG_LINEAR) != 0);
|
return ((abd->abd_flags & ABD_FLAG_LINEAR) ? B_TRUE : B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline boolean_t
|
static inline boolean_t
|
||||||
abd_is_linear_page(abd_t *abd)
|
abd_is_linear_page(abd_t *abd)
|
||||||
{
|
{
|
||||||
return ((abd->abd_flags & ABD_FLAG_LINEAR_PAGE) != 0);
|
return ((abd->abd_flags & ABD_FLAG_LINEAR_PAGE) ? B_TRUE : B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline boolean_t
|
static inline boolean_t
|
||||||
abd_is_gang(abd_t *abd)
|
abd_is_gang(abd_t *abd)
|
||||||
{
|
{
|
||||||
return ((abd->abd_flags & ABD_FLAG_GANG) != 0);
|
return ((abd->abd_flags & ABD_FLAG_GANG) ? B_TRUE : B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint_t
|
static inline uint_t
|
||||||
|
Loading…
Reference in New Issue
Block a user