summaryrefslogtreecommitdiffhomepage
path: root/src/IWlib.hsc
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2017-04-29 02:09:24 +0200
committerjao <jao@gnu.org>2017-04-29 02:09:24 +0200
commite41fd61bdeac8779fa24050cc0d44714f7c90f1d (patch)
treef724480c121a1246c942ed913f167fa71a9e2564 /src/IWlib.hsc
parent938a8d8307c1c4794c5fcf269c587c3c5c5e70df (diff)
downloadxmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.gz
xmobar-e41fd61bdeac8779fa24050cc0d44714f7c90f1d.tar.bz2
hlint configuration
Diffstat (limited to 'src/IWlib.hsc')
-rw-r--r--src/IWlib.hsc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/IWlib.hsc b/src/IWlib.hsc
index 5f7754d..b244510 100644
--- a/src/IWlib.hsc
+++ b/src/IWlib.hsc
@@ -56,7 +56,7 @@ getWirelessInfo iface =
str <- c_iw_stats i istr stats rng 1
rgr <- c_iw_range i istr rng
c_iw_close i
- if (bcr < 0) then return WirelessInfo { wiEssid = "", wiQuality = 0 } else
+ if bcr < 0 then return WirelessInfo { wiEssid = "", wiQuality = 0 } else
do hase <- (#peek struct wireless_config, has_essid) wc :: IO CInt
eon <- (#peek struct wireless_config, essid_on) wc :: IO CInt
essid <- if hase /= 0 && eon /= 0 then
@@ -70,6 +70,6 @@ getWirelessInfo iface =
return $ fromIntegral qualv / mxv
else return 0
let qv = round (100 * (q :: Double))
- return $ WirelessInfo { wiEssid = essid, wiQuality = min 100 qv }
+ return WirelessInfo { wiEssid = essid, wiQuality = min 100 qv }
where xqual p = let qp = (#ptr struct iw_param, value) p in
(#peek struct iw_quality, qual) qp :: IO CChar