Take advantage of the msi_get_deformatted_field function to simplify
some code.
This commit is contained in:
parent
216a4427d5
commit
67f83ba7e5
|
@ -625,7 +625,6 @@ static LPWSTR msi_get_checkbox_value( msi_dialog *dialog, LPCWSTR prop )
|
||||||
'\'','%','s','\'',0
|
'\'','%','s','\'',0
|
||||||
};
|
};
|
||||||
MSIRECORD *rec = NULL;
|
MSIRECORD *rec = NULL;
|
||||||
LPCWSTR val = NULL;
|
|
||||||
LPWSTR ret = NULL;
|
LPWSTR ret = NULL;
|
||||||
|
|
||||||
/* find if there is a value associated with the checkbox */
|
/* find if there is a value associated with the checkbox */
|
||||||
|
@ -633,16 +632,12 @@ static LPWSTR msi_get_checkbox_value( msi_dialog *dialog, LPCWSTR prop )
|
||||||
if (!rec)
|
if (!rec)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
val = MSI_RecordGetString( rec, 2 );
|
ret = msi_get_deformatted_field( dialog->package, rec, 2 );
|
||||||
if (val)
|
|
||||||
{
|
|
||||||
deformat_string( dialog->package, val, &ret );
|
|
||||||
if( ret && !ret[0] )
|
if( ret && !ret[0] )
|
||||||
{
|
{
|
||||||
msi_free( ret );
|
msi_free( ret );
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
msiobj_release( &rec->hdr );
|
msiobj_release( &rec->hdr );
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue