@@ -77,15 +77,15 @@ #endif #if defined(OF_HAVE_THREADS) && defined(OF_AMIGAOS) && !defined(OF_MORPHOS) OF_CONSTRUCTOR() { - if (!of_tlskey_new(&of_socket_base_key)) + if (of_tlskey_new(&of_socket_base_key) != 0) @throw [OFInitializationFailedException exception]; # ifdef OF_AMIGAOS4 - if (!of_tlskey_new(&of_socket_interface_key)) + if (of_tlskey_new(&of_socket_interface_key) != 0) @throw [OFInitializationFailedException exception]; # endif } #endif @@ -123,15 +123,15 @@ atexit((void (*)(void))socExit); # endif # if defined(OF_HAVE_THREADS) && (!defined(OF_AMIGAOS) || defined(OF_MORPHOS)) - if (!of_mutex_new(&mutex)) + if (of_mutex_new(&mutex) != 0) return; # ifdef OF_WII - if (!of_spinlock_new(&spinlock)) + if (of_spinlock_new(&spinlock) != 0) return; # endif # endif initSuccessful = true; @@ -181,20 +181,20 @@ CloseLibrary(socketBase); return false; } # endif - if (!of_tlskey_set(of_socket_base_key, socketBase)) { + if (of_tlskey_set(of_socket_base_key, socketBase) != 0) { CloseLibrary(socketBase); # ifdef OF_AMIGAOS4 DropInterface((struct Interface *)socketInterface); # endif return false; } # ifdef OF_AMIGAOS4 - if (!of_tlskey_set(of_socket_interface_key, socketInterface)) { + if (of_tlskey_set(of_socket_interface_key, socketInterface) != 0) { CloseLibrary(socketBase); DropInterface((struct Interface *)socketInterface); return false; } # endif @@ -327,19 +327,19 @@ socklen_t *restrict addrLen) { int ret; # if defined(OF_HAVE_THREADS) && (!defined(OF_AMIGAOS) || defined(OF_MORPHOS)) - if (!of_mutex_lock(&mutex)) + if (of_mutex_lock(&mutex) != 0) @throw [OFLockFailedException exception]; # endif ret = getsockname(sock, addr, addrLen); # if defined(OF_HAVE_THREADS) && (!defined(OF_AMIGAOS) || defined(OF_MORPHOS)) - if (!of_mutex_unlock(&mutex)) + if (of_mutex_unlock(&mutex) != 0) @throw [OFUnlockFailedException exception]; # endif return ret; }