From 91e4394c1b9a3e9e8f785c895bde9259787990dd Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 23 Jun 2015 19:59:40 +0300 Subject: [PATCH] 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 b92e52f5b5e..c132c7ea78a 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 fda7a01b2ea..f6891e3af71 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;