X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e68d03f1f2c0206497381c7ef3b91bd5d46f1964..16bbb8a8212497d9c44c81333ed2c0e689e0c5af:/examples/msg/icomms/peer2.c?ds=sidebyside diff --git a/examples/msg/icomms/peer2.c b/examples/msg/icomms/peer2.c index 22c4affd01..b5b4b5b9c0 100644 --- a/examples/msg/icomms/peer2.c +++ b/examples/msg/icomms/peer2.c @@ -127,15 +127,11 @@ int main(int argc, char *argv[]) msg_error_t res = MSG_OK; MSG_init(&argc, argv); - if (argc < 3) { - printf("Usage: %s platform_file deployment_file\n", argv[0]); - printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]); - exit(1); - } + xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n" + "\tExample: %s msg_platform.xml msg_deployment.xml\n", + argv[0], argv[0]); + res = test_all(argv[1], argv[2]); - if (res == MSG_OK) - return 0; - else - return 1; -} /* end_of_main */ + return res != MSG_OK; +}