X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f90ef00fd79ef42e4ef8f69b3b69457750173551..7eef625065d0b3af4a64b5665009491426db974f:/src/gras/DataDesc/ddt_create.c diff --git a/src/gras/DataDesc/ddt_create.c b/src/gras/DataDesc/ddt_create.c index f1e6a5b165..311917683f 100644 --- a/src/gras/DataDesc/ddt_create.c +++ b/src/gras/DataDesc/ddt_create.c @@ -1,8 +1,7 @@ -/* $Id$ */ - /* ddt_new - creation/deletion of datatypes structs (private to this module)*/ -/* Copyright (c) 2003-2009 The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004, 2005, 2006, 2007, 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. */ @@ -610,14 +609,14 @@ gras_datadesc_type_t gras_datadesc_array_dyn(const char *name, gras_datadesc_type_t gras_datadesc_ref_pop_arr(gras_datadesc_type_t element_type) { - + int cpt=0; gras_datadesc_type_t res,ddt2; char *name = (char *) xbt_malloc(strlen(element_type->name) + 4); sprintf(name, "%s[]", element_type->name); /* Make sure we are not trying to redefine a ddt with the same name */ ddt2 = gras_datadesc_by_name_or_null(name); - int cpt=0; + while (ddt2) { free(name); name=bprintf("%s[]_%d",element_type->name,cpt++);