From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Wed, 10 Feb 2016 13:55:30 -0500 Subject: [Cluster-devel] [DLM PATCH 4/6] DLM: Eliminate useless goto In-Reply-To: <1455130532-9317-1-git-send-email-rpeterso@redhat.com> References: <1455130532-9317-1-git-send-email-rpeterso@redhat.com> Message-ID: <1455130532-9317-5-git-send-email-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch simply removes a goto from function sctp_listen_for_all. The end result is the same, but makes the code more readable. Signed-off-by: Bob Peterson --- fs/dlm/lowcomms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 3b780f0..ec5087a 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1261,7 +1261,7 @@ static int sctp_listen_for_all(void) SOCK_STREAM, IPPROTO_SCTP, &sock); if (result < 0) { log_print("Can't create comms socket, check SCTP is loaded"); - goto out; + return result; } result = kernel_setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, @@ -1296,7 +1296,6 @@ static int sctp_listen_for_all(void) create_delsock: sock_release(sock); con->sock = NULL; -out: return result; } -- 2.5.0