Skip to content

Commit e32a05e

Browse files
committed
moving the comment (suggested by @endgame)
1 parent ff99e97 commit e32a05e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Network/Socket/Info.hsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ getAddrInfoNE hints node service = alloc getaddrinfo
274274
ret <- c_getaddrinfo c_node c_service c_hints ptr_ptr_addrs
275275
if ret == 0 then do
276276
ptr_addrs <- peek ptr_ptr_addrs
277-
-- POSIX requires that getaddrinfo(3) returns at least one addrinfo.
278-
-- See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
279277
ais <- followAddrInfo ptr_addrs
280278
return ais
281279
else do
@@ -315,6 +313,8 @@ getAddrInfoList hints node service =
315313

316314
followAddrInfo :: Ptr AddrInfo -> IO (NonEmpty AddrInfo)
317315
followAddrInfo ptr_ai
316+
-- POSIX requires that getaddrinfo(3) returns at least one addrinfo.
317+
-- See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
318318
| ptr_ai == nullPtr = ioError $ mkIOError NoSuchThing "getaddrinfo must return at least one addrinfo" Nothing Nothing
319319
| otherwise = do
320320
a <- peek ptr_ai

0 commit comments

Comments
 (0)