From 265ad4b96a4fe2e1c5832a6365e5c3f234697936 Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Tue, 13 Dec 2016 22:18:33 +0100 Subject: [PATCH] output/Thread: eliminate redundant nullptr check --- src/output/OutputThread.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index 3e3cccb9f..2ac59f534 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -493,7 +493,7 @@ AudioOutput::Play() in_playback_loop = false; }; - while (chunk != nullptr) { + do { if (command != Command::NONE) return true; @@ -502,7 +502,7 @@ AudioOutput::Play() pipe.Consume(*chunk); chunk = pipe.Get(); - } + } while (chunk != nullptr); const ScopeUnlock unlock(mutex); player_control->LockSignal();