Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : store last visited states during exploration
[simgrid.git] / src / xbt / xbt_peer.c
index 23d7ca4..919f51d 100644 (file)
@@ -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);
   }
 }