summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2000-07-19 06:22:01 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2000-07-19 06:22:01 +0000
commit31cc3a5c562006ac914d37f5c9572ec7a530e95b (patch)
tree46af6a7c2ce0bcd9dcf44adf8294180f757c1944 /lib/libc
parent3e413989d1f56b7aa9cefc6ed837b74448b8460b (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/name6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index db407dd163cc..8edcb1bee858 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -552,7 +552,7 @@ _hpcopy(struct hostent *hp, int *errp)
/* count size to be allocated */
size = sizeof(struct hostent);
- if (hp->h_name != NULL && *hp->h_name != '\0')
+ if (hp->h_name != NULL)
size += strlen(hp->h_name) + 1;
if ((pp = hp->h_aliases) != NULL) {
for (i = 0; *pp != NULL; i++, pp++) {
@@ -580,7 +580,7 @@ _hpcopy(struct hostent *hp, int *errp)
return NULL;
}
cp = (char *)&nhp[1];
- if (hp->h_name != NULL && *hp->h_name != '\0') {
+ if (hp->h_name != NULL) {
nhp->h_name = cp;
strcpy(cp, hp->h_name);
cp += strlen(cp) + 1;