summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_network.c
diff options
context:
space:
mode:
authorniklas <>1996-03-19 23:15:14 +0000
committerniklas <>1996-03-19 23:15:14 +0000
commitb12abff2eedd6c25979b3dc8890ef07b15432ea8 (patch)
tree2603354cf92c21ad3bdd387ed8be630a43b05f72 /src/lib/libc/net/inet_network.c
parent83a23009542c2672b009a5ad496e0a28417a37f9 (diff)
downloadopenbsd-b12abff2eedd6c25979b3dc8890ef07b15432ea8.tar.gz
openbsd-b12abff2eedd6c25979b3dc8890ef07b15432ea8.tar.bz2
openbsd-b12abff2eedd6c25979b3dc8890ef07b15432ea8.zip
From NetBSD: merge of 960317
Diffstat (limited to 'src/lib/libc/net/inet_network.c')
-rw-r--r--src/lib/libc/net/inet_network.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/net/inet_network.c b/src/lib/libc/net/inet_network.c
index 35105fa75a..3de21a5bac 100644
--- a/src/lib/libc/net/inet_network.c
+++ b/src/lib/libc/net/inet_network.c
@@ -1,4 +1,5 @@
1/* $NetBSD: inet_network.c,v 1.4 1995/02/25 06:20:45 cgd Exp $ */ 1/* $OpenBSD: inet_network.c,v 1.2 1996/03/19 23:15:08 niklas Exp $ */
2/* $NetBSD: inet_network.c,v 1.5 1996/02/17 15:35:41 hpeyerl Exp $ */
2 3
3/* 4/*
4 * Copyright (c) 1983, 1993 5 * Copyright (c) 1983, 1993
@@ -37,7 +38,8 @@
37#if 0 38#if 0
38static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93"; 39static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
39#else 40#else
40static char rcsid[] = "$NetBSD: inet_network.c,v 1.4 1995/02/25 06:20:45 cgd Exp $"; 41static char rcsid[] = "$OpenBSD: inet_network.c,v 1.2 1996/03/19 23:15:08 niklas Exp $";
42static char rcsid[] = "$NetBSD: inet_network.c,v 1.5 1996/02/17 15:35:41 hpeyerl Exp $";
41#endif 43#endif
42#endif /* LIBC_SCCS and not lint */ 44#endif /* LIBC_SCCS and not lint */
43 45
@@ -80,7 +82,7 @@ again:
80 break; 82 break;
81 } 83 }
82 if (*cp == '.') { 84 if (*cp == '.') {
83 if (pp >= parts + 4) 85 if (pp >= parts + 3)
84 return (INADDR_NONE); 86 return (INADDR_NONE);
85 *pp++ = val, cp++; 87 *pp++ = val, cp++;
86 goto again; 88 goto again;
@@ -89,8 +91,6 @@ again:
89 return (INADDR_NONE); 91 return (INADDR_NONE);
90 *pp++ = val; 92 *pp++ = val;
91 n = pp - parts; 93 n = pp - parts;
92 if (n > 4)
93 return (INADDR_NONE);
94 for (val = 0, i = 0; i < n; i++) { 94 for (val = 0, i = 0; i < n; i++) {
95 val <<= 8; 95 val <<= 8;
96 val |= parts[i] & 0xff; 96 val |= parts[i] & 0xff;