summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-09-07 16:15:36 +0200
committerWim Taymans <wtaymans@redhat.com>2020-09-07 16:15:36 +0200
commit1f6a0635ea51354191fc0c3f1207d87a1cb067ad (patch)
treeea5a0ca452431e66a09ed63f5381d1c314832d36
parent9abcff831211c8ed1fd9d4f098c0d1f696e1db42 (diff)
data-loop: small cleanup
So that we exit the function via only one path.
-rw-r--r--src/pipewire/data-loop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pipewire/data-loop.c b/src/pipewire/data-loop.c
index 31e9cf25..adbd8c1f 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;