X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6a6157abf9619875297ff1d16c1e5c63c526d4c1..5b78fc9f704153c9832230883dfd847f2bcf791d:/src/surf/network.c diff --git a/src/surf/network.c b/src/surf/network.c index 7a75d8b507..3864fd918e 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -733,11 +733,9 @@ static surf_action_t net_communicate(const char *src_name, /* LARGE PLATFORMS HACK: expand also with src->link and dst->link */ #ifdef HAVE_TRACING - action->src_name = xbt_new(char, strlen(src_name) + 1); - strncpy(action->src_name, src_name, strlen(src_name) + 1); + action->src_name = xbt_strdup(src_name); - action->dst_name = xbt_new(char, strlen(dst_name) + 1); - strncpy(action->dst_name, dst_name, strlen(dst_name) + 1); + action->dst_name = xbt_strdup(dst_name); #endif xbt_dynar_free(&route);