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
ba999f05
Commit
ba999f05
authored
Aug 18, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Test HRESULT values using proper success code.
parent
2f21130f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
compobj.c
dlls/ole32/compobj.c
+2
-2
git.c
dlls/ole32/git.c
+1
-1
rpc.c
dlls/ole32/rpc.c
+9
-8
No files found.
dlls/ole32/compobj.c
View file @
ba999f05
...
...
@@ -2910,7 +2910,7 @@ HRESULT WINAPI CoCreateInstance(
{
IGlobalInterfaceTable
*
git
=
get_std_git
();
hres
=
IGlobalInterfaceTable_QueryInterface
(
git
,
iid
,
ppv
);
if
(
hres
)
return
hres
;
if
(
hres
!=
S_OK
)
return
hres
;
TRACE
(
"Retrieved GIT (%p)
\n
"
,
*
ppv
);
return
S_OK
;
...
...
@@ -2992,7 +2992,7 @@ HRESULT WINAPI CoCreateInstanceEx(
&
IID_IUnknown
,
(
VOID
**
)
&
pUnk
);
if
(
hr
)
if
(
hr
!=
S_OK
)
return
hr
;
/*
...
...
dlls/ole32/git.c
View file @
ba999f05
...
...
@@ -296,7 +296,7 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
hres
=
CoUnmarshalInterface
(
stream
,
riid
,
ppv
);
IStream_Release
(
stream
);
if
(
hres
)
{
if
(
hres
!=
S_OK
)
{
WARN
(
"Failed to unmarshal stream
\n
"
);
return
hres
;
}
...
...
dlls/ole32/rpc.c
View file @
ba999f05
...
...
@@ -1519,7 +1519,7 @@ static void __RPC_STUB dispatch_rpc(RPC_MESSAGE *msg)
/* if IRpcStubBuffer_Invoke fails, we should raise an exception to tell
* the RPC runtime that the call failed */
if
(
hr
)
RpcRaiseException
(
hr
);
if
(
hr
!=
S_OK
)
RpcRaiseException
(
hr
);
}
/* stub registration */
...
...
@@ -1656,6 +1656,7 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
DWORD
size
=
(
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
);
STARTUPINFOW
sinfo
;
PROCESS_INFORMATION
pinfo
;
LONG
ret
;
hres
=
COM_OpenKeyForCLSID
(
rclsid
,
wszLocalServer32
,
KEY_READ
,
&
key
);
if
(
FAILED
(
hres
))
{
...
...
@@ -1663,9 +1664,9 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
return
hres
;
}
hres
=
RegQueryValueExW
(
key
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
command
,
&
size
);
ret
=
RegQueryValueExW
(
key
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
command
,
&
size
);
RegCloseKey
(
key
);
if
(
hres
)
{
if
(
ret
)
{
WARN
(
"No default value for LocalServer32 key
\n
"
);
return
REGDB_E_CLASSNOTREG
;
/* FIXME: check retval */
}
...
...
@@ -1861,9 +1862,9 @@ HRESULT RPC_GetLocalClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
return
E_NOINTERFACE
;
hres
=
CreateStreamOnHGlobal
(
0
,
TRUE
,
&
pStm
);
if
(
hres
)
return
hres
;
if
(
hres
!=
S_OK
)
return
hres
;
hres
=
IStream_Write
(
pStm
,
marshalbuffer
,
bufferlen
,
&
res
);
if
(
hres
)
goto
out
;
if
(
hres
!=
S_OK
)
goto
out
;
seekto
.
u
.
LowPart
=
0
;
seekto
.
u
.
HighPart
=
0
;
hres
=
IStream_Seek
(
pStm
,
seekto
,
STREAM_SEEK_SET
,
&
newpos
);
...
...
@@ -1935,13 +1936,13 @@ static DWORD WINAPI local_server_thread(LPVOID param)
TRACE
(
"marshalling LocalServer to client
\n
"
);
hres
=
IStream_Stat
(
pStm
,
&
ststg
,
STATFLAG_NONAME
);
if
(
hres
)
if
(
hres
!=
S_OK
)
break
;
seekto
.
u
.
LowPart
=
0
;
seekto
.
u
.
HighPart
=
0
;
hres
=
IStream_Seek
(
pStm
,
seekto
,
STREAM_SEEK_SET
,
&
newpos
);
if
(
hres
)
{
if
(
hres
!=
S_OK
)
{
FIXME
(
"IStream_Seek failed, %x
\n
"
,
hres
);
break
;
}
...
...
@@ -1950,7 +1951,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buflen
);
hres
=
IStream_Read
(
pStm
,
buffer
,
buflen
,
&
res
);
if
(
hres
)
{
if
(
hres
!=
S_OK
)
{
FIXME
(
"Stream Read failed, %x
\n
"
,
hres
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
break
;
...
...
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