diff options
author | Sadie Powell <sadie@witchery.services> | 2020-02-19 05:12:53 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-02-19 05:12:53 +0000 |
commit | 59d2dab8a1849b289dc7304e51e290b70bc3a528 (patch) | |
tree | 5afb04b6659cd59e42672730b479554c06e7310a | |
parent | d1a29d72b9d72fc15000aeef9dbb35602170715a (diff) |
Convert some things to HasFd that were previously missed.
-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; |