mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false'
This commit is contained in:
@@ -46,7 +46,7 @@ static inline size_t GetSystemPageSize()
|
||||
bool MemoryPageLocker::Lock(const void *addr, size_t len)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return VirtualLock(const_cast<void*>(addr), len);
|
||||
return VirtualLock(const_cast<void*>(addr), len) != 0;
|
||||
#else
|
||||
return mlock(addr, len) == 0;
|
||||
#endif
|
||||
@@ -55,7 +55,7 @@ bool MemoryPageLocker::Lock(const void *addr, size_t len)
|
||||
bool MemoryPageLocker::Unlock(const void *addr, size_t len)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return VirtualUnlock(const_cast<void*>(addr), len);
|
||||
return VirtualUnlock(const_cast<void*>(addr), len) != 0;
|
||||
#else
|
||||
return munlock(addr, len) == 0;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user