]> AND Public Git Repository - simgrid.git/blobdiff - src/instr/smx_instr.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
correct duplication of a variable
[simgrid.git] / src / instr / smx_instr.c
index 6c996d57e2c7d4af686f07ea0e58c3f094b67226..848eb6fb4bb943f21992769f7cdca83a3dd3fc4b 100644 (file)
@@ -1,14 +1,8 @@
-/*
- * smx.c
- *
- *  Created on: Nov 24, 2009
- *      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"
 
@@ -35,8 +29,7 @@ void TRACE_smx_action_communicate (smx_action_t act, smx_process_t proc)
   act->counter = counter++;
   char *category = __TRACE_current_category_get (proc);
   if (category){
-       act->category = xbt_new (char, strlen (category)+1);
-       strncpy (act->category, category, strlen(category)+1);
+    act->category = xbt_strdup (category);
   }
 }