Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
064b6fce
Commit
064b6fce
authored
Aug 17, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Aug 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
compobj.c
dlls/ole32/compobj.c
+2
-2
oleproxy.c
dlls/ole32/oleproxy.c
+3
-3
storage32.c
dlls/ole32/storage32.c
+2
-3
No files found.
dlls/ole32/compobj.c
View file @
064b6fce
...
...
@@ -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
)))
{
...
...
dlls/ole32/oleproxy.c
View file @
064b6fce
...
...
@@ -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
;
}
...
...
dlls/ole32/storage32.c
View file @
064b6fce
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment