spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit f25c8bd0592be9c238e3b7b70176d20367b9f60a
parent 539ec046cefa273e60a99d53415df6678ee24455
Author: sin <sin@2f30.org>
Date:   Tue, 24 May 2016 19:11:14 +0100

Nuke some newlines

Diffstat:
Mspoon.c | 10----------
1 file changed, 0 insertions(+), 10 deletions(-)

diff --git a/spoon.c b/spoon.c @@ -177,31 +177,26 @@ wifiread(char *buf, size_t len) warn("getifaddrs"); return -1; } - for (ifa = ifas; ifa; ifa = ifa->ifa_next) { s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) { warn("socket"); continue; } - memset(&ifmr, 0, sizeof(ifmr)); strlcpy(ifmr.ifm_name, ifa->ifa_name, IF_NAMESIZE); if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { close(s); continue; } - if ((ifmr.ifm_active & IFM_IEEE80211) == 0) { close(s); continue; } - if ((ifmr.ifm_active & IFM_IEEE80211_HOSTAP) != 0) { close(s); continue; } - memset(&bssid, 0, sizeof(bssid)); strlcpy(bssid.i_name, ifa->ifa_name, sizeof(bssid.i_name)); ibssid = ioctl(s, SIOCG80211BSSID, &bssid); @@ -209,7 +204,6 @@ wifiread(char *buf, size_t len) close(s); continue; } - memset(&nr, 0, sizeof(nr)); memcpy(&nr.nr_macaddr, bssid.i_bssid, sizeof(nr.nr_macaddr)); strlcpy(nr.nr_ifname, ifa->ifa_name, sizeof(nr.nr_ifname)); @@ -218,10 +212,8 @@ wifiread(char *buf, size_t len) continue; } close(s); - if (nr.nr_rssi == 0) continue; - if (nr.nr_max_rssi == 0) { if (nr.nr_rssi <= -100) quality = 0; @@ -232,7 +224,6 @@ wifiread(char *buf, size_t len) } else { quality = IEEE80211_NODEREQ_RSSI(&nr); } - if (quality == 100) icon = "::"; else if (quality >= 75) @@ -363,7 +354,6 @@ loop(void) dpy = XOpenDisplay(NULL); if (dpy == NULL) errx(1, "cannot open display"); - for (;;) { entcat(line, sizeof(line)); XStoreName(dpy, DefaultRootWindow(dpy), line);