diff options
Diffstat (limited to 'apps/dolmetschctl.c')
-rw-r--r-- | apps/dolmetschctl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/dolmetschctl.c b/apps/dolmetschctl.c index b8f9197..9e3b3d5 100644 --- a/apps/dolmetschctl.c +++ b/apps/dolmetschctl.c @@ -65,15 +65,12 @@ int main_loop(osc_t* o, midi_t* m) printf("main_loop running...\n"); for (;;) { int err = poll(pfds, npfds, 200); - if(err < 0) { - if(errno == EINTR) - continue; - + if(err < 0 || errno != EINTR) { error(0, errno, "poll failed"); break; } - if(err == 0) { - // timeout is reached + if(err <= 0) { + // timeout or EINTR continue; } |