Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
these models want to please Sonar
[simgrid.git] / src / surf / cpu_cas01.cpp
index f9835fa..1f5ebb5 100644 (file)
@@ -179,7 +179,7 @@ CpuAction *CpuCas01::sleep(double duration)
   // FIXME: sleep variables should not consume 1.0 in lmm_expand
   action->maxDuration_ = duration;
   action->suspended_ = 2;
-  if (duration == NO_MAX_DURATION) {
+  if (duration < 0) { // NO_MAX_DURATION
     /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
     action->getStateSet()->erase(action->getStateSet()->iterator_to(*action));
     action->stateSet_ = static_cast<CpuCas01Model*>(model())->p_cpuRunningActionSetThatDoesNotNeedBeingChecked;