diff --git a/libretro-common/net/net_compat.c b/libretro-common/net/net_compat.c index dbac3db217..4135fe397c 100644 --- a/libretro-common/net/net_compat.c +++ b/libretro-common/net/net_compat.c @@ -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) diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c index c36e32ff07..bfeb5a5dff 100644 --- a/libretro-common/rthreads/rthreads.c +++ b/libretro-common/rthreads/rthreads.c @@ -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) {