aboutsummaryrefslogtreecommitdiff
path: root/src/allocators.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-09-16 04:43:49 +0200
committerPieter Wuille <[email protected]>2014-09-16 04:47:55 +0200
commitdc54e9db982118ec71cc11b8d027e5a569810cba (patch)
tree34b0ca1ab9f4c153a551750dae6fea3b2dbf286a /src/allocators.cpp
parentMerge pull request #4911 (diff)
parentFixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (diff)
downloaddiscoin-dc54e9db982118ec71cc11b8d027e5a569810cba.tar.xz
discoin-dc54e9db982118ec71cc11b8d027e5a569810cba.zip
Merge pull request #4825
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
Diffstat (limited to 'src/allocators.cpp')
-rw-r--r--src/allocators.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/allocators.cpp b/src/allocators.cpp
index 15f34aa2c..8ecd7206c 100644
--- a/src/allocators.cpp
+++ b/src/allocators.cpp
@@ -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