- DebugSetProcessKillOnExit: Use SetLastErrorByStatus for NTSTATUS codes
[reactos.git] / reactos / dll / win32 / kernel32 / debug / debugger.c
index 611acf2..3685539 100644 (file)
@@ -232,7 +232,7 @@ ProcessIdToHandle(IN DWORD dwProcessId)
     CLIENT_ID ClientId;
 
     /* If we don't have a PID, look it up */
-    if (dwProcessId == -1) dwProcessId = (DWORD)CsrGetProcessId();
+    if (dwProcessId == -1U) dwProcessId = (DWORD)CsrGetProcessId();
 
     /* Open a handle to the process */
     ClientId.UniqueThread = NULL;
@@ -447,7 +447,7 @@ DebugSetProcessKillOnExit(IN BOOL KillOnExit)
     if (!NT_SUCCESS(Status))
     {
         /* Fail */
-        SetLastError(Status);
+        SetLastErrorByStatus(Status);
         return FALSE;
     }