Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sed -i -e 's/\t/ /g' [sources] Please people, stop using tabs
[simgrid.git] / examples / msg / actions / storage_actions.c
index 981b11c..aa1ef5b 100644 (file)
@@ -30,7 +30,7 @@ static void log_action(const char *const *action, double date)
   }
 }
 
-msg_file_t get_file_descriptor(const char *file_name){
+static msg_file_t get_file_descriptor(const char *file_name){
   char full_name[1024];
   msg_file_t file = NULL;
 
@@ -58,7 +58,7 @@ static void action_open(const char *const *action) {
   double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */
 
   sprintf(full_name, "%s:%s", MSG_process_get_name(MSG_process_self()), 
-         file_name);
+    file_name);
 
   ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
   file = MSG_file_open(file_name, NULL);
@@ -86,7 +86,6 @@ static void action_read(const char *const *action) {
 
 static void action_close(const char *const *action) {
   const char *file_name = action[2];
-  char full_name[1024];
   msg_file_t file;
   double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */
 
@@ -141,5 +140,5 @@ int main(int argc, char *argv[]) {
   /* Explicit finalization of the action module is required now*/
   MSG_action_exit();
 
-  return !!MSG_OK;
+  return !!res;
 }                               /* end_of_main */