-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2012. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
src_id, dst_id, links, nb_link);
/* Build the list of gtnets link IDs */
- gtnets_links = (int *) calloc(nb_link, sizeof(int));
+ gtnets_links = xbt_new0(int, nb_link);
i = 0;
xbt_dynar_foreach(links, cursor, link) {
gtnets_links[i++] = link->id;