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: 1d6206474837f6bae97637551dbc4e68483ecca1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1d6206474837f6bae97637551dbc4e68483ecca1

Author: Gerald Pfeifer <gerald at 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;
     }
 




More information about the wine-cvs mailing list