aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Backhaus <robbak@robbak.com>2013-05-24 23:40:51 +1000
committerRobert Backhaus <robbak@robbak.com>2013-05-24 23:40:51 +1000
commit03f498080a813850e1a3addf2c555450aa5e65c1 (patch)
treeab608589cc86847b84eaaf5bc920b3c46450b695 /src
parent36dc41f4273c59e570978c603e48bbec43f3d0a1 (diff)
downloadbitcoin-03f498080a813850e1a3addf2c555450aa5e65c1.tar.xz
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 ebd9dee7b2..3eb090ac0c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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."));