aboutsummaryrefslogtreecommitdiffstats
path: root/src/Network/WireGuard/Foreign/Tun.hs
diff options
context:
space:
mode:
authorBaylac-Jacqué Félix <felix@alternativebit.fr>2017-09-16 16:11:04 +0200
committerBaylac-Jacqué Félix <felix@alternativebit.fr>2017-09-16 17:11:53 +0200
commit0b2de17e8bb5ca5c2f709f150fd73153ef670fd0 (patch)
tree1376cb18d011492da599a8d2a80f01e164a3a847 /src/Network/WireGuard/Foreign/Tun.hs
parentPlumbed RPC set parser to STM state. (diff)
downloadwireguard-hs-0b2de17e8bb5ca5c2f709f150fd73153ef670fd0.tar.xz
wireguard-hs-0b2de17e8bb5ca5c2f709f150fd73153ef670fd0.zip
Fix GHC and HLINT warnings.
Diffstat (limited to 'src/Network/WireGuard/Foreign/Tun.hs')
-rw-r--r--src/Network/WireGuard/Foreign/Tun.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/WireGuard/Foreign/Tun.hs b/src/Network/WireGuard/Foreign/Tun.hs
index 3fdbbd4..89f4bae 100644
--- a/src/Network/WireGuard/Foreign/Tun.hs
+++ b/src/Network/WireGuard/Foreign/Tun.hs
@@ -27,14 +27,14 @@ openTun intfName threads =
tunReadBuf :: Fd -> Ptr Word8 -> CSize -> IO CSize
tunReadBuf _fd _buf 0 = return 0
tunReadBuf fd buf nbytes =
- fmap fromIntegral $
+ fromIntegral <$>
throwErrnoIfMinus1RetryMayBlock "tunReadBuf"
(tun_read_c (fromIntegral fd) (castPtr buf) nbytes)
(threadWaitRead fd)
tunWriteBuf :: Fd -> Ptr Word8 -> CSize -> IO CSize
tunWriteBuf fd buf len =
- fmap fromIntegral $
+ fromIntegral <$>
throwErrnoIfMinus1RetryMayBlock "tunWriteBuf"
(tun_write_c (fromIntegral fd) (castPtr buf) len)
(threadWaitWrite fd)