X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7da2926d0733ff0683f31aeea176ce71e127264f..82ef1f08a953fa19e307b0efec73caedb3b960c5:/examples/msg/priority/priority.c?ds=sidebyside diff --git a/examples/msg/priority/priority.c b/examples/msg/priority/priority.c index f1efaa6861..b184bf5c86 100644 --- a/examples/msg/priority/priority.c +++ b/examples/msg/priority/priority.c @@ -74,19 +74,15 @@ int main(int argc, char *argv[]) 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]); #ifdef _MSC_VER _set_output_format(prev_exponent_format); #endif - if (res == MSG_OK) - return 0; - else - return 1; + return res != MSG_OK; }