Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Offer the possibility to change smpi bandwidth and latency factor into tag config...
[simgrid.git] / src / xbt / xbt_peer.c
index a462588..80dae08 100644 (file)
@@ -32,7 +32,7 @@ xbt_peer_t xbt_peer_from_string(const char *peerport)
   xbt_peer_t res = xbt_new(s_xbt_peer_t, 1);
   char *name = xbt_strdup(peerport);
   char *port_str = strchr(name, ':');
-  xbt_assert1(port_str,
+  xbt_assert(port_str,
               "argument of xbt_peer_from_string should be of form <peername>:<port>, it's '%s'",
               peerport);
   *port_str = '\0';
@@ -48,8 +48,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);
   }
 }