ntdll: Change ambiguous variable name

Francois Gouget fgouget at free.fr
Fri Jun 17 13:31:55 CDT 2005


ntdll/tests/info.c has a variable called 'isnt'. My first thought was 
'Isn't what???'. But in fact it means 'is nt?'. IMO adding an underscore 
makes it clearer (and also makes it no look like a spelling mistake).


Changelog:

  * dlls/ntdll/tests/info.c

    Remove an unneeded variable in test_query_timeofday().
    Rename a variable to 'is_nt' to make its meaning clearer.


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
            Demander si un ordinateur peut penser revient à demander
                           si un sous-marin peut nager.
-------------- next part --------------
Index: dlls/ntdll/tests/info.c
===================================================================
RCS file: /var/cvs/wine/dlls/ntdll/tests/info.c,v
retrieving revision 1.9
diff -u -p -r1.9 info.c
--- dlls/ntdll/tests/info.c	16 Jun 2005 09:43:59 -0000	1.9
+++ dlls/ntdll/tests/info.c	16 Jun 2005 21:56:33 -0000
@@ -113,7 +113,6 @@ static void test_query_timeofday()
 {
     DWORD status;
     ULONG ReturnLength;
-    int isnt = 0;
 
     /* Copy of our winternl.h structure turned into a private one */
     typedef struct _SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE {
@@ -139,9 +138,8 @@ static void test_query_timeofday()
     */
 
     status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, sizeof(sti), &ReturnLength);
-    isnt = ( status == STATUS_INFO_LENGTH_MISMATCH);
 
-    if (isnt)
+    if (status == STATUS_INFO_LENGTH_MISMATCH)
     {
         trace("Windows version is NT, we have to cater for differences with W2K/WinXP\n");
  
@@ -159,7 +157,6 @@ static void test_query_timeofday()
     }
     else
     {
-
         status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 0, &ReturnLength);
         ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
         ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength);
@@ -194,7 +191,7 @@ static void test_query_process()
     DWORD status;
     ULONG ReturnLength;
     int i = 0, j = 0, k = 0;
-    int isnt = 0;
+    int is_nt = 0;
     SYSTEM_BASIC_INFORMATION sbi;
 
     /* Copy of our winternl.h structure turned into a private one */
@@ -250,9 +247,9 @@ static void test_query_process()
 
     pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength);
 
-    isnt = ( spi->dwOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136);
+    is_nt = ( spi->dwOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136);
 
-    if (isnt) trace("Windows version is NT, we will skip thread tests\n");
+    if (is_nt) trace("Windows version is NT, we will skip thread tests\n");
 
     /* Check if we have some return values
      * 
@@ -270,7 +267,7 @@ static void test_query_process()
 
         /* Loop through the threads, skip NT4 for now */
         
-        if (!isnt)
+        if (!is_nt)
         {
             for ( j = 0; j < spi->dwThreadCount; j++) 
             {
@@ -286,7 +283,7 @@ static void test_query_process()
         spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((char*)spi + spi->dwOffset);
     }
     trace("Total number of running processes : %d\n", i);
-    if (!isnt) trace("Total number of running threads   : %d\n", k);
+    if (!is_nt) trace("Total number of running threads   : %d\n", k);
 
     HeapFree( GetProcessHeap(), 0, spi);
 }


More information about the wine-patches mailing list