https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97f31ac396889dd15a74559a1428a101dc695af7

commit 97f31ac396889dd15a74559a1428a101dc695af7
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Thu Sep 19 02:38:34 2019 +0200
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Thu Sep 19 02:39:59 2019 +0200

    [SDK:NT] Remove Win32-isms.
---
 sdk/lib/nt/entry_point.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/sdk/lib/nt/entry_point.c b/sdk/lib/nt/entry_point.c
index 03fb65fce01..c40e2b59239 100644
--- a/sdk/lib/nt/entry_point.c
+++ b/sdk/lib/nt/entry_point.c
@@ -10,10 +10,8 @@
 
 /* PSDK/NDK Headers */
 #define WIN32_NO_STATUS
-#include <stdio.h>
-//#include <windows.h>
 #define NTOS_MODE_USER
-#include <ndk/psfuncs.h>
+// #include <ndk/psfuncs.h>
 #include <ndk/rtlfuncs.h>
 
 NTSTATUS
@@ -39,9 +37,9 @@ VOID FASTCALL EnvironmentStringToUnicodeString (PWCHAR wsIn, 
PUNICODE_STRING usO
 
         while (*CurrentChar)
         {
-            while(*CurrentChar++);
+            while (*CurrentChar++);
         }
-        /* double nullterm at end */
+        /* Double NULL-termination at end */
         CurrentChar++;
 
         usOut->Buffer = wsIn;
@@ -56,10 +54,8 @@ VOID FASTCALL EnvironmentStringToUnicodeString (PWCHAR wsIn, 
PUNICODE_STRING usO
     }
 }
 
-
-
 VOID
-WINAPI
+NTAPI
 NtProcessStartup(PPEB Peb)
 {
     NTSTATUS Status;
@@ -87,7 +83,7 @@ NtProcessStartup(PPEB Peb)
     ASSERT(ProcessParameters);
 
     /* Allocate memory for the argument list, enough for 512 tokens */
-    //FIXME: what if 512 is not enough????
+    // FIXME: what if 512 is not enough????
     ArgumentList = RtlAllocateHeap(RtlGetProcessHeap(), 0, 512 * 
sizeof(PCHAR));
     if (!ArgumentList)
     {
@@ -140,7 +136,7 @@ NtProcessStartup(PPEB Peb)
         /* Start parsing */
         while (*Source)
         {
-            /* Skip the white space. */
+            /* Skip the white space */
             while (*Source && *Source <= ' ') Source++;
 
             /* Copy until the next white space is reached */
@@ -170,7 +166,7 @@ NtProcessStartup(PPEB Peb)
     if (ProcessParameters->Environment)
     {
         EnvironmentStringToUnicodeString(ProcessParameters->Environment, 
&UnicodeEnvironment);
-        Status = RtlUnicodeStringToAnsiString (& AnsiEnvironment, & 
UnicodeEnvironment, TRUE);
+        Status = RtlUnicodeStringToAnsiString (&AnsiEnvironment, 
&UnicodeEnvironment, TRUE);
         if (!NT_SUCCESS(Status))
         {
             DPRINT1("ERR: no mem(guess)\n");

Reply via email to