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
448a44ca
Commit
448a44ca
authored
Apr 19, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Simplify IEnumSTATSTG initialization.
parent
3b956880
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
26 deletions
+10
-26
storage32.c
dlls/ole32/storage32.c
+10
-26
No files found.
dlls/ole32/storage32.c
View file @
448a44ca
...
...
@@ -732,9 +732,6 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
if
(
newEnum
)
{
*
ppenum
=
&
newEnum
->
IEnumSTATSTG_iface
;
IEnumSTATSTG_AddRef
(
*
ppenum
);
return
S_OK
;
}
...
...
@@ -5599,36 +5596,30 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Clone(
IEnumSTATSTG
**
ppenum
)
{
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
);
IEnumSTATSTGImpl
*
newClone
;
if
(
This
->
parentStorage
->
reverted
)
return
STG_E_REVERTED
;
/*
* Perform a sanity check on the parameters.
*/
if
(
ppenum
==
0
)
return
E_INVALIDARG
;
newClone
=
IEnumSTATSTGImpl_Construct
(
This
->
parentStorage
,
This
->
storageDirEntry
);
if
(
!
newClone
)
{
*
ppenum
=
NULL
;
return
E_OUTOFMEMORY
;
}
/*
* The new clone enumeration must point to the same current node as
* the ol
e
one.
* the ol
d
one.
*/
memcpy
(
newClone
->
name
,
This
->
name
,
sizeof
(
newClone
->
name
));
*
ppenum
=
&
newClone
->
IEnumSTATSTG_iface
;
/*
* Don't forget to nail down a reference to the clone before
* returning it.
*/
IEnumSTATSTGImpl_AddRef
(
*
ppenum
);
return
S_OK
;
}
...
...
@@ -5658,13 +5649,11 @@ static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
newEnumeration
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IEnumSTATSTGImpl
));
if
(
newEnumeration
!=
0
)
if
(
newEnumeration
)
{
/*
* Set-up the virtual function table and reference count.
*/
newEnumeration
->
IEnumSTATSTG_iface
.
lpVtbl
=
&
IEnumSTATSTGImpl_Vtbl
;
newEnumeration
->
ref
=
0
;
newEnumeration
->
ref
=
1
;
newEnumeration
->
name
[
0
]
=
0
;
/*
* We want to nail-down the reference to the storage in case the
...
...
@@ -5673,12 +5662,7 @@ static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
newEnumeration
->
parentStorage
=
parentStorage
;
IStorage_AddRef
(
&
newEnumeration
->
parentStorage
->
IStorage_iface
);
newEnumeration
->
storageDirEntry
=
storageDirEntry
;
/*
* Make sure the current node of the iterator is the first one.
*/
IEnumSTATSTGImpl_Reset
(
&
newEnumeration
->
IEnumSTATSTG_iface
);
newEnumeration
->
storageDirEntry
=
storageDirEntry
;
}
return
newEnumeration
;
...
...
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