X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinplink.c;h=48232b389280fdf9c48f43753ce60bf34f41116d;hb=8da4fa506389910599c59b87ba1b799efd6d3ae1;hp=ac7069a2e3fd966e5b8c376e7a06d9d5e411f685;hpb=0348f570771a0412609de947778cad9d5b3dca93;p=PuTTY.git diff --git a/windows/winplink.c b/windows/winplink.c index ac7069a2..48232b38 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -382,8 +382,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'; @@ -524,7 +523,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.