[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] [ANNOUNCE] First Leafnode-2.0 beta version
Joerg Dietrich wrote the following patch for helpfindxover():
--- xoverutil.c.orig Fri Oct 27 14:33:30 2000
+++ xoverutil.c Fri Oct 27 14:34:30 2000
@@ -209,9 +209,12 @@
new = (high-low)/2+low;
if ( article == xoverinfo[new].artno )
return new;
- if ( article < xoverinfo[new].artno )
- return helpfindxover( article, low, new-1 );
- else
+ if ( article < xoverinfo[new].artno ) {
+ if ( new > 0 )
+ return helpfindxover( article, low, new-1 );
+ else
+ return -1;
+ } else
return helpfindxover( article, new+1, high );
}
I don't think that this helps anything and I will now explain why.
The very first line of the helpfindxover() function says:
if ( low > high )
return -1;
Afterwards, neither "high" nor "low" are modified. "new" is therefore
calculated from "high" and "low" according to the first line of the
patch and will always be >= 0. xoverinfo[0] is a valid entry,
therefore it must be accessible.
Or am I missing something?
--Cornelius.
--
/* Cornelius Krasel, U Wuerzburg, Dept. of Pharmacology, Versbacher Str. 9 */
/* D-97078 Wuerzburg, Germany email: phak004@xxxxxxxxxxxxxxxxxxxxxx SP4 */
/* "Science is the game we play with God to find out what His rules are." */
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list