-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,"argument of xbt_peer_from_string should be of form <peername>:<port>, it's '%s'", peerport);
- *port_str='\0';
- port_str++;
-
- res->name = xbt_strdup(name); /* it will be shorter now that we cut the port */
- res->port = atoi(port_str);
- free(name);
- return res;
+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,
+ "argument of xbt_peer_from_string should be of form <peername>:<port>, it's '%s'",
+ peerport);
+ *port_str = '\0';
+ port_str++;
+
+ res->name = xbt_strdup(name); /* it will be shorter now that we cut the port */
+ res->port = atoi(port_str);
+ free(name);
+ return res;