summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsutane <atsutane@freethoughts.de>2009-09-11 21:41:22 +0200
committerMichael Stapelberg <michael@stapelberg.de>2009-09-11 23:05:54 +0200
commit48e033598bf8d97e3663b2b854ed4f6aa03585de (patch)
treee5b6bf602be5da1d520767fbd51608b5dda65919
parent112512c546c8d9a46b503b5e4b9cc10afb1a248e (diff)
Small improvement regarding readability if one hasn't an IPv6 address.
-rw-r--r--src/get_ipv6_addr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/get_ipv6_addr.c b/src/get_ipv6_addr.c
index aa09d3a..0f22e29 100644
--- a/src/get_ipv6_addr.c
+++ b/src/get_ipv6_addr.c
@@ -26,7 +26,7 @@ const char *get_ipv6_addr() {
* K root server is a pretty safe bet. */
if (getaddrinfo("k.root-servers.net", "domain", &hints, &result) != 0) {
perror("getaddrinfo()");
- return "no IP";
+ return "no IPv6";
}
for (resp = result; resp != NULL; resp = resp->ai_next) {
@@ -54,7 +54,7 @@ const char *get_ipv6_addr() {
if (getsockname(fd, (struct sockaddr*)&local, &local_len) == -1) {
perror("getsockname()");
(void)close(fd);
- return "no IP";
+ return "no IPv6";
}
(void)close(fd);
@@ -65,7 +65,7 @@ const char *get_ipv6_addr() {
buf, sizeof(buf), NULL, 0,
NI_NUMERICHOST)) != 0) {
fprintf(stderr, "getnameinfo(): %s\n", gai_strerror(ret));
- return "no IP";
+ return "no IPv6";
}
free(result);
@@ -73,5 +73,5 @@ const char *get_ipv6_addr() {
}
free(result);
- return "no IP";
+ return "no IPv6";
}