Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sed -i -e 's/\t/ /g' [sources] Please people, stop using tabs
[simgrid.git] / teshsuite / msg / storage / storage_basic.c
index 8252c9e..400c47f 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
@@ -58,9 +58,9 @@ void display_storage_properties(msg_storage_t storage){
   if (xbt_dict_length(props) > 0){
     XBT_INFO("\tProperties of mounted storage: %s", MSG_storage_get_name(storage));
     xbt_dict_foreach(props, cursor, key, data)
-         XBT_INFO("\t\t'%s' -> '%s'", key, data);
+    XBT_INFO("\t\t'%s' -> '%s'", key, data);
   }else{
-       XBT_INFO("\tNo property attached.");
+  XBT_INFO("\tNo property attached.");
   }
 }
 
@@ -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;
 }