fix uninitialized variable
authorThomas Bluemel <thomas@reactsoft.com>
Mon, 18 Apr 2005 19:26:12 +0000 (19:26 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Mon, 18 Apr 2005 19:26:12 +0000 (19:26 +0000)
svn path=/trunk/; revision=14678

reactos/ntoskrnl/ex/sysinfo.c

index 817a293..4546b75 100644 (file)
@@ -587,12 +587,13 @@ QSI_DEF(SystemProcessInformation)
 
                SpiCur = (PSYSTEM_PROCESS_INFORMATION)pCur;
 
-        current_entry = pr->ThreadListHead.Flink;
-        while (current_entry != &pr->ThreadListHead)
-        {
-            nThreads++;
-            current_entry = current_entry->Flink;
-        }
+               nThreads = 0;
+               current_entry = pr->ThreadListHead.Flink;
+               while (current_entry != &pr->ThreadListHead)
+               {
+                       nThreads++;
+                       current_entry = current_entry->Flink;
+               }
 
                // size of the structure for every process
                curSize = sizeof(SYSTEM_PROCESS_INFORMATION)-sizeof(SYSTEM_THREAD_INFORMATION)+sizeof(SYSTEM_THREAD_INFORMATION)*nThreads;