summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-29 11:26:40 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-29 11:26:40 +0000
commitfe872a67b78897a00ed61d48529bb9739ca45d27 (patch)
treec2f949fd72b28db7402223b4cb0b9d5f84ffae92 /src
parent8b8fafffa37a9748bf76dd86feaac14c8a6f7e4b (diff)
fix some minor initialization issues
git-svn-id: file:///home/lennart/svn/public/libcanberra/trunk@35 01b60673-d06a-42c0-afdd-89cb8e0f78ac
Diffstat (limited to 'src')
-rw-r--r--src/pulse.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pulse.c b/src/pulse.c
index de1c3cd..04dc5db 100644
--- a/src/pulse.c
+++ b/src/pulse.c
@@ -412,7 +412,7 @@ int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged
static int subscribe(ca_context *c) {
struct private *p;
pa_operation *o;
- int ret;
+ int ret = CA_SUCCESS;
ca_return_val_if_fail(c, CA_ERROR_INVALID);
ca_return_val_if_fail(c->private, CA_ERROR_STATE);
@@ -420,7 +420,9 @@ static int subscribe(ca_context *c) {
ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE);
ca_return_val_if_fail(p->context, CA_ERROR_STATE);
- ca_return_val_if_fail(!p->subscribed, CA_SUCCESS);
+
+ if (p->subscribed)
+ return CA_SUCCESS;
pa_threaded_mainloop_lock(p->mainloop);
@@ -818,7 +820,7 @@ int driver_cancel(ca_context *c, uint32_t id) {
* value */
for (out = p->outstanding; out; out = n) {
- int ret2;
+ int ret2 = CA_SUCCESS;
n = out->next;
if (out->type == OUTSTANDING_UPLOAD ||