]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/msg/storage/storage_basic.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
improve coverage in teshsuite
[simgrid.git] / teshsuite / msg / storage / storage_basic.c
index 8252c9e83851d7a2c79a4c95825d66699775363c..c19be283ac5afd5a6ac659b6bfb2d10a1c18f6e8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -168,7 +168,7 @@ int client(int argc, char *argv[])
 int server(int argc, char *argv[])
 {
   msg_task_t to_execute = NULL;
-  _XBT_GNUC_UNUSED int res;
+  XBT_ATTRIB_UNUSED int res;
 
   storage_info(MSG_host_self());
 
@@ -205,10 +205,7 @@ int main(int argc, char *argv[])
   MSG_init(&argc, argv);
 
   /* Check the arguments */
-  if (argc < 3) {
-    printf("Usage: %s platform_file deployment_file \n", argv[0]);
-    return -1;
-  }
+  xbt_assert(argc > 2,"Usage: %s platform_file deployment_file \n", argv[0]);
 
   const char *platform_file = argv[1];
   const char *deployment_file = argv[2];
@@ -222,8 +219,5 @@ int main(int argc, char *argv[])
   msg_error_t res = MSG_main();
   XBT_INFO("Simulated time: %g", MSG_get_clock());
 
-  if (res == MSG_OK)
-    return 0;
-  else
-    return 1;
+  return res != MSG_OK;
 }