Gerald Pfeifer : oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative .
Alexandre Julliard
julliard at winehq.org
Mon Nov 26 08:16:23 CST 2007
Module: wine
Branch: master
Commit: 48d839822b072438ad35fd20825fc018f3067d9f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=48d839822b072438ad35fd20825fc018f3067d9f
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Thu Nov 22 21:49:37 2007 +0100
oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative.
---
dlls/oleaut32/typelib.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 62fe557..8e37de0 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3758,7 +3758,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType(
int i;
ITypeInfoImpl *pTInfo = This->pTypeInfo;
- if ((ITypeLib2_fnGetTypeInfoCount(iface) < index + 1) || (index < 0))
+ if (ITypeLib2_fnGetTypeInfoCount(iface) < index + 1)
return TYPE_E_ELEMENTNOTFOUND;
TRACE("(%p) index %d\n", This, index);
@@ -6647,7 +6647,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData(
for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,pFDesc=pFDesc->next);
- if(pFDesc && indexParam >=0 && indexParam<pFDesc->funcdesc.cParams)
+ if(pFDesc && indexParam<pFDesc->funcdesc.cParams)
for(pCData=pFDesc->pParamDesc[indexParam].pCustData; pCData;
pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break;
@@ -6880,7 +6880,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllParamCustData( ITypeInfo2 * iface,
for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,
pFDesc=pFDesc->next)
;
- if(pFDesc && indexParam >=0 && indexParam<pFDesc->funcdesc.cParams){
+ if(pFDesc && indexParam<pFDesc->funcdesc.cParams){
pCustData->prgCustData =
TLB_Alloc(pFDesc->pParamDesc[indexParam].ctCustData *
sizeof(CUSTDATAITEM));
More information about the wine-cvs
mailing list