-/* $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. */
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++);