small ipv6 doc changes; nslookup a tiny bit smaller
[oweals/busybox.git] / networking / nslookup.c
index dd49e2669832495bb63e190258aac998e0788f19..89a2d6481e45d7c5f78fe55f97b4e55b65b0d5d2 100644 (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 {