diff options
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 17b98e28b..1341716f8 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -337,6 +337,7 @@ bool irc::sockets::MatchCIDR(const char* address, const char* cidr_mask, bool ma */ bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten) { + _CrtCheckMemory(); /* We allocate 2 of these, because sockaddr_in6 is larger than sockaddr (ugh, hax) */ sockaddr* servaddr = new sockaddr[2]; memset(servaddr,0,sizeof(sockaddr)*2); @@ -510,7 +511,7 @@ int InspIRCd::BindPorts(bool, int &ports_found, FailedPortList &failed_ports) { irc::portparser portrange(configToken, false); int portno = -1; - while ((portno = portrange.GetToken())) + while (0 != (portno = portrange.GetToken())) { if (*Addr == '*') *Addr = 0; @@ -583,3 +584,4 @@ int irc::sockets::insp_aton(const char* a, insp_inaddr* n) return inet_pton(AF_FAMILY, a, n); } + |