On Sep 11, 2007, at 12:09 PM, jean-frederic clere wrote:


 AP_DECLARE(lb_score *) ap_get_scoreboard_lb(int lb_num)
 {
-    if (((lb_num < 0) || (lb_limit < lb_num))) {
+    char *ptr;
+    if (((lb_num < 0) || (lb_limit < lb_num)) || worker_size==0) {
         return(NULL); /* Out of range */
     }
-    return &ap_scoreboard_image->balancers[lb_num];
+ ptr = (char *) ap_scoreboard_image->balancers + lb_num*worker_size;
+    return (lb_score *) ptr;

Ideally, of course, lb_score should just go away
and use void *... (and remove that (char *) stuff
as well).

Reply via email to