Gerald Pfeifer : msi: Remove an extraneous safety check and simplify generate_error_string().
Alexandre Julliard
julliard at winehq.org
Thu Jan 3 06:43:42 CST 2008
Module: wine
Branch: master
Commit: bb8471beace7ab1baf610837c22fd7b3ff30d863
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb8471beace7ab1baf610837c22fd7b3ff30d863
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Wed Jan 2 16:30:45 2008 +0100
msi: Remove an extraneous safety check and simplify generate_error_string().
---
dlls/msi/helpers.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index 139a447..90055a1 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -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;
}
More information about the wine-cvs
mailing list