Skip to content

Commit 3398168

Browse files
mmatuskaixhamza
authored andcommitted
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 openzfs#16613
1 parent 7a1e4d4 commit 3398168

File tree

1 file changed

+4
-4
lines changed
  • lib/libspl/include/sys

1 file changed

+4
-4
lines changed

lib/libspl/include/sys/uio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,20 @@ zfs_dio_page_aligned(void *buf)
9292
static inline boolean_t
9393
zfs_dio_offset_aligned(uint64_t offset, uint64_t blksz)
9494
{
95-
return (IS_P2ALIGNED(offset, blksz));
95+
return ((IS_P2ALIGNED(offset, blksz)) ? B_TRUE : B_FALSE);
9696
}
9797

9898
static inline boolean_t
9999
zfs_dio_size_aligned(uint64_t size, uint64_t blksz)
100100
{
101-
return ((size % blksz) == 0);
101+
return (((size % blksz) == 0) ? B_TRUE : B_FALSE);
102102
}
103103

104104
static inline boolean_t
105105
zfs_dio_aligned(uint64_t offset, uint64_t size, uint64_t blksz)
106106
{
107-
return (zfs_dio_offset_aligned(offset, blksz) &&
108-
zfs_dio_size_aligned(size, blksz));
107+
return ((zfs_dio_offset_aligned(offset, blksz) &&
108+
zfs_dio_size_aligned(size, blksz)) ? B_TRUE : B_FALSE);
109109
}
110110

111111
static inline void

0 commit comments

Comments
 (0)