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
4bb61ec0
Commit
4bb61ec0
authored
Oct 15, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use BOOL type where appropriate.
parent
06a66688
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
40 deletions
+39
-40
bindctx.c
dlls/ole32/bindctx.c
+3
-4
filemoniker.c
dlls/ole32/filemoniker.c
+6
-6
ifs.c
dlls/ole32/ifs.c
+16
-16
storage32.c
dlls/ole32/storage32.c
+10
-10
storage32.h
dlls/ole32/storage32.h
+3
-3
stubmanager.c
dlls/ole32/stubmanager.c
+1
-1
No files found.
dlls/ole32/bindctx.c
View file @
4bb61ec0
...
...
@@ -432,9 +432,8 @@ static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl* This,
LPOLESTR
pszkey
,
DWORD
*
index
)
{
DWORD
i
;
B
YTE
found
=
0
;
B
OOL
found
=
FALSE
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
punk
,
pszkey
,
index
);
...
...
@@ -451,14 +450,14 @@ static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl* This,
)
)
found
=
1
;
found
=
TRUE
;
}
}
else
/* search object identified by a moniker*/
for
(
i
=
0
;
(
(
i
<
This
->
bindCtxTableLastIndex
)
&&
(
!
found
));
i
++
)
if
(
This
->
bindCtxTable
[
i
].
pObj
==
punk
)
found
=
1
;
found
=
TRUE
;
if
(
index
!=
NULL
)
*
index
=
i
-
1
;
...
...
dlls/ole32/filemoniker.c
View file @
4bb61ec0
...
...
@@ -1360,7 +1360,7 @@ static HRESULT FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPa
LPOLESTR
*
tabStr
=
0
;
static
const
WCHAR
twoPoint
[]
=
{
'.'
,
'.'
,
0
};
static
const
WCHAR
bkSlash
[]
=
{
'\\'
,
0
};
B
YTE
addBkSlash
;
B
OOL
addBkSlash
;
TRACE
(
"(%p,%s)
\n
"
,
This
,
debugstr_w
(
lpszPathName
));
...
...
@@ -1381,14 +1381,14 @@ static HRESULT FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPa
if
(
nb
>
0
){
addBkSlash
=
1
;
addBkSlash
=
TRUE
;
if
(
lstrcmpW
(
tabStr
[
0
],
twoPoint
)
!=
0
)
addBkSlash
=
0
;
addBkSlash
=
FALSE
;
else
for
(
i
=
0
;
i
<
nb
;
i
++
){
if
(
(
lstrcmpW
(
tabStr
[
i
],
twoPoint
)
!=
0
)
&&
(
lstrcmpW
(
tabStr
[
i
],
bkSlash
)
!=
0
)
){
addBkSlash
=
0
;
addBkSlash
=
FALSE
;
break
;
}
else
...
...
@@ -1396,13 +1396,13 @@ static HRESULT FileMonikerImpl_Construct(FileMonikerImpl* This, LPCOLESTR lpszPa
if
(
lstrcmpW
(
tabStr
[
i
],
bkSlash
)
==
0
&&
i
<
nb
-
1
&&
lstrcmpW
(
tabStr
[
i
+
1
],
bkSlash
)
==
0
){
*
tabStr
[
i
]
=
0
;
sizeStr
--
;
addBkSlash
=
0
;
addBkSlash
=
FALSE
;
break
;
}
}
if
(
lstrcmpW
(
tabStr
[
nb
-
1
],
bkSlash
)
==
0
)
addBkSlash
=
0
;
addBkSlash
=
FALSE
;
This
->
filePathName
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
filePathName
,(
sizeStr
+
1
)
*
sizeof
(
WCHAR
));
...
...
dlls/ole32/ifs.c
View file @
4bb61ec0
...
...
@@ -73,7 +73,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
static
CRITICAL_SECTION
IMalloc32_SpyCS
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
/* resize the old table */
static
int
SetSpyedBlockTableLength
(
DWORD
NewLength
)
static
BOOL
SetSpyedBlockTableLength
(
DWORD
NewLength
)
{
LPVOID
*
NewSpyedBlocks
;
...
...
@@ -88,14 +88,13 @@ static int SetSpyedBlockTableLength ( DWORD NewLength )
}
/* add a location to the table */
static
int
AddMemoryLocation
(
LPVOID
*
pMem
)
static
BOOL
AddMemoryLocation
(
LPVOID
*
pMem
)
{
LPVOID
*
Current
;
/* allocate the table if not already allocated */
if
(
!
Malloc32
.
SpyedBlockTableLength
)
{
if
(
!
SetSpyedBlockTableLength
(
0x1000
))
return
0
;
}
if
(
!
Malloc32
.
SpyedBlockTableLength
&&
!
SetSpyedBlockTableLength
(
0x1000
))
return
FALSE
;
/* find a free location */
Current
=
Malloc32
.
SpyedBlocks
;
...
...
@@ -104,7 +103,8 @@ static int AddMemoryLocation(LPVOID * pMem)
if
(
Current
>=
Malloc32
.
SpyedBlocks
+
Malloc32
.
SpyedBlockTableLength
)
{
/* no more space in table, grow it */
DWORD
old_length
=
Malloc32
.
SpyedBlockTableLength
;
if
(
!
SetSpyedBlockTableLength
(
Malloc32
.
SpyedBlockTableLength
+
0x1000
))
return
0
;
if
(
!
SetSpyedBlockTableLength
(
Malloc32
.
SpyedBlockTableLength
+
0x1000
))
return
FALSE
;
Current
=
Malloc32
.
SpyedBlocks
+
old_length
;
}
};
...
...
@@ -113,31 +113,31 @@ static int AddMemoryLocation(LPVOID * pMem)
*
Current
=
pMem
;
Malloc32
.
SpyedAllocationsLeft
++
;
/*TRACE("%lu\n",Malloc32.SpyedAllocationsLeft);*/
return
1
;
return
TRUE
;
}
static
int
RemoveMemoryLocation
(
LPCVOID
pMem
)
static
BOOL
RemoveMemoryLocation
(
LPCVOID
pMem
)
{
LPVOID
*
Current
;
/* allocate the table if not already allocated */
if
(
!
Malloc32
.
SpyedBlockTableLength
)
{
if
(
!
SetSpyedBlockTableLength
(
0x1000
))
return
0
;
}
if
(
!
Malloc32
.
SpyedBlockTableLength
&&
!
SetSpyedBlockTableLength
(
0x1000
))
return
FALSE
;
Current
=
Malloc32
.
SpyedBlocks
;
/* find the location */
while
(
*
Current
!=
pMem
)
{
Current
++
;
if
(
Current
>=
Malloc32
.
SpyedBlocks
+
Malloc32
.
SpyedBlockTableLength
)
return
0
;
/* not found */
if
(
Current
>=
Malloc32
.
SpyedBlocks
+
Malloc32
.
SpyedBlockTableLength
)
return
FALSE
;
/* not found */
}
/* location found */
Malloc32
.
SpyedAllocationsLeft
--
;
/*TRACE("%lu\n",Malloc32.SpyedAllocationsLeft);*/
*
Current
=
NULL
;
return
1
;
return
TRUE
;
}
/******************************************************************************
...
...
@@ -252,7 +252,7 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,DWORD cb) {
*/
static
VOID
WINAPI
IMalloc_fnFree
(
LPMALLOC
iface
,
LPVOID
pv
)
{
BOOL
fSpyed
=
0
;
BOOL
fSpyed
=
FALSE
;
TRACE
(
"(%p)
\n
"
,
pv
);
...
...
@@ -289,7 +289,7 @@ static VOID WINAPI IMalloc_fnFree(LPMALLOC iface,LPVOID pv) {
static
DWORD
WINAPI
IMalloc_fnGetSize
(
LPMALLOC
iface
,
LPVOID
pv
)
{
DWORD
cb
;
BOOL
fSpyed
=
0
;
BOOL
fSpyed
=
FALSE
;
TRACE
(
"(%p)
\n
"
,
pv
);
...
...
@@ -313,7 +313,7 @@ static DWORD WINAPI IMalloc_fnGetSize(LPMALLOC iface,LPVOID pv) {
*/
static
INT
WINAPI
IMalloc_fnDidAlloc
(
LPMALLOC
iface
,
LPVOID
pv
)
{
BOOL
fSpyed
=
0
;
BOOL
fSpyed
=
FALSE
;
int
didAlloc
;
TRACE
(
"(%p)
\n
"
,
pv
);
...
...
dlls/ole32/storage32.c
View file @
4bb61ec0
...
...
@@ -1423,7 +1423,7 @@ static HRESULT insertIntoTree(
* The root storage contains some element, therefore, start the research
* for the appropriate location.
*/
BOOL
found
=
0
;
BOOL
found
=
FALSE
;
DirRef
current
,
next
,
previous
,
currentEntryId
;
/*
...
...
@@ -1442,7 +1442,7 @@ static HRESULT insertIntoTree(
next
=
currentEntry
.
rightChild
;
current
=
currentEntryId
;
while
(
found
==
0
)
while
(
!
found
)
{
LONG
diff
=
entryNameCmp
(
newEntry
.
name
,
currentEntry
.
name
);
...
...
@@ -1461,7 +1461,7 @@ static HRESULT insertIntoTree(
StorageBaseImpl_WriteDirEntry
(
This
,
current
,
&
currentEntry
);
found
=
1
;
found
=
TRUE
;
}
}
else
if
(
diff
>
0
)
...
...
@@ -1479,7 +1479,7 @@ static HRESULT insertIntoTree(
StorageBaseImpl_WriteDirEntry
(
This
,
current
,
&
currentEntry
);
found
=
1
;
found
=
TRUE
;
}
}
else
...
...
@@ -2786,7 +2786,7 @@ static HRESULT StorageImpl_Construct(
else
This
->
base
.
lockingrole
=
SWMR_None
;
This
->
base
.
reverted
=
0
;
This
->
base
.
reverted
=
FALSE
;
/*
* Initialize the big block cache.
...
...
@@ -3016,7 +3016,7 @@ static void StorageImpl_Invalidate(StorageBaseImpl* iface)
StorageBaseImpl_DeleteAll
(
&
This
->
base
);
This
->
base
.
reverted
=
1
;
This
->
base
.
reverted
=
TRUE
;
}
static
void
StorageImpl_Destroy
(
StorageBaseImpl
*
iface
)
...
...
@@ -4850,7 +4850,7 @@ static void TransactedSnapshotImpl_Invalidate(StorageBaseImpl* This)
{
TRACE
(
"Storage invalidated (stg=%p)
\n
"
,
This
);
This
->
reverted
=
1
;
This
->
reverted
=
TRUE
;
StorageBaseImpl_DeleteAll
(
This
);
}
...
...
@@ -5255,7 +5255,7 @@ static void StorageInternalImpl_Invalidate( StorageBaseImpl *base )
{
TRACE
(
"Storage invalidated (stg=%p)
\n
"
,
This
);
This
->
base
.
reverted
=
1
;
This
->
base
.
reverted
=
TRUE
;
This
->
parentStorage
=
NULL
;
...
...
@@ -5740,7 +5740,7 @@ static StorageInternalImpl* StorageInternalImpl_Construct(
newStorage
->
base
.
baseVtbl
=
&
StorageInternalImpl_BaseVtbl
;
newStorage
->
base
.
openFlags
=
(
openFlags
&
~
STGM_CREATE
);
newStorage
->
base
.
reverted
=
0
;
newStorage
->
base
.
reverted
=
FALSE
;
newStorage
->
base
.
ref
=
1
;
...
...
@@ -5751,7 +5751,7 @@ static StorageInternalImpl* StorageInternalImpl_Construct(
*/
newStorage
->
base
.
storageDirEntry
=
storageDirEntry
;
newStorage
->
base
.
create
=
0
;
newStorage
->
base
.
create
=
FALSE
;
return
newStorage
;
}
...
...
dlls/ole32/storage32.h
View file @
4bb61ec0
...
...
@@ -200,7 +200,7 @@ struct StorageBaseImpl
/*
* TRUE if this object has been invalidated
*/
int
reverted
;
BOOL
reverted
;
/*
* Index of the directory entry of this storage
...
...
@@ -222,8 +222,8 @@ struct StorageBaseImpl
*/
DWORD
stateBits
;
BOOL
create
;
/* Was the storage created or opened.
The behaviour of STGM_SIMPLE depends on this */
BOOL
create
;
/* Was the storage created or opened.
The behaviour of STGM_SIMPLE depends on this */
/*
* If this storage was opened in transacted mode, the object that implements
* the transacted snapshot or cache.
...
...
dlls/ole32/stubmanager.c
View file @
4bb61ec0
...
...
@@ -331,7 +331,7 @@ struct stub_manager *get_stub_manager_from_object(APARTMENT *apt, void *object)
* threads have a reference to it */
void
apartment_disconnectobject
(
struct
apartment
*
apt
,
void
*
object
)
{
int
found
=
FALSE
;
BOOL
found
=
FALSE
;
struct
stub_manager
*
stubmgr
;
EnterCriticalSection
(
&
apt
->
cs
);
...
...
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