programs/winhelp/winhelp.c simplification

Gerald Pfeifer gerald at pfeifer.com
Sat May 3 03:23:24 CDT 2008


This is related to the following change:

  winhelp: Implement the first round of support for links in RichEdit.

link->window is of type unsigned, so checking for positiveness is a
nop.  Note that the error check (against -1) already happens above.

Gerald

ChangeLog:
Remove extraneous positiveness check for unsigned variable in 
WINHELP_HandleTextMouse().

Index: programs/winhelp/winhelp.c
===================================================================
RCS file: /home/wine/wine/programs/winhelp/winhelp.c,v
retrieving revision 1.100
diff -u -3 -p -r1.100 winhelp.c
--- programs/winhelp/winhelp.c	2 May 2008 12:08:04 -0000	1.100
+++ programs/winhelp/winhelp.c	3 May 2008 08:21:06 -0000
@@ -782,7 +782,7 @@ static BOOL WINHELP_HandleTextMouse(WINH
                 {
                     if (link->window == -1)
                         wi = win->info;
-                    else if ((link->window >= 0) && (link->window < hlpfile->numWindows))
+                    else if (link->window < hlpfile->numWindows)
                         wi = &hlpfile->windows[link->window];
                     else
                     {



More information about the wine-patches mailing list