diff --git a/netplay/netplay.c b/netplay/netplay.c index c63b473fc0..b7dc3f33e1 100644 --- a/netplay/netplay.c +++ b/netplay/netplay.c @@ -733,10 +733,14 @@ static bool init_tcp_socket(netplay_t *netplay, const char *server, while (tmp_info) { - int fd; - if ((fd = init_tcp_connection(tmp_info, server, netplay->spectate.enabled, - (struct sockaddr*)&netplay->other_addr, - sizeof(netplay->other_addr))) >= 0) + int fd = init_tcp_connection( + tmp_info, + server, + netplay->spectate.enabled, + (struct sockaddr*)&netplay->other_addr, + sizeof(netplay->other_addr)); + + if (fd >= 0) { ret = true; netplay->fd = fd; diff --git a/netplay/netplay.h b/netplay/netplay.h index 04c4924117..9059c98bf5 100644 --- a/netplay/netplay.h +++ b/netplay/netplay.h @@ -75,10 +75,10 @@ enum netplay_cmd /* Controlling game playback */ - /* Pauses the game, takes no args */ + /* Pauses the game, takes no arguments */ NETPLAY_CMD_PAUSE = 0x0030, - /* Resumes the game, takes no args */ + /* Resumes the game, takes no arguments */ NETPLAY_CMD_RESUME = 0x0031 }; diff --git a/netplay/netplay_net.c b/netplay/netplay_net.c index 5a15f9b2ee..70b67a2486 100644 --- a/netplay/netplay_net.c +++ b/netplay/netplay_net.c @@ -82,8 +82,8 @@ static void netplay_net_post_frame(netplay_t *netplay) while (first || (netplay->tmp_ptr != netplay->self_ptr)) { serial_info.data = netplay->buffer[netplay->tmp_ptr].state; - serial_info.data_const = NULL; serial_info.size = netplay->state_size; + serial_info.data_const = NULL; core_ctl(CORE_CTL_RETRO_SERIALIZE, &serial_info);