From 51284a6d4294310f06c74a07352de117758aee2f Mon Sep 17 00:00:00 2001 From: krcroft Date: Thu, 5 Mar 2020 14:32:06 -0800 Subject: [PATCH] Simplify conditional logic --- src/libs/decoders/opus.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/decoders/opus.cpp b/src/libs/decoders/opus.cpp index 1653df8f..3c188a26 100644 --- a/src/libs/decoders/opus.cpp +++ b/src/libs/decoders/opus.cpp @@ -294,9 +294,11 @@ static uint32_t opus_read(Sound_Sample * sample, void * buffer, uint32_t request if (result == 0) { sample->flags |= SOUND_SAMPLEFLAG_EOF; break; - } else if (result == OP_HOLE) { + } + if (result == OP_HOLE) continue; // hole in the data; keeping going! - } else if (result < 0) { + + if (result < 0) { sample->flags |= SOUND_SAMPLEFLAG_ERROR; break; }