From 48d839822b072438ad35fd20825fc018f3067d9f Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Thu, 22 Nov 2007 21:49:37 +0100 Subject: [PATCH] oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative. --- dlls/oleaut32/typelib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 62fe5575ff0..8e37de09192 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 && indexParamfuncdesc.cParams) + if(pFDesc && indexParamfuncdesc.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 && indexParamfuncdesc.cParams){ + if(pFDesc && indexParamfuncdesc.cParams){ pCustData->prgCustData = TLB_Alloc(pFDesc->pParamDesc[indexParam].ctCustData * sizeof(CUSTDATAITEM));