char *ret;
if(!display || !*display) {
/* try to find platform-specific local display */
- if((ret = platform_get_x_display())==0)
+ if((ret = platform_get_x_display())==0 || !*ret)
/* plausible default for all platforms */
ret = dupstr(":0");
} else
host[n] = '\0';
sfree(display);
- if(!strcmp(host, "unix")) {
+ if(!strcmp(host, "unix") || host[0] == '/') {
/* use AF_UNIX sockets (doesn't make sense on all platforms) */
- addr = platform_get_x11_unix_address(displaynum,
+ addr = platform_get_x11_unix_address(display, displaynum,
&dummy_realhost);
port = 0; /* to show we are not confused */
} else {
char realauthdata[64];
int realauthlen = 0;
int authstrlen = strlen(x11_authnames[pr->auth->realproto]);
- int buflen;
+ int buflen = 0; /* initialise to placate optimiser */
static const char zeroes[4] = { 0,0,0,0 };
void *buf;