httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@apache.org>
Subject Re: svn commit: r771940 - in /httpd/httpd/trunk/modules/proxy: ./ balancers/ examples/
Date Tue, 05 May 2009 19:23:54 GMT

On May 5, 2009, at 3:08 PM, Ruediger Pluem wrote:

>> @@ -1471,13 +1471,13 @@
>>
>> PROXY_DECLARE(void)
>> ap_proxy_add_worker_to_balancer(apr_pool_t *pool, proxy_balancer  
>> *balancer,
>> -                                proxy_worker *worker)
>> +                                proxy_worker **worker)
>
> IMHO providing *worker as the old code does is sufficient.
>

Plus, it cleans things up and keeps the PROXY_DECLARE such that
we don't need to worry about an API bump

>> {
>> -    proxy_worker *runtime;
>> +    proxy_worker **runtime;
>>
>>     runtime = apr_array_push(balancer->workers);
>> -    memcpy(runtime, worker, sizeof(proxy_worker));
>> -    runtime->id = proxy_lb_workers;
>> +    memcpy(runtime, worker, sizeof(proxy_worker *));
>
> Do we really need memcpy here? Shouldn't
>
> *runtime = *worker
>
> be sufficient or in the case that we go back to the old
> function prototype shouldn't
>
> *runtime = worker
>
> be enough?
>

+1

I'm guessing jfc simply kept the code the same with no optimizations :)

Mime
View raw message