This commit is contained in:
twinaphex 2019-09-17 05:30:07 +02:00
parent 6f6b1a8333
commit a36d5926d7
2 changed files with 6 additions and 4 deletions

View File

@ -94,7 +94,7 @@ char *inet_ntoa(struct SceNetInAddr in)
{
static char ip_addr[INET_ADDRSTRLEN + 1];
if (inet_ntop_compat(AF_INET, &in, ip_addr, INET_ADDRSTRLEN) == NULL)
if (!inet_ntop_compat(AF_INET, &in, ip_addr, INET_ADDRSTRLEN))
strlcpy(ip_addr, "Invalid", sizeof(ip_addr));
return ip_addr;
@ -184,7 +184,8 @@ int getaddrinfo_retro(const char *node, const char *service,
}
#if defined(WIIU)
if (node == NULL) {
if (!node)
{
/* Wii U's socket library chokes on NULL node */
if (hints->ai_flags & AI_PASSIVE)
node = "0.0.0.0";
@ -329,7 +330,7 @@ bool network_init(void)
socket_lib_init();
#elif defined(_3DS)
_net_compat_net_memory = (u32*)memalign(SOC_ALIGN, SOC_BUFFERSIZE);
if (_net_compat_net_memory == NULL)
if (!_net_compat_net_memory)
return false;
Result ret = socInit(_net_compat_net_memory, SOC_BUFFERSIZE);//WIFI init
if (ret != 0)

View File

@ -464,7 +464,8 @@ scond_t *scond_new(void)
* Note: We might could simplify this using vista+ condition variables,
* but we wanted an XP compatible solution. */
cond->event = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!cond->event) goto error;
if (!cond->event)
goto error;
cond->hot_potato = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!cond->hot_potato)
{