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 e4e361b..54f3bf6 100644 (file)
@@ -1,14 +1,8 @@
-/*
- * msg_process_instr.c
- *
- *  Created on: Feb 24, 2010
- *      Author: Lucas Schnorr
- *     License: This program is free software; you can redistribute
- *              it and/or modify it under the terms of the license
- *              (GNU LGPL) which comes with this package.
- *
- *     Copyright (c) 2009 The SimGrid team.
- */
+/* Copyright (c) 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "instr/private.h"
 
@@ -57,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);