]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/ux_x11.c
Bah. Stop the Proxy panel appearing empty in Change Settings. One
[PuTTY.git] / unix / ux_x11.c
index 61b4f04c8070ddbca161f1a5d81728ff13ec3e99..67c76f839ee713476cd3ccd3a2457d45ab4fb74e 100644 (file)
@@ -13,6 +13,7 @@ void platform_get_x11_auth(char *display, int *protocol,
     char *command;
     int maxsize = *datalen;
     char *localbuf;
+    int proto = -1;
 
     /*
      * Normally we should run `xauth list DISPLAYNAME'. However,
@@ -29,14 +30,14 @@ void platform_get_x11_auth(char *display, int *protocol,
     if (!fp)
         return;                        /* assume no auth */
 
-    localbuf = smalloc(maxsize);
+    localbuf = snewn(maxsize, char);
 
     while (1) {
         /*
          * Read a line from stdin, and attempt to parse it into a
          * display name (ignored), auth protocol, and auth string.
          */
-        int c, i, hexdigit, proto;
+        int c, i, hexdigit;
         char protoname[64];
 
         /* Skip the display name. */