8219577: Returning NULL in a function which returns bools
Reviewed-by: shade, zgu, clanger
This commit is contained in:
parent
b0eedd125f
commit
24be06441a
@ -602,7 +602,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
|||||||
HANDLE interrupt_event = CreateEvent(NULL, true, false, NULL);
|
HANDLE interrupt_event = CreateEvent(NULL, true, false, NULL);
|
||||||
if (interrupt_event == NULL) {
|
if (interrupt_event == NULL) {
|
||||||
delete osthread;
|
delete osthread;
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
osthread->set_interrupt_event(interrupt_event);
|
osthread->set_interrupt_event(interrupt_event);
|
||||||
osthread->set_interrupted(false);
|
osthread->set_interrupted(false);
|
||||||
@ -676,7 +676,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
|||||||
CloseHandle(osthread->interrupt_event());
|
CloseHandle(osthread->interrupt_event());
|
||||||
thread->set_osthread(NULL);
|
thread->set_osthread(NULL);
|
||||||
delete osthread;
|
delete osthread;
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Atomic::inc(&os::win32::_os_thread_count);
|
Atomic::inc(&os::win32::_os_thread_count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user