diff options
author | Laszlo Papp <lpapp@kde.org> | 2011-12-08 00:44:25 +0200 |
---|---|---|
committer | Laszlo Papp <ext-laszlo.papp@nokia.com> | 2011-12-08 00:44:25 +0200 |
commit | 05a543f3b6779dafc7cc02dbdb01c90d8e3c6ef2 (patch) | |
tree | 8316a90ff0a965f78f4b5444cc1a008487759f83 | |
parent | d907f8979c6a5b26d265dea977b03631d7151773 (diff) |
Do not use a local return value variable, just write the output argument
-rw-r--r-- | src/decoders/qalflacaudiodecoder.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoders/qalflacaudiodecoder.cpp b/src/decoders/qalflacaudiodecoder.cpp index 4be6377..74c293c 100644 --- a/src/decoders/qalflacaudiodecoder.cpp +++ b/src/decoders/qalflacaudiodecoder.cpp @@ -61,13 +61,12 @@ QALFlacAudioDecoder::Private::readCallback(const FLAC__StreamDecoder *decoder, F if (*bytes <= 0) return FLAC__STREAM_DECODER_READ_STATUS_ABORT; - int retval; - if ((retval = reinterpret_cast<QALFlacAudioDecoder::Private*>(client_data)->file.read(reinterpret_cast<char*>(buffer), *bytes)) == -1) { + if ((*bytes = reinterpret_cast<QALFlacAudioDecoder::Private*>(client_data)->file.read(reinterpret_cast<char*>(buffer), *bytes)) == -1) { qWarning() << Q_FUNC_INFO << "Failed to read the data from the file"; return FLAC__STREAM_DECODER_READ_STATUS_ABORT; } - if (retval != 0) + if (*bytes != 0) return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; |