Skip to content

Commit 0ac202c

Browse files
binarymasterdisean
andauthored
Apply suggestion from @disean
Co-authored-by: Dmitry Borisov <di.sean@protonmail.com>
1 parent 1691c8d commit 0ac202c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

ntoskrnl/config/cmconfig.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,8 @@ CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
395395
if (LoaderBlock->ConfigurationRoot)
396396
{
397397
#ifdef _M_IX86
398-
/* Set the alternative system architecture information */
399-
const CHAR SystemId_PC98[] = "NEC PC-98";
400-
401398
PCONFIGURATION_COMPONENT_DATA ConfigData;
399+
402400
ConfigData = KeFindConfigurationEntry(LoaderBlock->ConfigurationRoot,
403401
SystemClass,
404402
MaximumType,
@@ -407,9 +405,9 @@ CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
407405
{
408406
/* Check if the system identifier starts with a known string.
409407
* Set kernel flags and initialize variables accordingly. */
410-
if (RtlCompareMemory(ConfigData->ComponentEntry.Identifier,
411-
SystemId_PC98,
412-
sizeof(SystemId_PC98) - 1) == sizeof(SystemId_PC98) - 1)
408+
if (!strncmp(ConfigData->ComponentEntry.Identifier,
409+
"NEC PC-98",
410+
sizeof("NEC PC-98") - 1))
413411
{
414412
/* Running on a NEC PC-9800 or compatible */
415413
KeI386MachineType |= 0x100; /* Should probably be one of MACHINE_TYPE_* consts */

0 commit comments

Comments
 (0)