Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bug fixes: correct use of xbt dictionaries and arrays
[simgrid.git] / src / instr / msg_process_instr.c
index 86875a4..54f3bf6 100644 (file)
@@ -51,8 +51,7 @@ void TRACE_msg_set_process_category (m_process_t process, const char *category)
   if (!IS_TRACING) return;
 
   //set process category
-  process->category = xbt_new (char, strlen (category)+1);
-  strncpy (process->category, category, strlen(category)+1);
+  process->category = xbt_strdup(category);
 
   //create container of type "PROCESS" to indicate location
   __TRACE_msg_process_location (process);