thread_tools: minor simplification
This commit is contained in:
1 parent
31b78ad7fa
commit
094f6be600
1 file changed
+1
-3
+1
-3
@@ -110,9 +110,7 @@ void mp_cancel_reset(struct mp_cancel *c)
|
||||
// Flush it fully.
|
||||
while (1) {
|
||||
int r = read(c->wakeup_pipe[0], &(char[256]){0}, 256);
|
||||
if (r < 0 && errno == EINTR)
|
||||
continue;
|
||||
if (r <= 0)
|
||||
if (r <= 0 && !(r < 0 && errno == EINTR))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user