From 5c19776f2fc1416dab1da2f2baae9a0c764df965 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 26 Oct 2008 20:56:46 +0100 Subject: 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). --- src/decoder/mp3_plugin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/decoder/mp3_plugin.c') diff --git a/src/decoder/mp3_plugin.c b/src/decoder/mp3_plugin.c index a3b8c5a5a..330ba668f 100644 --- a/src/decoder/mp3_plugin.c +++ b/src/decoder/mp3_plugin.c @@ -158,9 +158,8 @@ static void initMp3DecodeData(mp3DecodeData * data, struct decoder *decoder, static int seekMp3InputBuffer(mp3DecodeData * data, long offset) { - if (input_stream_seek(data->inStream, offset, SEEK_SET) < 0) { + if (!input_stream_seek(data->inStream, offset, SEEK_SET)) return -1; - } mad_stream_buffer(&data->stream, data->readBuffer, 0); (data->stream).error = 0; @@ -757,7 +756,7 @@ static int getMp3TotalTime(char *file) mp3DecodeData data; int ret; - if (input_stream_open(&inStream, file) < 0) + if (!input_stream_open(&inStream, file)) return -1; initMp3DecodeData(&data, NULL, &inStream); if (decodeFirstFrame(&data, NULL, NULL) < 0) -- cgit v1.2.3