Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reset the clock to 0 in surf_exit so that it gets zeroed in MSG_clean for people...
[simgrid.git] / src / surf / surf.c
index 8880069..46b0c8e 100644 (file)
@@ -357,7 +357,7 @@ FILE *surf_fopen(const char *name, const char *mode)
   int i;
   char *path = NULL;
   FILE *file = NULL;
-  int path_name_len = 0;       /* don't count '\0' */
+  unsigned int path_name_len = 0;      /* don't count '\0' */
 
   xbt_assert0(name, "Need a non-NULL file name");
 
@@ -417,6 +417,7 @@ void surf_exit(void)
     free(path_name);
     path_name = NULL;
   }
+  NOW=0; /* Just in case the user plans to restart the simulation afterward */
   xbt_exit();
 }