X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Frtl%2Fprocess.c;h=50e36eb38d572148903cc0ed22ea3d5f51975f36;hp=5d6c6896a044137dac57f3db0919bf5ac230fa23;hb=6af485d3aaf3a567504048d983f7caa429e8145c;hpb=fa9cd08b02fed8d1bd4c10a2f3119f22fa4157dd diff --git a/reactos/lib/rtl/process.c b/reactos/lib/rtl/process.c index 5d6c6896a04..50e36eb38d5 100644 --- a/reactos/lib/rtl/process.c +++ b/reactos/lib/rtl/process.c @@ -43,7 +43,7 @@ RtlpMapFile(PUNICODE_STRING ImageFileName, if (!NT_SUCCESS(Status)) { DPRINT1("Failed to read image file from disk\n"); - return(Status); + return Status; } /* Now create a section for this image */ @@ -94,7 +94,7 @@ RtlpInitEnvironment(HANDLE ProcessHandle, if (!NT_SUCCESS(Status)) { DPRINT1("Failed to reserve 1MB of space \n"); - return(Status); + return Status; } } @@ -118,7 +118,7 @@ RtlpInitEnvironment(HANDLE ProcessHandle, if (!NT_SUCCESS(Status)) { DPRINT1("Failed to allocate Environment Block\n"); - return(Status); + return Status; } /* Write the Environment Block */ @@ -144,7 +144,7 @@ RtlpInitEnvironment(HANDLE ProcessHandle, if (!NT_SUCCESS(Status)) { DPRINT1("Failed to allocate Parameter Block\n"); - return(Status); + return Status; } /* Write the Parameter Block */ @@ -245,7 +245,7 @@ RtlCreateUserProcess(IN PUNICODE_STRING ImageFileName, { DPRINT1("Could not create Kernel Process Object\n"); ZwClose(hSection); - return(Status); + return Status; } /* Get some information on the image */ @@ -259,7 +259,7 @@ RtlCreateUserProcess(IN PUNICODE_STRING ImageFileName, DPRINT1("Could not query Section Info\n"); ZwClose(ProcessInfo->ProcessHandle); ZwClose(hSection); - return(Status); + return Status; } /* Get some information about the process */ @@ -273,7 +273,7 @@ RtlCreateUserProcess(IN PUNICODE_STRING ImageFileName, DPRINT1("Could not query Process Info\n"); ZwClose(ProcessInfo->ProcessHandle); ZwClose(hSection); - return(Status); + return Status; } /* Create Process Environment */ @@ -312,22 +312,21 @@ PVOID NTAPI RtlEncodePointer(IN PVOID Pointer) { - ULONG Cookie; - NTSTATUS Status; - - Status = ZwQueryInformationProcess(NtCurrentProcess(), - ProcessCookie, - &Cookie, - sizeof(Cookie), - NULL); - - if(!NT_SUCCESS(Status)) - { - DPRINT1("Failed to receive the process cookie! Status: 0x%lx\n", Status); - return Pointer; - } - - return (PVOID)((ULONG_PTR)Pointer ^ Cookie); + ULONG Cookie; + NTSTATUS Status; + + Status = ZwQueryInformationProcess(NtCurrentProcess(), + ProcessCookie, + &Cookie, + sizeof(Cookie), + NULL); + if(!NT_SUCCESS(Status)) + { + DPRINT1("Failed to receive the process cookie! Status: 0x%lx\n", Status); + return Pointer; + } + + return (PVOID)((ULONG_PTR)Pointer ^ Cookie); } /* @@ -337,7 +336,7 @@ PVOID NTAPI RtlDecodePointer(IN PVOID Pointer) { - return RtlEncodePointer(Pointer); + return RtlEncodePointer(Pointer); } /*