diff options
-rw-r--r-- | src/listensocket.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_ident.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp index cb1c5c73f..8c5fda59a 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -48,8 +48,7 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t } fd = socket(bind_to.family(), SOCK_STREAM, 0); - - if (this->fd == -1) + if (!HasFd()) return; #ifdef IPV6_V6ONLY diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index dea411cea..15e46b83a 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -113,8 +113,7 @@ class IdentRequestSocket : public EventHandler age = ServerInstance->Time(); SetFd(socket(user->server_sa.family(), SOCK_STREAM, 0)); - - if (GetFd() == -1) + if (!HasFd()) throw ModuleException("Could not create socket"); done = false; |