Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix warnings about comparisons of integers of different types.
[simgrid.git] / src / surf / vm_workstation.cpp
index 072942c..fe17e16 100644 (file)
@@ -273,17 +273,14 @@ WorkstationVM2013Lmm::~WorkstationVM2013Lmm()
   /* Free the cpu resource of the VM. If using power_trace, we will have to
    * free other objects than lmm_constraint. */
   lmm_constraint_free(cpu->p_model->p_maxminSystem, cpu->p_constraint);
-  {
-    unsigned long i;
-    for (i = 0; i < cpu->m_core; i++) {
-      void *cnst_id = cpu->p_constraintCore[i]->id;
-      lmm_constraint_free(cpu->p_model->p_maxminSystem, cpu->p_constraintCore[i]);
-      xbt_free(cnst_id);
-    }
-
-    xbt_free(cpu->p_constraintCore);
+  for (int i = 0; i < cpu->m_core; i++) {
+    void *cnst_id = cpu->p_constraintCore[i]->id;
+    lmm_constraint_free(cpu->p_model->p_maxminSystem, cpu->p_constraintCore[i]);
+    xbt_free(cnst_id);
   }
 
+  xbt_free(cpu->p_constraintCore);
+
   delete cpu;
 
   /* Free the network resource of the VM. */