]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/blobdiff - unix/uxplink.c
Use the new host_str* functions to improve IPv6 literal support.
[PuTTY_svn.git] / unix / uxplink.c
index 7fbaa36a80d260589f799a74c8bd5de92f3cbf0a..961fcf9a7cbb9fbc532dabf46494edd4c568e3d3 100644 (file)
@@ -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.