diff options
Diffstat (limited to '')
-rw-r--r-- | src/mds-kkbd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c index 32ae6db..82b3d22 100644 --- a/src/mds-kkbd.c +++ b/src/mds-kkbd.c @@ -437,7 +437,7 @@ int master_loop(void) if (r == -2) { eprint("corrupt message received, aborting."); - goto fail; + goto done; } else if (errno == EINTR) continue; @@ -448,18 +448,17 @@ int master_loop(void) mds_message_destroy(&received); mds_message_initialise(&received); connected = 0; - if (reconnect_to_display()) - goto fail; + fail_if (reconnect_to_display()); connected = 1; } joined = 1; fail_if ((errno = pthread_join(kbd_thread, &kbd_ret))); rc = kbd_ret == NULL ? 0 : 1; - goto fail; + goto done; pfail: xperror(*argv); - fail: + done: pthread_mutex_destroy(&send_mutex); pthread_mutex_destroy(&mapping_mutex); free(send_buffer); |