[ros-diffs] [weiden] 24342: Fix usage of a uninitialized variable, unnecessary goto not replaced by a if(...) statement
weiden at svn.reactos.org
weiden at svn.reactos.org
Sun Oct 1 16:02:08 CEST 2006
Author: weiden
Date: Sun Oct 1 18:02:08 2006
New Revision: 24342
URL: http://svn.reactos.org/svn/reactos?rev=24342&view=rev
Log:
Fix usage of a uninitialized variable, unnecessary goto not replaced by a if(...) statement
Modified:
trunk/reactos/ntoskrnl/ke/i386/kiinit.c
Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?rev=24342&r1=24341&r2=24342&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Sun Oct 1 18:02:08 2006
@@ -311,11 +311,12 @@
/* Initialize the machine type */
KiInitializeMachineType();
- /* Skip initial setup if this isn't the Boot CPU */
- if (Cpu) goto AppCpuInit;
-
/* Get GDT, IDT, PCR and TSS pointers */
KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss);
+
+ /* Skip initial setup if this isn't the Boot CPU */
+ if (Cpu)
+ goto AppCpuInit;
/* Setup the TSS descriptors and entries */
Ki386InitializeTss(Tss, Idt, Gdt);
@@ -347,8 +348,8 @@
do
{
/* Loop until execution can continue */
- while (KiFreezeExecutionLock == 1);
- } while(InterlockedBitTestAndSet(&KiFreezeExecutionLock, 0));
+ while ((volatile KSPIN_LOCK)KiFreezeExecutionLock == 1);
+ } while(InterlockedBitTestAndSet((PLONG)&KiFreezeExecutionLock, 0));
/* Setup CPU-related fields */
__writefsdword(KPCR_NUMBER, Cpu);
More information about the Ros-diffs
mailing list