Cleanups
This commit is contained in:
parent
6f6b1a8333
commit
a36d5926d7
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue