msi: Remove an extraneous safety check and simplify generate_error_string().

This commit is contained in:
Gerald Pfeifer 2008-01-02 16:30:45 +01:00 committed by Alexandre Julliard
parent 257f519eb5
commit bb8471beac
1 changed files with 6 additions and 12 deletions

View File

@ -1029,8 +1029,7 @@ WCHAR* generate_error_string(MSIPACKAGE *package, UINT error, DWORD count, ... )
va_end(va); va_end(va);
MSI_FormatRecordW(package,rec,NULL,&size); MSI_FormatRecordW(package,rec,NULL,&size);
if (size >= 0)
{
size++; size++;
data = msi_alloc(size*sizeof(WCHAR)); data = msi_alloc(size*sizeof(WCHAR));
if (size > 1) if (size > 1)
@ -1041,11 +1040,6 @@ WCHAR* generate_error_string(MSIPACKAGE *package, UINT error, DWORD count, ... )
return data; return data;
} }
msiobj_release( &rec->hdr );
data = NULL;
return data;
}
void msi_ui_error( DWORD msg_id, DWORD type ) void msi_ui_error( DWORD msg_id, DWORD type )
{ {
WCHAR text[2048]; WCHAR text[2048];