libstand: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
This commit is contained in:
Pedro F. Giffuni 2016-04-26 01:19:36 +00:00
parent 968c0b406d
commit ab881fadba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298601

View File

@ -1017,7 +1017,7 @@ ioread(struct open_file *f, off_t pos, void *buf, u_int length)
off = pos % bsize;
pos /= bsize;
nsec = (length + (bsize - 1)) / bsize;
nsec = howmany(length, bsize);
NANDFS_DEBUG("pos=%lld length=%d off=%d nsec=%d\n", pos, length,
off, nsec);