]> git.sur5r.net Git - i3/i3status/commitdiff
get_ip_address: return NULL instead of down
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 26 Jan 2010 13:25:21 +0000 (14:25 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 26 Jan 2010 13:25:21 +0000 (14:25 +0100)
src/print_ip_addr.c

index 6ddd35a125ef6c6d50e9ea522f1eff29bfa10b4e..e719d2f6b228c96a4333abfe185c28b2b3cdd7fb 100644 (file)
@@ -25,10 +25,8 @@ const char *get_ip_addr(const char *interface) {
 
         getifaddrs(&ifaddr);
 
-        if (ifaddr == NULL) {
-                (void)snprintf(part, sizeof(part), "E: down");
-                return part;
-        }
+        if (ifaddr == NULL)
+                return NULL;
 
         addrp = ifaddr;