Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bad idea to acquire a semaphore that is already hold. Split cleanup code from waiting...
[simgrid.git] / src / instr / smx_instr.c
index 675ec54..848eb6f 100644 (file)
@@ -1,17 +1,10 @@
-/*
- * 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"
-#include "instr/config.h"
 
 #ifdef HAVE_TRACING
 
@@ -36,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);
   }
 }