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.
This commit is contained in:
Max Kellermann
2008-10-29 20:40:27 +01:00
parent 03390d8be1
commit 58c5bee9f0
21 changed files with 162 additions and 153 deletions

View File

@@ -67,7 +67,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
if (plugin->test_default_device) {
WARNING("Attempting to detect a %s audio "
"device\n", plugin->name);
if (plugin->test_default_device() == 0) {
if (plugin->test_default_device()) {
WARNING("Successfully detected a %s "
"audio device\n", plugin->name);
break;
@@ -85,7 +85,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
ao->name = name;
ao->plugin = plugin;
ao->open = 0;
ao->open = false;
ao->convBuffer = NULL;
ao->convBufferLen = 0;