https://git.reactos.org/?p=reactos.git;a=commitdiff;h=842e40d7cdc508b76b514bd790f6249cf2faaee7

commit 842e40d7cdc508b76b514bd790f6249cf2faaee7
Author:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
AuthorDate: Mon Oct 14 20:27:38 2024 +0200
Commit:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
CommitDate: Mon Oct 14 22:51:51 2024 +0200

    [NTOS:KDBG] Minor code style for the following commits
---
 ntoskrnl/kd64/kdtrap.c  | 2 +-
 ntoskrnl/kdbg/kdb.c     | 5 ++---
 ntoskrnl/kdbg/kdb_cli.c | 7 ++-----
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/ntoskrnl/kd64/kdtrap.c b/ntoskrnl/kd64/kdtrap.c
index dc78b11891e..4cfac2b04b0 100644
--- a/ntoskrnl/kd64/kdtrap.c
+++ b/ntoskrnl/kd64/kdtrap.c
@@ -147,7 +147,7 @@ KdpTrap(IN PKTRAP_FRAME TrapFrame,
 
     /*
      * Check if we got a STATUS_BREAKPOINT with a SubID for Print, Prompt or
-     * Load/Unload symbols. Make sure it isn't a software breakpoints as those
+     * Load/Unload symbols. Make sure it isn't a software breakpoint as those
      * are handled by KdpReport.
      */
     if ((ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) &&
diff --git a/ntoskrnl/kdbg/kdb.c b/ntoskrnl/kdbg/kdb.c
index 15175d5ca93..bb5b3afe0af 100644
--- a/ntoskrnl/kdbg/kdb.c
+++ b/ntoskrnl/kdbg/kdb.c
@@ -1176,7 +1176,8 @@ KdbpInternalEnter(VOID)
     Thread->Tcb.StackLimit = (ULONG_PTR)KdbStack;
     Thread->Tcb.KernelStack = (char*)KdbStack + KDB_STACK_SIZE;
 
-    // KdbPrintf("Switching to KDB stack 0x%08x-0x%08x (Current Stack is 
0x%08x)\n", Thread->Tcb.StackLimit, Thread->Tcb.StackBase, Esp);
+    // KdbPrintf("Switching to KDB stack 0x%08x-0x%08x (Current Stack is 
0x%08x)\n",
+    //           Thread->Tcb.StackLimit, Thread->Tcb.StackBase, Esp);
 
     KdbpStackSwitchAndCall(KdbStack + KDB_STACK_SIZE - KDB_STACK_RESERVE, 
KdbpCallMainLoop);
 
@@ -1333,7 +1334,6 @@ KdbEnterDebuggerException(
         {
             Resume = TRUE; /* Set the resume flag when continuing execution */
         }
-
         /*
          * When a temporary breakpoint is hit we have to make sure that we are
          * in the same context in which it was set, otherwise it could happen
@@ -1360,7 +1360,6 @@ KdbEnterDebuggerException(
 
             KdbEnteredOnSingleStep = TRUE;
         }
-
         /*
          * If we hit a breakpoint set by the debugger we set the single step 
flag,
          * ignore the next single step and reenable the breakpoint.
diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c
index a8ce312f918..e6a23fc5321 100644
--- a/ntoskrnl/kdbg/kdb_cli.c
+++ b/ntoskrnl/kdbg/kdb_cli.c
@@ -3341,23 +3341,20 @@ VOID
 KdbpCliInterpretInitFile(VOID)
 {
     PCHAR p1, p2;
-    INT_PTR i;
-    CHAR c;
 
     /* Execute the commands in the init file */
     DPRINT("KDB: Executing KDBinit file...\n");
     p1 = KdbInitFileBuffer;
     while (p1[0] != '\0')
     {
-        i = strcspn(p1, "\r\n");
+        size_t i = strcspn(p1, "\r\n");
         if (i > 0)
         {
-            c = p1[i];
+            CHAR c = p1[i];
             p1[i] = '\0';
 
             /* Look for "break" command and comments */
             p2 = p1;
-
             while (isspace(p2[0]))
                 p2++;
 

Reply via email to