From 8528151658927bcb4822f2956b93d352cf5ad2e6 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 7 Nov 2006 19:05:43 +0000 Subject: small ipv6 doc changes; nslookup a tiny bit smaller --- networking/nslookup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'networking/nslookup.c') diff --git a/networking/nslookup.c b/networking/nslookup.c index dd49e2669..89a2d6481 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c @@ -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 { -- cgit v1.2.3