diff options
Diffstat (limited to 'src/pulse/client-conf-x11.c')
-rw-r--r-- | src/pulse/client-conf-x11.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c index e240ba88..393a7cd3 100644 --- a/src/pulse/client-conf-x11.c +++ b/src/pulse/client-conf-x11.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of PulseAudio. @@ -46,7 +44,10 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { pa_assert(c); - if (!dname && (!(dname = getenv("DISPLAY")) || *dname == '\0')) + if (!dname && !(dname = getenv("DISPLAY"))) + goto finish; + + if (*dname == 0) goto finish; if (!(d = XOpenDisplay(dname))) { @@ -80,7 +81,7 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { pa_assert(sizeof(cookie) == sizeof(c->cookie)); memcpy(c->cookie, cookie, sizeof(cookie)); - c->cookie_valid = 1; + c->cookie_valid = TRUE; pa_xfree(c->cookie_file); c->cookie_file = NULL; |