diff options
author | Colin Guthrie <colin@mageia.org> | 2011-05-15 15:05:44 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-05-15 15:05:55 +0100 |
commit | ce8b03bb26243f01623699a115a34706b1348b77 (patch) | |
tree | 16093d78d3e334e90cd32a2e3e89b43c3fc09d38 /src/modules/bluetooth/module-bluetooth-device.c | |
parent | ff79b3147cd9ecee353b0948e28b180088a49382 (diff) |
bluetooth: Fix early return styling and add missing return value
Thanks to Tanu Kaskinen for pointing out the missing return.
Diffstat (limited to 'src/modules/bluetooth/module-bluetooth-device.c')
-rw-r--r-- | src/modules/bluetooth/module-bluetooth-device.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 086fce9c..1ff752a9 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1936,10 +1936,11 @@ static int sco_over_pcm_state_update(struct userdata *u, pa_bool_t changed) { if (u->transport) return bt_transport_acquire(u, TRUE); - else - return start_stream_fd(u); - } else if (changed) { + return start_stream_fd(u); + } + + if (changed) { if (u->service_fd < 0 && u->stream_fd < 0) return 0; @@ -1954,9 +1955,9 @@ static int sco_over_pcm_state_update(struct userdata *u, pa_bool_t changed) { pa_close(u->service_fd); u->service_fd = -1; } - - return 0; } + + return 0; } static pa_hook_result_t sink_state_changed_cb(pa_core *c, pa_sink *s, struct userdata *u) { |