]> git.sur5r.net Git - i3/i3status/commitdiff
Treat the interface as 'down' when it cannot be found in /proc/net/wireless (Thanks...
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 19 Apr 2010 11:29:52 +0000 (13:29 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 19 Apr 2010 11:29:52 +0000 (13:29 +0200)
src/print_wireless_info.c

index 946c5898c046cb10ec1b7f68d61b7be6be5a4f7d..968ff663ba7ccad662d3704612428b7eeace0199 100644 (file)
@@ -38,7 +38,7 @@ static const char *get_wireless_essid(const char *interface) {
  */
 void print_wireless_info(const char *interface, const char *format_up, const char *format_down) {
         char buf[1024];
-        int quality = -1;
+        int quality = 0;
         char *interfaces;
         const char *walk;
         memset(buf, 0, sizeof(buf));
@@ -57,10 +57,6 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
                 break;
         }
 
-        /* Interface could not be found */
-        if (quality == -1)
-                return;
-
         if ((quality == UCHAR_MAX) || (quality == 0)) {
                 walk = format_down;
                 printf("%s", color("#FF0000"));