From 59d2dab8a1849b289dc7304e51e290b70bc3a528 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 19 Feb 2020 05:12:53 +0000 Subject: Convert some things to HasFd that were previously missed. --- src/listensocket.cpp | 3 +-- 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; -- cgit v1.2.3