dlls/comctl32/imagelist.c -- simplify (RESEND)

Gerald Pfeifer gerald at pfeifer.com
Wed Nov 14 15:14:20 CST 2007


The reason I've been focusing on changes like this is that this way
we found (and fixed) real bugs.  Removing such extra warnings, and
simplifying the code, will help us to find and address the remaining
bugs.

Gerald

---------- Forwarded message ----------
From: Gerald Pfeifer <gerald at pfeifer.com>
To:  <wine-patches at winehq.org>
Date: Sat, 3 Nov 2007 15:12:32 +0100 (CET)
Subject: dlls/comctl32/imagelist.c -- simplify

Checking an unsigned value for < 0 is always false.

ChangeLog:
Remove check which never triggers.

Index: dlls/comctl32/imagelist.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v
retrieving revision 1.140
diff -u -3 -p -r1.140 imagelist.c
--- dlls/comctl32/imagelist.c	1 Jun 2007 11:46:35 -0000	1.140
+++ dlls/comctl32/imagelist.c	3 Nov 2007 14:11:24 -0000
@@ -2570,8 +2570,6 @@ ImageList_SetImageCount (HIMAGELIST himl
 
     if (!is_valid(himl))
 	return FALSE;
-    if (iImageCount < 0)
-        return FALSE;
     if (himl->cMaxImage > iImageCount)
     {
         himl->cCurImage = iImageCount;



More information about the wine-patches mailing list