Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
51854091
Commit
51854091
authored
Jul 21, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Remove redundant variables.
parent
6fb39dfe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
42 deletions
+16
-42
antimoniker.c
dlls/ole32/antimoniker.c
+6
-13
bindctx.c
dlls/ole32/bindctx.c
+3
-10
classmoniker.c
dlls/ole32/classmoniker.c
+1
-3
datacache.c
dlls/ole32/datacache.c
+3
-5
defaulthandler.c
dlls/ole32/defaulthandler.c
+1
-4
filemoniker.c
dlls/ole32/filemoniker.c
+2
-7
No files found.
dlls/ole32/antimoniker.c
View file @
51854091
...
@@ -192,13 +192,9 @@ AntiMonikerImpl_Load(IMoniker* iface,IStream* pStm)
...
@@ -192,13 +192,9 @@ AntiMonikerImpl_Load(IMoniker* iface,IStream* pStm)
static
HRESULT
WINAPI
static
HRESULT
WINAPI
AntiMonikerImpl_Save
(
IMoniker
*
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
AntiMonikerImpl_Save
(
IMoniker
*
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
{
{
DWORD
constant
=
1
;
static
const
DWORD
constant
=
1
;
HRESULT
res
;
/* data written by this function is only a DWORD constant set to 1 ! */
/* data written by this function is only a DWORD constant set to 1 ! */
res
=
IStream_Write
(
pStm
,
&
constant
,
sizeof
(
constant
),
NULL
);
return
IStream_Write
(
pStm
,
&
constant
,
sizeof
(
constant
),
NULL
);
return
res
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -614,9 +610,8 @@ static HRESULT AntiMonikerImpl_Construct(AntiMonikerImpl* This)
...
@@ -614,9 +610,8 @@ static HRESULT AntiMonikerImpl_Construct(AntiMonikerImpl* This)
******************************************************************************/
******************************************************************************/
HRESULT
WINAPI
CreateAntiMoniker
(
LPMONIKER
*
ppmk
)
HRESULT
WINAPI
CreateAntiMoniker
(
LPMONIKER
*
ppmk
)
{
{
AntiMonikerImpl
*
newAntiMoniker
=
0
;
AntiMonikerImpl
*
newAntiMoniker
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
;
IID
riid
=
IID_IMoniker
;
TRACE
(
"(%p)
\n
"
,
ppmk
);
TRACE
(
"(%p)
\n
"
,
ppmk
);
...
@@ -632,9 +627,7 @@ HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk)
...
@@ -632,9 +627,7 @@ HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk)
return
hr
;
return
hr
;
}
}
hr
=
AntiMonikerImpl_QueryInterface
((
IMoniker
*
)
newAntiMoniker
,
&
riid
,(
void
**
)
ppmk
);
return
AntiMonikerImpl_QueryInterface
((
IMoniker
*
)
newAntiMoniker
,
&
IID_IMoniker
,(
void
**
)
ppmk
);
return
hr
;
}
}
static
HRESULT
WINAPI
AntiMonikerCF_QueryInterface
(
LPCLASSFACTORY
iface
,
static
HRESULT
WINAPI
AntiMonikerCF_QueryInterface
(
LPCLASSFACTORY
iface
,
...
@@ -677,7 +670,7 @@ static HRESULT WINAPI AntiMonikerCF_CreateInstance(LPCLASSFACTORY iface,
...
@@ -677,7 +670,7 @@ static HRESULT WINAPI AntiMonikerCF_CreateInstance(LPCLASSFACTORY iface,
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
hr
=
IMoniker_QueryInterface
(
pMoniker
,
riid
,
ppv
);
hr
=
IMoniker_QueryInterface
(
pMoniker
,
riid
,
ppv
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
IMoniker_Release
(
pMoniker
);
IMoniker_Release
(
pMoniker
);
...
...
dlls/ole32/bindctx.c
View file @
51854091
...
@@ -285,8 +285,6 @@ BindCtxImpl_GetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
...
@@ -285,8 +285,6 @@ BindCtxImpl_GetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
static
HRESULT
WINAPI
static
HRESULT
WINAPI
BindCtxImpl_GetRunningObjectTable
(
IBindCtx
*
iface
,
IRunningObjectTable
**
pprot
)
BindCtxImpl_GetRunningObjectTable
(
IBindCtx
*
iface
,
IRunningObjectTable
**
pprot
)
{
{
HRESULT
res
;
BindCtxImpl
*
This
=
(
BindCtxImpl
*
)
iface
;
BindCtxImpl
*
This
=
(
BindCtxImpl
*
)
iface
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
pprot
);
TRACE
(
"(%p,%p)
\n
"
,
This
,
pprot
);
...
@@ -294,9 +292,7 @@ BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot)
...
@@ -294,9 +292,7 @@ BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot)
if
(
pprot
==
NULL
)
if
(
pprot
==
NULL
)
return
E_POINTER
;
return
E_POINTER
;
res
=
GetRunningObjectTable
(
0
,
pprot
);
return
GetRunningObjectTable
(
0
,
pprot
);
return
res
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -555,9 +551,8 @@ static HRESULT BindCtxImpl_Construct(BindCtxImpl* This)
...
@@ -555,9 +551,8 @@ static HRESULT BindCtxImpl_Construct(BindCtxImpl* This)
*/
*/
HRESULT
WINAPI
CreateBindCtx
(
DWORD
reserved
,
LPBC
*
ppbc
)
HRESULT
WINAPI
CreateBindCtx
(
DWORD
reserved
,
LPBC
*
ppbc
)
{
{
BindCtxImpl
*
newBindCtx
=
0
;
BindCtxImpl
*
newBindCtx
;
HRESULT
hr
;
HRESULT
hr
;
IID
riid
=
IID_IBindCtx
;
TRACE
(
"(%d,%p)
\n
"
,
reserved
,
ppbc
);
TRACE
(
"(%d,%p)
\n
"
,
reserved
,
ppbc
);
...
@@ -582,9 +577,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc)
...
@@ -582,9 +577,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc)
return
hr
;
return
hr
;
}
}
hr
=
BindCtxImpl_QueryInterface
((
IBindCtx
*
)
newBindCtx
,
&
riid
,(
void
**
)
ppbc
);
return
BindCtxImpl_QueryInterface
((
IBindCtx
*
)
newBindCtx
,
&
IID_IBindCtx
,(
void
**
)
ppbc
);
return
hr
;
}
}
/******************************************************************************
/******************************************************************************
...
...
dlls/ole32/classmoniker.c
View file @
51854091
...
@@ -210,9 +210,7 @@ static HRESULT WINAPI ClassMoniker_Save(IMoniker* iface,
...
@@ -210,9 +210,7 @@ static HRESULT WINAPI ClassMoniker_Save(IMoniker* iface,
hr
=
IStream_Write
(
pStm
,
&
This
->
clsid
,
sizeof
(
This
->
clsid
),
NULL
);
hr
=
IStream_Write
(
pStm
,
&
This
->
clsid
,
sizeof
(
This
->
clsid
),
NULL
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IStream_Write
(
pStm
,
&
zero
,
sizeof
(
zero
),
NULL
);
return
IStream_Write
(
pStm
,
&
zero
,
sizeof
(
zero
),
NULL
);
return
hr
;
}
}
/******************************************************************************
/******************************************************************************
...
...
dlls/ole32/datacache.c
View file @
51854091
...
@@ -655,17 +655,15 @@ static HRESULT DataCacheEntry_LoadData(DataCacheEntry *This)
...
@@ -655,17 +655,15 @@ static HRESULT DataCacheEntry_LoadData(DataCacheEntry *This)
static
HRESULT
DataCacheEntry_CreateStream
(
DataCacheEntry
*
This
,
static
HRESULT
DataCacheEntry_CreateStream
(
DataCacheEntry
*
This
,
IStorage
*
storage
,
IStream
**
stream
)
IStorage
*
storage
,
IStream
**
stream
)
{
{
HRESULT
hr
;
WCHAR
wszName
[]
=
{
2
,
'O'
,
'l'
,
'e'
,
'P'
,
'r'
,
'e'
,
's'
,
WCHAR
wszName
[]
=
{
2
,
'O'
,
'l'
,
'e'
,
'P'
,
'r'
,
'e'
,
's'
,
'0'
+
(
This
->
stream_number
/
100
)
%
10
,
'0'
+
(
This
->
stream_number
/
100
)
%
10
,
'0'
+
(
This
->
stream_number
/
10
)
%
10
,
'0'
+
(
This
->
stream_number
/
10
)
%
10
,
'0'
+
This
->
stream_number
%
10
,
0
};
'0'
+
This
->
stream_number
%
10
,
0
};
/* FIXME: cache the created stream in This? */
/* FIXME: cache the created stream in This? */
hr
=
IStorage_CreateStream
(
storage
,
wszName
,
return
IStorage_CreateStream
(
storage
,
wszName
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
|
STGM_CREATE
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
|
STGM_CREATE
,
0
,
0
,
stream
);
0
,
0
,
stream
);
return
hr
;
}
}
static
HRESULT
DataCacheEntry_Save
(
DataCacheEntry
*
This
,
IStorage
*
storage
,
static
HRESULT
DataCacheEntry_Save
(
DataCacheEntry
*
This
,
IStorage
*
storage
,
...
...
dlls/ole32/defaulthandler.c
View file @
51854091
...
@@ -1146,14 +1146,11 @@ static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
...
@@ -1146,14 +1146,11 @@ static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
DWORD
dwDirection
,
DWORD
dwDirection
,
IEnumFORMATETC
**
ppenumFormatEtc
)
IEnumFORMATETC
**
ppenumFormatEtc
)
{
{
HRESULT
hres
;
DefaultHandler
*
This
=
impl_from_IDataObject
(
iface
);
DefaultHandler
*
This
=
impl_from_IDataObject
(
iface
);
TRACE
(
"(%p, %x, %p)
\n
"
,
iface
,
dwDirection
,
ppenumFormatEtc
);
TRACE
(
"(%p, %x, %p)
\n
"
,
iface
,
dwDirection
,
ppenumFormatEtc
);
hres
=
OleRegEnumFormatEtc
(
&
This
->
clsid
,
dwDirection
,
ppenumFormatEtc
);
return
OleRegEnumFormatEtc
(
&
This
->
clsid
,
dwDirection
,
ppenumFormatEtc
);
return
hres
;
}
}
/************************************************************************
/************************************************************************
...
...
dlls/ole32/filemoniker.c
View file @
51854091
...
@@ -421,10 +421,7 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
...
@@ -421,10 +421,7 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
}
}
if
(
!
bWriteWide
)
if
(
!
bWriteWide
)
{
return
IStream_Write
(
pStm
,
&
ZERO
,
sizeof
(
DWORD
),
NULL
);
res
=
IStream_Write
(
pStm
,
&
ZERO
,
sizeof
(
DWORD
),
NULL
);
return
res
;
}
/* write bytes needed for the filepathW (without 0) + 6 */
/* write bytes needed for the filepathW (without 0) + 6 */
bytesW
=
len
*
sizeof
(
WCHAR
)
+
6
;
bytesW
=
len
*
sizeof
(
WCHAR
)
+
6
;
...
@@ -441,9 +438,7 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
...
@@ -441,9 +438,7 @@ FileMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty)
if
(
FAILED
(
res
))
return
res
;
if
(
FAILED
(
res
))
return
res
;
/* write W string (no 0) */
/* write W string (no 0) */
res
=
IStream_Write
(
pStm
,
filePathW
,
bytesW
,
NULL
);
return
IStream_Write
(
pStm
,
filePathW
,
bytesW
,
NULL
);
return
res
;
}
}
/******************************************************************************
/******************************************************************************
...
...
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