From 79e0c7b62e94c599f0f2379eb24789fb30c57be7 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 1 Mar 2017 20:25:17 +0100 Subject: [PATCH] Remove a dead code line. Found by Coverity Scan. --- mixer.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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; } } -- 2.39.2