diff options
Diffstat (limited to 'src/lib/libc/net/inet_netof.c')
-rw-r--r-- | src/lib/libc/net/inet_netof.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/libc/net/inet_netof.c b/src/lib/libc/net/inet_netof.c index 02f52ca318..f3b9c01697 100644 --- a/src/lib/libc/net/inet_netof.c +++ b/src/lib/libc/net/inet_netof.c | |||
@@ -1,5 +1,3 @@ | |||
1 | /* $NetBSD: inet_netof.c,v 1.4 1995/02/25 06:20:43 cgd Exp $ */ | ||
2 | |||
3 | /* | 1 | /* |
4 | * Copyright (c) 1983, 1993 | 2 | * Copyright (c) 1983, 1993 |
5 | * The Regents of the University of California. All rights reserved. | 3 | * The Regents of the University of California. All rights reserved. |
@@ -34,11 +32,7 @@ | |||
34 | */ | 32 | */ |
35 | 33 | ||
36 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
37 | #if 0 | 35 | static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.3 1997/04/05 21:13:13 millert Exp $"; |
38 | static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93"; | ||
39 | #else | ||
40 | static char rcsid[] = "$NetBSD: inet_netof.c,v 1.4 1995/02/25 06:20:43 cgd Exp $"; | ||
41 | #endif | ||
42 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
43 | 37 | ||
44 | #include <sys/param.h> | 38 | #include <sys/param.h> |
@@ -49,11 +43,11 @@ static char rcsid[] = "$NetBSD: inet_netof.c,v 1.4 1995/02/25 06:20:43 cgd Exp $ | |||
49 | * Return the network number from an internet | 43 | * Return the network number from an internet |
50 | * address; handles class a/b/c network #'s. | 44 | * address; handles class a/b/c network #'s. |
51 | */ | 45 | */ |
52 | u_long | 46 | in_addr_t |
53 | inet_netof(in) | 47 | inet_netof(in) |
54 | struct in_addr in; | 48 | struct in_addr in; |
55 | { | 49 | { |
56 | register u_long i = ntohl(in.s_addr); | 50 | register in_addr_t i = ntohl(in.s_addr); |
57 | 51 | ||
58 | if (IN_CLASSA(i)) | 52 | if (IN_CLASSA(i)) |
59 | return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); | 53 | return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); |