Return failure if native function failed. one more test passes
authorAlex Ionescu <aionescu@gmail.com>
Tue, 9 Aug 2005 08:54:56 +0000 (08:54 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 9 Aug 2005 08:54:56 +0000 (08:54 +0000)
svn path=/trunk/; revision=17236

reactos/lib/kernel32/thread/thread.c

index 56e4ede..3c68a8b 100644 (file)
@@ -530,7 +530,10 @@ SetThreadAffinityMask(HANDLE hThread,
                                  &AffinityMask,
                                  sizeof(KAFFINITY));
   if (!NT_SUCCESS(Status))
                                  &AffinityMask,
                                  sizeof(KAFFINITY));
   if (!NT_SUCCESS(Status))
+  {
     SetLastErrorByStatus(Status);
     SetLastErrorByStatus(Status);
+    ThreadBasic.AffinityMask = 0;
+  }
 
   return(ThreadBasic.AffinityMask);
 }
 
   return(ThreadBasic.AffinityMask);
 }