aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-29 20:40:27 +0100
committerMax Kellermann <max@duempel.org>2008-10-29 20:40:27 +0100
commit58c5bee9f0bcb46da7d113b66a4e1e2d7add9837 (patch)
tree4517d2156aa3643247e7f2fc886af86d3dfd8791 /src/output_thread.c
parent03390d8be1cb8983778faf6eedb9bcfd26a6dbce (diff)
downloadmpd-58c5bee9f0bcb46da7d113b66a4e1e2d7add9837.tar.gz
mpd-58c5bee9f0bcb46da7d113b66a4e1e2d7add9837.tar.xz
mpd-58c5bee9f0bcb46da7d113b66a4e1e2d7add9837.zip
output: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
Diffstat (limited to 'src/output_thread.c')
-rw-r--r--src/output_thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index e2f360d9b..f03520013 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -74,7 +74,7 @@ static void ao_pause(struct audio_output *ao)
} else {
/* pause is not supported - simply close the device */
ao->plugin->close(ao->data);
- ao->open = 0;
+ ao->open = false;
ao_command_finished(ao);
}
}
@@ -94,8 +94,8 @@ static void *audio_output_task(void *arg)
&ao->outAudioFormat);
assert(!ao->open);
- if (ao->result == 0)
- ao->open = 1;
+ if (ao->result == true)
+ ao->open = true;
ao_command_finished(ao);
break;
@@ -103,7 +103,7 @@ static void *audio_output_task(void *arg)
case AO_COMMAND_CLOSE:
assert(ao->open);
ao->plugin->close(ao->data);
- ao->open = 0;
+ ao->open = false;
ao_command_finished(ao);
break;