mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
getaddrinfo error codes can also be positive.
This commit is contained in:
parent
f589c50043
commit
b49d2a87ab
@ -411,7 +411,7 @@ bool udp_send_packet(const char *host,
|
||||
|
||||
snprintf(port_buf, sizeof(port_buf), "%hu", (unsigned short)port);
|
||||
|
||||
if (getaddrinfo_retro(host, port_buf, &hints, &res) < 0)
|
||||
if (getaddrinfo_retro(host, port_buf, &hints, &res) != 0)
|
||||
return false;
|
||||
|
||||
/* Send to all possible targets.
|
||||
|
@ -131,14 +131,14 @@ static bool init_tcp_socket(netplay_t *netplay, void *direct_host,
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
|
||||
snprintf(port_buf, sizeof(port_buf), "%hu", (unsigned short)port);
|
||||
if (getaddrinfo_retro(server, port_buf, &hints, &res) < 0)
|
||||
if (getaddrinfo_retro(server, port_buf, &hints, &res) != 0)
|
||||
{
|
||||
#ifdef HAVE_INET6
|
||||
if (!server)
|
||||
{
|
||||
/* Didn't work with IPv6, try wildcard */
|
||||
hints.ai_family = 0;
|
||||
if (getaddrinfo_retro(server, port_buf, &hints, &res) < 0)
|
||||
if (getaddrinfo_retro(server, port_buf, &hints, &res) != 0)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user