Michael Stefaniuc : ole32: Use IsEqualIID instead of memcmp to compare REFIIDs.

Alexandre Julliard julliard at winehq.org
Fri Jul 23 10:05:44 CDT 2010


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Fri Jul 23 11:30:00 2010 +0200

ole32: Use IsEqualIID instead of memcmp to compare REFIIDs.

---

 dlls/ole32/datacache.c |    3 +--
 dlls/ole32/oleobj.c    |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index 1c7be2b..2f26363 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -2284,8 +2284,7 @@ HRESULT WINAPI CreateDataCache(
    * This is necessary because it's the only time the non-delegating
    * IUnknown pointer can be returned to the outside.
    */
-  if ( (pUnkOuter!=NULL) &&
-       (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) != 0) )
+  if ( pUnkOuter && !IsEqualIID(&IID_IUnknown, riid) )
     return CLASS_E_NOAGGREGATION;
 
   /*
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index 584e796..7e131ae 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -615,8 +615,8 @@ static HRESULT WINAPI DataAdviseHolder_QueryInterface(
   /*
    * Compare the riid with the interface IDs implemented by this object.
    */
-  if ( (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0) ||
-       (memcmp(&IID_IDataAdviseHolder, riid, sizeof(IID_IDataAdviseHolder)) == 0)  )
+  if ( IsEqualIID(&IID_IUnknown, riid) ||
+       IsEqualIID(&IID_IDataAdviseHolder, riid)  )
   {
     *ppvObject = iface;
   }




More information about the wine-cvs mailing list