msi: Use proper return types in MSI_RecordSetStreamFromFileW.
Hans Leidekker
hans at codeweavers.com
Wed Sep 14 03:06:09 CDT 2016
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/msi/record.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index 88d94a9..51e7a23 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -727,7 +727,8 @@ UINT MSI_RecordSetStream(MSIRECORD *rec, UINT iField, IStream *stream)
UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilename)
{
IStream *stm = NULL;
- HRESULT r;
+ HRESULT hr;
+ UINT ret;
if( (iField == 0) || (iField > rec->count) )
return ERROR_INVALID_PARAMETER;
@@ -746,16 +747,16 @@ UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilenam
return ERROR_INVALID_FIELD;
ofs.QuadPart = 0;
- r = IStream_Seek( stm, ofs, STREAM_SEEK_SET, &cur );
- if( FAILED( r ) )
+ hr = IStream_Seek( stm, ofs, STREAM_SEEK_SET, &cur );
+ if (FAILED( hr ))
return ERROR_FUNCTION_FAILED;
}
else
{
/* read the file into a stream and save the stream in the record */
- r = RECORD_StreamFromFile(szFilename, &stm);
- if( r != ERROR_SUCCESS )
- return r;
+ ret = RECORD_StreamFromFile(szFilename, &stm);
+ if (ret != ERROR_SUCCESS)
+ return ret;
/* if all's good, store it in the record */
MSI_RecordSetStream(rec, iField, stm);
--
2.1.4
More information about the wine-patches
mailing list