project wide nullptr fix

This commit is contained in:
Erik Frojdh
2019-01-16 15:15:29 +01:00
parent 80a1a3d796
commit 49f71ffca7
16 changed files with 411 additions and 119 deletions

View File

@ -39,7 +39,7 @@ void ThreadObject::DestroyThread() {
if(alive){
killThread = true;
sem_post(&semaphore);
pthread_join(thread,NULL);
pthread_join(thread,nullptr);
sem_destroy(&semaphore);
killThread = false;
alive = false;
@ -56,7 +56,7 @@ int ThreadObject::CreateThread() {
sem_init(&semaphore,1,0);
killThread = false;
if(pthread_create(&thread, NULL,StartThread, (void*) this)){
if(pthread_create(&thread, nullptr,StartThread, (void*) this)){
FILE_LOG(logERROR) << "Could not create " << GetType() << " thread with index " << index;
return FAIL;
}
@ -91,7 +91,7 @@ void ThreadObject::RunningThread() {
if(killThread) {
FILE_LOG(logINFOBLUE) << "Exiting [ " << GetType() <<
" Thread " << index << ", Tid: " << syscall(SYS_gettid) << "]";
pthread_exit(NULL);
pthread_exit(nullptr);
}
}//end of outer loop