]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Make BindPorts return size_t instead of int.
authorPeter Powell <petpow@saberuk.com>
Mon, 9 Dec 2019 01:34:02 +0000 (01:34 +0000)
committerPeter Powell <petpow@saberuk.com>
Mon, 9 Dec 2019 01:34:02 +0000 (01:34 +0000)
include/inspircd.h
src/inspircd.cpp
src/socket.cpp

index f3e718dcc5d3f5711a620bcbb39fd7c0496fa06a..8f5fdc1769a9b632f07394cfc53e584b29a6f787 100644 (file)
@@ -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
index d0dfce2e74c7254c5771d0555ddaab99649e105d..384f783aa0e1eb0f116739ce928e317ea1d0e53f 100644 (file)
@@ -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++)
index f19af36bb48a9728d2fd49c372e4cfd8c1129860..736e094865d35cdb36d6a299eeb4d4f674e91492 100644 (file)
@@ -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");