From 7a812769258f8d156d0d4e8f2b86ea85eec03157 Mon Sep 17 00:00:00 2001 From: Jose A Ortega Ruiz Date: Tue, 23 Feb 2010 01:23:50 +0100 Subject: Nits Ignore-this: f696da8b5b9877b65786b1146fddaefb darcs-hash:20100223002350-748be-56d18001f20ff1f6bd45480b45d9a4f00750783d.gz --- IWlib.hsc | 4 ++-- 1 file 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)) -- cgit v1.2.3