From ce8b03bb26243f01623699a115a34706b1348b77 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 15 May 2011 15:05:44 +0100 Subject: bluetooth: Fix early return styling and add missing return value Thanks to Tanu Kaskinen for pointing out the missing return. --- src/modules/bluetooth/module-bluetooth-device.c | 11 ++++++----- 1 file 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) { -- cgit