Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Comply with clang-format rules
[simgrid.git] / src / kernel / resource / Model.cpp
index c03ea50..1e8998c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -73,7 +73,7 @@ double Model::next_occuring_event_lazy(double now)
       min = now + time_to_completion; // when the task will complete if nothing changes
     }
 
-    if ((action->get_max_duration() > NO_MAX_DURATION) &&
+    if ((action->get_max_duration() != NO_MAX_DURATION) &&
         (min <= -1 || action->get_start_time() + action->get_max_duration() < min)) {
       // when the task will complete anyway because of the deadline if any
       min          = action->get_start_time() + action->get_max_duration();