summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c21e19)
raw | patch | inline | side by side (parent: 5c21e19)
author | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 19:17:48 +0000 (21:17 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 19:17:48 +0000 (21:17 +0200) |
src/screen_outputs.c | patch | blob | history |
diff --git a/src/screen_outputs.c b/src/screen_outputs.c
index c40f470997e15c7d3bb74bb782358c340e229d97..75b9790b460398e86daaeb5e7f0f5dbe5f1af052 100644 (file)
--- a/src/screen_outputs.c
+++ b/src/screen_outputs.c
wrefresh(lw->w);
}
-static int
+static bool
toggle_output(struct mpdclient *c, unsigned int output_index)
{
struct mpd_output *output;
assert(mpd_outputs != NULL);
if (output_index >= mpd_outputs->len)
- return -1;
+ return false;
output = g_ptr_array_index(mpd_outputs, output_index);
if (!mpd_run_enable_output(c->connection,
mpd_output_get_id(output))) {
mpdclient_handle_error(c);
- return -1;
+ return false;
}
c->events |= MPD_IDLE_OUTPUT;
if (!mpd_run_disable_output(c->connection,
mpd_output_get_id(output))) {
mpdclient_handle_error(c);
- return -1;
+ return false;
}
c->events |= MPD_IDLE_OUTPUT;
mpd_output_get_name(output));
}
- return 0;
+ return true;
}
static void