diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-09-07 16:15:36 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-09-07 16:15:36 +0200 |
commit | 1f6a0635ea51354191fc0c3f1207d87a1cb067ad (patch) | |
tree | ea5a0ca452431e66a09ed63f5381d1c314832d36 | |
parent | 9abcff831211c8ed1fd9d4f098c0d1f696e1db42 (diff) |
data-loop: small cleanup
So that we exit the function via only one path.
-rw-r--r-- | src/pipewire/data-loop.c | 6 |
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; |