summaryrefslogtreecommitdiff
path: root/networking/nslookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/nslookup.c')
-rw-r--r--networking/nslookup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c
index dd49e26..89a2d64 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 {