From 62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Oct 2008 08:38:54 +0100 Subject: 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. --- src/decoder_control.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/decoder_control.c') diff --git a/src/decoder_control.c b/src/decoder_control.c index 1b9b3029d..9587d3980 100644 --- a/src/decoder_control.c +++ b/src/decoder_control.c @@ -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; } -- cgit v1.2.3