diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 01:20:16 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 01:20:16 +0000 |
commit | 1c5fd754bd844d7cecf67e71108877bf8212656b (patch) | |
tree | b2282132fa294d1142b00335e2795e8485430921 /lib/libcuse | |
parent | ab881fadbac442c9f795b5adfb31b861e7a01671 (diff) |
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.
Notes
Notes:
svn path=/head/; revision=298602
Diffstat (limited to 'lib/libcuse')
-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 dd25ef8f6c6c..436b5db728bd 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++) { |