msi: Remove redundant null checks before MSI_EvaluateCondition.
This commit is contained in:
parent
b0499bf71b
commit
9375fd9fd3
|
@ -700,12 +700,10 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq, BOOL UI)
|
||||||
|
|
||||||
/* check conditions */
|
/* check conditions */
|
||||||
cond = MSI_RecordGetString(row,2);
|
cond = MSI_RecordGetString(row,2);
|
||||||
if (cond)
|
|
||||||
{
|
|
||||||
/* this is a hack to skip errors in the condition code */
|
/* this is a hack to skip errors in the condition code */
|
||||||
if (MSI_EvaluateConditionW(package, cond) == MSICONDITION_FALSE)
|
if (MSI_EvaluateConditionW(package, cond) == MSICONDITION_FALSE)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
|
||||||
|
|
||||||
action = MSI_RecordGetString(row,1);
|
action = MSI_RecordGetString(row,1);
|
||||||
if (!action)
|
if (!action)
|
||||||
|
@ -748,16 +746,13 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
|
||||||
|
|
||||||
/* check conditions */
|
/* check conditions */
|
||||||
cond = MSI_RecordGetString(row,2);
|
cond = MSI_RecordGetString(row,2);
|
||||||
if (cond)
|
|
||||||
{
|
|
||||||
/* this is a hack to skip errors in the condition code */
|
/* this is a hack to skip errors in the condition code */
|
||||||
if (MSI_EvaluateConditionW(iap->package, cond) == MSICONDITION_FALSE)
|
if (MSI_EvaluateConditionW(iap->package, cond) == MSICONDITION_FALSE)
|
||||||
{
|
{
|
||||||
TRACE("Skipping action: %s (condition is false)\n",
|
TRACE("Skipping action: %s (condition is false)\n", debugstr_w(action));
|
||||||
debugstr_w(action));
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (iap->UI)
|
if (iap->UI)
|
||||||
rc = ACTION_PerformUIAction(iap->package,action);
|
rc = ACTION_PerformUIAction(iap->package,action);
|
||||||
|
@ -2044,16 +2039,12 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
|
||||||
TRACE("Enabling or Disabling Components\n");
|
TRACE("Enabling or Disabling Components\n");
|
||||||
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
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));
|
TRACE("Disabling component %s\n", debugstr_w(comp->Component));
|
||||||
comp->Enabled = FALSE;
|
comp->Enabled = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MSI_SetPropertyW(package,szCosting,szOne);
|
MSI_SetPropertyW(package,szCosting,szOne);
|
||||||
/* set default run level if not set */
|
/* set default run level if not set */
|
||||||
|
|
Loading…
Reference in New Issue