From e9880491796516b7e2f835a3df6f20e5da06ebf7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 8 Dec 2014 19:15:24 +0100 Subject: no more goto fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-clipboard.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mds-clipboard.c') diff --git a/src/mds-clipboard.c b/src/mds-clipboard.c index 09cb599..a2a43eb 100644 --- a/src/mds-clipboard.c +++ b/src/mds-clipboard.c @@ -357,7 +357,7 @@ int master_loop(void) if (r == -2) { eprint("corrupt message received, aborting."); - goto fail; + goto done; } else if (errno == EINTR) continue; @@ -368,16 +368,15 @@ 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; } rc = 0; - goto fail; + goto done; pfail: xperror(*argv); - fail: + done: if (!rc && reexecing) return 0; mds_message_destroy(&received); -- cgit v1.2.3-70-g09d2