summaryrefslogtreecommitdiff
path: root/src/get_wireless_info.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2009-09-26 13:26:13 +0200
committerMichael Stapelberg <michael@stapelberg.de>2009-09-26 13:26:13 +0200
commitcdb450376e52bad45969c87a44908ef6e9997f39 (patch)
tree9fcd251c6840ff4b69261b850ae276f071f6e4fa /src/get_wireless_info.c
parent89ad3dbaa258f3c15957d5f69558d070e3c5d9bc (diff)
Bugfix: Don’t show colors in wireless info if colors are disabled (Thanks shatter)
Diffstat (limited to 'src/get_wireless_info.c')
-rw-r--r--src/get_wireless_info.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/get_wireless_info.c b/src/get_wireless_info.c
index 529ba71..2cdcb8c 100644
--- a/src/get_wireless_info.c
+++ b/src/get_wireless_info.c
@@ -33,9 +33,7 @@ const char *get_wireless_info() {
if (sscanf(interfaces, "%*[^:]: 0000 %d", &quality) != 1)
continue;
if ((quality == UCHAR_MAX) || (quality == 0)) {
- if (use_colors)
- (void)snprintf(part, sizeof(part), "%sW: down%s", color("#FF0000"), endcolor());
- else (void)snprintf(part, sizeof(part), "W: down");
+ (void)snprintf(part, sizeof(part), "%sW: down%s", color("#FF0000"), endcolor());
} else (void)snprintf(part, sizeof(part), "%sW: (%03d%%) %s%s",
color("#00FF00"), quality, get_ip_addr(wlan_interface), endcolor());
return part;