mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
fs: fully initialize _OVERLAPPED for win32
This commit is contained in:
parent
13fd9ee5c2
commit
02c9e56468
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ bool FileLock::TryLock()
|
||||||
if (hFile == INVALID_HANDLE_VALUE) {
|
if (hFile == INVALID_HANDLE_VALUE) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_OVERLAPPED overlapped = {0};
|
_OVERLAPPED overlapped = {};
|
||||||
if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
|
if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
|
||||||
reason = GetErrorReason();
|
reason = GetErrorReason();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue