aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Backhaus <robbak@robbak.com>2013-05-24 23:40:51 +1000
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-05 09:15:39 +0100
commit187f8a56750bf5f1815cefa439611c3000f70c14 (patch)
tree9d643ac50fecb5472acb828c7ab5f52149adb3a7 /src
parent9612e4c0d9730dbdb9971e53c72df17dd97daa2a (diff)
Explictly cast calculation to int, to allow std::max to work.
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 9c5386779d..68ca62288d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -533,7 +533,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."));