From: Steinar H. Gunderson Date: Wed, 1 Mar 2017 19:25:17 +0000 (+0100) Subject: Remove a dead code line. X-Git-Tag: 1.5.0~17 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=79e0c7b62e94c599f0f2379eb24789fb30c57be7;p=nageru Remove a dead code line. Found by Coverity Scan. --- diff --git a/mixer.cpp b/mixer.cpp index 79d8e97..bf7dfd7 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -166,17 +166,13 @@ void QueueLengthPolicy::update_policy(unsigned queue_length) been_at_safe_point_since_last_starvation = false; return; } - if (queue_length >= 1) { - if (queue_length >= safe_queue_length) { - been_at_safe_point_since_last_starvation = true; - } - if (++frames_with_at_least_one >= 1000 && safe_queue_length > 1) { - --safe_queue_length; - fprintf(stderr, "Card %u: Spare frames for more than 1000 frames, reducing safe limit to %u frame(s)\n", - card_index, safe_queue_length); - frames_with_at_least_one = 0; - } - } else { + if (queue_length >= safe_queue_length) { + been_at_safe_point_since_last_starvation = true; + } + if (++frames_with_at_least_one >= 1000 && safe_queue_length > 1) { + --safe_queue_length; + fprintf(stderr, "Card %u: Spare frames for more than 1000 frames, reducing safe limit to %u frame(s)\n", + card_index, safe_queue_length); frames_with_at_least_one = 0; } }