From 22036bcf092644c95dca1c42dde4e07a58e033e9 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 26 Apr 2016 01:20:16 +0000 Subject: libcuse: make more use of the howmany() macro when available. We have a howmany() macro in the header that is convenient to re-use as it makes things easier to read. --- lib/libcuse/cuse_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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++) { -- cgit v1.1