From 3d7b7f6afa0ee9c0f9377714b8f2e0337935e18a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 1 May 2016 23:01:41 +0200 Subject: [PATCH] init_udp_socket - cleanups --- netplay/netplay.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/netplay/netplay.c b/netplay/netplay.c index 579f796a0f..bed296d9f5 100644 --- a/netplay/netplay.c +++ b/netplay/netplay.c @@ -762,10 +762,7 @@ static bool init_udp_socket(netplay_t *netplay, const char *server, netplay->udp_fd = socket_init((void**)&netplay->addr, port, server, SOCKET_TYPE_DATAGRAM); if (netplay->udp_fd < 0) - { - RARCH_ERR("Failed to initialize socket.\n"); - return false; - } + goto error; if (!server) { @@ -782,6 +779,10 @@ static bool init_udp_socket(netplay_t *netplay, const char *server, } return true; + +error: + RARCH_ERR("Failed to initialize socket.\n"); + return false; } static bool init_socket(netplay_t *netplay, const char *server, uint16_t port)