oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative.

This commit is contained in:
Gerald Pfeifer 2007-11-22 21:49:37 +01:00 committed by Alexandre Julliard
parent 1d62064748
commit 48d839822b
1 changed files with 3 additions and 3 deletions

View File

@ -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));