X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxplink.c;h=961fcf9a7cbb9fbc532dabf46494edd4c568e3d3;hb=8da4fa506389910599c59b87ba1b799efd6d3ae1;hp=7fbaa36a80d260589f799a74c8bd5de92f3cbf0a;hpb=0348f570771a0412609de947778cad9d5b3dca93;p=PuTTY.git diff --git a/unix/uxplink.c b/unix/uxplink.c index 7fbaa36a..961fcf9a 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -705,8 +705,7 @@ int main(int argc, char **argv) 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'; @@ -847,7 +846,7 @@ int main(int argc, char **argv) /* * Trim off a colon suffix if it's there. */ - host[strcspn(host, ":")] = '\0'; + host[host_strcspn(host, ":")] = '\0'; /* * Remove any remaining whitespace.