mirror of https://github.com/mpv-player/mpv
thread_tools: minor simplification
This commit is contained in:
parent
31b78ad7fa
commit
094f6be600
|
@ -110,9 +110,7 @@ void mp_cancel_reset(struct mp_cancel *c)
|
||||||
// Flush it fully.
|
// Flush it fully.
|
||||||
while (1) {
|
while (1) {
|
||||||
int r = read(c->wakeup_pipe[0], &(char[256]){0}, 256);
|
int r = read(c->wakeup_pipe[0], &(char[256]){0}, 256);
|
||||||
if (r < 0 && errno == EINTR)
|
if (r <= 0 && !(r < 0 && errno == EINTR))
|
||||||
continue;
|
|
||||||
if (r <= 0)
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue