aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Matuška <[email protected]>2024-10-07 19:31:46 +0200
committerGitHub <[email protected]>2024-10-07 10:31:46 -0700
commitab777f436ce228559f3c2480ebe8a6b5ab888c43 (patch)
tree986bba088e4913690cc3e11494b15bd6f5035e45 /lib
parente8f0aa143e1b25d98624d4b2623a6e0fc42afb9e (diff)
Return boolean_t in inline functions of lib/libspl/include/sys/uio.h
The inline functions zfs_dio_offset_aligned(), zfs_dio_size_aligned() and zfs_dio_aligned() are declared as boolean_t but return the bool type. This fixes the build of FreeBSD. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #16613
Diffstat (limited to 'lib')
-rw-r--r--lib/libspl/include/sys/uio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libspl/include/sys/uio.h b/lib/libspl/include/sys/uio.h
index 2cb0107d5..16749fa49 100644
--- a/lib/libspl/include/sys/uio.h
+++ b/lib/libspl/include/sys/uio.h
@@ -92,20 +92,20 @@ zfs_dio_page_aligned(void *buf)
static inline boolean_t
zfs_dio_offset_aligned(uint64_t offset, uint64_t blksz)
{
- return (IS_P2ALIGNED(offset, blksz));
+ return ((IS_P2ALIGNED(offset, blksz)) ? B_TRUE : B_FALSE);
}
static inline boolean_t
zfs_dio_size_aligned(uint64_t size, uint64_t blksz)
{
- return ((size % blksz) == 0);
+ return (((size % blksz) == 0) ? B_TRUE : B_FALSE);
}
static inline boolean_t
zfs_dio_aligned(uint64_t offset, uint64_t size, uint64_t blksz)
{
- return (zfs_dio_offset_aligned(offset, blksz) &&
- zfs_dio_size_aligned(size, blksz));
+ return ((zfs_dio_offset_aligned(offset, blksz) &&
+ zfs_dio_size_aligned(size, blksz)) ? B_TRUE : B_FALSE);
}
static inline void