mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 18:56:48 +00:00
[USETUP] Simplify code.
svn path=/branches/setup_improvements/; revision=75698
This commit is contained in:
parent
acd933faa0
commit
58e402e08e
1 changed files with 34 additions and 28 deletions
|
@ -337,6 +337,8 @@ CreateComputerTypeList(
|
|||
|
||||
do
|
||||
{
|
||||
BOOLEAN FoundId;
|
||||
|
||||
if (!INF_GetDataField(&Context, 1, &KeyValue))
|
||||
{
|
||||
/* FIXME: Handle error! */
|
||||
|
@ -345,9 +347,12 @@ CreateComputerTypeList(
|
|||
}
|
||||
|
||||
DPRINT("KeyValue: %S\n", KeyValue);
|
||||
if (wcsstr(ComputerIdentifier, KeyValue))
|
||||
{
|
||||
FoundId = !!wcsstr(ComputerIdentifier, KeyValue);
|
||||
INF_FreeData(KeyValue);
|
||||
|
||||
if (!FoundId)
|
||||
continue;
|
||||
|
||||
if (!INF_GetDataField(&Context, 0, &KeyName))
|
||||
{
|
||||
/* FIXME: Handle error! */
|
||||
|
@ -358,8 +363,6 @@ CreateComputerTypeList(
|
|||
DPRINT("Computer key: %S\n", KeyName);
|
||||
wcscpy(ComputerKey, KeyName);
|
||||
INF_FreeData(KeyName);
|
||||
}
|
||||
INF_FreeData(KeyValue);
|
||||
} while (SetupFindNextLine(&Context, &Context));
|
||||
|
||||
List = CreateGenericList();
|
||||
|
@ -594,6 +597,8 @@ CreateDisplayDriverList(
|
|||
|
||||
do
|
||||
{
|
||||
BOOLEAN FoundId;
|
||||
|
||||
if (!INF_GetDataField(&Context, 1, &KeyValue))
|
||||
{
|
||||
/* FIXME: Handle error! */
|
||||
|
@ -602,9 +607,12 @@ CreateDisplayDriverList(
|
|||
}
|
||||
|
||||
DPRINT("KeyValue: %S\n", KeyValue);
|
||||
if (wcsstr(DisplayIdentifier, KeyValue))
|
||||
{
|
||||
FoundId = !!wcsstr(DisplayIdentifier, KeyValue);
|
||||
INF_FreeData(KeyValue);
|
||||
|
||||
if (!FoundId)
|
||||
continue;
|
||||
|
||||
if (!INF_GetDataField(&Context, 0, &KeyName))
|
||||
{
|
||||
/* FIXME: Handle error! */
|
||||
|
@ -615,8 +623,6 @@ CreateDisplayDriverList(
|
|||
DPRINT("Display key: %S\n", KeyName);
|
||||
wcscpy(DisplayKey, KeyName);
|
||||
INF_FreeData(KeyName);
|
||||
}
|
||||
INF_FreeData(KeyValue);
|
||||
} while (SetupFindNextLine(&Context, &Context));
|
||||
|
||||
List = CreateGenericList();
|
||||
|
|
Loading…
Reference in a new issue