Fixed assert that checks return value of TlsSetValue.
authorOscar Fuentes <ofv@wanadoo.es>
Tue, 30 Jun 2009 14:12:28 +0000 (14:12 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Tue, 30 Jun 2009 14:12:28 +0000 (14:12 +0000)
See http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx

Patch by Olaf Krzikalla!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Win32/ThreadLocal.inc

index 8ab37d9d75e06718cfe343f4b1bc54a0b94520d4..c8f7840b00387f894e93d772fd5463d244fafafe 100644 (file)
@@ -43,7 +43,7 @@ const void* ThreadLocalImpl::getInstance() {
 void ThreadLocalImpl::setInstance(const void* d){
   DWORD* tls = static_cast<DWORD*>(data);
   int errorcode = TlsSetValue(*tls, const_cast<void*>(d));
-  assert(errorcode == 0);
+  assert(errorcode != 0);
 }
 
 }