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
|
do
|
||||||
{
|
{
|
||||||
|
BOOLEAN FoundId;
|
||||||
|
|
||||||
if (!INF_GetDataField(&Context, 1, &KeyValue))
|
if (!INF_GetDataField(&Context, 1, &KeyValue))
|
||||||
{
|
{
|
||||||
/* FIXME: Handle error! */
|
/* FIXME: Handle error! */
|
||||||
|
@ -345,21 +347,22 @@ CreateComputerTypeList(
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("KeyValue: %S\n", KeyValue);
|
DPRINT("KeyValue: %S\n", KeyValue);
|
||||||
if (wcsstr(ComputerIdentifier, KeyValue))
|
FoundId = !!wcsstr(ComputerIdentifier, KeyValue);
|
||||||
{
|
|
||||||
INF_FreeData(KeyValue);
|
|
||||||
if (!INF_GetDataField(&Context, 0, &KeyName))
|
|
||||||
{
|
|
||||||
/* FIXME: Handle error! */
|
|
||||||
DPRINT("INF_GetDataField() failed\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DPRINT("Computer key: %S\n", KeyName);
|
|
||||||
wcscpy(ComputerKey, KeyName);
|
|
||||||
INF_FreeData(KeyName);
|
|
||||||
}
|
|
||||||
INF_FreeData(KeyValue);
|
INF_FreeData(KeyValue);
|
||||||
|
|
||||||
|
if (!FoundId)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!INF_GetDataField(&Context, 0, &KeyName))
|
||||||
|
{
|
||||||
|
/* FIXME: Handle error! */
|
||||||
|
DPRINT("INF_GetDataField() failed\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT("Computer key: %S\n", KeyName);
|
||||||
|
wcscpy(ComputerKey, KeyName);
|
||||||
|
INF_FreeData(KeyName);
|
||||||
} while (SetupFindNextLine(&Context, &Context));
|
} while (SetupFindNextLine(&Context, &Context));
|
||||||
|
|
||||||
List = CreateGenericList();
|
List = CreateGenericList();
|
||||||
|
@ -594,6 +597,8 @@ CreateDisplayDriverList(
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
BOOLEAN FoundId;
|
||||||
|
|
||||||
if (!INF_GetDataField(&Context, 1, &KeyValue))
|
if (!INF_GetDataField(&Context, 1, &KeyValue))
|
||||||
{
|
{
|
||||||
/* FIXME: Handle error! */
|
/* FIXME: Handle error! */
|
||||||
|
@ -602,21 +607,22 @@ CreateDisplayDriverList(
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("KeyValue: %S\n", KeyValue);
|
DPRINT("KeyValue: %S\n", KeyValue);
|
||||||
if (wcsstr(DisplayIdentifier, KeyValue))
|
FoundId = !!wcsstr(DisplayIdentifier, KeyValue);
|
||||||
{
|
|
||||||
INF_FreeData(KeyValue);
|
|
||||||
if (!INF_GetDataField(&Context, 0, &KeyName))
|
|
||||||
{
|
|
||||||
/* FIXME: Handle error! */
|
|
||||||
DPRINT("INF_GetDataField() failed\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DPRINT("Display key: %S\n", KeyName);
|
|
||||||
wcscpy(DisplayKey, KeyName);
|
|
||||||
INF_FreeData(KeyName);
|
|
||||||
}
|
|
||||||
INF_FreeData(KeyValue);
|
INF_FreeData(KeyValue);
|
||||||
|
|
||||||
|
if (!FoundId)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!INF_GetDataField(&Context, 0, &KeyName))
|
||||||
|
{
|
||||||
|
/* FIXME: Handle error! */
|
||||||
|
DPRINT("INF_GetDataField() failed\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT("Display key: %S\n", KeyName);
|
||||||
|
wcscpy(DisplayKey, KeyName);
|
||||||
|
INF_FreeData(KeyName);
|
||||||
} while (SetupFindNextLine(&Context, &Context));
|
} while (SetupFindNextLine(&Context, &Context));
|
||||||
|
|
||||||
List = CreateGenericList();
|
List = CreateGenericList();
|
||||||
|
|
Loading…
Reference in a new issue