summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mountd
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 /usr.sbin/mountd
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 'usr.sbin/mountd')
-rw-r--r--usr.sbin/mountd/mountd.c5
1 files changed, 3 insertions, 2 deletions
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 <err.h>
#include <errno.h>
#include <grp.h>
+#include <limits.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
@@ -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;
}
OpenPOWER on IntegriCloud