]> Git Repo - VerusCoin.git/commitdiff
Explictly cast calculation to int, to allow std::max to work.
authorRobert Backhaus <[email protected]>
Fri, 24 May 2013 13:40:51 +0000 (23:40 +1000)
committerRobert Backhaus <[email protected]>
Fri, 24 May 2013 13:40:51 +0000 (23:40 +1000)
src/init.cpp

index ebd9dee7b2ffd86e5b1662786c50484982d29193..3eb090ac0c22806a71285a7dd7013f6e21fd4b7e 100644 (file)
@@ -530,7 +530,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     // Make sure enough file descriptors are available
     int nBind = std::max((int)mapArgs.count("-bind"), 1);
     nMaxConnections = GetArg("-maxconnections", 125);
-    nMaxConnections = std::max(std::min(nMaxConnections, FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS), 0);
+    nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
     int nFD = RaiseFileDescriptorLimit(nMaxConnections + MIN_CORE_FILEDESCRIPTORS);
     if (nFD < MIN_CORE_FILEDESCRIPTORS)
         return InitError(_("Not enough file descriptors available."));
This page took 0.022631 seconds and 4 git commands to generate.