Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Canceled RPC are a pain right now (until we move to a N/1-port model, they are likely...
[simgrid.git] / src / surf / trace_mgr.c
index fd1e6b7..aee5753 100644 (file)
@@ -6,14 +6,10 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/sysdep.h"
-#include "xbt/error.h"
+#include "xbt/log.h"
 #include "xbt/dict.h"
 #include "trace_mgr_private.h"
 #include "surf_private.h"
-#include <stdlib.h>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(trace, surf,
-                               "Logging specific to the SURF trace module");
 
 static xbt_dict_t trace_list = NULL;
 static void _tmgr_trace_free(void *trace)
@@ -49,7 +45,7 @@ tmgr_trace_t tmgr_trace_new(const char *filename)
   tmgr_event_t last_event = NULL;
 
   if (trace_list) {
-    xbt_dict_get(trace_list, filename, (void **) &trace);
+    trace = xbt_dict_get_or_null(trace_list, filename);
     if (trace)
       return trace;
   }
@@ -112,9 +108,9 @@ tmgr_trace_t tmgr_trace_new(const char *filename)
 tmgr_trace_t tmgr_empty_trace_new(void)
 {
   tmgr_trace_t trace = NULL;
-  double periodicity = -1.0;   /* No periodicity by default */
+  /*double periodicity = -1.0;  No periodicity by default; unused variables
+  tmgr_event_t last_event = NULL;*/
   s_tmgr_event_t event;
-  tmgr_event_t last_event = NULL;
 
   trace = xbt_new0(s_tmgr_trace_t, 1);
   trace->event_list = xbt_dynar_new(sizeof(s_tmgr_event_t), NULL);