summaryrefslogtreecommitdiff
path: root/components/wifi.c
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-07-08 17:42:58 +0200
committerAaron Marcher <me@drkhsh.at>2018-07-08 17:42:58 +0200
commit96ddf4e1dee808d6ae8162fc1a13126a3d4c77dc (patch)
tree75f6d95fc7bbe3464c5f47574ab36a7514d0382e /components/wifi.c
parentc93971748cb4771aec25aee6e8ff5b7bbb1aacf3 (diff)
Consistency with 80 char limit and breaks
Diffstat (limited to 'components/wifi.c')
-rw-r--r--components/wifi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/wifi.c b/components/wifi.c
index da00cb3..e5dd4b5 100644
--- a/components/wifi.c
+++ b/components/wifi.c
@@ -22,8 +22,7 @@
char status[5];
FILE *fp;
- if (esnprintf(path, sizeof(path),
- "/sys/class/net/%s/operstate",
+ if (esnprintf(path, sizeof(path), "/sys/class/net/%s/operstate",
interface) < 0) {
return NULL;
}
@@ -72,8 +71,8 @@
memset(&wreq, 0, sizeof(struct iwreq));
wreq.u.essid.length = IW_ESSID_MAX_SIZE+1;
- if (esnprintf(wreq.ifr_name, sizeof(wreq.ifr_name),
- "%s", interface) < 0) {
+ if (esnprintf(wreq.ifr_name, sizeof(wreq.ifr_name), "%s",
+ interface) < 0) {
return NULL;
}
@@ -151,8 +150,9 @@
if (nr.nr_max_rssi) {
q = IEEE80211_NODEREQ_RSSI(&nr);
} else {
- q = nr.nr_rssi >= -50 ? 100 : (nr.nr_rssi <= -100 ? 0 :
- (2 * (nr.nr_rssi + 100)));
+ q = nr.nr_rssi >= -50 ? 100 :
+ (nr.nr_rssi <= -100 ? 0 :
+ (2 * (nr.nr_rssi + 100)));
}
return bprintf("%d", q);
}