Module: wine Branch: master Commit: 91e4394c1b9a3e9e8f785c895bde9259787990dd URL: http://source.winehq.org/git/wine.git/?a=commit;h=91e4394c1b9a3e9e8f785c895b...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue Jun 23 19:59:40 2015 +0300
qmgr: Simplify GetProgress() with a structure copy.
---
dlls/qmgr/file.c | 4 +--- dlls/qmgr/job.c | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/qmgr/file.c b/dlls/qmgr/file.c index b92e52f..c132c7e 100644 --- a/dlls/qmgr/file.c +++ b/dlls/qmgr/file.c @@ -122,9 +122,7 @@ static HRESULT WINAPI BackgroundCopyFile_GetProgress( TRACE("(%p)->(%p)\n", file, pVal);
EnterCriticalSection(&file->owner->cs); - pVal->BytesTotal = file->fileProgress.BytesTotal; - pVal->BytesTransferred = file->fileProgress.BytesTransferred; - pVal->Completed = file->fileProgress.Completed; + *pVal = file->fileProgress; LeaveCriticalSection(&file->owner->cs);
return S_OK; diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index fda7a01..f6891e3 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -506,10 +506,7 @@ static HRESULT WINAPI BackgroundCopyJob_GetProgress( return E_INVALIDARG;
EnterCriticalSection(&This->cs); - pVal->BytesTotal = This->jobProgress.BytesTotal; - pVal->BytesTransferred = This->jobProgress.BytesTransferred; - pVal->FilesTotal = This->jobProgress.FilesTotal; - pVal->FilesTransferred = This->jobProgress.FilesTransferred; + *pVal = This->jobProgress; LeaveCriticalSection(&This->cs);
return S_OK;