diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-09-11 00:24:10 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-09-11 00:24:10 +0000 |
commit | 848a4d7487bdce14f8231698666fb24d5397e091 (patch) | |
tree | bfcc2ed424af87cdfad8173ce7b65fd56ee38a16 /src/pulse/client-conf-x11.c | |
parent | 9b0ab39b1c443744bb7b09b03e62e51d78aab527 (diff) |
more s/assert/pa_assert/ modernizations
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1798 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulse/client-conf-x11.c')
-rw-r--r-- | src/pulse/client-conf-x11.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c index e8de9553..e240ba88 100644 --- a/src/pulse/client-conf-x11.c +++ b/src/pulse/client-conf-x11.c @@ -26,7 +26,6 @@ #endif #include <string.h> -#include <assert.h> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -36,6 +35,7 @@ #include <pulsecore/x11prop.h> #include <pulsecore/log.h> #include <pulsecore/core-util.h> +#include <pulsecore/macro.h> #include "client-conf-x11.h" @@ -44,6 +44,8 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { int ret = -1; char t[1024]; + pa_assert(c); + if (!dname && (!(dname = getenv("DISPLAY")) || *dname == '\0')) goto finish; @@ -75,7 +77,7 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { goto finish; } - assert(sizeof(cookie) == sizeof(c->cookie)); + pa_assert(sizeof(cookie) == sizeof(c->cookie)); memcpy(c->cookie, cookie, sizeof(cookie)); c->cookie_valid = 1; |