Jelajahi Sumber

Merge branch 'edge' of http://git.int.zerotier.com/zerotier/ZeroTierOne into edge

Adam Ierymenko 5 tahun lalu
induk
melakukan
befc50ac3a
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      core/Utils.hpp

+ 2 - 2
core/Utils.hpp

@@ -103,7 +103,7 @@ extern const uint64_t s_mapNonce;
 static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noexcept
 static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noexcept
 {
 {
 #ifdef __WINDOWS__
 #ifdef __WINDOWS__
-	VirtualLock(const_cast<LPVOID>(reinterpret_cast<LPVOID>(p)), l);
+	VirtualLock(reinterpret_cast<LPVOID>(const_cast<void*>(p)), l);
 #else
 #else
 	mlock(p, l);
 	mlock(p, l);
 #endif
 #endif
@@ -118,7 +118,7 @@ static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noex
 static ZT_INLINE void memoryUnlock(const void *const p, const unsigned int l) noexcept
 static ZT_INLINE void memoryUnlock(const void *const p, const unsigned int l) noexcept
 {
 {
 #ifdef __WINDOWS__
 #ifdef __WINDOWS__
-	VirtualUnlock(const_cast<LPVOID>(reinterpret_cast<LPVOID>(p)), l);
+	VirtualUnlock(reinterpret_cast<LPVOID>(const_cast<void*>(p)), l);
 #else
 #else
 	munlock(p, l);
 	munlock(p, l);
 #endif
 #endif