diff options
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r-- | usr.sbin/mountd/mountd.c | 5 |
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; } |