summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2017-12-28 17:14:13 +0200
committerTanu Kaskinen <tanuk@iki.fi>2018-01-04 15:15:44 +0200
commitd35cc563c1b00c113f5537707911823a6f328bf5 (patch)
treed2ae4a327459ebcf8ab1333b7c9c30619c1716ac
parenta7e6d77a077d5ca4008a29bd68ead6d1575eb88b (diff)
downloadpulseaudio-d35cc563c1b00c113f5537707911823a6f328bf5.tar.gz
switch-on-port-available: remove unused return values
-rw-r--r--src/modules/module-switch-on-port-available.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
index 7d2c596cf..8fd3c9e5f 100644
--- a/src/modules/module-switch-on-port-available.c
+++ b/src/modules/module-switch-on-port-available.c
@@ -228,17 +228,17 @@ static struct port_pointers find_port_pointers(pa_device_port *port) {
}
/* Switches to a port, switching profiles if necessary or preferred */
-static bool switch_to_port(pa_device_port *port) {
+static void switch_to_port(pa_device_port *port) {
struct port_pointers pp = find_port_pointers(port);
if (pp.is_port_active)
- return true; /* Already selected */
+ return; /* Already selected */
pa_log_debug("Trying to switch to port %s", port->name);
if (!pp.is_preferred_profile_active) {
if (try_to_switch_profile(port) < 0) {
if (!pp.is_possible_profile_active)
- return false;
+ return;
}
else
/* Now that profile has changed, our sink and source pointers must be updated */
@@ -249,17 +249,16 @@ static bool switch_to_port(pa_device_port *port) {
pa_source_set_port(pp.source, port->name, false);
if (pp.sink)
pa_sink_set_port(pp.sink, port->name, false);
- return true;
}
/* Switches away from a port, switching profiles if necessary or preferred */
-static bool switch_from_port(pa_device_port *port) {
+static void switch_from_port(pa_device_port *port) {
struct port_pointers pp = find_port_pointers(port);
pa_device_port *p, *best_port = NULL;
void *state;
if (!pp.is_port_active)
- return true; /* Already deselected */
+ return; /* Already deselected */
/* Try to find a good enough port to switch to */
PA_HASHMAP_FOREACH(p, port->card->ports, state)
@@ -270,9 +269,7 @@ static bool switch_from_port(pa_device_port *port) {
pa_log_debug("Trying to switch away from port %s, found %s", port->name, best_port ? best_port->name : "no better option");
if (best_port)
- return switch_to_port(best_port);
-
- return false;
+ switch_to_port(best_port);
}