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).
This commit is contained in:
Max Kellermann
2008-10-26 20:56:46 +01:00
parent 464b611772
commit 5c19776f2f
14 changed files with 55 additions and 49 deletions

View File

@@ -64,9 +64,8 @@ static OggFLAC__SeekableStreamDecoderSeekStatus of_seek_cb(mpd_unused const
{
FlacData *data = (FlacData *) fdata;
if (input_stream_seek(data->inStream, offset, SEEK_SET) < 0) {
if (!input_stream_seek(data->inStream, offset, SEEK_SET))
return OggFLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
}
return OggFLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK;
}
@@ -261,7 +260,7 @@ static struct tag *oggflac_TagDup(char *file)
OggFLAC__SeekableStreamDecoder *decoder;
FlacData data;
if (input_stream_open(&inStream, file) < 0)
if (!input_stream_open(&inStream, file))
return NULL;
if (ogg_stream_type_detect(&inStream) != FLAC) {
input_stream_close(&inStream);