diff options
author | mike <mike@FreeBSD.org> | 2002-09-25 04:06:37 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-09-25 04:06:37 +0000 |
commit | 86a758e51be945d9e690ee0802a21bf9a667b4e8 (patch) | |
tree | 2295edf76df9065e84ea0b415c9c13ecf434f1fa /lib/libc | |
parent | b9155304da025f935d34f191093267f40e40cdd2 (diff) | |
download | FreeBSD-src-86a758e51be945d9e690ee0802a21bf9a667b4e8.zip FreeBSD-src-86a758e51be945d9e690ee0802a21bf9a667b4e8.tar.gz |
Use the standardized CHAR_BIT constant instead of NBBY in userland.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/res_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index e855ccb..9bb8452 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include <arpa/inet.h> #include <arpa/nameser.h> #include <ctype.h> +#include <limits.h> #include <resolv.h> #include <stdio.h> #include <stdlib.h> @@ -414,7 +415,7 @@ res_init() } /*FALLTHROUGH*/ default: - m = sizeof(struct in6_addr) * NBBY; + m = sizeof(struct in6_addr) * CHAR_BIT; break; } if (m >= 0) { @@ -422,7 +423,7 @@ res_init() if (m <= 0) { *u = 0; } else { - m -= NBBY; + m -= CHAR_BIT; *u = (u_char)~0; if (m < 0) *u <<= -m; |