diff options
author | Max Kellermann <max@duempel.org> | 2009-02-26 19:17:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-26 19:17:56 +0100 |
commit | a0b3f3553786be3010ab5eb5b9b74ee20ed8051a (patch) | |
tree | e8644a1ebd6c7a9384b94efb5867539ab2b90a0f | |
parent | e1f58fdcf55a570fd0e3073f9b2523d678d8a198 (diff) | |
download | mpd-a0b3f3553786be3010ab5eb5b9b74ee20ed8051a.tar.gz mpd-a0b3f3553786be3010ab5eb5b9b74ee20ed8051a.tar.xz mpd-a0b3f3553786be3010ab5eb5b9b74ee20ed8051a.zip |
oss: return bool instead of int
Return type of oss_find_supported_param(), oss_can_convert() and
oss_find_unsupported_param() should be bool instead of int.
-rw-r--r-- | src/output/oss_plugin.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/output/oss_plugin.c b/src/output/oss_plugin.c index 932f69e25..ed3f0055e 100644 --- a/src/output/oss_plugin.c +++ b/src/output/oss_plugin.c @@ -92,33 +92,33 @@ oss_param_from_ioctl(unsigned param) return idx; } -static int +static bool oss_find_supported_param(struct oss_data *od, unsigned param, int val) { enum oss_param idx = oss_param_from_ioctl(param); for (unsigned i = 0; i < od->num_supported[idx]; i++) if (od->supported[idx][i] == val) - return 1; + return true; - return 0; + return false; } -static int +static bool oss_can_convert(int idx, int val) { switch (idx) { case OSS_BITS: if (val != 16) - return 0; + return false; break; case OSS_CHANNELS: if (val != 2) - return 0; + return false; break; } - return 1; + return true; } static int @@ -145,17 +145,17 @@ oss_get_supported_param(struct oss_data *od, unsigned param, int val) return ret; } -static int +static bool oss_find_unsupported_param(struct oss_data *od, unsigned param, int val) { enum oss_param idx = oss_param_from_ioctl(param); for (unsigned i = 0; i < od->num_unsupported[idx]; i++) { if (od->unsupported[idx][i] == val) - return 1; + return true; } - return 0; + return false; } static void |