Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
small cosmetics to kill time
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 24 May 2017 08:54:08 +0000 (10:54 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 24 May 2017 09:40:17 +0000 (11:40 +0200)
src/surf/cpu_ti.cpp
src/surf/maxmin.cpp

index 16f0c64..79e74a2 100644 (file)
@@ -296,9 +296,8 @@ int CpuTiTrace::binarySearch(double *array, double a, int low, int high)
 {
   xbt_assert(low < high, "Wrong parameters: low (%d) should be smaller than high (%d)", low, high);
 
-  int mid;
   do {
-    mid = low + (high - low) / 2;
+    int mid = low + (high - low) / 2;
     XBT_DEBUG("a %f low %d high %d mid %d value %f", a, low, high, mid, array[mid]);
 
     if (array[mid] > a)
@@ -491,7 +490,6 @@ void CpuTi::updateActionsFinishTime(double now)
   CpuTiAction *action;
   double sum_priority = 0.0;
   double total_area;
-  double min_finish = -1;
 
   /* update remaining amount of actions */
   updateRemainingAmount(now);
@@ -516,7 +514,7 @@ void CpuTi::updateActionsFinishTime(double now)
 
   for(ActionTiList::iterator it(actionSet_->begin()), itend(actionSet_->end()) ; it != itend ; ++it) {
     action = &*it;
-    min_finish = -1;
+    double min_finish = -1;
     /* action not running, skip it */
     if (action->getStateSet() !=  surf_cpu_model_pm->getRunningActionSet())
       continue;
index 610e64a..81a1bdc 100644 (file)
@@ -111,7 +111,7 @@ void lmm_system_free(lmm_system_t sys)
   lmm_variable_t var = nullptr;
   lmm_constraint_t cnst = nullptr;
 
-  if (not sys)
+  if (sys == nullptr)
     return;
 
   while ((var = (lmm_variable_t) extract_variable(sys))) {