Gerald Pfeifer : msi: Remove an extraneous safety check and simplify deformat_string().
Alexandre Julliard
julliard at winehq.org
Wed Jan 2 07:34:47 CST 2008
Module: wine
Branch: master
Commit: 739152ce3e398e4b8a76cd1f9d585da134e79cbb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=739152ce3e398e4b8a76cd1f9d585da134e79cbb
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Tue Jan 1 18:18:51 2008 +0100
msi: Remove an extraneous safety check and simplify deformat_string().
---
dlls/msi/helpers.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index 172f516..139a447 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -368,18 +368,16 @@ DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data )
MSI_RecordSetStringW(rec,0,ptr);
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 sizeof(WCHAR)*size;
- }
+
+ 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 sizeof(WCHAR)*size;
}
*data = NULL;
More information about the wine-cvs
mailing list