summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getnetbyht.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/getnetbyht.c')
-rw-r--r--lib/libc/net/getnetbyht.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c
index 6eaebc5..f536422 100644
--- a/lib/libc/net/getnetbyht.c
+++ b/lib/libc/net/getnetbyht.c
@@ -105,9 +105,8 @@ again:
if (*p == '#')
goto again;
cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
+ if (cp != NULL)
+ *cp = '\0';
net.n_name = p;
cp = strpbrk(p, " \t");
if (cp == NULL)
OpenPOWER on IntegriCloud