summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Emitter.cpp2
-rw-r--r--cpp/src/Ice/ThreadPool.cpp8
-rw-r--r--cpp/src/IceStorm/Server.cpp5
3 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/Ice/Emitter.cpp b/cpp/src/Ice/Emitter.cpp
index 5990cb68e7e..f890e61d5b0 100644
--- a/cpp/src/Ice/Emitter.cpp
+++ b/cpp/src/Ice/Emitter.cpp
@@ -219,7 +219,7 @@ IceInternal::Emitter::timeout() const
bool
IceInternal::Emitter::server() const
{
- return true;
+ return false;
}
bool
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 8b7bbfca768..6c06abedde3 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -68,7 +68,7 @@ IceInternal::ThreadPool::waitUntilServerFinished()
{
JTCSyncT<JTCMonitorT<JTCMutex> > sync(*this);
- while (_servers > 0 && _threadNum > 0)
+ while (_servers != 0 && _threadNum != 0)
{
try
{
@@ -79,7 +79,7 @@ IceInternal::ThreadPool::waitUntilServerFinished()
}
}
- if (_servers > 0)
+ if (_servers != 0)
{
_instance->logger()->error("can't wait for graceful server termination in thread pool\n"
"since all threads have vanished");
@@ -91,7 +91,7 @@ IceInternal::ThreadPool::waitUntilFinished()
{
JTCSyncT<JTCMonitorT<JTCMutex> > sync(*this);
- while (_handlerMap.size() > 0 && _threadNum > 0) // Faster than _reapList.size() with most STLs.
+ while (!_handlerMap.empty() && _threadNum != 0)
{
try
{
@@ -102,7 +102,7 @@ IceInternal::ThreadPool::waitUntilFinished()
}
}
- if (_handlerMap.size() > 0)
+ if (!_handlerMap.empty())
{
_instance->logger()->error("can't wait for graceful application termination in thread pool\n"
"since all threads have vanished");
diff --git a/cpp/src/IceStorm/Server.cpp b/cpp/src/IceStorm/Server.cpp
index d27e8873a01..3a6a9281b53 100644
--- a/cpp/src/IceStorm/Server.cpp
+++ b/cpp/src/IceStorm/Server.cpp
@@ -37,10 +37,11 @@ public:
int
main(int argc, char* argv[])
{
+ addArgumentPrefix("IceStorm");
+ PropertiesPtr defaultProperties;
try
{
- addArgumentPrefix("IceStorm");
- PropertiesPtr defaultProperties = getDefaultProperties(argc, argv);
+ defaultProperties = getDefaultProperties(argc, argv);
}
catch(const Exception& ex)
{