small ipv6 doc changes; nslookup a tiny bit smaller

This commit is contained in:
Denis Vlasenko
2006-11-07 19:05:43 +00:00
parent 6476cc1089
commit 8528151658
3 changed files with 6 additions and 4 deletions

View File

@@ -82,9 +82,10 @@ static int print_host(const char *hostname, const char *header)
while (cur) {
sockaddr_to_dotted(cur->ai_addr, str, sizeof(str));
printf("%s %s\nAddress: %s", header, hostname, str);
if (getnameinfo(cur->ai_addr, cur->ai_addrlen, str, sizeof(str), NULL, 0, NI_NAMEREQD))
s[0] = ' ';
if (getnameinfo(cur->ai_addr, cur->ai_addrlen, str+1, sizeof(str)-1, NULL, 0, NI_NAMEREQD))
str[0] = '\0';
printf(" %s\n", str);
puts(str);
cur = cur->ai_next;
}
} else {