decoder: 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-30 08:38:54 +01:00
parent d29bad4410
commit 62d4fa9306
18 changed files with 148 additions and 144 deletions

@@ -96,7 +96,7 @@ void decoder_seek_error(struct decoder * decoder)
{
assert(dc.command == DECODE_COMMAND_SEEK);
dc.seekError = 1;
dc.seekError = true;
decoder_command_finished(decoder);
}
@@ -109,7 +109,7 @@ size_t decoder_read(struct decoder *decoder,
assert(inStream != NULL);
assert(buffer != NULL);
while (1) {
while (true) {
/* XXX don't allow decoder==NULL */
if (decoder != NULL &&
(dc.command != DECODE_COMMAND_SEEK ||