diff --git a/rehlds/engine/net_ws.cpp b/rehlds/engine/net_ws.cpp index cca2fb855..ddef7e30d 100644 --- a/rehlds/engine/net_ws.cpp +++ b/rehlds/engine/net_ws.cpp @@ -1148,7 +1148,7 @@ void* NET_ThreadMain(void*) NET_ThreadLock(); #ifdef REHLDS_FIXES - if(net_thread_terminated) + if (net_thread_terminated) { NET_ThreadUnlock(); return 0; @@ -1216,7 +1216,7 @@ void NET_StartThread() pthread_mutexattr_init(&net_mutex_attr); pthread_mutexattr_settype(&net_mutex_attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(&net_mutex, &net_mutex_attr); - if(pthread_create(&hNetThread, nullptr, &NET_ThreadMain, nullptr) != 0) + if (pthread_create(&hNetThread, nullptr, &NET_ThreadMain, nullptr) != 0) { pthread_mutex_destroy(&net_mutex); #endif @@ -1244,7 +1244,7 @@ void NET_StopThread() #ifdef _WIN32 #ifdef REHLDS_FIXES - if(WaitForSingleObject(hNetThread, 0.5 * 1000) != WAIT_OBJECT_0) // Wait 0.5 second for thread to finish + if (WaitForSingleObject(hNetThread, 0.5 * 1000) != WAIT_OBJECT_0) // Wait 0.5 second for thread to finish #endif // REHLDS_FIXES { TerminateThread(hNetThread, 0); // Kill unresponsive thread. @@ -1253,12 +1253,12 @@ void NET_StopThread() #else // _WIN32 struct timespec ts; - if(clock_gettime(CLOCK_REALTIME, &ts) == -1) { + if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { Sys_Error("%s: CLOCK_REALTIME ERROR: %s", __func__, NET_ErrorString(NET_GetLastError())); } ts.tv_nsec += 0.5 * 1000000000; // Wait 0.5 second for thread to finish - if(pthread_timedjoin_np(hNetThread, nullptr, &ts) != 0) + if (pthread_timedjoin_np(hNetThread, nullptr, &ts) != 0) { pthread_cancel(hNetThread); // Kill unresponsive thread. pthread_join(hNetThread, nullptr);