X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b3b356352e87ae00a20f737c48e19b0c8413455a..6a42d0b4d34e2b9777922430ef85646dabbefa20:/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c diff --git a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c index 048e817dbb..112c71935d 100644 --- a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c +++ b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c @@ -94,7 +94,7 @@ static int worker_main(int argc, char *argv[]) int slave(int argc, char *argv[]) { msg_task_t task; - _XBT_GNUC_UNUSED int res; + XBT_ATTRIB_UNUSED int res; int id = -1; char mailbox[80]; double start, end; @@ -144,11 +144,9 @@ int main(int argc, char *argv[]) const char *application_file; 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]); + platform_file = argv[1]; application_file = argv[2]; @@ -165,8 +163,5 @@ int main(int argc, char *argv[]) XBT_INFO("Simulation time %g", MSG_get_clock()); - if (res == MSG_OK) - return 0; - else - return 1; + return res != MSG_OK; } /* end_of_main */