From 10110d624fd3d0402393628660e45d6124ce8634 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Mon, 7 Oct 2024 11:27:37 +0200 Subject: [PATCH] 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 zstd. Signed-off-by: Martin Matuska --- lib/libspl/include/sys/uio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libspl/include/sys/uio.h b/lib/libspl/include/sys/uio.h index 2cb0107d58f5..16749fa492e5 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