Nikolay Sivov : oleaut32: Use better naming to clarify copy direction.

Alexandre Julliard julliard at winehq.org
Tue Feb 25 16:58:15 CST 2014


Module: wine
Branch: master
Commit: efa2905cf86009a12bd969ec98f42b5e16a7aa79
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=efa2905cf86009a12bd969ec98f42b5e16a7aa79

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Feb 25 08:43:28 2014 +0400

oleaut32: Use better naming to clarify copy direction.

---

 dlls/oleaut32/recinfo.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/dlls/oleaut32/recinfo.c b/dlls/oleaut32/recinfo.c
index 69c973c..02ba61f 100644
--- a/dlls/oleaut32/recinfo.c
+++ b/dlls/oleaut32/recinfo.c
@@ -266,20 +266,19 @@ static HRESULT WINAPI IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvEx
     return S_OK;
 }
 
-static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExisting,
-                                                PVOID pvNew)
+static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, void *src_rec, void *dest_rec)
 {
     IRecordInfoImpl *This = impl_from_IRecordInfo(iface);
     HRESULT hr = S_OK;
     int i;
 
-    TRACE("(%p)->(%p %p)\n", This, pvExisting, pvNew);
+    TRACE("(%p)->(%p %p)\n", This, src_rec, dest_rec);
 
-    if(!pvExisting || !pvNew)
+    if(!src_rec || !dest_rec)
         return E_INVALIDARG;
 
     /* release already stored data */
-    IRecordInfo_RecordClear(iface, pvNew);
+    IRecordInfo_RecordClear(iface, dest_rec);
 
     for (i = 0; i < This->n_vars; i++)
     {
@@ -290,8 +289,8 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExi
             continue;
         }
 
-        src  = ((BYTE*)pvExisting) + This->fields[i].offset;
-        dest = ((BYTE*)pvNew) + This->fields[i].offset;
+        src  = ((BYTE*)src_rec) + This->fields[i].offset;
+        dest = ((BYTE*)dest_rec) + This->fields[i].offset;
         switch (This->fields[i].vt)
         {
             case VT_BSTR:
@@ -333,7 +332,7 @@ static HRESULT WINAPI IRecordInfoImpl_RecordCopy(IRecordInfo *iface, PVOID pvExi
     }
 
     if (FAILED(hr))
-        IRecordInfo_RecordClear(iface, pvNew);
+        IRecordInfo_RecordClear(iface, dest_rec);
 
     return hr;
 }




More information about the wine-cvs mailing list