From 1f6a0635ea51354191fc0c3f1207d87a1cb067ad Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 7 Sep 2020 16:15:36 +0200 Subject: [PATCH] data-loop: small cleanup So that we exit the function via only one path. --- src/pipewire/data-loop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipewire/data-loop.c b/src/pipewire/data-loop.c index 31e9cf253..adbd8c1f3 100644 --- a/src/pipewire/data-loop.c +++ b/src/pipewire/data-loop.c @@ -38,8 +38,10 @@ int pw_data_loop_wait(struct pw_data_loop *this, int timeout) int res; while (true) { - if (!this->running) - return -ECANCELED; + if (!this->running) { + res = -ECANCELED; + break; + } if ((res = pw_loop_iterate(this->loop, timeout)) < 0) { if (errno == EINTR) continue;