diff options
author | Peter Powell <petpow@saberuk.com> | 2019-12-09 01:34:02 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-12-09 01:34:02 +0000 |
commit | ad50225dc3d5ce6e44a5009351a7434b7249d233 (patch) | |
tree | 02b160ea49831a6ee192ba759768a2d0266e24a3 | |
parent | 350a01d60c94fbdd3c0b6361b98a77b148a35116 (diff) |
Make BindPorts return size_t instead of int.
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | src/inspircd.cpp | 4 | ||||
-rw-r--r-- | src/socket.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index f3e718dcc..8f5fdc176 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -348,7 +348,7 @@ class CoreExport InspIRCd /** Bind all ports specified in the configuration file. * @return The number of ports bound without error */ - int BindPorts(FailedPortList &failed_ports); + size_t BindPorts(FailedPortList &failed_ports); /** Find a user in the nick hash. * If the user cant be found in the nick hash check the uuid hash diff --git a/src/inspircd.cpp b/src/inspircd.cpp index d0dfce2e7..384f783aa 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -530,7 +530,7 @@ InspIRCd::InspIRCd(int argc, char** argv) this->XLines->ApplyLines(); FailedPortList pl; - int bounditems = BindPorts(pl); + size_t bounditems = BindPorts(pl); std::cout << std::endl; @@ -542,7 +542,7 @@ InspIRCd::InspIRCd(int argc, char** argv) if (!pl.empty()) { std::cout << std::endl << "WARNING: Not all your client ports could be bound -- " << std::endl << "starting anyway with " << bounditems - << " of " << bounditems + (int)pl.size() << " client ports bound." << std::endl << std::endl; + << " of " << (bounditems + pl.size()) << " client ports bound." << std::endl << std::endl; std::cout << "The following port(s) failed to bind:" << std::endl << std::endl; int j = 1; for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++) diff --git a/src/socket.cpp b/src/socket.cpp index f19af36bb..736e09486 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -54,9 +54,9 @@ bool InspIRCd::BindPort(ConfigTag* tag, const irc::sockets::sockaddrs& sa, std:: return true; } -int InspIRCd::BindPorts(FailedPortList& failed_ports) +size_t InspIRCd::BindPorts(FailedPortList& failed_ports) { - int bound = 0; + size_t bound = 0; std::vector<ListenSocket*> old_ports(ports.begin(), ports.end()); ConfigTagList tags = ServerInstance->Config->ConfTags("bind"); |