summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_ident.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp6
-rw-r--r--src/modules/m_spanningtree/resolvers.cpp6
3 files changed, 3 insertions, 11 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 5994caee5..dea411cea 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -187,7 +187,7 @@ class IdentRequestSocket : public EventHandler
/* Remove ident socket from engine, and close it, but dont detatch it
* from its parent user class, or attempt to delete its memory.
*/
- if (GetFd() > -1)
+ if (HasFd())
{
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Close ident socket %d", GetFd());
SocketEngine::Close(this);
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 1aab60eda..5e6e9b036 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -221,11 +221,7 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y)
{
// Create a TreeServer object that will start connecting immediately in the background
TreeSocket* newsocket = new TreeSocket(x, y, sa);
- if (newsocket->GetFd() > -1)
- {
- /* Handled automatically on success */
- }
- else
+ if (!newsocket->HasFd())
{
ServerInstance->SNO->WriteToSnoMask('l', "CONNECT: Error connecting \002%s\002: %s.",
x->Name.c_str(), newsocket->getError().c_str());
diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp
index f048283cf..14a96933d 100644
--- a/src/modules/m_spanningtree/resolvers.cpp
+++ b/src/modules/m_spanningtree/resolvers.cpp
@@ -71,11 +71,7 @@ void ServernameResolver::OnLookupComplete(const DNS::Query *r)
if (!CheckDupe) /* Check that nobody tried to connect it successfully while we were resolving */
{
TreeSocket* newsocket = new TreeSocket(MyLink, myautoconnect, sa);
- if (newsocket->GetFd() > -1)
- {
- /* We're all OK */
- }
- else
+ if (!newsocket->HasFd())
{
/* Something barfed, show the opers */
ServerInstance->SNO->WriteToSnoMask('l', "CONNECT: Error connecting \002%s\002: %s.",