summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-26 01:20:16 +0000
committerpfg <pfg@FreeBSD.org>2016-04-26 01:20:16 +0000
commit22036bcf092644c95dca1c42dde4e07a58e033e9 (patch)
treeb2282132fa294d1142b00335e2795e8485430921 /lib
parentc26598f6f0ea549cd5b94cffa114ff79ca06d82b (diff)
downloadFreeBSD-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.c2
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++) {
OpenPOWER on IntegriCloud