summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_netof.c
diff options
context:
space:
mode:
authorotto <>2005-03-25 13:24:12 +0000
committerotto <>2005-03-25 13:24:12 +0000
commit2f490723a2e673b2457f65c4b06cacb7d700a3e8 (patch)
treec9dcd3a58da3f7404d9e626fe10abdd67c384fba /src/lib/libc/net/inet_netof.c
parent9a03506f8308b6023a12f108a2072feb958607a6 (diff)
downloadopenbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.tar.gz
openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.tar.bz2
openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.zip
ansify. ok deraadt@ moritz@
Diffstat (limited to 'src/lib/libc/net/inet_netof.c')
-rw-r--r--src/lib/libc/net/inet_netof.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libc/net/inet_netof.c b/src/lib/libc/net/inet_netof.c
index 58be2d05cd..83f346c5f5 100644
--- a/src/lib/libc/net/inet_netof.c
+++ b/src/lib/libc/net/inet_netof.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#if defined(LIBC_SCCS) && !defined(lint) 30#if defined(LIBC_SCCS) && !defined(lint)
31static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.4 2003/06/02 20:18:35 millert Exp $"; 31static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.5 2005/03/25 13:24:12 otto Exp $";
32#endif /* LIBC_SCCS and not lint */ 32#endif /* LIBC_SCCS and not lint */
33 33
34#include <sys/param.h> 34#include <sys/param.h>
@@ -40,10 +40,9 @@ static char rcsid[] = "$OpenBSD: inet_netof.c,v 1.4 2003/06/02 20:18:35 millert
40 * address; handles class a/b/c network #'s. 40 * address; handles class a/b/c network #'s.
41 */ 41 */
42in_addr_t 42in_addr_t
43inet_netof(in) 43inet_netof(struct in_addr in)
44 struct in_addr in;
45{ 44{
46 register in_addr_t i = ntohl(in.s_addr); 45 in_addr_t i = ntohl(in.s_addr);
47 46
48 if (IN_CLASSA(i)) 47 if (IN_CLASSA(i))
49 return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); 48 return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);