diff options
| author | Maxim Sobolev <sobomax@FreeBSD.org> | 2005-01-03 11:07:45 +0000 |
|---|---|---|
| committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2005-01-03 11:07:45 +0000 |
| commit | 7b6cc40479b0b88d4ca9ec1e15d9bda120d17ea3 (patch) | |
| tree | 932dc5516fad9adc5c8df459d8e23846159bce61 | |
| parent | a8ef988f6524c2940fff3bbe65c156c5cd12e11d (diff) | |
Notes
| -rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 | ||||
| -rw-r--r-- | lib/libc/net/gethostbyht.c | 6 | ||||
| -rw-r--r-- | lib/libc/net/getnetbyht.c | 5 | ||||
| -rw-r--r-- | lib/libc/net/getprotoent.c | 5 | ||||
| -rw-r--r-- | lib/libc/net/getservent.c | 5 |
5 files changed, 12 insertions, 15 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 6508024d6cb0..9c4948e7fc7f 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -2070,9 +2070,9 @@ again: return (NULL); if (*p == '#') goto again; - if (!(cp = strpbrk(p, "#\n"))) - goto again; - *cp = '\0'; + cp = strpbrk(p, "#\n"); + if (cp != NULL) + *cp = '\0'; if (!(cp = strpbrk(p, " \t"))) goto again; *cp++ = '\0'; diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c index e4320fd8a2cc..e414058e0e42 100644 --- a/lib/libc/net/gethostbyht.c +++ b/lib/libc/net/gethostbyht.c @@ -118,9 +118,9 @@ gethostent() } if (*p == '#') goto again; - if (!(cp = strpbrk(p, "#\n"))) - goto again; - *cp = '\0'; + cp = strpbrk(p, "#\n"); + if (cp != NULL) + *cp = '\0'; if (!(cp = strpbrk(p, " \t"))) goto again; *cp++ = '\0'; diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c index 6eaebc52a0a6..f5364220a5e5 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) diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c index c8f1ad483e82..e2d7a975e362 100644 --- a/lib/libc/net/getprotoent.c +++ b/lib/libc/net/getprotoent.c @@ -87,9 +87,8 @@ again: if (*p == '#') goto again; cp = strpbrk(p, "#\n"); - if (cp == NULL) - goto again; - *cp = '\0'; + if (cp != NULL) + *cp = '\0'; proto.p_name = p; cp = strpbrk(p, " \t"); if (cp == NULL) diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c index a89bc5173966..7e4423534339 100644 --- a/lib/libc/net/getservent.c +++ b/lib/libc/net/getservent.c @@ -244,9 +244,8 @@ unpack: if (*p == '#') goto again; cp = strpbrk(p, "#\n"); - if (cp == NULL) - goto again; - *cp = '\0'; + if (cp != NULL) + *cp = '\0'; serv.s_name = p; p = strpbrk(p, " \t"); if (p == NULL) |
