[PATCH] amstream: Simplify flush_receive_queue() a bit.
Zebediah Figura
z.figura12 at gmail.com
Fri May 22 16:25:51 CDT 2020
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/amstream/audiostream.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/amstream/audiostream.c b/dlls/amstream/audiostream.c
index 68b8b84f505..4e82d76da0d 100644
--- a/dlls/amstream/audiostream.c
+++ b/dlls/amstream/audiostream.c
@@ -95,13 +95,10 @@ static void remove_queued_update(IAudioStreamSampleImpl *sample)
static void flush_receive_queue(struct audio_stream *stream)
{
- while (!list_empty(&stream->receive_queue))
- {
- struct queued_receive *receive =
- LIST_ENTRY(list_head(&stream->receive_queue), struct queued_receive, entry);
+ struct list *entry;
- remove_queued_receive(receive);
- }
+ while ((entry = list_head(&stream->receive_queue)))
+ remove_queued_receive(LIST_ENTRY(entry, struct queued_receive, entry));
}
static void process_update(IAudioStreamSampleImpl *sample, struct queued_receive *receive)
--
2.26.2
More information about the wine-devel
mailing list