summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 db407dd..8edcb1b 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;
OpenPOWER on IntegriCloud