Commit bb8471be authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

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

parent 257f519e
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment