[pulseaudio-discuss] [PATCH v2 02/22] bluetooth: Remove return value of setup_stream()

Mikel Astiz mikel.astiz.oss at gmail.com
Fri Aug 31 03:50:54 PDT 2012


From: Mikel Astiz <mikel.astiz at bmw-carit.de>

The function setup_stream() never fails so the code can be simplified by
just removing the return value.
---
 src/modules/bluetooth/module-bluetooth-device.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 07f97fa..a1f3080 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -244,7 +244,7 @@ static void a2dp_set_bitpool(struct userdata *u, uint8_t bitpool)
 
 /* from IO thread, except in SCO over PCM */
 
-static int setup_stream(struct userdata *u) {
+static void setup_stream(struct userdata *u) {
     struct pollfd *pollfd;
     int one;
 
@@ -277,8 +277,6 @@ static int setup_stream(struct userdata *u) {
                 10,
                 pa_rtclock_now(),
                 TRUE);
-
-    return 0;
 }
 
 static void bt_transport_release(struct userdata *u) {
@@ -346,7 +344,9 @@ static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
 
 done:
     pa_log_info("Transport %s resuming", u->transport);
-    return setup_stream(u);
+    setup_stream(u);
+
+    return 0;
 }
 
 /* Run from IO thread */
-- 
1.7.7.6



More information about the pulseaudio-discuss mailing list