summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_pgsql.cpp5
-rw-r--r--src/modules/m_cgiirc.cpp4
-rw-r--r--src/modules/m_ident.cpp4
-rw-r--r--src/modules/m_spanningtree/main.cpp6
-rw-r--r--src/modules/m_spanningtree/utils.cpp6
5 files changed, 5 insertions, 20 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 9ec369859..57c049f30 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -817,14 +817,11 @@ class ModulePgSQL : public Module
ipvalid = inet_pton(AF_INET6, host.host.c_str(), &blargle);
}
else
+#endif
{
in_addr blargle;
ipvalid = inet_aton(host.host.c_str(), &blargle);
}
-#else
- in_addr blargle;
- ipvalid = inet_aton(host.host.c_str(), &blargle);
-#endif
if(ipvalid > 0)
{
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index a866d938d..3ab2f50be 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -385,10 +385,8 @@ public:
if (user->GetProtocolFamily() == AF_INET6)
inet_pton(AF_INET6, newip, &((sockaddr_in6*)user->ip)->sin6_addr);
else
- inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
-#else
- inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
#endif
+ inet_aton(newip, &((sockaddr_in*)user->ip)->sin_addr);
try
{
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 00d7524c7..eb9f3f365 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -163,10 +163,8 @@ class RFC1413 : public InspSocket
if (this->u->GetProtocolFamily() == AF_INET6)
snprintf(ident_request,127,"%d,%d\r\n",ntohs(((sockaddr_in6*)sock_them)->sin6_port),ntohs(((sockaddr_in6*)sock_us)->sin6_port));
else
- snprintf(ident_request,127,"%d,%d\r\n",ntohs(((sockaddr_in*)sock_them)->sin_port),ntohs(((sockaddr_in*)sock_us)->sin_port));
-#else
- snprintf(ident_request,127,"%d,%d\r\n",ntohs(((sockaddr_in*)sock_them)->sin_port),ntohs(((sockaddr_in*)sock_us)->sin_port));
#endif
+ snprintf(ident_request,127,"%d,%d\r\n",ntohs(((sockaddr_in*)sock_them)->sin_port),ntohs(((sockaddr_in*)sock_us)->sin_port));
this->Write(ident_request);
delete[] sock_us;
delete[] sock_them;
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 0fddd6e0e..a134d95e1 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -510,16 +510,12 @@ void ModuleSpanningTree::ConnectServer(Link* x)
ipvalid = false;
}
else
+#endif
{
in_addr n;
if (inet_aton(x->IPAddr.c_str(),&n) < 1)
ipvalid = false;
}
-#else
- in_addr n;
- if (inet_aton(x->IPAddr.c_str(),&n) < 1)
- ipvalid = false;
-#endif
/* Do we already have an IP? If so, no need to resolve it. */
if (ipvalid)
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 854e38e76..6c4001503 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -428,16 +428,12 @@ void SpanningTreeUtilities::RefreshIPCache()
ipvalid = false;
}
else
+#endif
{
in_addr n;
if (inet_aton(L->IPAddr.c_str(),&n) < 1)
ipvalid = false;
}
-#else
- in_addr n;
- if (inet_aton(L->IPAddr.c_str(),&n) < 1)
- ipvalid = false;
-#endif
if (!ipvalid)
{
try