summaryrefslogtreecommitdiff
path: root/lib/libc/net/getnetent.c
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1996-02-19 19:54:44 +0000
committerdm <dm@cvs.openbsd.org>1996-02-19 19:54:44 +0000
commit34dfcd3c571a64de57872aa758d1b228d7b22a02 (patch)
tree22b14dd50dff4fc41ec5c5f2ee3e20f4b7f1d141 /lib/libc/net/getnetent.c
parentd134390523f594c4e7f1b453b8026b993a1aeebb (diff)
netbsd: bind 4.9.3
Diffstat (limited to 'lib/libc/net/getnetent.c')
-rw-r--r--lib/libc/net/getnetent.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/libc/net/getnetent.c b/lib/libc/net/getnetent.c
index 8ecdf6c5a36..2e897201a82 100644
--- a/lib/libc/net/getnetent.c
+++ b/lib/libc/net/getnetent.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getnetent.c,v 1.5 1996/01/14 05:02:41 ghudson Exp $ */
+/* $NetBSD: getnetent.c,v 1.6 1996/02/02 15:22:21 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)getnetent.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$NetBSD: getnetent.c,v 1.5 1996/01/14 05:02:41 ghudson Exp $";
+static char rcsid[] = "$NetBSD: getnetent.c,v 1.6 1996/02/02 15:22:21 mrg Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -109,19 +109,18 @@ again:
net.n_net = inet_network(cp);
net.n_addrtype = AF_INET;
q = net.n_aliases = net_aliases;
- if (p != NULL) {
+ if (p != NULL)
cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &net_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
+ while (cp && *cp) {
+ if (*cp == ' ' || *cp == '\t') {
+ cp++;
+ continue;
}
+ if (q < &net_aliases[MAXALIASES - 1])
+ *q++ = cp;
+ cp = strpbrk(cp, " \t");
+ if (cp != NULL)
+ *cp++ = '\0';
}
*q = NULL;
return (&net);