summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-01 18:59:25 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-01 18:59:25 +0000
commit563f4b63cd37794b72af4601796edb5b6f5f2455 (patch)
tree4f44fc16d186fd0c18b06a10ecf0df31eccd2f85
parent06a05bc66c46550dd550a8960e421b5e9cb1b2bb (diff)
make check for $DISPLAY=="" more readable, pa_bool_tization
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2315 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulse/client-conf-x11.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index e240ba88..49df4b6c 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -46,7 +46,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 +83,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;