diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-08 19:15:24 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-08 19:15:24 +0100 |
commit | e9880491796516b7e2f835a3df6f20e5da06ebf7 (patch) | |
tree | dc10120bd50d39aa092bea82c1143e5df845ee04 /src/mds-clipboard.c | |
parent | replace all variants of goto pfail with fail_if (diff) | |
download | mds-e9880491796516b7e2f835a3df6f20e5da06ebf7.tar.gz mds-e9880491796516b7e2f835a3df6f20e5da06ebf7.tar.bz2 mds-e9880491796516b7e2f835a3df6f20e5da06ebf7.tar.xz |
no more goto fail
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-clipboard.c | 9 |
1 files changed, 4 insertions, 5 deletions
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); |