aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-06 21:44:21 +0100
committerMax Kellermann <max@duempel.org>2014-01-06 21:57:40 +0100
commitd403749d096b93ad7c1035ccf89eba5035e02d1c (patch)
treeb8c86c6520f31c5c26fa0ed28632ff0b31a65f3d /src
parent582c2105a99c814c678cc778b9591b8372a1049a (diff)
downloadmpd-d403749d096b93ad7c1035ccf89eba5035e02d1c.tar.gz
mpd-d403749d096b93ad7c1035ccf89eba5035e02d1c.tar.xz
mpd-d403749d096b93ad7c1035ccf89eba5035e02d1c.zip
decoder/faad: eliminate local variable "ret"
Diffstat (limited to 'src')
-rw-r--r--src/decoder/FaadDecoderPlugin.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/decoder/FaadDecoderPlugin.cxx b/src/decoder/FaadDecoderPlugin.cxx
index f1dd5a343..68eb78870 100644
--- a/src/decoder/FaadDecoderPlugin.cxx
+++ b/src/decoder/FaadDecoderPlugin.cxx
@@ -67,15 +67,13 @@ static size_t
adts_find_frame(DecoderBuffer *buffer)
{
size_t length, frame_length;
- bool ret;
while (true) {
const uint8_t *data = (const uint8_t *)
decoder_buffer_read(buffer, &length);
if (data == nullptr || length < 8) {
/* not enough data yet */
- ret = decoder_buffer_fill(buffer);
- if (!ret)
+ if (!decoder_buffer_fill(buffer))
/* failed */
return 0;
@@ -109,8 +107,7 @@ adts_find_frame(DecoderBuffer *buffer)
/* available buffer size is smaller than the
frame will be - attempt to read more
data */
- ret = decoder_buffer_fill(buffer);
- if (!ret) {
+ if (!decoder_buffer_fill(buffer)) {
/* not enough data; discard this frame
to prevent a possible buffer
overflow */