diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-26 01:20:16 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-26 01:20:16 +0000 |
commit | 22036bcf092644c95dca1c42dde4e07a58e033e9 (patch) | |
tree | b2282132fa294d1142b00335e2795e8485430921 /lib | |
parent | c26598f6f0ea549cd5b94cffa114ff79ca06d82b (diff) | |
download | FreeBSD-src-22036bcf092644c95dca1c42dde4e07a58e033e9.zip FreeBSD-src-22036bcf092644c95dca1c42dde4e07a58e033e9.tar.gz |
libcuse: 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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcuse/cuse_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcuse/cuse_lib.c b/lib/libcuse/cuse_lib.c index dd25ef8..436b5db 100644 --- a/lib/libcuse/cuse_lib.c +++ b/lib/libcuse/cuse_lib.c @@ -184,7 +184,7 @@ cuse_vmalloc(int size) if (size < 1) return (NULL); - info.page_count = (size + PAGE_SIZE - 1) / PAGE_SIZE; + info.page_count = howmany(size, PAGE_SIZE); CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { |