ole32: Avoid signed-unsigned integer comparisons.

This commit is contained in:
Andrew Talbot 2013-02-21 22:30:15 +00:00 committed by Alexandre Julliard
parent eedf2f6fab
commit faaeeea937
2 changed files with 8 additions and 8 deletions

View File

@ -1638,10 +1638,10 @@ static const IEnumMonikerVtbl VT_EnumMonikerImpl =
******************************************************************************/
static HRESULT
EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize,
ULONG currentPos, BOOL leftToRigth, IEnumMoniker ** ppmk)
ULONG currentPos, BOOL leftToRight, IEnumMoniker ** ppmk)
{
EnumMonikerImpl* newEnumMoniker;
int i;
ULONG i;
if (currentPos > tabSize)
return E_INVALIDARG;
@ -1665,17 +1665,17 @@ EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize,
return E_OUTOFMEMORY;
}
if (leftToRigth)
if (leftToRight)
for (i=0;i<tabSize;i++){
newEnumMoniker->tabMoniker[i]=tabMoniker[i];
IMoniker_AddRef(tabMoniker[i]);
}
else
for (i=tabSize-1;i>=0;i--){
for (i = tabSize; i > 0; i--){
newEnumMoniker->tabMoniker[tabSize-i-1]=tabMoniker[i];
IMoniker_AddRef(tabMoniker[i]);
newEnumMoniker->tabMoniker[tabSize-i]=tabMoniker[i - 1];
IMoniker_AddRef(tabMoniker[i - 1]);
}
*ppmk=&newEnumMoniker->IEnumMoniker_iface;

View File

@ -1767,7 +1767,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
StorageBaseImpl *This = impl_from_IStorage(iface);
BOOL skip_storage = FALSE, skip_stream = FALSE;
int i;
DWORD i;
TRACE("(%p, %d, %p, %p, %p)\n",
iface, ciidExclude, rgiidExclude,
@ -2822,7 +2822,7 @@ static HRESULT StorageImpl_Construct(
{
ULONG current_block = This->extBigBlockDepotStart;
ULONG cache_size = This->extBigBlockDepotCount * 2;
int i;
ULONG i;
This->extBigBlockDepotLocations = HeapAlloc(GetProcessHeap(), 0, sizeof(ULONG) * cache_size);
if (!This->extBigBlockDepotLocations)