From 296eb5e7063b4051927f2e2bf94e1034bf64f60c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 9 May 2012 18:56:57 +0200 Subject: Error handling: Never output null as full_text (JSON), prefix messages with i3status (Thanks Artemis) The former made i3bar crash, the latter is helpful for debugging. --- src/print_ip_addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/print_ip_addr.c') diff --git a/src/print_ip_addr.c b/src/print_ip_addr.c index 778427c..909a8b2 100644 --- a/src/print_ip_addr.c +++ b/src/print_ip_addr.c @@ -56,7 +56,7 @@ const char *get_ip_addr(const char *interface) { int ret; if ((ret = getnameinfo(addrp->ifa_addr, len, part, sizeof(part), NULL, 0, NI_NUMERICHOST)) != 0) { - fprintf(stderr, "getnameinfo(): %s\n", gai_strerror(ret)); + fprintf(stderr, "i3status: getnameinfo(): %s\n", gai_strerror(ret)); freeifaddrs(ifaddr); return "no IP"; } -- cgit v1.2.3