Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Always initialize p_power.event.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 27 Jan 2014 22:11:59 +0000 (23:11 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 27 Jan 2014 22:11:59 +0000 (23:11 +0100)
src/surf/workstation_ptask_L07.cpp

index 1898fe7..f44c1a1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2010, 2013. The SimGrid Team.
+/* Copyright (c) 2007-2010, 2013-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -436,7 +436,10 @@ CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props,
 
   m_powerCurrent = power_initial;
   if (power_trace)
 
   m_powerCurrent = power_initial;
   if (power_trace)
-       p_power.event = tmgr_history_add_trace(history, power_trace, 0.0, 0, static_cast<ResourcePtr>(this));
+    p_power.event = tmgr_history_add_trace(history, power_trace, 0.0, 0,
+                                           static_cast<ResourcePtr>(this));
+  else
+    p_power.event = NULL;
 
   setState(state_initial);
   if (state_trace)
 
   setState(state_initial);
   if (state_trace)