diff --git a/libretro-common/net/net_compat.c b/libretro-common/net/net_compat.c index 8c863078b9..1dc656d421 100644 --- a/libretro-common/net/net_compat.c +++ b/libretro-common/net/net_compat.c @@ -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. diff --git a/network/netplay/netplay_init.c b/network/netplay/netplay_init.c index e063922e35..969439b894 100644 --- a/network/netplay/netplay_init.c +++ b/network/netplay/netplay_init.c @@ -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