mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
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:
parent
968c0b406d
commit
ab881fadba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298601
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user