aboutsummaryrefslogtreecommitdiffstats
path: root/src/Network/WireGuard/Foreign/Tun.hs
diff options
context:
space:
mode:
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)