diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-04-23 20:59:43 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-04-23 20:59:43 +0000 |
commit | 286310a563ad52105676243326b6ec2c34d945c5 (patch) | |
tree | e5da209d87313841bf8731e791b1b71e5c4bd774 /src | |
parent | 9b52ac4b47f468ad79ef91e337fe727b58ac26ce (diff) |
small optimization
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@789 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r-- | src/polyp/context.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/polyp/context.c b/src/polyp/context.c index ff224547..1e78f97f 100644 --- a/src/polyp/context.c +++ b/src/polyp/context.c @@ -784,18 +784,15 @@ static void set_dispatch_callbacks(pa_operation *o) { done = 0; } - if (!done) - pa_operation_ref(o); - else { + if (done) { if (o->callback) { pa_context_notify_cb_t cb = (pa_context_notify_cb_t) o->callback; cb(o->context, o->userdata); } pa_operation_done(o); - } - - pa_operation_unref(o); + pa_operation_unref(o); + } } pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *userdata) { |