Skip to content

Commit b2eaf90

Browse files
committed
[NTOS:KDBG] Minor code style fix.
1 parent 0f8306b commit b2eaf90

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

ntoskrnl/kdbg/kdb_cli.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ KdbpGetComponentId(
641641
{
642642
ULONG i;
643643

644-
for (i = 0; i < sizeof(ComponentTable) / sizeof(ComponentTable[0]); i++)
644+
for (i = 0; i < RTL_NUMBER_OF(ComponentTable); i++)
645645
{
646646
if (_stricmp(ComponentName, ComponentTable[i].Name) == 0)
647647
{
@@ -689,7 +689,7 @@ KdbpCmdFilter(
689689
KdbpPrint("The list of debug filter components currently available on your system is:\n\n");
690690
KdbpPrint(" Component Name Component ID\n"
691691
"================ ==============\n");
692-
for (i = 0; i < sizeof(ComponentTable) / sizeof(ComponentTable[0]); i++)
692+
for (i = 0; i < RTL_NUMBER_OF(ComponentTable); i++)
693693
{
694694
KdbpPrint("%16s 0x%08lx\n", ComponentTable[i].Name, ComponentTable[i].Id);
695695
}
@@ -704,7 +704,7 @@ KdbpCmdFilter(
704704

705705
if (p > opt)
706706
{
707-
for (j = 0; j < sizeof(debug_classes) / sizeof(debug_classes[0]); j++)
707+
for (j = 0; j < RTL_NUMBER_OF(debug_classes); j++)
708708
{
709709
SIZE_T len = strlen(debug_classes[j].Name);
710710
if (len != (p - opt))
@@ -718,7 +718,7 @@ KdbpCmdFilter(
718718
break;
719719
}
720720
}
721-
if (j == sizeof(debug_classes) / sizeof(debug_classes[0]))
721+
if (j == RTL_NUMBER_OF(debug_classes))
722722
{
723723
Level = strtoul(opt, &pend, 0);
724724
if (pend != p)
@@ -1702,7 +1702,7 @@ KdbpCmdThread(
17021702
Eip = 0;
17031703

17041704
if (Ebp) /* FIXME: Should we attach to the process to read Ebp[1]? */
1705-
KdbpSafeReadMemory(&Eip, Ebp + 1, sizeof (Eip));
1705+
KdbpSafeReadMemory(&Eip, Ebp + 1, sizeof(Eip));
17061706
}
17071707

17081708
if (Thread->Tcb.State < (DeferredReady + 1))
@@ -2688,7 +2688,7 @@ KdbpPrint(
26882688
break;
26892689

26902690
Buffer[Length++] = c;
2691-
if (Length >= (sizeof (Buffer) - 1))
2691+
if (Length >= (sizeof(Buffer) - 1))
26922692
break;
26932693
}
26942694

@@ -2723,7 +2723,7 @@ KdbpPrint(
27232723
break;
27242724

27252725
Buffer[Length++] = c;
2726-
if (isalpha(c) || Length >= (sizeof (Buffer) - 1))
2726+
if (isalpha(c) || Length >= (sizeof(Buffer) - 1))
27272727
break;
27282728
}
27292729

@@ -2762,7 +2762,7 @@ KdbpPrint(
27622762

27632763
/* Get the string */
27642764
va_start(ap, Format);
2765-
Length = _vsnprintf(Buffer, sizeof (Buffer) - 1, Format, ap);
2765+
Length = _vsnprintf(Buffer, sizeof(Buffer) - 1, Format, ap);
27662766
Buffer[Length] = '\0';
27672767
va_end(ap);
27682768

@@ -3005,7 +3005,7 @@ KdbpPager(
30053005
break;
30063006

30073007
InBuffer[Length++] = c;
3008-
if (Length >= (sizeof (InBuffer) - 1))
3008+
if (Length >= (sizeof(InBuffer) - 1))
30093009
break;
30103010
}
30113011

@@ -3040,7 +3040,7 @@ KdbpPager(
30403040
break;
30413041

30423042
InBuffer[Length++] = c;
3043-
if (isalpha(c) || Length >= (sizeof (InBuffer) - 1))
3043+
if (isalpha(c) || Length >= (sizeof(InBuffer) - 1))
30443044
break;
30453045
}
30463046

@@ -3680,7 +3680,7 @@ KdbpCliMainLoop(
36803680
KdbpPrint(KdbPromptString.Buffer);
36813681

36823682
/* Read a command and remember it */
3683-
KdbpReadCommand(Command, sizeof (Command));
3683+
KdbpReadCommand(Command, sizeof(Command));
36843684
KdbpCommandHistoryAppend(Command);
36853685

36863686
/* Reset the number of rows/cols printed and output aborted state */
@@ -3793,7 +3793,7 @@ KdbpCliInit(VOID)
37933793
}
37943794

37953795
/* Get the size of the file */
3796-
Status = ZwQueryInformationFile(hFile, &Iosb, &FileStdInfo, sizeof (FileStdInfo),
3796+
Status = ZwQueryInformationFile(hFile, &Iosb, &FileStdInfo, sizeof(FileStdInfo),
37973797
FileStandardInformation);
37983798
if (!NT_SUCCESS(Status))
37993799
{

0 commit comments

Comments
 (0)