summaryrefslogtreecommitdiffhomepage
path: root/IWlib.hsc
diff options
context:
space:
mode:
authorJose A Ortega Ruiz <jao@gnu.org>2010-02-23 01:23:50 +0100
committerJose A Ortega Ruiz <jao@gnu.org>2010-02-23 01:23:50 +0100
commit7a812769258f8d156d0d4e8f2b86ea85eec03157 (patch)
tree00d7c3e569c300e9294d56f3bf2214679a828357 /IWlib.hsc
parent7350d55936ffcc4a0b1b0eb08a60a3433e74fc5a (diff)
downloadxmobar-7a812769258f8d156d0d4e8f2b86ea85eec03157.tar.gz
xmobar-7a812769258f8d156d0d4e8f2b86ea85eec03157.tar.bz2
Nits
Ignore-this: f696da8b5b9877b65786b1146fddaefb darcs-hash:20100223002350-748be-56d18001f20ff1f6bd45480b45d9a4f00750783d.gz
Diffstat (limited to 'IWlib.hsc')
-rw-r--r--IWlib.hsc4
1 files changed, 2 insertions, 2 deletions
diff --git a/IWlib.hsc b/IWlib.hsc
index c7c0555..6d8b507 100644
--- a/IWlib.hsc
+++ b/IWlib.hsc
@@ -59,7 +59,7 @@ getWirelessInfo iface =
if (bcr < 0) then return nullInfo 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
+ essid <- if hase /= 0 && eon /= 0 then
do l <- (#peek struct wireless_config, essid_len) wc
let e = (#ptr struct wireless_config, essid) wc
peekCStringLen (e, fromIntegral (l :: CInt))
@@ -67,7 +67,7 @@ getWirelessInfo iface =
q <- if str >= 0 && rgr >=0 then
do qualv <- xqual $ (#ptr struct iw_statistics, qual) stats
mv <- xqual $ (#ptr struct iw_range, max_qual) rng
- let mxv = if mv > 0 then fromIntegral mv else 1
+ let mxv = if mv /= 0 then fromIntegral mv else 1
return $ fromIntegral qualv / mxv
else return (-1)
let qv = round (100 * (q :: Double))