Skip to content

Commit

Permalink
use SetLastError to clear error
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Apr 3, 2024
1 parent ed439db commit e3fefde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/os/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ void os::dll_unload(void *lib) {
}

void* os::dll_lookup(void *lib, const char *name) {
::GetLastError(); // Clear old pending errors
::SetLastError(0); // Clear old pending errors
void* ret = ::GetProcAddress((HMODULE)lib, name);
if (ret == nullptr) {
char buf[512];
Expand Down

0 comments on commit e3fefde

Please sign in to comment.