data-loop: small cleanup

So that we exit the function via only one path.
This commit is contained in:
Wim Taymans 2020-09-07 16:15:36 +02:00
parent 9abcff8312
commit 1f6a0635ea

View file

@ -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;