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,20 +1029,14 @@ WCHAR* generate_error_string(MSIPACKAGE *package, UINT error, DWORD count, ... )
va_end(va);
MSI_FormatRecordW(package,rec,NULL,&size);
if (size >= 0)
{
size++;
data = msi_alloc(size*sizeof(WCHAR));
if (size > 1)
MSI_FormatRecordW(package,rec,data,&size);
else
data[0] = 0;
msiobj_release( &rec->hdr );
return data;
}
size++;
data = msi_alloc(size*sizeof(WCHAR));
if (size > 1)
MSI_FormatRecordW(package,rec,data,&size);
else
data[0] = 0;
msiobj_release( &rec->hdr );
data = NULL;
return data;
}