[ADVAPI32]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 25 Oct 2014 13:56:28 +0000 (13:56 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 25 Oct 2014 13:56:28 +0000 (13:56 +0000)
* Fix set_ntstatus() to use NT_SUCCESS when performing the checks.
CORE-8540

svn path=/trunk/; revision=64980

reactos/dll/win32/advapi32/wine/security.c

index 1b77f36..6456cf3 100644 (file)
@@ -264,8 +264,8 @@ static const ACEFLAG AceRights[] =
 /* used for functions that are a simple wrapper around the corresponding ntdll API */
 static __inline BOOL set_ntstatus( NTSTATUS status )
 {
-    if (status) SetLastError( RtlNtStatusToDosError( status ));
-    return !status;
+    if (!NT_SUCCESS(status)) SetLastError( RtlNtStatusToDosError( status ));
+    return NT_SUCCESS(status);
 }
 
 static const RECORD SidTable[] =