programs/winhelp/winhelp.c simplification
Gerald Pfeifer
gerald at pfeifer.com
Sat Dec 29 13:57:03 CST 2007
A further case where a range check can be simplified due to the
"natural range" of the variable in question. This time at least
error checking was handled correctly. ;-)
Gerald
ChangeLog:
Remove a dead condition.
Index: programs/winhelp/winhelp.c
===================================================================
RCS file: /home/wine/wine/programs/winhelp/winhelp.c,v
retrieving revision 1.61
diff -u -3 -p -r1.61 winhelp.c
--- programs/winhelp/winhelp.c 21 Dec 2007 13:30:02 -0000 1.61
+++ programs/winhelp/winhelp.c 29 Dec 2007 19:55:22 -0000
@@ -1219,7 +1219,7 @@ static LRESULT CALLBACK WINHELP_TextWndP
hlpfile = WINHELP_LookupHelpFile(part->link->lpszString);
if (part->link->window == -1)
wi = win->info;
- else if ((part->link->window >= 0) && (part->link->window < hlpfile->numWindows))
+ else if (part->link->window < hlpfile->numWindows)
wi = &hlpfile->windows[part->link->window];
else
{
More information about the wine-patches
mailing list