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
static inline boolean_t
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
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
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