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

@@ -85,20 +85,20 @@ dc_stop(struct notify *notify)
dc_command(notify, DECODE_COMMAND_STOP);
}
int
bool
dc_seek(struct notify *notify, double where)
{
assert(where >= 0.0);
if (dc.state == DECODE_STATE_STOP || !dc.seekable)
return -1;
return false;
dc.seekWhere = where;
dc.seekError = 0;
dc.seekError = false;
dc_command(notify, DECODE_COMMAND_SEEK);
if (dc.seekError)
return -1;
return false;
return 0;
return true;
}