diff options
author | millert <> | 1997-04-05 21:13:17 +0000 |
---|---|---|
committer | millert <> | 1997-04-05 21:13:17 +0000 |
commit | 9156235dba65010d9f983e3b8fc0e0b2739c78d4 (patch) | |
tree | 178131fb064d2fb2a659152bdfbfb0c0bb5788cd /src/lib/libc/net/inet_netof.c | |
parent | 06967c8a88bc843a5afe2987c242b4f744a4dabf (diff) | |
download | openbsd-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.c | 6 |
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) |
35 | static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.2 1996/08/19 08:29:12 tholo Exp $"; | 35 | static 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 | */ |
46 | u_long | 46 | in_addr_t |
47 | inet_netof(in) | 47 | inet_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); |