summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/pass1.c
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-09-25 04:06:37 +0000
committermike <mike@FreeBSD.org>2002-09-25 04:06:37 +0000
commit86a758e51be945d9e690ee0802a21bf9a667b4e8 (patch)
tree2295edf76df9065e84ea0b415c9c13ecf434f1fa /sbin/fsck_ffs/pass1.c
parentb9155304da025f935d34f191093267f40e40cdd2 (diff)
downloadFreeBSD-src-86a758e51be945d9e690ee0802a21bf9a667b4e8.zip
FreeBSD-src-86a758e51be945d9e690ee0802a21bf9a667b4e8.tar.gz
Use the standardized CHAR_BIT constant instead of NBBY in userland.
Diffstat (limited to 'sbin/fsck_ffs/pass1.c')
-rw-r--r--sbin/fsck_ffs/pass1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c
index 87cc464..5a18abd 100644
--- a/sbin/fsck_ffs/pass1.c
+++ b/sbin/fsck_ffs/pass1.c
@@ -48,6 +48,7 @@ static const char rcsid[] =
#include <ufs/ffs/fs.h>
#include <err.h>
+#include <limits.h>
#include <stdint.h>
#include <string.h>
@@ -116,11 +117,11 @@ pass1(void)
if (preen && usedsoftdep) {
if (!cg_chkmagic(&cgrp))
pfatal("CG %d: BAD MAGIC NUMBER\n", c);
- cp = &cg_inosused(&cgrp)[(inosused - 1) / NBBY];
- for ( ; inosused > 0; inosused -= NBBY, cp--) {
+ cp = &cg_inosused(&cgrp)[(inosused - 1) / CHAR_BIT];
+ for ( ; inosused > 0; inosused -= CHAR_BIT, cp--) {
if (*cp == 0)
continue;
- for (i = 1 << (NBBY - 1); i > 0; i >>= 1) {
+ for (i = 1 << (CHAR_BIT - 1); i > 0; i >>= 1) {
if (*cp & i)
break;
inosused--;
OpenPOWER on IntegriCloud