Commit 064b6fce authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Fix testing of HRESULT types with not operator instead of comparing against S_OK.

This makes it more obvious what the code is doing.
parent cda469c8
......@@ -1391,7 +1391,7 @@ HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
return ret;
ret=WINE_StringFromCLSID(id,buf);
if (!ret) {
if (ret == S_OK) {
DWORD len = MultiByteToWideChar( CP_ACP, 0, buf, -1, NULL, 0 );
*idstr = IMalloc_Alloc( mllc, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, buf, -1, *idstr, len );
......@@ -2806,7 +2806,7 @@ HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
if (!memcmp( clsidOld, clsidNew, sizeof(*clsidOld) ))
{
if (!RegQueryValueW(hkey, wszAutoTreatAs, auto_treat_as, &auto_treat_as_size) &&
!CLSIDFromString(auto_treat_as, &id))
CLSIDFromString(auto_treat_as, &id) == S_OK)
{
if (RegSetValueW(hkey, wszTreatAs, REG_SZ, auto_treat_as, sizeof(auto_treat_as)))
{
......
......@@ -585,7 +585,7 @@ static HRESULT WINAPI RemUnkStub_Invoke(LPRPCSTUBBUFFER iface,
pMsg->cbBuffer = cIids * sizeof(HRESULT);
IRpcChannelBuffer_GetBuffer(pChannel, pMsg, &IID_IRemUnknown);
if (!hr)
if (hr == S_OK)
{
buf = pMsg->Buffer;
memcpy(buf, pResults, cIids * sizeof(HRESULT));
......@@ -964,12 +964,12 @@ PSFacBuf_CreateStub(
if (IsEqualIID(&IID_IClassFactory, riid) ||
IsEqualIID(&IID_IUnknown, riid) /* FIXME: fixup stub manager and remove this*/) {
hres = CFStub_Construct(ppStub);
if (!hres)
if (hres == S_OK)
IRpcStubBuffer_Connect((*ppStub),pUnkServer);
return hres;
} else if (IsEqualIID(&IID_IRemUnknown,riid)) {
hres = RemUnkStub_Construct(ppStub);
if (!hres)
if (hres == S_OK)
IRpcStubBuffer_Connect((*ppStub),pUnkServer);
return hres;
}
......
......@@ -2100,7 +2100,6 @@ static HRESULT findPlaceholder(
INT typeOfRelation)
{
StgProperty storeProperty;
HRESULT hr = S_OK;
BOOL res = TRUE;
/*
......@@ -2162,12 +2161,12 @@ static HRESULT findPlaceholder(
}
}
hr = StorageImpl_WriteProperty(
res = StorageImpl_WriteProperty(
storage->base.ancestorStorage,
storePropertyIndex,
&storeProperty);
if(! hr)
if(!res)
{
return E_FAIL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment