dlls/oleaut32/typelib2.c -- simplify

Gerald Pfeifer gerald at pfeifer.com
Sat Nov 3 09:23:21 CDT 2007


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

Index: dlls/oleaut32/typelib2.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib2.c,v
retrieving revision 1.46
diff -u -3 -p -r1.46 typelib2.c
--- dlls/oleaut32/typelib2.c	27 Jul 2007 12:36:04 -0000	1.46
+++ dlls/oleaut32/typelib2.c	3 Nov 2007 14:21:13 -0000
@@ -3493,7 +3493,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTyp
 
     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_fnGetTyp
 
     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-patches mailing list