Gerald Pfeifer : oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative .
Module: wine Branch: master Commit: 1d6206474837f6bae97637551dbc4e68483ecca1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d6206474837f6bae97637551d... Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Thu Nov 22 01:06:32 2007 +0100 oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative. --- dlls/oleaut32/typelib2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 41ee8e6..7464b0c 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -3493,7 +3493,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfo( TRACE("(%p,%d,%p)\n", iface, index, ppTInfo); - if ((index < 0) || (index >= This->typelib_header.nrtypeinfos)) { + if (index >= This->typelib_header.nrtypeinfos) { return TYPE_E_ELEMENTNOTFOUND; } @@ -3514,7 +3514,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType( TRACE("(%p,%d,%p)\n", iface, index, pTKind); - if ((index < 0) || (index >= This->typelib_header.nrtypeinfos)) { + if (index >= This->typelib_header.nrtypeinfos) { return TYPE_E_ELEMENTNOTFOUND; }
participants (1)
-
Alexandre Julliard