diff options
author | wm4 <wm4@nowhere> | 2018-05-17 21:03:02 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:35 +0200 |
commit | 094f6be60041c67359a29dec905e66129b538afa (patch) | |
tree | 5147cb9bd191157cd13e896e8c8b1e654c56df87 /misc | |
parent | 31b78ad7fa97d8047b609c1647a273e72612d425 (diff) | |
download | mpv-094f6be60041c67359a29dec905e66129b538afa.tar.bz2 mpv-094f6be60041c67359a29dec905e66129b538afa.tar.xz |
thread_tools: minor simplification
Diffstat (limited to 'misc')
-rw-r--r-- | misc/thread_tools.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/misc/thread_tools.c b/misc/thread_tools.c index 57a4900ad6..b11ffd07e4 100644 --- a/misc/thread_tools.c +++ b/misc/thread_tools.c @@ -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; } } |