Commit faaeeea9 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

ole32: Avoid signed-unsigned integer comparisons.

parent eedf2f6f
...@@ -1638,10 +1638,10 @@ static const IEnumMonikerVtbl VT_EnumMonikerImpl = ...@@ -1638,10 +1638,10 @@ static const IEnumMonikerVtbl VT_EnumMonikerImpl =
******************************************************************************/ ******************************************************************************/
static HRESULT static HRESULT
EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize, EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize,
ULONG currentPos, BOOL leftToRigth, IEnumMoniker ** ppmk) ULONG currentPos, BOOL leftToRight, IEnumMoniker ** ppmk)
{ {
EnumMonikerImpl* newEnumMoniker; EnumMonikerImpl* newEnumMoniker;
int i; ULONG i;
if (currentPos > tabSize) if (currentPos > tabSize)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -1665,17 +1665,17 @@ EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize, ...@@ -1665,17 +1665,17 @@ EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize,
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
if (leftToRigth) if (leftToRight)
for (i=0;i<tabSize;i++){ for (i=0;i<tabSize;i++){
newEnumMoniker->tabMoniker[i]=tabMoniker[i]; newEnumMoniker->tabMoniker[i]=tabMoniker[i];
IMoniker_AddRef(tabMoniker[i]); IMoniker_AddRef(tabMoniker[i]);
} }
else else
for (i=tabSize-1;i>=0;i--){ for (i = tabSize; i > 0; i--){
newEnumMoniker->tabMoniker[tabSize-i-1]=tabMoniker[i]; newEnumMoniker->tabMoniker[tabSize-i]=tabMoniker[i - 1];
IMoniker_AddRef(tabMoniker[i]); IMoniker_AddRef(tabMoniker[i - 1]);
} }
*ppmk=&newEnumMoniker->IEnumMoniker_iface; *ppmk=&newEnumMoniker->IEnumMoniker_iface;
......
...@@ -1767,7 +1767,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo( ...@@ -1767,7 +1767,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
StorageBaseImpl *This = impl_from_IStorage(iface); StorageBaseImpl *This = impl_from_IStorage(iface);
BOOL skip_storage = FALSE, skip_stream = FALSE; BOOL skip_storage = FALSE, skip_stream = FALSE;
int i; DWORD i;
TRACE("(%p, %d, %p, %p, %p)\n", TRACE("(%p, %d, %p, %p, %p)\n",
iface, ciidExclude, rgiidExclude, iface, ciidExclude, rgiidExclude,
...@@ -2822,7 +2822,7 @@ static HRESULT StorageImpl_Construct( ...@@ -2822,7 +2822,7 @@ static HRESULT StorageImpl_Construct(
{ {
ULONG current_block = This->extBigBlockDepotStart; ULONG current_block = This->extBigBlockDepotStart;
ULONG cache_size = This->extBigBlockDepotCount * 2; ULONG cache_size = This->extBigBlockDepotCount * 2;
int i; ULONG i;
This->extBigBlockDepotLocations = HeapAlloc(GetProcessHeap(), 0, sizeof(ULONG) * cache_size); This->extBigBlockDepotLocations = HeapAlloc(GetProcessHeap(), 0, sizeof(ULONG) * cache_size);
if (!This->extBigBlockDepotLocations) if (!This->extBigBlockDepotLocations)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment