From 13af267e75fae8be2da63c2f5a4a739c8e4ea252 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 14 Sep 2016 10:06:09 +0200 Subject: [PATCH] msi: Use proper return types in MSI_RecordSetStreamFromFileW. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- 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 88d94a9da1d..51e7a23a45c 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);