diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c index ed6269d3e97..5e7fe8fcccd 100644 --- a/dlls/ole32/bindctx.c +++ b/dlls/ole32/bindctx.c @@ -432,9 +432,8 @@ static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl* This, LPOLESTR pszkey, DWORD *index) { - DWORD i; - BYTE found=0; + BOOL 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; ( (ibindCtxTableLastIndex) && (!found));i++) if(This->bindCtxTable[i].pObj==punk) - found=1; + found = TRUE; if (index != NULL) *index=i-1; diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index 7a97100dcc7..8905c55aa27 100644 --- a/dlls/ole32/filemoniker.c +++ b/dlls/ole32/filemoniker.c @@ -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}; - BYTE addBkSlash; + BOOL 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;ifilePathName=HeapReAlloc(GetProcessHeap(),0,This->filePathName,(sizeStr+1)*sizeof(WCHAR)); diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index 35ed04b8406..696a7b832cc 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -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); diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index bd076ce5ba1..fa2d3c097c1 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -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, ¤tEntry); - found = 1; + found = TRUE; } } else if (diff > 0) @@ -1479,7 +1479,7 @@ static HRESULT insertIntoTree( StorageBaseImpl_WriteDirEntry(This, current, ¤tEntry); - 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; } diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 8cb330f2b60..ba46affa224 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -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. diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c index 57a33b030eb..973114ed08f 100644 --- a/dlls/ole32/stubmanager.c +++ b/dlls/ole32/stubmanager.c @@ -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);