summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/info/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/info/Client.cpp')
-rw-r--r--cpp/test/Ice/info/Client.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/cpp/test/Ice/info/Client.cpp b/cpp/test/Ice/info/Client.cpp
index 4482eca8387..6aa30209e92 100644
--- a/cpp/test/Ice/info/Client.cpp
+++ b/cpp/test/Ice/info/Client.cpp
@@ -29,32 +29,15 @@ main(int argc, char* argv[])
#ifdef ICE_STATIC_LIBS
Ice::registerIceSSL();
#endif
- int status;
- Ice::CommunicatorPtr communicator;
try
{
- communicator = 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;
}