From: Seunghun Lee Date: Mon, 3 Jul 2023 08:01:27 +0000 (+0900) Subject: server: Remove superfluous goto label X-Git-Tag: accepted/tizen/unified/20230706.152204^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F295139%2F3;p=platform%2Fupstream%2Fwayland.git server: Remove superfluous goto label The goto label was introduced by 1c4afff, and is no longer necessary after 812e138. Change-Id: If3735215a8f16c4530cc1270562d6999dd0ce5f7 --- diff --git a/src/wayland-server.c b/src/wayland-server.c index 4b32960..c0ba0a9 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -388,12 +388,12 @@ wl_client_connection_data(int fd, uint32_t mask, void *data) wl_log("Mask has hangup flag set, client_proc(%s) PID(%d) mask[%x]\n", client->proc_name, client->pid, mask); wl_client_destroy(client); - goto end; + return 1; } if (mask & WL_EVENT_ERROR) { destroy_client_with_error(client, "socket error"); - goto end; + return 1; } if (mask & WL_EVENT_WRITABLE) { @@ -407,7 +407,7 @@ wl_client_connection_data(int fd, uint32_t mask, void *data) if (len < 0 && errno != EAGAIN) { destroy_client_with_error( client, "failed to flush client connection"); - goto end; + return 1; } else if (len >= 0) { wl_event_source_fd_update(client->source, WL_EVENT_READABLE); @@ -425,7 +425,7 @@ wl_client_connection_data(int fd, uint32_t mask, void *data) if (len == 0 || (len < 0 && errno != EAGAIN)) { destroy_client_with_error( client, "failed to read client connection"); - goto end; + return 1; } } @@ -528,7 +528,6 @@ wl_client_connection_data(int fd, uint32_t mask, void *data) "error in client communication"); } -end: return 1; }