Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Better fix to the comparison between signed and unsigned int around dynar size: chang...
[simgrid.git] / src / simix / smx_global.c
index 51290f0..c204eca 100644 (file)
@@ -31,7 +31,7 @@ static void simix_cfg_control_set(const char *control_string)
   /* To split the string in commands, and the cursors */
   xbt_dynar_t set_strings;
   char *str;
-  int cpt;
+  unsigned int cpt;
 
   if (!control_string)
     return;
@@ -323,7 +323,7 @@ double SIMIX_solve(xbt_fifo_t actions_done, xbt_fifo_t actions_failed)
 {
 
   smx_process_t process = NULL;
-  int i;
+  unsigned int iter;
   double elapsed_time = 0.0;
   static int state_modifications = 1;
   static int first = 1;
@@ -353,11 +353,12 @@ double SIMIX_solve(xbt_fifo_t actions_done, xbt_fifo_t actions_failed)
     void *fun = NULL;
     void *arg = NULL;
 
-    xbt_dynar_foreach(model_list, i, model) {
+    xbt_dynar_foreach(model_list, iter, model) {
       if (xbt_swag_size(model->common_public->states.failed_action_set)
          || xbt_swag_size(model->common_public->states.
                           done_action_set)) {
        state_modifications = 1;
+        break;
       }
     }
 
@@ -374,7 +375,7 @@ double SIMIX_solve(xbt_fifo_t actions_done, xbt_fifo_t actions_failed)
        DEBUG2("Launching %s on %s", args->name, args->hostname);
        process = SIMIX_process_create(args->name, args->code,
                                       args->data, args->hostname,
-                                      args->argc, args->argv);
+                                      args->argc, args->argv, args->properties);
        if (args->kill_time > SIMIX_get_clock()) {
          surf_timer_model->extension_public->set(args->kill_time,
                                                     (void *)
@@ -392,7 +393,7 @@ double SIMIX_solve(xbt_fifo_t actions_done, xbt_fifo_t actions_failed)
     }
 
     /* Wake up all process waiting for the action finish */
-    xbt_dynar_foreach(model_list, i, model) {
+    xbt_dynar_foreach(model_list, iter, model) {
       while ((action =
              xbt_swag_extract(model->common_public->states.
                               failed_action_set))) {