Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[NS3] unused variable removed
[simgrid.git] / src / surf / network_im.c
index 3b1e091..b5ba625 100644 (file)
@@ -781,9 +781,12 @@ static surf_action_t im_net_communicate(const char *src_name,
   /* LARGE PLATFORMS HACK:
      expand also with src->link and dst->link */
 #ifdef HAVE_TRACING
-  action->src_name = xbt_strdup(src_name);
-
-  action->dst_name = xbt_strdup(dst_name);
+  if (TRACE_is_enabled()) {
+    action->src_name = xbt_strdup(src_name);
+    action->dst_name = xbt_strdup(dst_name);
+  } else {
+    action->src_name = action->dst_name = NULL;
+  }
 #endif
 
   xbt_dynar_free(&route);