Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix copyright headers
[simgrid.git] / examples / gras / replay / xbt_workload.c
index 1dbdff7..46a9e4b 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) 2009 Da SimGrid Team.  All rights reserved.                */
+/* Copyright (c) 2009, 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. */
@@ -184,8 +185,8 @@ void xbt_workload_declare_datadesc(void) {
 
 xbt_workload_data_chunk_t xbt_workload_data_chunk_new(int size) {
   xbt_workload_data_chunk_t res = xbt_new0(s_xbt_workload_data_chunk_t,1);
-  res->size = size;
-  res->chunk = xbt_new(char,size-sizeof(res)-sizeof(int));
+  res->size = size-sizeof(res)-sizeof(int);
+  res->chunk = xbt_new(char,res->size);
   return res;
 }
 void xbt_workload_data_chunk_free(xbt_workload_data_chunk_t c) {