/* xbt_peer_t management functions */
-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006-2012. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
return res;
}
+/** \brief copy constructor */
xbt_peer_t xbt_peer_copy(xbt_peer_t h)
{
return xbt_peer_new(h->name, h->port);
void xbt_peer_free(xbt_peer_t peer)
{
if (peer) {
- if (peer->name)
- free(peer->name);
+ free(peer->name);
free(peer);
}
}