ole32: Avoid signed-unsigned integer comparisons
Andrew Talbot
andrew.talbot at talbotville.com
Thu Feb 21 16:30:15 CST 2013
Changelog:
ole32: Avoid signed-unsigned integer comparisons.
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index a6cfd62..34e1eee 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -1641,7 +1641,7 @@ EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize,
ULONG currentPos, BOOL leftToRigth, IEnumMoniker ** ppmk)
{
EnumMonikerImpl* newEnumMoniker;
- int i;
+ ULONG i;
if (currentPos > tabSize)
return E_INVALIDARG;
@@ -1672,8 +1672,8 @@ EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker, ULONG tabSize,
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]);
}
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index f259d24..1d64ab0 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -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)
More information about the wine-patches
mailing list