mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
data-loop: small cleanup
So that we exit the function via only one path.
This commit is contained in:
parent
9abcff8312
commit
1f6a0635ea
1 changed files with 4 additions and 2 deletions
|
|
@ -38,8 +38,10 @@ int pw_data_loop_wait(struct pw_data_loop *this, int timeout)
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!this->running)
|
if (!this->running) {
|
||||||
return -ECANCELED;
|
res = -ECANCELED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if ((res = pw_loop_iterate(this->loop, timeout)) < 0) {
|
if ((res = pw_loop_iterate(this->loop, timeout)) < 0) {
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue