diff options
author | Max Kellermann <max@duempel.org> | 2008-10-26 20:56:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-26 20:56:46 +0100 |
commit | 5c19776f2fc1416dab1da2f2baae9a0c764df965 (patch) | |
tree | 828f8f768be17f053e12fc38f2a7593e0a9b77b5 /src/decoder/wavpack_plugin.c | |
parent | 464b6117721056e72c79824a298caf53eb5cd452 (diff) | |
download | mpd-5c19776f2fc1416dab1da2f2baae9a0c764df965.tar.gz mpd-5c19776f2fc1416dab1da2f2baae9a0c764df965.tar.xz mpd-5c19776f2fc1416dab1da2f2baae9a0c764df965.zip |
input_stream: use "bool" instead of "int"
For boolean values and success flags, use bool instead of integer (1/0
for true/false, 0/-1 for success/failure).
Diffstat (limited to 'src/decoder/wavpack_plugin.c')
-rw-r--r-- | src/decoder/wavpack_plugin.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c index 7a0a2249f..86b01164e 100644 --- a/src/decoder/wavpack_plugin.c +++ b/src/decoder/wavpack_plugin.c @@ -366,12 +366,14 @@ static uint32_t get_pos(void *id) static int set_pos_abs(void *id, uint32_t pos) { - return input_stream_seek(((InputStreamPlus *)id)->is, pos, SEEK_SET); + return input_stream_seek(((InputStreamPlus *)id)->is, pos, SEEK_SET) + ? 0 : -1; } static int set_pos_rel(void *id, int32_t delta, int mode) { - return input_stream_seek(((InputStreamPlus *)id)->is, delta, mode); + return input_stream_seek(((InputStreamPlus *)id)->is, delta, mode) + ? 0 : -1; } static int push_back_byte(void *id, int c) @@ -439,7 +441,7 @@ static int wavpack_open_wvc(struct decoder *decoder, const char *utf8url; size_t len; char *wvc_url = NULL; - int ret; + bool ret; /* * As we use dc->utf8url, this function will be bad for @@ -464,7 +466,7 @@ static int wavpack_open_wvc(struct decoder *decoder, ret = input_stream_open(is_wvc, wvc_url); free(wvc_url); - if (ret) + if (!ret) return 0; /* |