diff options
author | pfg <pfg@FreeBSD.org> | 2016-05-01 02:19:49 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-05-01 02:19:49 +0000 |
commit | 212ce360b69cebcd06dfe2e5569bd3bbd96fb734 (patch) | |
tree | 14f7983a72b5947db45cb789d7f297af70fb87aa /sbin | |
parent | fd394515010c5c17631a204b831ea15eca8497e8 (diff) | |
download | FreeBSD-src-212ce360b69cebcd06dfe2e5569bd3bbd96fb734.zip FreeBSD-src-212ce360b69cebcd06dfe2e5569bd3bbd96fb734.tar.gz |
sbin: use our howmany() macro when available through <sys/param.h>.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/growfs/debug.c | 3 | ||||
-rw-r--r-- | sbin/newfs_nandfs/newfs_nandfs.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index 55e2b13..d371013 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -518,7 +518,8 @@ dbg_dump_frmap(struct fs *sb, const char *comment, struct cg *cgr) cp = (unsigned char *)cg_blksfree(cgr); if (sb->fs_old_nspf) - e = howmany((sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf), CHAR_BIT); + e = howmany(sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf, + CHAR_BIT); else e = 0; for (j = 0; j < e; j += 32) { diff --git a/sbin/newfs_nandfs/newfs_nandfs.c b/sbin/newfs_nandfs/newfs_nandfs.c index 8ec285d..c9e0927 100644 --- a/sbin/newfs_nandfs/newfs_nandfs.c +++ b/sbin/newfs_nandfs/newfs_nandfs.c @@ -132,7 +132,7 @@ static uint32_t nuserfiles; static uint32_t seg_nblocks; static uint32_t seg_endblock; -#define SIZE_TO_BLOCK(size) (((size) + (blocksize - 1)) / blocksize) +#define SIZE_TO_BLOCK(size) howmany(size, blocksize) static uint32_t nandfs_first_block(void) |