From bac942f34df0fb2e51b3d85ca2ff240b3b3710eb Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 7 Aug 2005 21:48:14 +0000 Subject: [PATCH] - Return correct error. Spotted by Thomas. svn path=/trunk/; revision=17181 --- reactos/ntoskrnl/ps/cid.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ps/cid.c b/reactos/ntoskrnl/ps/cid.c index 83eea3ba00b..935ca8ff495 100644 --- a/reactos/ntoskrnl/ps/cid.c +++ b/reactos/ntoskrnl/ps/cid.c @@ -139,6 +139,7 @@ PsLookupProcessThreadByCid(IN PCLIENT_ID Cid, { PHANDLE_TABLE_ENTRY CidEntry; PETHREAD FoundThread; + NTSTATUS Status = STATUS_INVALID_CID; PAGED_CODE(); @@ -157,10 +158,10 @@ PsLookupProcessThreadByCid(IN PCLIENT_ID Cid, *Process = FoundThread->ThreadsProcess; } *Thread = FoundThread; - return STATUS_SUCCESS; + Status = STATUS_SUCCESS; } - return STATUS_INVALID_PARAMETER; + return Status; } @@ -173,6 +174,7 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId, { PHANDLE_TABLE_ENTRY CidEntry; PETHREAD FoundThread; + NTSTATUS Status = STATUS_INVALID_CID; PAGED_CODE(); @@ -186,10 +188,10 @@ PsLookupThreadByThreadId(IN HANDLE ThreadId, PsUnlockCidHandle(CidEntry); *Thread = FoundThread; - return STATUS_SUCCESS; + Status = STATUS_SUCCESS; } - return STATUS_INVALID_PARAMETER; + return Status; } VOID