X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/9939292a8f1e9b00e3e09192e966c88afb473c7c..d2c2927496535d8d67042980001fadede5e19b99:/unix/ux_x11.c diff --git a/unix/ux_x11.c b/unix/ux_x11.c index 61b4f04c..67c76f83 100644 --- a/unix/ux_x11.c +++ b/unix/ux_x11.c @@ -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. */