Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move a DEBUG request to avoid printing uninitialized variables
[simgrid.git] / src / surf / cpu_ti.c
index 54e8834c56c485ba797c56e971b57fa7a03df541..e8839ddbd4a1ea8540020288e3fceecd70e8a398 100644 (file)
@@ -597,8 +597,8 @@ static void update_actions_state(double now, double delta)
   surf_action_cpu_ti_t action;
   while ((xbt_heap_size(action_heap) > 0)
          && (xbt_heap_maxkey(action_heap) <= now)) {
-    DEBUG1("Action %p: finish", action);
     action = xbt_heap_pop(action_heap);
+    DEBUG1("Action %p: finish", action);
     GENERIC_ACTION(action).finish = surf_get_clock();
     /* set the remains to 0 due to precision problems when updating the remaining amount */
     GENERIC_ACTION(action).remains = 0;