msi: Remove redundant null checks before MSI_EvaluateCondition.

This commit is contained in:
Mike McCormack 2006-10-27 17:29:02 +09:00 committed by Alexandre Julliard
parent b0499bf71b
commit 9375fd9fd3
1 changed files with 13 additions and 22 deletions

View File

@ -700,12 +700,10 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq, BOOL UI)
/* check conditions */
cond = MSI_RecordGetString(row,2);
if (cond)
{
/* this is a hack to skip errors in the condition code */
if (MSI_EvaluateConditionW(package, cond) == MSICONDITION_FALSE)
goto end;
}
action = MSI_RecordGetString(row,1);
if (!action)
@ -748,16 +746,13 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
/* check conditions */
cond = MSI_RecordGetString(row,2);
if (cond)
{
/* this is a hack to skip errors in the condition code */
if (MSI_EvaluateConditionW(iap->package, cond) == MSICONDITION_FALSE)
{
TRACE("Skipping action: %s (condition is false)\n",
debugstr_w(action));
TRACE("Skipping action: %s (condition is false)\n", debugstr_w(action));
return ERROR_SUCCESS;
}
}
if (iap->UI)
rc = ACTION_PerformUIAction(iap->package,action);
@ -2044,16 +2039,12 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
TRACE("Enabling or Disabling Components\n");
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{
if (comp->Condition)
{
if (MSI_EvaluateConditionW(package,
comp->Condition) == MSICONDITION_FALSE)
if (MSI_EvaluateConditionW(package, comp->Condition) == MSICONDITION_FALSE)
{
TRACE("Disabling component %s\n", debugstr_w(comp->Component));
comp->Enabled = FALSE;
}
}
}
MSI_SetPropertyW(package,szCosting,szOne);
/* set default run level if not set */