From 86a758e51be945d9e690ee0802a21bf9a667b4e8 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 25 Sep 2002 04:06:37 +0000 Subject: Use the standardized CHAR_BIT constant instead of NBBY in userland. --- usr.sbin/mountd/mountd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 49d5454..e3868b9 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -75,6 +75,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -2362,11 +2363,11 @@ makemask(struct sockaddr_storage *ssp, int bitlen) if ((p = sa_rawaddr((struct sockaddr *)ssp, &len)) == NULL) return (-1); - if (bitlen > len * NBBY) + if (bitlen > len * CHAR_BIT) return (-1); for (i = 0; i < len; i++) { - bits = (bitlen > NBBY) ? NBBY : bitlen; + bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; *p++ = (1 << bits) - 1; bitlen -= bits; } -- cgit v1.1