Module: wine Branch: master Commit: faaeeea9376b16a71f0bdf647aa6200ce2b173d5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=faaeeea9376b16a71f0bdf647a...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Thu Feb 21 22:30:15 2013 +0000
ole32: Avoid signed-unsigned integer comparisons.
---
dlls/ole32/compositemoniker.c | 12 ++++++------ dlls/ole32/storage32.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index a6cfd62..ed154f2 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -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; 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)