diff options
author | ume <ume@FreeBSD.org> | 2001-03-23 18:59:31 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-03-23 18:59:31 +0000 |
commit | aabe84d0cbca8d7eed5bd5b81cb33f80bca39a55 (patch) | |
tree | 700ba2e4a6b16a6e442280ce6bb1cb2946d327c6 /lib/libc/net/inet_netof.c | |
parent | af0ef4a0618c8bc04852f5517a94e7bb9cf23a79 (diff) | |
download | FreeBSD-src-aabe84d0cbca8d7eed5bd5b81cb33f80bca39a55.zip FreeBSD-src-aabe84d0cbca8d7eed5bd5b81cb33f80bca39a55.tar.gz |
IPv4 address is not unsigned int. This change introduces in_addr_t.
PR: 9982
Adviced by: des
Reviewed by: -alpha and -net (no objection)
Obtained from: OpenBSD
Diffstat (limited to 'lib/libc/net/inet_netof.c')
-rw-r--r-- | lib/libc/net/inet_netof.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/net/inet_netof.c b/lib/libc/net/inet_netof.c index 37063f7..94f27a3 100644 --- a/lib/libc/net/inet_netof.c +++ b/lib/libc/net/inet_netof.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -43,11 +45,11 @@ static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93"; * Return the network number from an internet * address; handles class a/b/c network #'s. */ -u_long +in_addr_t inet_netof(in) struct in_addr in; { - register u_long i = ntohl(in.s_addr); + register in_addr_t i = ntohl(in.s_addr); if (IN_CLASSA(i)) return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); |