q += 2;
conf_set_int(conf, CONF_protocol, PROT_TELNET);
p = q;
- while (*p && *p != ':' && *p != '/')
- p++;
+ p += host_strcspn(p, ":/");
c = *p;
if (*p)
*p++ = '\0';
/*
* Trim off a colon suffix if it's there.
*/
- host[strcspn(host, ":")] = '\0';
+ host[host_strcspn(host, ":")] = '\0';
/*
* Remove any remaining whitespace.