for (na = 1, ap = from->h_aliases; *ap != 0; na++, ap++){;}
if (!from->h_aliases) { na = 1; } else { for (na = 1, ap = from->h_aliases; *ap != 0; na++, ap++){;}  }
static PRStatus CopyHostent(    struct hostent *from,    char *buf,    PRIntn bufsize,#if defined(_PR_INET6)    _PRIPAddrConversion conversion,#endif    PRHostEnt *to){	PRIntn len, na;	char **ap;	/* Do the easy stuff */#if defined(_PR_INET6)	if (conversion != _PRIPAddrNoConversion			&& from->h_addrtype == AF_INET) {		PR_ASSERT(from->h_length == 4);		to->h_addrtype = AF_INET6;		to->h_length = 16;	} else {		to->h_addrtype = from->h_addrtype;		to->h_length = from->h_length;	}#else	to->h_addrtype = from->h_addrtype;	to->h_length = from->h_length;#endif	/* Copy the official name */	if (!from->h_name) return PR_FAILURE;	len = strlen(from->h_name) + 1;	to->h_name = Alloc(len, &buf, &bufsize, 0);	if (!to->h_name) return PR_FAILURE;	memcpy(to->h_name, from->h_name, len);	/* Count the aliases, then allocate storage for the pointers */	for (na = 1, ap = from->h_aliases; *ap != 0; na++, ap++){;} /* nothing to execute */	to->h_aliases = (char**)Alloc(	    na * sizeof(char*), &buf, &bufsize, sizeof(char**));	if (!to->h_aliases) return PR_FAILURE;	/* Copy the aliases, one at a time */	for (na = 0, ap = from->h_aliases; *ap != 0; na++, ap++) {		len = strlen(*ap) + 1;		to->h_aliases[na] = Alloc(len, &buf, &bufsize, 0);		if (!to->h_aliases[na]) return PR_FAILURE;		memcpy(to->h_aliases[na], *ap, len);	}	to->h_aliases[na] = 0;	/* Count the addresses, then allocate storage for the pointers */	for (na = 1, ap = from->h_addr_list; *ap != 0; na++, ap++){;} /* nothing to execute */	to->h_addr_list = (char**)Alloc(	    na * sizeof(char*), &buf, &bufsize, sizeof(char**));	if (!to->h_addr_list) return PR_FAILURE;	/* Copy the addresses, one at a time */	for (na = 0, ap = from->h_addr_list; *ap != 0; na++, ap++) {		to->h_addr_list[na] = Alloc(to->h_length, &buf, &bufsize, 0);		if (!to->h_addr_list[na]) return PR_FAILURE;#if defined(_PR_INET6)		if (conversion != _PRIPAddrNoConversion				&& from->h_addrtype == AF_INET) {			if (conversion == _PRIPAddrIPv4Mapped) {				MakeIPv4MappedAddr(*ap, to->h_addr_list[na]);			} else {				PR_ASSERT(conversion == _PRIPAddrIPv4Compat);				MakeIPv4CompatAddr(*ap, to->h_addr_list[na]);			}		} else {			memcpy(to->h_addr_list[na], *ap, to->h_length);		}#else		memcpy(to->h_addr_list[na], *ap, to->h_length);#endif	}	to->h_addr_list[na] = 0;	return PR_SUCCESS;}