aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
commit62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca (patch)
tree565dd0a8c2c50a31dac369408e6b499eb7daafb5 /src/decoder_control.c
parentd29bad441066919f808c4ad1657bc5600fd9bd45 (diff)
downloadmpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.gz
mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.xz
mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.zip
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.
Diffstat (limited to '')
-rw-r--r--src/decoder_control.c10
1 files changed, 5 insertions, 5 deletions
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;
}