X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/61e948b810774df0ab0a52dd60ca1fb16af658c5..32c187d71846015df8c8d484161b137f1096e89e:/src/surf/cpu_cas01.cpp diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index ae557e6516..ebf1f87530 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -205,8 +205,7 @@ void CpuCas01::updateState(tmgr_trace_iterator_t event_type, double value, doubl m_speedScale = value; onSpeedChange(); - if (tmgr_trace_event_free(event_type)) - p_speedEvent = nullptr; + tmgr_trace_event_unref(&p_speedEvent); } else if (event_type == p_stateEvent) { /* TODO (Hypervisor): do the same thing for constraint_core[i] */ xbt_assert(m_core == 1, "FIXME: add state change code also for constraint_core[i]"); @@ -231,8 +230,7 @@ void CpuCas01::updateState(tmgr_trace_iterator_t event_type, double value, doubl } } } - if (tmgr_trace_event_free(event_type)) - p_stateEvent = nullptr; + tmgr_trace_event_unref(&p_stateEvent); } else { xbt_die("Unknown event!\n"); }