Fix return code check of pa_append_to_home_dir

It returns negative on error, zero on success.

Found by coverity
This commit is contained in:
Felipe Sateler 2015-09-10 21:42:48 -03:00 committed by Tanu Kaskinen
parent 5271f28145
commit c49c9bd3aa

View file

@ -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)