remove trailing whitespace at end of lines
[reactos.git] / rosapps / tests / regtest / regtest.c
index ca867d2..5f93fd3 100644 (file)
@@ -53,8 +53,8 @@ void do_enumeratekey(PWSTR Name)
 void test1(void)
 {
  HKEY hKey = NULL, hKey1;
- OBJECT_ATTRIBUTES ObjectAttributes; 
- NTSTATUS Status; 
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ NTSTATUS Status;
  UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry");
  ULONG Index,Length,i;
  KEY_BASIC_INFORMATION KeyInformation[5];
@@ -173,9 +173,9 @@ void test1(void)
 void test2(void)
 {
  HKEY hKey,hKey1;
- OBJECT_ATTRIBUTES ObjectAttributes; 
+ OBJECT_ATTRIBUTES ObjectAttributes;
  UNICODE_STRING KeyName,ValueName;
- NTSTATUS Status; 
+ NTSTATUS Status;
  KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
  ULONG Index,Length,i;
  char Buffer[10];
@@ -295,9 +295,9 @@ void test2(void)
 void test3(void)
 {
  HKEY hKey,hKey1;
- OBJECT_ATTRIBUTES ObjectAttributes; 
+ OBJECT_ATTRIBUTES ObjectAttributes;
  UNICODE_STRING KeyName,ValueName;
- NTSTATUS Status; 
+ NTSTATUS Status;
  KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
  ULONG Index,Length,i;
  char Buffer[10];
@@ -447,7 +447,7 @@ void test4(void)
                            L"System\\Setup",
                            0,
                            KEY_ALL_ACCESS,
-                           &hKey1); 
+                           &hKey1);
   dprintf("\t\tdwError =%x\n",dwError);
   if (dwError == ERROR_SUCCESS)
     {
@@ -476,7 +476,7 @@ void test4(void)
                            L"System\\ControlSet001\\Services\\Serial",
                            0,
                            KEY_ALL_ACCESS,
-                           &hKey); 
+                           &hKey);
    dprintf ("\t\t\t\t\tdwError %x\n", dwError);
    RegDataSize = sizeof(GlobalFifoEnable);
    if (dwError == ERROR_SUCCESS)
@@ -611,7 +611,7 @@ void test6(void)
   HKEY hKey;
   OBJECT_ATTRIBUTES ObjectAttributes;
   UNICODE_STRING KeyName,ValueName;
-  NTSTATUS Status; 
+  NTSTATUS Status;
   KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
   ULONG Length,i;
 
@@ -720,7 +720,7 @@ void test7(void)
   HKEY hKey;
   OBJECT_ATTRIBUTES ObjectAttributes;
   UNICODE_STRING KeyName,ValueName;
-  NTSTATUS Status; 
+  NTSTATUS Status;
 
   dprintf("Open link key\n");
   dprintf("  Key: \\Registry\\Machine\\SOFTWARE\\Test\n");
@@ -765,9 +765,9 @@ void test8(void)
  UNICODE_STRING KeyName;
  NTSTATUS Status;
  LONG dwError;
- TOKEN_PRIVILEGES NewPrivileges; 
+ TOKEN_PRIVILEGES NewPrivileges;
  HANDLE Token,hKey;
- LUID Luid; 
+ LUID Luid;
  BOOLEAN bRes;
   Status=NtOpenProcessToken(GetCurrentProcess()
        ,TOKEN_ADJUST_PRIVILEGES,&Token);
@@ -775,24 +775,24 @@ void test8(void)
   dprintf("\t\t\t\tStatus =%x\n",Status);
 //  bRes=LookupPrivilegeValueA(NULL,SE_RESTORE_NAME,&Luid);
 //  dprintf("\t\t\t\tbRes =%x\n",bRes);
-  NewPrivileges.PrivilegeCount = 1; 
-  NewPrivileges.Privileges[0].Luid = Luid; 
+  NewPrivileges.PrivilegeCount = 1;
+  NewPrivileges.Privileges[0].Luid = Luid;
 //  NewPrivileges.Privileges[0].Luid.u.LowPart=18;
 //  NewPrivileges.Privileges[0].Luid.u.HighPart=0;
-  NewPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 
-//  Status = NtAdjustPrivilegesToken( 
-  bRes = AdjustTokenPrivileges( 
-            Token, 
-            FALSE, 
-            &NewPrivileges, 
-            0, 
-            NULL, 
-            NULL 
-            ); 
+  NewPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+
+//  Status = NtAdjustPrivilegesToken(
+  bRes = AdjustTokenPrivileges(
+            Token,
+            FALSE,
+            &NewPrivileges,
+            0,
+            NULL,
+            NULL
+            );
   dprintf("\t\t\t\tbRes =%x\n",bRes);
-//  Status=NtClose(Token); 
+
+//  Status=NtClose(Token);
 //  dprintf("\t\t\t\tStatus =%x\n",Status);
 
 
@@ -824,8 +824,8 @@ void test8(void)
 void test9(void)
 {
     HKEY hKey = NULL, hKey1;
-    OBJECT_ATTRIBUTES ObjectAttributes; 
-    NTSTATUS Status; 
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    NTSTATUS Status;
     UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry");
     ULONG Index,Length,i;
     KEY_BASIC_INFORMATION KeyInformation[5];