From: Michael Stapelberg Date: Sun, 23 Aug 2009 18:20:52 +0000 (+0200) Subject: Don’t display an error message if getaddrinfo() fails for getting the IPv6 addr ... X-Git-Tag: 2.0~32 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=89ad3dbaa258f3c15957d5f69558d070e3c5d9bc;p=i3%2Fi3status Don’t display an error message if getaddrinfo() fails for getting the IPv6 addr (Thanks Atsutane) --- diff --git a/src/get_ipv6_addr.c b/src/get_ipv6_addr.c index 0f22e29..341b5ba 100644 --- a/src/get_ipv6_addr.c +++ b/src/get_ipv6_addr.c @@ -25,7 +25,9 @@ const char *get_ipv6_addr() { * replace this with any other host which has an AAAA record, but the * K root server is a pretty safe bet. */ if (getaddrinfo("k.root-servers.net", "domain", &hints, &result) != 0) { - perror("getaddrinfo()"); + /* We don’t display the error here because most + * likely, there just is no connectivity. + * Thus, don’t spam the user’s console. */ return "no IPv6"; }