radioline() was broken after the portable-dialog stuff got added, so
[u/mdw/putty] / proxy.c
diff --git a/proxy.c b/proxy.c
index 0065b5c..2ea0bc8 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -269,7 +269,8 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port,
     if (addr) {
        sk_getaddr(addr, hostip, 64);
        hostip_len = strlen(hostip);
-    }
+    } else
+       hostip_len = 0;                /* placate gcc; shouldn't be required */
 
     hostname_len = strlen(hostname);
 
@@ -695,6 +696,7 @@ int proxy_socks4_negotiate (Proxy_Socket p, int change)
            namelen = 0;
            sk_addrcopy(p->remote_addr, addr);
        } else {                       /* type == ADDRTYPE_NAME */
+           assert(type == ADDRTYPE_NAME);
            sk_getaddr(p->remote_addr, hostname, lenof(hostname));
            namelen = strlen(hostname) + 1;   /* include the NUL */
            addr[0] = addr[1] = addr[2] = 0;
@@ -999,7 +1001,8 @@ int proxy_socks5_negotiate (Proxy_Socket p, int change)
                len = 22;              /* 4 hdr + 16 addr + 2 trailer */
                command[3] = 4; /* IPv6 */
                sk_addrcopy(p->remote_addr, command+4);
-           } else if (type == ADDRTYPE_NAME) {
+           } else {
+               assert(type == ADDRTYPE_NAME);
                command[3] = 3;
                sk_getaddr(p->remote_addr, command+5, 256);
                command[4] = strlen(command+5);