summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/inheritance/Collocated.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/inheritance/Collocated.cpp')
-rw-r--r--cpp/test/Ice/inheritance/Collocated.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp
index 9f0c5acb53d..8496f69ecd4 100644
--- a/cpp/test/Ice/inheritance/Collocated.cpp
+++ b/cpp/test/Ice/inheritance/Collocated.cpp
@@ -36,32 +36,15 @@ main(int argc, char* argv[])
#ifdef ICE_STATIC_LIBS
Ice::registerIceSSL();
#endif
- int status;
- Ice::CommunicatorPtr communicator;
try
{
- communicator = ICE_COMMUNICATOR_HOLDER_RELEASE(Ice::initialize(argc, argv));
- status = run(argc, argv, communicator);
+ Ice::CommunicatorHolder ich = Ice::initialize(argc, argv);
+ return run(argc, argv, ich.communicator());
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
- status = EXIT_FAILURE;
+ return EXIT_FAILURE;
}
-
- if(communicator)
- {
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
- }
-
- return status;
}