mirror_zfs/include/os/freebsd
Ryan Moeller 127daad223 Avoid possibility of division by zero
When hz > 1000, msec / (1000 / hz) results in division by zero.

I found somewhere in FreeBSD using howmany(msec * hz, 1000) to convert
ms to ticks, avoiding the potential for a zero in the divisor.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #10894
2020-09-09 10:26:03 -07:00
..
linux Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
spl Fixes for running FreeBSD buildworld on Linux/macOS hosts 2020-09-09 10:21:11 -07:00
zfs Avoid possibility of division by zero 2020-09-09 10:26:03 -07:00
Makefile.am Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00