From 96ddf4e1dee808d6ae8162fc1a13126a3d4c77dc Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Sun, 8 Jul 2018 17:42:58 +0200 Subject: Consistency with 80 char limit and breaks --- components/wifi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'components/wifi.c') 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); } -- cgit v1.2.3