summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-11 09:41:58 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-11 09:41:58 +0000
commit5db1d322be106c8462dc691072f9415dc0766ed4 (patch)
tree311cb5e6d5307d3e2b77652a9a2461a324c5ab2e /src/inspsocket.cpp
parent0626e6a68af3327ecfda4467f2dd09d4e729773d (diff)
Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a note to webirc that needs looking at.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 0e8744d17..d412b961c 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -178,10 +178,10 @@ bool BufferedSocket::BindAddr(const std::string &ip)
int j = 0;
while (j < Conf.Enumerate("bind") || (!ip.empty()))
{
- std::string IP = ip.empty() ? Conf.ReadValue("bind","address",j) : ip;
+ std::string sIP = ip.empty() ? Conf.ReadValue("bind","address",j) : ip;
if (!ip.empty() || Conf.ReadValue("bind","type",j) == "servers")
{
- if (!ip.empty() || ((IP != "*") && (IP != "127.0.0.1") && (!IP.empty()) && (IP != "::1")))
+ if (!ip.empty() || ((sIP != "*") && (sIP != "127.0.0.1") && (!sIP.empty()) && (sIP != "::1")))
{
/* The [2] is required because we may write a sockaddr_in6 here, and sockaddr_in6 is larger than sockaddr, where sockaddr_in4 is not. */
sockaddr* s = new sockaddr[2];
@@ -189,7 +189,7 @@ bool BufferedSocket::BindAddr(const std::string &ip)
if (v6)
{
in6_addr n;
- if (inet_pton(AF_INET6, IP.c_str(), &n) > 0)
+ if (inet_pton(AF_INET6, sIP.c_str(), &n) > 0)
{
memcpy(&((sockaddr_in6*)s)->sin6_addr, &n, sizeof(sockaddr_in6));
((sockaddr_in6*)s)->sin6_port = 0;
@@ -207,7 +207,7 @@ bool BufferedSocket::BindAddr(const std::string &ip)
#endif
{
in_addr n;
- if (inet_aton(IP.c_str(), &n) > 0)
+ if (inet_aton(sIP.c_str(), &n) > 0)
{
((sockaddr_in*)s)->sin_addr = n;
((sockaddr_in*)s)->sin_port = 0;