X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0ca1291c2f63ca6235f4b4885c48413a900aade4..386fdb787b4d39af174e239965e51008bc9c330d:/src/xbt/xbt_peer.c diff --git a/src/xbt/xbt_peer.c b/src/xbt/xbt_peer.c index 23d7ca4911..d8339587f1 100644 --- a/src/xbt/xbt_peer.c +++ b/src/xbt/xbt_peer.c @@ -1,6 +1,6 @@ /* xbt_peer_t management functions */ -/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2006-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -21,6 +21,7 @@ xbt_peer_t xbt_peer_new(const char *name, int port) return res; } +/** \brief copy constructor */ xbt_peer_t xbt_peer_copy(xbt_peer_t h) { return xbt_peer_new(h->name, h->port); @@ -48,8 +49,7 @@ xbt_peer_t xbt_peer_from_string(const char *peerport) void xbt_peer_free(xbt_peer_t peer) { if (peer) { - if (peer->name) - free(peer->name); + free(peer->name); free(peer); } }