summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_netof.c
diff options
context:
space:
mode:
authormillert <>1997-04-05 21:13:17 +0000
committermillert <>1997-04-05 21:13:17 +0000
commit9156235dba65010d9f983e3b8fc0e0b2739c78d4 (patch)
tree178131fb064d2fb2a659152bdfbfb0c0bb5788cd /src/lib/libc/net/inet_netof.c
parent06967c8a88bc843a5afe2987c242b4f744a4dabf (diff)
downloadopenbsd-9156235dba65010d9f983e3b8fc0e0b2739c78d4.tar.gz
openbsd-9156235dba65010d9f983e3b8fc0e0b2739c78d4.tar.bz2
openbsd-9156235dba65010d9f983e3b8fc0e0b2739c78d4.zip
Use in_addr_t not u_long and use in_port_t in some cases instead
of u_short or u_int16_t.
Diffstat (limited to 'src/lib/libc/net/inet_netof.c')
-rw-r--r--src/lib/libc/net/inet_netof.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/net/inet_netof.c b/src/lib/libc/net/inet_netof.c
index 8f78b7a8b4..f3b9c01697 100644
--- a/src/lib/libc/net/inet_netof.c
+++ b/src/lib/libc/net/inet_netof.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.2 1996/08/19 08:29:12 tholo Exp $"; 35static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.3 1997/04/05 21:13:13 millert Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <sys/param.h> 38#include <sys/param.h>
@@ -43,11 +43,11 @@ static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.2 1996/08/19 08:29:12 tholo Ex
43 * Return the network number from an internet 43 * Return the network number from an internet
44 * address; handles class a/b/c network #'s. 44 * address; handles class a/b/c network #'s.
45 */ 45 */
46u_long 46in_addr_t
47inet_netof(in) 47inet_netof(in)
48 struct in_addr in; 48 struct in_addr in;
49{ 49{
50 register u_long i = ntohl(in.s_addr); 50 register in_addr_t i = ntohl(in.s_addr);
51 51
52 if (IN_CLASSA(i)) 52 if (IN_CLASSA(i))
53 return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); 53 return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);