From: Martin Quinson Date: Thu, 6 Oct 2016 23:01:06 +0000 (+0200) Subject: don't test equality to 0. X-Git-Tag: v3_14~360 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9d483650be13b1787260d9c225ab6f72746ccb07 don't test equality to 0. --- diff --git a/src/surf/plugins/energy.cpp b/src/surf/plugins/energy.cpp index 3d7c8a8533..9a8879cd81 100644 --- a/src/surf/plugins/energy.cpp +++ b/src/surf/plugins/energy.cpp @@ -1,17 +1,16 @@ -/* Copyright (c) 2010, 2012-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010, 2012-2016. 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. */ -#include - #include "simgrid/plugins/energy.h" #include "simgrid/simix.hpp" #include "src/surf/plugins/energy.hpp" #include "src/surf/cpu_interface.hpp" #include "src/surf/virtual_machine.hpp" +#include + /** @addtogroup SURF_plugin_energy @@ -151,7 +150,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load) double max_power = 0; double power_slope = 0; - if (cpu_load != 0) { /* Something is going on, the machine is not idle */ + if (cpu_load > 0) { /* Something is going on, the machine is not idle */ double min_power = range.min; double max_power = range.max; double power_slope = max_power - min_power;