summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@debian.org>2015-09-10 21:42:48 -0300
committerTanu Kaskinen <tanuk@iki.fi>2015-09-11 14:22:15 +0300
commitc49c9bd3aa829fff9a3de0037330a7ed2cbdb9a5 (patch)
tree16957f794df817caba1e7e6d829a4510c711145c
parent5271f281459fd33726a542538558588b488386c9 (diff)
downloadpulseaudio-c49c9bd3aa829fff9a3de0037330a7ed2cbdb9a5.tar.gz
Fix return code check of pa_append_to_home_dir
It returns negative on error, zero on success. Found by coverity
-rw-r--r--src/pulse/client-conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 83331f882..47fe183a0 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -212,7 +212,7 @@ int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie
if (r >= 0)
return 0;
- if (pa_append_to_home_dir(PA_NATIVE_COOKIE_FILE_FALLBACK, &fallback_path) > 0) {
+ if (pa_append_to_home_dir(PA_NATIVE_COOKIE_FILE_FALLBACK, &fallback_path) >= 0) {
r = pa_authkey_load(fallback_path, false, cookie, cookie_length);
pa_xfree(fallback_path);
if (r >= 0)